Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
soar
提交
82efd3c2
S
soar
项目概览
Xiaomi
/
soar
大约 2 年 前同步成功
通知
467
Star
8513
Fork
1329
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
soar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
82efd3c2
编写于
5月 24, 2019
作者:
martianzhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add vendor
上级
7c5d8b1e
变更
47
显示空白变更内容
内联
并排
Showing
47 changed file
with
12343 addition
and
9853 deletion
+12343
-9853
vendor/github.com/pingcap/errors/juju_adaptor.go
vendor/github.com/pingcap/errors/juju_adaptor.go
+45
-0
vendor/github.com/pingcap/parser/README.md
vendor/github.com/pingcap/parser/README.md
+1
-0
vendor/github.com/pingcap/parser/ast/ddl.go
vendor/github.com/pingcap/parser/ast/ddl.go
+80
-14
vendor/github.com/pingcap/parser/ast/dml.go
vendor/github.com/pingcap/parser/ast/dml.go
+205
-14
vendor/github.com/pingcap/parser/ast/expressions.go
vendor/github.com/pingcap/parser/ast/expressions.go
+9
-2
vendor/github.com/pingcap/parser/ast/functions.go
vendor/github.com/pingcap/parser/ast/functions.go
+2
-2
vendor/github.com/pingcap/parser/ast/misc.go
vendor/github.com/pingcap/parser/ast/misc.go
+207
-4
vendor/github.com/pingcap/parser/ast/stats.go
vendor/github.com/pingcap/parser/ast/stats.go
+7
-2
vendor/github.com/pingcap/parser/charset/charset.go
vendor/github.com/pingcap/parser/charset/charset.go
+72
-26
vendor/github.com/pingcap/parser/circle.yml
vendor/github.com/pingcap/parser/circle.yml
+3
-0
vendor/github.com/pingcap/parser/digester.go
vendor/github.com/pingcap/parser/digester.go
+3
-0
vendor/github.com/pingcap/parser/format/format.go
vendor/github.com/pingcap/parser/format/format.go
+7
-0
vendor/github.com/pingcap/parser/go.mod1
vendor/github.com/pingcap/parser/go.mod1
+1
-1
vendor/github.com/pingcap/parser/go.sum1
vendor/github.com/pingcap/parser/go.sum1
+70
-0
vendor/github.com/pingcap/parser/misc.go
vendor/github.com/pingcap/parser/misc.go
+19
-0
vendor/github.com/pingcap/parser/model/ddl.go
vendor/github.com/pingcap/parser/model/ddl.go
+53
-51
vendor/github.com/pingcap/parser/model/model.go
vendor/github.com/pingcap/parser/model/model.go
+13
-3
vendor/github.com/pingcap/parser/mysql/charset.go
vendor/github.com/pingcap/parser/mysql/charset.go
+27
-25
vendor/github.com/pingcap/parser/mysql/errcode.go
vendor/github.com/pingcap/parser/mysql/errcode.go
+6
-3
vendor/github.com/pingcap/parser/mysql/errname.go
vendor/github.com/pingcap/parser/mysql/errname.go
+8
-7
vendor/github.com/pingcap/parser/parser.go
vendor/github.com/pingcap/parser/parser.go
+7311
-6667
vendor/github.com/pingcap/parser/parser.y
vendor/github.com/pingcap/parser/parser.y
+568
-114
vendor/github.com/pingcap/parser/terror/terror.go
vendor/github.com/pingcap/parser/terror/terror.go
+9
-1
vendor/github.com/pingcap/parser/test.sh
vendor/github.com/pingcap/parser/test.sh
+1
-1
vendor/github.com/pingcap/parser/types/field_type.go
vendor/github.com/pingcap/parser/types/field_type.go
+27
-18
vendor/github.com/pingcap/parser/yy_parser.go
vendor/github.com/pingcap/parser/yy_parser.go
+13
-0
vendor/github.com/pingcap/tidb/sessionctx/stmtctx/stmtctx.go
vendor/github.com/pingcap/tidb/sessionctx/stmtctx/stmtctx.go
+79
-16
vendor/github.com/pingcap/tidb/types/convert.go
vendor/github.com/pingcap/tidb/types/convert.go
+93
-0
vendor/github.com/pingcap/tidb/types/datum.go
vendor/github.com/pingcap/tidb/types/datum.go
+5
-9
vendor/github.com/pingcap/tidb/types/errors.go
vendor/github.com/pingcap/tidb/types/errors.go
+51
-34
vendor/github.com/pingcap/tidb/types/json/binary_functions.go
...or/github.com/pingcap/tidb/types/json/binary_functions.go
+206
-0
vendor/github.com/pingcap/tidb/types/json/path_expr.go
vendor/github.com/pingcap/tidb/types/json/path_expr.go
+48
-0
vendor/github.com/pingcap/tidb/types/time.go
vendor/github.com/pingcap/tidb/types/time.go
+223
-59
vendor/github.com/pingcap/tidb/util/logutil/log.go
vendor/github.com/pingcap/tidb/util/logutil/log.go
+4
-1
vendor/github.com/pingcap/tidb/util/math/math.go
vendor/github.com/pingcap/tidb/util/math/math.go
+3
-3
vendor/github.com/pingcap/tidb/util/memory/tracker.go
vendor/github.com/pingcap/tidb/util/memory/tracker.go
+24
-5
vendor/vendor.json
vendor/vendor.json
+79
-79
vendor/vitess.io/vitess/go/sqltypes/bind_variables.go
vendor/vitess.io/vitess/go/sqltypes/bind_variables.go
+10
-0
vendor/vitess.io/vitess/go/sqltypes/value.go
vendor/vitess.io/vitess/go/sqltypes/value.go
+5
-0
vendor/vitess.io/vitess/go/vt/proto/vtgate/vtgate.pb.go
vendor/vitess.io/vitess/go/vt/proto/vtgate/vtgate.pb.go
+238
-179
vendor/vitess.io/vitess/go/vt/sqlparser/ast.go
vendor/vitess.io/vitess/go/vt/sqlparser/ast.go
+3
-3
vendor/vitess.io/vitess/go/vt/sqlparser/normalizer.go
vendor/vitess.io/vitess/go/vt/sqlparser/normalizer.go
+3
-0
vendor/vitess.io/vitess/go/vt/sqlparser/parsed_query.go
vendor/vitess.io/vitess/go/vt/sqlparser/parsed_query.go
+12
-4
vendor/vitess.io/vitess/go/vt/sqlparser/sql.go
vendor/vitess.io/vitess/go/vt/sqlparser/sql.go
+2460
-2470
vendor/vitess.io/vitess/go/vt/sqlparser/sql.y
vendor/vitess.io/vitess/go/vt/sqlparser/sql.y
+14
-33
vendor/vitess.io/vitess/go/vt/sqlparser/token.go
vendor/vitess.io/vitess/go/vt/sqlparser/token.go
+1
-1
vendor/vitess.io/vitess/go/vt/vterrors/vterrors.go
vendor/vitess.io/vitess/go/vt/vterrors/vterrors.go
+15
-2
未找到文件。
vendor/github.com/pingcap/errors/juju_adaptor.go
浏览文件 @
82efd3c2
...
@@ -9,6 +9,9 @@ import (
...
@@ -9,6 +9,9 @@ import (
// Trace just calls AddStack.
// Trace just calls AddStack.
func
Trace
(
err
error
)
error
{
func
Trace
(
err
error
)
error
{
if
err
==
nil
{
return
nil
}
return
AddStack
(
err
)
return
AddStack
(
err
)
}
}
...
@@ -52,6 +55,48 @@ func Annotatef(err error, format string, args ...interface{}) error {
...
@@ -52,6 +55,48 @@ func Annotatef(err error, format string, args ...interface{}) error {
}
}
}
}
var
emptyStack
stack
// NewNoStackError creates error without error stack
// later duplicate trace will no longer generate Stack too.
func
NewNoStackError
(
msg
string
)
error
{
return
&
fundamental
{
msg
:
msg
,
stack
:
&
emptyStack
,
}
}
// SuspendStack suspends stack generate for error.
func
SuspendStack
(
err
error
)
error
{
if
err
==
nil
{
return
err
}
cleared
:=
clearStack
(
err
)
if
cleared
{
return
err
}
return
&
withStack
{
err
,
&
emptyStack
,
}
}
func
clearStack
(
err
error
)
(
cleared
bool
)
{
switch
typedErr
:=
err
.
(
type
)
{
case
*
withMessage
:
return
clearStack
(
typedErr
.
Cause
())
case
*
fundamental
:
typedErr
.
stack
=
&
emptyStack
return
true
case
*
withStack
:
typedErr
.
stack
=
&
emptyStack
clearStack
(
typedErr
.
Cause
())
return
true
default
:
return
false
}
}
// ErrorStack will format a stack trace if it is available, otherwise it will be Error()
// ErrorStack will format a stack trace if it is available, otherwise it will be Error()
// If the error is nil, the empty string is returned
// If the error is nil, the empty string is returned
// Note that this just calls fmt.Sprintf("%+v", err)
// Note that this just calls fmt.Sprintf("%+v", err)
...
...
vendor/github.com/pingcap/parser/README.md
浏览文件 @
82efd3c2
# Parser
# Parser
[

](https://goreportcard.com/report/github.com/pingcap/parser)
[

](https://circleci.com/gh/pingcap/parser)
[

](https://godoc.org/github.com/pingcap/parser)
[

](https://goreportcard.com/report/github.com/pingcap/parser)
[

](https://circleci.com/gh/pingcap/parser)
[

](https://godoc.org/github.com/pingcap/parser)
[

](https://codecov.io/gh/pingcap/parser)
TiDB SQL Parser
TiDB SQL Parser
...
...
vendor/github.com/pingcap/parser/ast/ddl.go
浏览文件 @
82efd3c2
...
@@ -98,11 +98,11 @@ func (n *CreateDatabaseStmt) Restore(ctx *RestoreCtx) error {
...
@@ -98,11 +98,11 @@ func (n *CreateDatabaseStmt) Restore(ctx *RestoreCtx) error {
ctx
.
WriteKeyWord
(
"IF NOT EXISTS "
)
ctx
.
WriteKeyWord
(
"IF NOT EXISTS "
)
}
}
ctx
.
WriteName
(
n
.
Name
)
ctx
.
WriteName
(
n
.
Name
)
for
_
,
option
:=
range
n
.
Options
{
for
i
,
option
:=
range
n
.
Options
{
ctx
.
WritePlain
(
" "
)
ctx
.
WritePlain
(
" "
)
err
:=
option
.
Restore
(
ctx
)
err
:=
option
.
Restore
(
ctx
)
if
err
!=
nil
{
if
err
!=
nil
{
return
errors
.
Trace
(
err
)
return
errors
.
Annotatef
(
err
,
"An error occurred while splicing CreateDatabaseStmt DatabaseOption: [%v]"
,
i
)
}
}
}
}
return
nil
return
nil
...
@@ -118,6 +118,43 @@ func (n *CreateDatabaseStmt) Accept(v Visitor) (Node, bool) {
...
@@ -118,6 +118,43 @@ func (n *CreateDatabaseStmt) Accept(v Visitor) (Node, bool) {
return
v
.
Leave
(
n
)
return
v
.
Leave
(
n
)
}
}
// AlterDatabaseStmt is a statement to change the structure of a database.
// See https://dev.mysql.com/doc/refman/5.7/en/alter-database.html
type
AlterDatabaseStmt
struct
{
ddlNode
Name
string
AlterDefaultDatabase
bool
Options
[]
*
DatabaseOption
}
// Restore implements Node interface.
func
(
n
*
AlterDatabaseStmt
)
Restore
(
ctx
*
RestoreCtx
)
error
{
ctx
.
WriteKeyWord
(
"ALTER DATABASE"
)
if
!
n
.
AlterDefaultDatabase
{
ctx
.
WritePlain
(
" "
)
ctx
.
WriteName
(
n
.
Name
)
}
for
i
,
option
:=
range
n
.
Options
{
ctx
.
WritePlain
(
" "
)
err
:=
option
.
Restore
(
ctx
)
if
err
!=
nil
{
return
errors
.
Annotatef
(
err
,
"An error occurred while splicing AlterDatabaseStmt DatabaseOption: [%v]"
,
i
)
}
}
return
nil
}
// Accept implements Node Accept interface.
func
(
n
*
AlterDatabaseStmt
)
Accept
(
v
Visitor
)
(
Node
,
bool
)
{
newNode
,
skipChildren
:=
v
.
Enter
(
n
)
if
skipChildren
{
return
v
.
Leave
(
newNode
)
}
n
=
newNode
.
(
*
AlterDatabaseStmt
)
return
v
.
Leave
(
n
)
}
// DropDatabaseStmt is a statement to drop a database and all tables in the database.
// DropDatabaseStmt is a statement to drop a database and all tables in the database.
// See https://dev.mysql.com/doc/refman/5.7/en/drop-database.html
// See https://dev.mysql.com/doc/refman/5.7/en/drop-database.html
type
DropDatabaseStmt
struct
{
type
DropDatabaseStmt
struct
{
...
@@ -354,6 +391,14 @@ const (
...
@@ -354,6 +391,14 @@ const (
ColumnOptionCollate
ColumnOptionCollate
)
)
var
(
invalidOptionForGeneratedColumn
=
map
[
ColumnOptionType
]
struct
{}{
ColumnOptionAutoIncrement
:
{},
ColumnOptionOnUpdate
:
{},
ColumnOptionDefaultValue
:
{},
}
)
// ColumnOption is used for parsing column constraint info from SQL.
// ColumnOption is used for parsing column constraint info from SQL.
type
ColumnOption
struct
{
type
ColumnOption
struct
{
node
node
...
@@ -672,6 +717,23 @@ func (n *ColumnDef) Accept(v Visitor) (Node, bool) {
...
@@ -672,6 +717,23 @@ func (n *ColumnDef) Accept(v Visitor) (Node, bool) {
return
v
.
Leave
(
n
)
return
v
.
Leave
(
n
)
}
}
// Validate checks if a column definition is legal.
// For example, generated column definitions that contain such
// column options as `ON UPDATE`, `AUTO_INCREMENT`, `DEFAULT`
// are illegal.
func
(
n
*
ColumnDef
)
Validate
()
bool
{
generatedCol
:=
false
illegalOpt4gc
:=
false
for
_
,
opt
:=
range
n
.
Options
{
if
opt
.
Tp
==
ColumnOptionGenerated
{
generatedCol
=
true
}
_
,
found
:=
invalidOptionForGeneratedColumn
[
opt
.
Tp
]
illegalOpt4gc
=
illegalOpt4gc
||
found
}
return
!
(
generatedCol
&&
illegalOpt4gc
)
}
// CreateTableStmt is a statement to create a table.
// CreateTableStmt is a statement to create a table.
// See https://dev.mysql.com/doc/refman/5.7/en/create-table.html
// See https://dev.mysql.com/doc/refman/5.7/en/create-table.html
type
CreateTableStmt
struct
{
type
CreateTableStmt
struct
{
...
@@ -684,7 +746,7 @@ type CreateTableStmt struct {
...
@@ -684,7 +746,7 @@ type CreateTableStmt struct {
Constraints
[]
*
Constraint
Constraints
[]
*
Constraint
Options
[]
*
TableOption
Options
[]
*
TableOption
Partition
*
PartitionOptions
Partition
*
PartitionOptions
OnDuplicate
OnDuplicate
CreateTableSelect
Type
OnDuplicate
OnDuplicate
KeyHandling
Type
Select
ResultSetNode
Select
ResultSetNode
}
}
...
@@ -744,11 +806,11 @@ func (n *CreateTableStmt) Restore(ctx *RestoreCtx) error {
...
@@ -744,11 +806,11 @@ func (n *CreateTableStmt) Restore(ctx *RestoreCtx) error {
if
n
.
Select
!=
nil
{
if
n
.
Select
!=
nil
{
switch
n
.
OnDuplicate
{
switch
n
.
OnDuplicate
{
case
OnDuplicate
CreateTableSelect
Error
:
case
OnDuplicate
KeyHandling
Error
:
ctx
.
WriteKeyWord
(
" AS "
)
ctx
.
WriteKeyWord
(
" AS "
)
case
OnDuplicate
CreateTableSelect
Ignore
:
case
OnDuplicate
KeyHandling
Ignore
:
ctx
.
WriteKeyWord
(
" IGNORE AS "
)
ctx
.
WriteKeyWord
(
" IGNORE AS "
)
case
OnDuplicate
CreateTableSelect
Replace
:
case
OnDuplicate
KeyHandling
Replace
:
ctx
.
WriteKeyWord
(
" REPLACE AS "
)
ctx
.
WriteKeyWord
(
" REPLACE AS "
)
}
}
...
@@ -1180,6 +1242,7 @@ const (
...
@@ -1180,6 +1242,7 @@ const (
TableOptionRowFormat
TableOptionRowFormat
TableOptionStatsPersistent
TableOptionStatsPersistent
TableOptionShardRowID
TableOptionShardRowID
TableOptionPreSplitRegion
TableOptionPackKeys
TableOptionPackKeys
)
)
...
@@ -1201,15 +1264,16 @@ const (
...
@@ -1201,15 +1264,16 @@ const (
TokuDBRowFormatUncompressed
TokuDBRowFormatUncompressed
)
)
// OnDuplicate
CreateTableSelectType is the option that handle unique key values in 'CREATE TABLE ... SELECT'
.
// OnDuplicate
KeyHandlingType is the option that handle unique key values in 'CREATE TABLE ... SELECT' or `LOAD DATA`
.
// See https://dev.mysql.com/doc/refman/5.7/en/create-table-select.html
// See https://dev.mysql.com/doc/refman/5.7/en/create-table-select.html
type
OnDuplicateCreateTableSelectType
int
// See https://dev.mysql.com/doc/refman/5.7/en/load-data.html
type
OnDuplicateKeyHandlingType
int
// OnDuplicate
CreateTableSelect
types
// OnDuplicate
KeyHandling
types
const
(
const
(
OnDuplicate
CreateTableSelectError
OnDuplicateCreateTableSelect
Type
=
iota
OnDuplicate
KeyHandlingError
OnDuplicateKeyHandling
Type
=
iota
OnDuplicate
CreateTableSelect
Ignore
OnDuplicate
KeyHandling
Ignore
OnDuplicate
CreateTableSelect
Replace
OnDuplicate
KeyHandling
Replace
)
)
// TableOption is used for parsing table option from SQL.
// TableOption is used for parsing table option from SQL.
...
@@ -1324,8 +1388,10 @@ func (n *TableOption) Restore(ctx *RestoreCtx) error {
...
@@ -1324,8 +1388,10 @@ func (n *TableOption) Restore(ctx *RestoreCtx) error {
ctx
.
WritePlain
(
" /* TableOptionStatsPersistent is not supported */ "
)
ctx
.
WritePlain
(
" /* TableOptionStatsPersistent is not supported */ "
)
case
TableOptionShardRowID
:
case
TableOptionShardRowID
:
ctx
.
WriteKeyWord
(
"SHARD_ROW_ID_BITS "
)
ctx
.
WriteKeyWord
(
"SHARD_ROW_ID_BITS "
)
ctx
.
WritePlain
(
"= "
)
ctx
.
WritePlainf
(
"= %d"
,
n
.
UintValue
)
ctx
.
WritePlainf
(
"%d"
,
n
.
UintValue
)
case
TableOptionPreSplitRegion
:
ctx
.
WriteKeyWord
(
"PRE_SPLIT_REGIONS "
)
ctx
.
WritePlainf
(
"= %d"
,
n
.
UintValue
)
case
TableOptionPackKeys
:
case
TableOptionPackKeys
:
// TODO: not support
// TODO: not support
ctx
.
WriteKeyWord
(
"PACK_KEYS "
)
ctx
.
WriteKeyWord
(
"PACK_KEYS "
)
...
...
vendor/github.com/pingcap/parser/ast/dml.go
浏览文件 @
82efd3c2
...
@@ -31,6 +31,7 @@ var (
...
@@ -31,6 +31,7 @@ var (
_
DMLNode
=
&
SelectStmt
{}
_
DMLNode
=
&
SelectStmt
{}
_
DMLNode
=
&
ShowStmt
{}
_
DMLNode
=
&
ShowStmt
{}
_
DMLNode
=
&
LoadDataStmt
{}
_
DMLNode
=
&
LoadDataStmt
{}
_
DMLNode
=
&
SplitIndexRegionStmt
{}
_
Node
=
&
Assignment
{}
_
Node
=
&
Assignment
{}
_
Node
=
&
ByItem
{}
_
Node
=
&
ByItem
{}
...
@@ -1113,6 +1114,11 @@ func (n *Assignment) Accept(v Visitor) (Node, bool) {
...
@@ -1113,6 +1114,11 @@ func (n *Assignment) Accept(v Visitor) (Node, bool) {
return
v
.
Leave
(
n
)
return
v
.
Leave
(
n
)
}
}
type
ColumnNameOrUserVar
struct
{
ColumnName
*
ColumnName
UserVar
*
VariableExpr
}
// LoadDataStmt is a statement to load data from a specified file, then insert this rows into an existing table.
// LoadDataStmt is a statement to load data from a specified file, then insert this rows into an existing table.
// See https://dev.mysql.com/doc/refman/5.7/en/load-data.html
// See https://dev.mysql.com/doc/refman/5.7/en/load-data.html
type
LoadDataStmt
struct
{
type
LoadDataStmt
struct
{
...
@@ -1120,11 +1126,15 @@ type LoadDataStmt struct {
...
@@ -1120,11 +1126,15 @@ type LoadDataStmt struct {
IsLocal
bool
IsLocal
bool
Path
string
Path
string
OnDuplicate
OnDuplicateKeyHandlingType
Table
*
TableName
Table
*
TableName
Columns
[]
*
ColumnName
Columns
[]
*
ColumnName
FieldsInfo
*
FieldsClause
FieldsInfo
*
FieldsClause
LinesInfo
*
LinesClause
LinesInfo
*
LinesClause
IgnoreLines
uint64
IgnoreLines
uint64
ColumnAssignments
[]
*
Assignment
ColumnsAndUserVars
[]
*
ColumnNameOrUserVar
}
}
// Restore implements Node interface.
// Restore implements Node interface.
...
@@ -1135,6 +1145,11 @@ func (n *LoadDataStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1135,6 +1145,11 @@ func (n *LoadDataStmt) Restore(ctx *RestoreCtx) error {
}
}
ctx
.
WriteKeyWord
(
"INFILE "
)
ctx
.
WriteKeyWord
(
"INFILE "
)
ctx
.
WriteString
(
n
.
Path
)
ctx
.
WriteString
(
n
.
Path
)
if
n
.
OnDuplicate
==
OnDuplicateKeyHandlingReplace
{
ctx
.
WriteKeyWord
(
" REPLACE"
)
}
else
if
n
.
OnDuplicate
==
OnDuplicateKeyHandlingIgnore
{
ctx
.
WriteKeyWord
(
" IGNORE"
)
}
ctx
.
WriteKeyWord
(
" INTO TABLE "
)
ctx
.
WriteKeyWord
(
" INTO TABLE "
)
if
err
:=
n
.
Table
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
Table
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore LoadDataStmt.Table"
)
return
errors
.
Annotate
(
err
,
"An error occurred while restore LoadDataStmt.Table"
)
...
@@ -1146,18 +1161,39 @@ func (n *LoadDataStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1146,18 +1161,39 @@ func (n *LoadDataStmt) Restore(ctx *RestoreCtx) error {
ctx
.
WritePlainf
(
"%d"
,
n
.
IgnoreLines
)
ctx
.
WritePlainf
(
"%d"
,
n
.
IgnoreLines
)
ctx
.
WriteKeyWord
(
" LINES"
)
ctx
.
WriteKeyWord
(
" LINES"
)
}
}
if
len
(
n
.
Columns
)
!=
0
{
if
len
(
n
.
Columns
AndUserVars
)
!=
0
{
ctx
.
WritePlain
(
" ("
)
ctx
.
WritePlain
(
" ("
)
for
i
,
c
olumn
:=
range
n
.
Column
s
{
for
i
,
c
:=
range
n
.
ColumnsAndUserVar
s
{
if
i
!=
0
{
if
i
!=
0
{
ctx
.
WritePlain
(
","
)
ctx
.
WritePlain
(
","
)
}
}
if
err
:=
column
.
Restore
(
ctx
);
err
!=
nil
{
if
c
.
ColumnName
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore LoadDataStmt.Columns"
)
if
err
:=
c
.
ColumnName
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore LoadDataStmt.ColumnsAndUserVars"
)
}
}
if
c
.
UserVar
!=
nil
{
if
err
:=
c
.
UserVar
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore LoadDataStmt.ColumnsAndUserVars"
)
}
}
}
}
}
ctx
.
WritePlain
(
")"
)
ctx
.
WritePlain
(
")"
)
}
}
if
n
.
ColumnAssignments
!=
nil
{
ctx
.
WriteKeyWord
(
" SET"
)
for
i
,
assign
:=
range
n
.
ColumnAssignments
{
if
i
!=
0
{
ctx
.
WritePlain
(
","
)
}
ctx
.
WritePlain
(
" "
)
if
err
:=
assign
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore LoadDataStmt.ColumnAssignments"
)
}
}
}
return
nil
return
nil
}
}
...
@@ -1182,9 +1218,28 @@ func (n *LoadDataStmt) Accept(v Visitor) (Node, bool) {
...
@@ -1182,9 +1218,28 @@ func (n *LoadDataStmt) Accept(v Visitor) (Node, bool) {
}
}
n
.
Columns
[
i
]
=
node
.
(
*
ColumnName
)
n
.
Columns
[
i
]
=
node
.
(
*
ColumnName
)
}
}
for
i
,
assignment
:=
range
n
.
ColumnAssignments
{
node
,
ok
:=
assignment
.
Accept
(
v
)
if
!
ok
{
return
n
,
false
}
n
.
ColumnAssignments
[
i
]
=
node
.
(
*
Assignment
)
}
return
v
.
Leave
(
n
)
return
v
.
Leave
(
n
)
}
}
const
(
Terminated
=
iota
Enclosed
Escaped
)
type
FieldItem
struct
{
Type
int
Value
string
}
// FieldsClause represents fields references clause in load data statement.
// FieldsClause represents fields references clause in load data statement.
type
FieldsClause
struct
{
type
FieldsClause
struct
{
Terminated
string
Terminated
string
...
@@ -1750,6 +1805,7 @@ const (
...
@@ -1750,6 +1805,7 @@ const (
ShowStatsBuckets
ShowStatsBuckets
ShowStatsHealthy
ShowStatsHealthy
ShowPlugins
ShowPlugins
ShowProfile
ShowProfiles
ShowProfiles
ShowMasterStatus
ShowMasterStatus
ShowPrivileges
ShowPrivileges
...
@@ -1757,6 +1813,21 @@ const (
...
@@ -1757,6 +1813,21 @@ const (
ShowBindings
ShowBindings
ShowPumpStatus
ShowPumpStatus
ShowDrainerStatus
ShowDrainerStatus
ShowOpenTables
ShowAnalyzeStatus
)
const
(
ProfileTypeInvalid
=
iota
ProfileTypeCPU
ProfileTypeMemory
ProfileTypeBlockIo
ProfileTypeContextSwitch
ProfileTypePageFaults
ProfileTypeIpc
ProfileTypeSwaps
ProfileTypeSource
ProfileTypeAll
)
)
// ShowStmt is a statement to provide information about databases, tables, columns and so on.
// ShowStmt is a statement to provide information about databases, tables, columns and so on.
...
@@ -1772,12 +1843,17 @@ type ShowStmt struct {
...
@@ -1772,12 +1843,17 @@ type ShowStmt struct {
Flag
int
// Some flag parsed from sql, such as FULL.
Flag
int
// Some flag parsed from sql, such as FULL.
Full
bool
Full
bool
User
*
auth
.
UserIdentity
// Used for show grants/create user.
User
*
auth
.
UserIdentity
// Used for show grants/create user.
Roles
[]
*
auth
.
RoleIdentity
// Used for show grants .. using
IfNotExists
bool
// Used for `show create database if not exists`
IfNotExists
bool
// Used for `show create database if not exists`
// GlobalScope is used by `show variables` and `show bindings`
// GlobalScope is used by `show variables` and `show bindings`
GlobalScope
bool
GlobalScope
bool
Pattern
*
PatternLikeExpr
Pattern
*
PatternLikeExpr
Where
ExprNode
Where
ExprNode
ShowProfileTypes
[]
int
// Used for `SHOW PROFILE` syntax
ShowProfileArgs
*
int64
// Used for `SHOW PROFILE` syntax
ShowProfileLimit
*
Limit
// Used for `SHOW PROFILE` syntax
}
}
// Restore implements Node interface.
// Restore implements Node interface.
...
@@ -1847,6 +1923,17 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1847,6 +1923,17 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
return
errors
.
Annotate
(
err
,
"An error occurred while restore ShowStmt.User"
)
return
errors
.
Annotate
(
err
,
"An error occurred while restore ShowStmt.User"
)
}
}
}
}
if
n
.
Roles
!=
nil
{
ctx
.
WriteKeyWord
(
" USING "
)
for
i
,
r
:=
range
n
.
Roles
{
if
err
:=
r
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore ShowStmt.User"
)
}
if
i
!=
len
(
n
.
Roles
)
-
1
{
ctx
.
WritePlain
(
", "
)
}
}
}
case
ShowMasterStatus
:
case
ShowMasterStatus
:
ctx
.
WriteKeyWord
(
"MASTER STATUS"
)
ctx
.
WriteKeyWord
(
"MASTER STATUS"
)
case
ShowProcessList
:
case
ShowProcessList
:
...
@@ -1874,6 +1961,47 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1874,6 +1961,47 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
}
}
case
ShowProfiles
:
case
ShowProfiles
:
ctx
.
WriteKeyWord
(
"PROFILES"
)
ctx
.
WriteKeyWord
(
"PROFILES"
)
case
ShowProfile
:
ctx
.
WriteKeyWord
(
"PROFILE"
)
if
len
(
n
.
ShowProfileTypes
)
>
0
{
for
i
,
tp
:=
range
n
.
ShowProfileTypes
{
if
i
!=
0
{
ctx
.
WritePlain
(
","
)
}
ctx
.
WritePlain
(
" "
)
switch
tp
{
case
ProfileTypeCPU
:
ctx
.
WriteKeyWord
(
"CPU"
)
case
ProfileTypeMemory
:
ctx
.
WriteKeyWord
(
"MEMORY"
)
case
ProfileTypeBlockIo
:
ctx
.
WriteKeyWord
(
"BLOCK IO"
)
case
ProfileTypeContextSwitch
:
ctx
.
WriteKeyWord
(
"CONTEXT SWITCHES"
)
case
ProfileTypeIpc
:
ctx
.
WriteKeyWord
(
"IPC"
)
case
ProfileTypePageFaults
:
ctx
.
WriteKeyWord
(
"PAGE FAULTS"
)
case
ProfileTypeSource
:
ctx
.
WriteKeyWord
(
"SOURCE"
)
case
ProfileTypeSwaps
:
ctx
.
WriteKeyWord
(
"SWAPS"
)
case
ProfileTypeAll
:
ctx
.
WriteKeyWord
(
"ALL"
)
}
}
}
if
n
.
ShowProfileArgs
!=
nil
{
ctx
.
WriteKeyWord
(
" FOR QUERY "
)
ctx
.
WritePlainf
(
"%d"
,
*
n
.
ShowProfileArgs
)
}
if
n
.
ShowProfileLimit
!=
nil
{
ctx
.
WritePlain
(
" "
)
if
err
:=
n
.
ShowProfileLimit
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore ShowStmt.WritePlain"
)
}
}
case
ShowPrivileges
:
case
ShowPrivileges
:
ctx
.
WriteKeyWord
(
"PRIVILEGES"
)
ctx
.
WriteKeyWord
(
"PRIVILEGES"
)
// ShowTargetFilterable
// ShowTargetFilterable
...
@@ -1889,6 +2017,9 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1889,6 +2017,9 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
restoreOptFull
()
restoreOptFull
()
ctx
.
WriteKeyWord
(
"TABLES"
)
ctx
.
WriteKeyWord
(
"TABLES"
)
restoreShowDatabaseNameOpt
()
restoreShowDatabaseNameOpt
()
case
ShowOpenTables
:
ctx
.
WriteKeyWord
(
"OPEN TABLES"
)
restoreShowDatabaseNameOpt
()
case
ShowTableStatus
:
case
ShowTableStatus
:
ctx
.
WriteKeyWord
(
"TABLE STATUS"
)
ctx
.
WriteKeyWord
(
"TABLE STATUS"
)
restoreShowDatabaseNameOpt
()
restoreShowDatabaseNameOpt
()
...
@@ -1943,6 +2074,8 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1943,6 +2074,8 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
ctx
.
WriteKeyWord
(
"PUMP STATUS"
)
ctx
.
WriteKeyWord
(
"PUMP STATUS"
)
case
ShowDrainerStatus
:
case
ShowDrainerStatus
:
ctx
.
WriteKeyWord
(
"DRAINER STATUS"
)
ctx
.
WriteKeyWord
(
"DRAINER STATUS"
)
case
ShowAnalyzeStatus
:
ctx
.
WriteKeyWord
(
"ANALYZE STATUS"
)
default
:
default
:
return
errors
.
New
(
"Unknown ShowStmt type"
)
return
errors
.
New
(
"Unknown ShowStmt type"
)
}
}
...
@@ -2011,7 +2144,7 @@ type WindowSpec struct {
...
@@ -2011,7 +2144,7 @@ type WindowSpec struct {
Frame
*
FrameClause
Frame
*
FrameClause
// OnlyAlias will set to true of the first following case.
// OnlyAlias will set to true of the first following case.
// To make compati
a
ble with MySQL, we need to distinguish `select func over w` from `select func over (w)`.
// To make compatible with MySQL, we need to distinguish `select func over w` from `select func over (w)`.
OnlyAlias
bool
OnlyAlias
bool
}
}
...
@@ -2270,3 +2403,61 @@ func (n *FrameBound) Accept(v Visitor) (Node, bool) {
...
@@ -2270,3 +2403,61 @@ func (n *FrameBound) Accept(v Visitor) (Node, bool) {
}
}
return
v
.
Leave
(
n
)
return
v
.
Leave
(
n
)
}
}
type
SplitIndexRegionStmt
struct
{
dmlNode
Table
*
TableName
IndexName
string
ValueLists
[][]
ExprNode
}
func
(
n
*
SplitIndexRegionStmt
)
Restore
(
ctx
*
RestoreCtx
)
error
{
ctx
.
WriteKeyWord
(
"SPLIT TABLE "
)
if
err
:=
n
.
Table
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore SplitIndexRegionStmt.Table"
)
}
ctx
.
WriteKeyWord
(
" INDEX "
)
ctx
.
WriteName
(
n
.
IndexName
)
ctx
.
WriteKeyWord
(
" BY "
)
for
i
,
row
:=
range
n
.
ValueLists
{
if
i
!=
0
{
ctx
.
WritePlain
(
","
)
}
ctx
.
WritePlain
(
"("
)
for
j
,
v
:=
range
row
{
if
j
!=
0
{
ctx
.
WritePlain
(
","
)
}
if
err
:=
v
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotatef
(
err
,
"An error occurred while restore SplitIndexRegionStmt.ValueLists[%d][%d]"
,
i
,
j
)
}
}
ctx
.
WritePlain
(
")"
)
}
return
nil
}
func
(
n
*
SplitIndexRegionStmt
)
Accept
(
v
Visitor
)
(
Node
,
bool
)
{
newNode
,
skipChildren
:=
v
.
Enter
(
n
)
if
skipChildren
{
return
v
.
Leave
(
newNode
)
}
n
=
newNode
.
(
*
SplitIndexRegionStmt
)
node
,
ok
:=
n
.
Table
.
Accept
(
v
)
if
!
ok
{
return
n
,
false
}
n
.
Table
=
node
.
(
*
TableName
)
for
i
,
list
:=
range
n
.
ValueLists
{
for
j
,
val
:=
range
list
{
node
,
ok
:=
val
.
Accept
(
v
)
if
!
ok
{
return
n
,
false
}
n
.
ValueLists
[
i
][
j
]
=
node
.
(
ExprNode
)
}
}
return
v
.
Leave
(
n
)
}
vendor/github.com/pingcap/parser/ast/expressions.go
浏览文件 @
82efd3c2
...
@@ -158,9 +158,15 @@ func (n *BinaryOperationExpr) Restore(ctx *RestoreCtx) error {
...
@@ -158,9 +158,15 @@ func (n *BinaryOperationExpr) Restore(ctx *RestoreCtx) error {
if
err
:=
n
.
L
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
L
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred when restore BinaryOperationExpr.L"
)
return
errors
.
Annotate
(
err
,
"An error occurred when restore BinaryOperationExpr.L"
)
}
}
if
ctx
.
Flags
.
HasSpacesAroundBinaryOperationFlag
()
{
ctx
.
WritePlain
(
" "
)
}
if
err
:=
n
.
Op
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
Op
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred when restore BinaryOperationExpr.Op"
)
return
errors
.
Annotate
(
err
,
"An error occurred when restore BinaryOperationExpr.Op"
)
}
}
if
ctx
.
Flags
.
HasSpacesAroundBinaryOperationFlag
()
{
ctx
.
WritePlain
(
" "
)
}
if
err
:=
n
.
R
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
R
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred when restore BinaryOperationExpr.R"
)
return
errors
.
Annotate
(
err
,
"An error occurred when restore BinaryOperationExpr.R"
)
}
}
...
@@ -283,13 +289,14 @@ func (n *CaseExpr) Restore(ctx *RestoreCtx) error {
...
@@ -283,13 +289,14 @@ func (n *CaseExpr) Restore(ctx *RestoreCtx) error {
// Format the ExprNode into a Writer.
// Format the ExprNode into a Writer.
func
(
n
*
CaseExpr
)
Format
(
w
io
.
Writer
)
{
func
(
n
*
CaseExpr
)
Format
(
w
io
.
Writer
)
{
fmt
.
Fprint
(
w
,
"CASE
"
)
fmt
.
Fprint
(
w
,
"CASE"
)
// Because the presence of `case when` syntax, `Value` could be nil and we need check this.
// Because the presence of `case when` syntax, `Value` could be nil and we need check this.
if
n
.
Value
!=
nil
{
if
n
.
Value
!=
nil
{
n
.
Value
.
Format
(
w
)
fmt
.
Fprint
(
w
,
" "
)
fmt
.
Fprint
(
w
,
" "
)
n
.
Value
.
Format
(
w
)
}
}
for
_
,
clause
:=
range
n
.
WhenClauses
{
for
_
,
clause
:=
range
n
.
WhenClauses
{
fmt
.
Fprint
(
w
,
" "
)
fmt
.
Fprint
(
w
,
"WHEN "
)
fmt
.
Fprint
(
w
,
"WHEN "
)
clause
.
Expr
.
Format
(
w
)
clause
.
Expr
.
Format
(
w
)
fmt
.
Fprint
(
w
,
" THEN "
)
fmt
.
Fprint
(
w
,
" THEN "
)
...
...
vendor/github.com/pingcap/parser/ast/functions.go
浏览文件 @
82efd3c2
...
@@ -512,7 +512,7 @@ func (n *FuncCastExpr) Restore(ctx *RestoreCtx) error {
...
@@ -512,7 +512,7 @@ func (n *FuncCastExpr) Restore(ctx *RestoreCtx) error {
return
errors
.
Annotatef
(
err
,
"An error occurred while restore FuncCastExpr.Expr"
)
return
errors
.
Annotatef
(
err
,
"An error occurred while restore FuncCastExpr.Expr"
)
}
}
ctx
.
WriteKeyWord
(
" AS "
)
ctx
.
WriteKeyWord
(
" AS "
)
n
.
Tp
.
FormatAsCastType
(
ctx
.
In
)
n
.
Tp
.
RestoreAsCastType
(
ctx
)
ctx
.
WritePlain
(
")"
)
ctx
.
WritePlain
(
")"
)
case
CastConvertFunction
:
case
CastConvertFunction
:
ctx
.
WriteKeyWord
(
"CONVERT"
)
ctx
.
WriteKeyWord
(
"CONVERT"
)
...
@@ -521,7 +521,7 @@ func (n *FuncCastExpr) Restore(ctx *RestoreCtx) error {
...
@@ -521,7 +521,7 @@ func (n *FuncCastExpr) Restore(ctx *RestoreCtx) error {
return
errors
.
Annotatef
(
err
,
"An error occurred while restore FuncCastExpr.Expr"
)
return
errors
.
Annotatef
(
err
,
"An error occurred while restore FuncCastExpr.Expr"
)
}
}
ctx
.
WritePlain
(
", "
)
ctx
.
WritePlain
(
", "
)
n
.
Tp
.
FormatAsCastType
(
ctx
.
In
)
n
.
Tp
.
RestoreAsCastType
(
ctx
)
ctx
.
WritePlain
(
")"
)
ctx
.
WritePlain
(
")"
)
case
CastBinaryOperator
:
case
CastBinaryOperator
:
ctx
.
WriteKeyWord
(
"BINARY "
)
ctx
.
WriteKeyWord
(
"BINARY "
)
...
...
vendor/github.com/pingcap/parser/ast/misc.go
浏览文件 @
82efd3c2
...
@@ -42,6 +42,7 @@ var (
...
@@ -42,6 +42,7 @@ var (
_
StmtNode
=
&
RollbackStmt
{}
_
StmtNode
=
&
RollbackStmt
{}
_
StmtNode
=
&
SetPwdStmt
{}
_
StmtNode
=
&
SetPwdStmt
{}
_
StmtNode
=
&
SetRoleStmt
{}
_
StmtNode
=
&
SetRoleStmt
{}
_
StmtNode
=
&
SetDefaultRoleStmt
{}
_
StmtNode
=
&
SetStmt
{}
_
StmtNode
=
&
SetStmt
{}
_
StmtNode
=
&
UseStmt
{}
_
StmtNode
=
&
UseStmt
{}
_
StmtNode
=
&
FlushStmt
{}
_
StmtNode
=
&
FlushStmt
{}
...
@@ -67,6 +68,12 @@ const (
...
@@ -67,6 +68,12 @@ const (
DrainerType
=
"DRAINER"
DrainerType
=
"DRAINER"
)
)
// Transaction mode constants.
const
(
Optimistic
=
"OPTIMISTIC"
Pessimistic
=
"PESSIMISTIC"
)
var
(
var
(
// ExplainFormats stores the valid formats for explain statement, used by validator.
// ExplainFormats stores the valid formats for explain statement, used by validator.
ExplainFormats
=
[]
string
{
ExplainFormats
=
[]
string
{
...
@@ -364,11 +371,17 @@ func (n *ExecuteStmt) Accept(v Visitor) (Node, bool) {
...
@@ -364,11 +371,17 @@ func (n *ExecuteStmt) Accept(v Visitor) (Node, bool) {
// See https://dev.mysql.com/doc/refman/5.7/en/commit.html
// See https://dev.mysql.com/doc/refman/5.7/en/commit.html
type
BeginStmt
struct
{
type
BeginStmt
struct
{
stmtNode
stmtNode
Mode
string
}
}
// Restore implements Node interface.
// Restore implements Node interface.
func
(
n
*
BeginStmt
)
Restore
(
ctx
*
RestoreCtx
)
error
{
func
(
n
*
BeginStmt
)
Restore
(
ctx
*
RestoreCtx
)
error
{
if
n
.
Mode
==
""
{
ctx
.
WriteKeyWord
(
"START TRANSACTION"
)
ctx
.
WriteKeyWord
(
"START TRANSACTION"
)
}
else
{
ctx
.
WriteKeyWord
(
"BEGIN "
)
ctx
.
WriteKeyWord
(
n
.
Mode
)
}
return
nil
return
nil
}
}
...
@@ -847,6 +860,57 @@ func (n *SetRoleStmt) Accept(v Visitor) (Node, bool) {
...
@@ -847,6 +860,57 @@ func (n *SetRoleStmt) Accept(v Visitor) (Node, bool) {
return
v
.
Leave
(
n
)
return
v
.
Leave
(
n
)
}
}
type
SetDefaultRoleStmt
struct
{
stmtNode
SetRoleOpt
SetRoleStmtType
RoleList
[]
*
auth
.
RoleIdentity
UserList
[]
*
auth
.
UserIdentity
}
func
(
n
*
SetDefaultRoleStmt
)
Restore
(
ctx
*
RestoreCtx
)
error
{
ctx
.
WriteKeyWord
(
"SET DEFAULT ROLE"
)
switch
n
.
SetRoleOpt
{
case
SetRoleNone
:
ctx
.
WriteKeyWord
(
" NONE"
)
case
SetRoleAll
:
ctx
.
WriteKeyWord
(
" ALL"
)
default
:
}
for
i
,
role
:=
range
n
.
RoleList
{
ctx
.
WritePlain
(
" "
)
err
:=
role
.
Restore
(
ctx
)
if
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore SetDefaultRoleStmt.RoleList"
)
}
if
i
!=
len
(
n
.
RoleList
)
-
1
{
ctx
.
WritePlain
(
","
)
}
}
ctx
.
WritePlain
(
" TO"
)
for
i
,
user
:=
range
n
.
UserList
{
ctx
.
WritePlain
(
" "
)
err
:=
user
.
Restore
(
ctx
)
if
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore SetDefaultRoleStmt.UserList"
)
}
if
i
!=
len
(
n
.
UserList
)
-
1
{
ctx
.
WritePlain
(
","
)
}
}
return
nil
}
// Accept implements Node Accept interface.
func
(
n
*
SetDefaultRoleStmt
)
Accept
(
v
Visitor
)
(
Node
,
bool
)
{
newNode
,
skipChildren
:=
v
.
Enter
(
n
)
if
skipChildren
{
return
v
.
Leave
(
newNode
)
}
n
=
newNode
.
(
*
SetDefaultRoleStmt
)
return
v
.
Leave
(
n
)
}
// UserSpec is used for parsing create user statement.
// UserSpec is used for parsing create user statement.
type
UserSpec
struct
{
type
UserSpec
struct
{
User
*
auth
.
UserIdentity
User
*
auth
.
UserIdentity
...
@@ -901,6 +965,108 @@ func (n *UserSpec) EncodedPassword() (string, bool) {
...
@@ -901,6 +965,108 @@ func (n *UserSpec) EncodedPassword() (string, bool) {
return
opt
.
HashString
,
true
return
opt
.
HashString
,
true
}
}
const
(
TslNone
=
iota
Ssl
X509
Cipher
Issuer
Subject
)
type
TslOption
struct
{
Type
int
Value
string
}
func
(
t
*
TslOption
)
Restore
(
ctx
*
RestoreCtx
)
error
{
switch
t
.
Type
{
case
TslNone
:
ctx
.
WriteKeyWord
(
"NONE"
)
case
Ssl
:
ctx
.
WriteKeyWord
(
"SSL"
)
case
X509
:
ctx
.
WriteKeyWord
(
"X509"
)
case
Cipher
:
ctx
.
WriteKeyWord
(
"CIPHER "
)
ctx
.
WriteString
(
t
.
Value
)
case
Issuer
:
ctx
.
WriteKeyWord
(
"ISSUER "
)
ctx
.
WriteString
(
t
.
Value
)
case
Subject
:
ctx
.
WriteKeyWord
(
"CIPHER"
)
ctx
.
WriteString
(
t
.
Value
)
default
:
return
errors
.
Errorf
(
"Unsupported TslOption.Type %d"
,
t
.
Type
)
}
return
nil
}
const
(
MaxQueriesPerHour
=
iota
+
1
MaxUpdatesPerHour
MaxConnectionsPerHour
MaxUserConnections
)
type
ResourceOption
struct
{
Type
int
Count
int64
}
func
(
r
*
ResourceOption
)
Restore
(
ctx
*
RestoreCtx
)
error
{
switch
r
.
Type
{
case
MaxQueriesPerHour
:
ctx
.
WriteKeyWord
(
"MAX_QUERIES_PER_HOUR "
)
case
MaxUpdatesPerHour
:
ctx
.
WriteKeyWord
(
"MAX_UPDATES_PER_HOUR "
)
case
MaxConnectionsPerHour
:
ctx
.
WriteKeyWord
(
"MAX_CONNECTIONS_PER_HOUR "
)
case
MaxUserConnections
:
ctx
.
WriteKeyWord
(
"MAX_USER_CONNECTIONS "
)
default
:
return
errors
.
Errorf
(
"Unsupported ResourceOption.Type %d"
,
r
.
Type
)
}
ctx
.
WritePlainf
(
"%d"
,
r
.
Count
)
return
nil
}
const
(
PasswordExpire
=
iota
+
1
PasswordExpireDefault
PasswordExpireNever
PasswordExpireInterval
Lock
Unlock
)
type
PasswordOrLockOption
struct
{
Type
int
Count
int64
}
func
(
p
*
PasswordOrLockOption
)
Restore
(
ctx
*
RestoreCtx
)
error
{
switch
p
.
Type
{
case
PasswordExpire
:
ctx
.
WriteKeyWord
(
"PASSWORD EXPIRE"
)
case
PasswordExpireDefault
:
ctx
.
WriteKeyWord
(
"PASSWORD EXPIRE DEFAULT"
)
case
PasswordExpireNever
:
ctx
.
WriteKeyWord
(
"PASSWORD EXPIRE NEVER"
)
case
PasswordExpireInterval
:
ctx
.
WriteKeyWord
(
"PASSWORD EXPIRE NEVER"
)
ctx
.
WritePlainf
(
" %d"
,
p
.
Count
)
ctx
.
WriteKeyWord
(
" DAY"
)
case
Lock
:
ctx
.
WriteKeyWord
(
"ACCOUNT LOCK"
)
case
Unlock
:
ctx
.
WriteKeyWord
(
"ACCOUNT UNLOCK"
)
default
:
return
errors
.
Errorf
(
"Unsupported PasswordOrLockOption.Type %d"
,
p
.
Type
)
}
return
nil
}
// CreateUserStmt creates user account.
// CreateUserStmt creates user account.
// See https://dev.mysql.com/doc/refman/5.7/en/create-user.html
// See https://dev.mysql.com/doc/refman/5.7/en/create-user.html
type
CreateUserStmt
struct
{
type
CreateUserStmt
struct
{
...
@@ -909,6 +1075,9 @@ type CreateUserStmt struct {
...
@@ -909,6 +1075,9 @@ type CreateUserStmt struct {
IsCreateRole
bool
IsCreateRole
bool
IfNotExists
bool
IfNotExists
bool
Specs
[]
*
UserSpec
Specs
[]
*
UserSpec
TslOptions
[]
*
TslOption
ResourceOptions
[]
*
ResourceOption
PasswordOrLockOptions
[]
*
PasswordOrLockOption
}
}
// Restore implements Node interface.
// Restore implements Node interface.
...
@@ -929,6 +1098,40 @@ func (n *CreateUserStmt) Restore(ctx *RestoreCtx) error {
...
@@ -929,6 +1098,40 @@ func (n *CreateUserStmt) Restore(ctx *RestoreCtx) error {
return
errors
.
Annotatef
(
err
,
"An error occurred while restore CreateUserStmt.Specs[%d]"
,
i
)
return
errors
.
Annotatef
(
err
,
"An error occurred while restore CreateUserStmt.Specs[%d]"
,
i
)
}
}
}
}
tslOptionLen
:=
len
(
n
.
TslOptions
)
if
tslOptionLen
!=
0
{
ctx
.
WriteKeyWord
(
" REQUIRE "
)
}
// Restore `tslOptions` reversely to keep order the same with original sql
for
i
:=
tslOptionLen
;
i
>
0
;
i
--
{
if
i
!=
tslOptionLen
{
ctx
.
WriteKeyWord
(
" AND "
)
}
if
err
:=
n
.
TslOptions
[
i
-
1
]
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotatef
(
err
,
"An error occurred while restore CreateUserStmt.TslOptions[%d]"
,
i
)
}
}
if
len
(
n
.
ResourceOptions
)
!=
0
{
ctx
.
WriteKeyWord
(
" WITH"
)
}
for
i
,
v
:=
range
n
.
ResourceOptions
{
ctx
.
WritePlain
(
" "
)
if
err
:=
v
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotatef
(
err
,
"An error occurred while restore CreateUserStmt.ResourceOptions[%d]"
,
i
)
}
}
for
i
,
v
:=
range
n
.
PasswordOrLockOptions
{
ctx
.
WritePlain
(
" "
)
if
err
:=
v
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotatef
(
err
,
"An error occurred while restore CreateUserStmt.PasswordOrLockOptions[%d]"
,
i
)
}
}
return
nil
return
nil
}
}
...
...
vendor/github.com/pingcap/parser/ast/stats.go
浏览文件 @
82efd3c2
...
@@ -36,11 +36,16 @@ type AnalyzeTableStmt struct {
...
@@ -36,11 +36,16 @@ type AnalyzeTableStmt struct {
// IndexFlag is true when we only analyze indices for a table.
// IndexFlag is true when we only analyze indices for a table.
IndexFlag
bool
IndexFlag
bool
Incremental
bool
}
}
// Restore implements Node interface.
// Restore implements Node interface.
func
(
n
*
AnalyzeTableStmt
)
Restore
(
ctx
*
RestoreCtx
)
error
{
func
(
n
*
AnalyzeTableStmt
)
Restore
(
ctx
*
RestoreCtx
)
error
{
if
n
.
Incremental
{
ctx
.
WriteKeyWord
(
"ANALYZE INCREMENTAL TABLE "
)
}
else
{
ctx
.
WriteKeyWord
(
"ANALYZE TABLE "
)
ctx
.
WriteKeyWord
(
"ANALYZE TABLE "
)
}
for
i
,
table
:=
range
n
.
TableNames
{
for
i
,
table
:=
range
n
.
TableNames
{
if
i
!=
0
{
if
i
!=
0
{
ctx
.
WritePlain
(
","
)
ctx
.
WritePlain
(
","
)
...
...
vendor/github.com/pingcap/parser/charset/charset.go
浏览文件 @
82efd3c2
...
@@ -18,6 +18,17 @@ import (
...
@@ -18,6 +18,17 @@ import (
"github.com/pingcap/errors"
"github.com/pingcap/errors"
"github.com/pingcap/parser/mysql"
"github.com/pingcap/parser/mysql"
"github.com/pingcap/parser/terror"
)
const
(
codeCollationCharsetMismatch
=
terror
.
ErrCode
(
mysql
.
ErrCollationCharsetMismatch
)
codeUnknownCollation
=
terror
.
ErrCode
(
mysql
.
ErrUnknownCollation
)
)
var
(
ErrUnknownCollation
=
terror
.
ClassDDL
.
New
(
codeUnknownCollation
,
mysql
.
MySQLErrName
[
mysql
.
ErrUnknownCollation
])
ErrCollationCharsetMismatch
=
terror
.
ClassDDL
.
New
(
codeCollationCharsetMismatch
,
mysql
.
MySQLErrName
[
mysql
.
ErrCollationCharsetMismatch
])
)
)
// Charset is a charset.
// Charset is a charset.
...
@@ -40,8 +51,10 @@ type Collation struct {
...
@@ -40,8 +51,10 @@ type Collation struct {
}
}
var
charsets
=
make
(
map
[
string
]
*
Charset
)
var
charsets
=
make
(
map
[
string
]
*
Charset
)
var
collationsMap
=
make
(
map
[
int
]
*
Collation
)
var
collationsIDMap
=
make
(
map
[
int
]
*
Collation
)
var
collationsNameMap
=
make
(
map
[
string
]
*
Collation
)
var
descs
=
make
([]
*
Desc
,
0
,
len
(
charsetInfos
))
var
descs
=
make
([]
*
Desc
,
0
,
len
(
charsetInfos
))
var
supportedCollations
=
make
([]
*
Collation
,
0
,
len
(
supportedCollationNames
))
// All the supported charsets should be in the following table.
// All the supported charsets should be in the following table.
var
charsetInfos
=
[]
*
Charset
{
var
charsetInfos
=
[]
*
Charset
{
...
@@ -52,6 +65,15 @@ var charsetInfos = []*Charset{
...
@@ -52,6 +65,15 @@ var charsetInfos = []*Charset{
{
CharsetBin
,
CollationBin
,
make
(
map
[
string
]
*
Collation
),
"binary"
,
1
},
{
CharsetBin
,
CollationBin
,
make
(
map
[
string
]
*
Collation
),
"binary"
,
1
},
}
}
// All the names supported collations should be in the following table.
var
supportedCollationNames
=
map
[
string
]
struct
{}{
CollationUTF8
:
{},
CollationUTF8MB4
:
{},
CollationASCII
:
{},
CollationLatin1
:
{},
CollationBin
:
{},
}
// Desc is a charset description.
// Desc is a charset description.
type
Desc
struct
{
type
Desc
struct
{
Name
string
Name
string
...
@@ -60,11 +82,16 @@ type Desc struct {
...
@@ -60,11 +82,16 @@ type Desc struct {
Maxlen
int
Maxlen
int
}
}
// Get
AllCharsets gets all charset descriptions in the local charsets
.
// Get
SupportedCharsets gets descriptions for all charsets supported so far
.
func
Get
All
Charsets
()
[]
*
Desc
{
func
Get
Supported
Charsets
()
[]
*
Desc
{
return
descs
return
descs
}
}
// GetSupportedCollations gets information for all collations supported so far.
func
GetSupportedCollations
()
[]
*
Collation
{
return
supportedCollations
}
// ValidCharsetAndCollation checks the charset and the collation validity
// ValidCharsetAndCollation checks the charset and the collation validity
// and returns a boolean.
// and returns a boolean.
func
ValidCharsetAndCollation
(
cs
string
,
co
string
)
bool
{
func
ValidCharsetAndCollation
(
cs
string
,
co
string
)
bool
{
...
@@ -119,17 +146,20 @@ func GetCharsetInfo(cs string) (string, string, error) {
...
@@ -119,17 +146,20 @@ func GetCharsetInfo(cs string) (string, string, error) {
// GetCharsetDesc gets charset descriptions in the local charsets.
// GetCharsetDesc gets charset descriptions in the local charsets.
func
GetCharsetDesc
(
cs
string
)
(
*
Desc
,
error
)
{
func
GetCharsetDesc
(
cs
string
)
(
*
Desc
,
error
)
{
c
,
ok
:=
charsets
[
strings
.
ToLower
(
cs
)]
switch
strings
.
ToLower
(
cs
)
{
if
!
ok
{
case
CharsetUTF8
:
return
descs
[
0
],
nil
case
CharsetUTF8MB4
:
return
descs
[
1
],
nil
case
CharsetASCII
:
return
descs
[
2
],
nil
case
CharsetLatin1
:
return
descs
[
3
],
nil
case
CharsetBin
:
return
descs
[
4
],
nil
default
:
return
nil
,
errors
.
Errorf
(
"Unknown charset %s"
,
cs
)
return
nil
,
errors
.
Errorf
(
"Unknown charset %s"
,
cs
)
}
}
desc
:=
&
Desc
{
Name
:
c
.
Name
,
DefaultCollation
:
c
.
DefaultCollation
,
Desc
:
c
.
Desc
,
Maxlen
:
c
.
Maxlen
,
}
return
desc
,
nil
}
}
// GetCharsetInfoByID returns charset and collation for id as cs_number.
// GetCharsetInfoByID returns charset and collation for id as cs_number.
...
@@ -137,7 +167,7 @@ func GetCharsetInfoByID(coID int) (string, string, error) {
...
@@ -137,7 +167,7 @@ func GetCharsetInfoByID(coID int) (string, string, error) {
if
coID
==
mysql
.
DefaultCollationID
{
if
coID
==
mysql
.
DefaultCollationID
{
return
mysql
.
DefaultCharset
,
mysql
.
DefaultCollationName
,
nil
return
mysql
.
DefaultCharset
,
mysql
.
DefaultCollationName
,
nil
}
}
if
collation
,
ok
:=
collationsMap
[
coID
];
ok
{
if
collation
,
ok
:=
collations
ID
Map
[
coID
];
ok
{
return
collation
.
CharsetName
,
collation
.
Name
,
nil
return
collation
.
CharsetName
,
collation
.
Name
,
nil
}
}
return
""
,
""
,
errors
.
Errorf
(
"Unknown charset id %d"
,
coID
)
return
""
,
""
,
errors
.
Errorf
(
"Unknown charset id %d"
,
coID
)
...
@@ -148,6 +178,14 @@ func GetCollations() []*Collation {
...
@@ -148,6 +178,14 @@ func GetCollations() []*Collation {
return
collations
return
collations
}
}
func
GetCollationByName
(
name
string
)
(
*
Collation
,
error
)
{
collation
,
ok
:=
collationsNameMap
[
strings
.
ToLower
(
name
)]
if
!
ok
{
return
nil
,
ErrUnknownCollation
.
GenWithStackByArgs
(
name
)
}
return
collation
,
nil
}
const
(
const
(
// CharsetBin is used for marking binary charset.
// CharsetBin is used for marking binary charset.
CharsetBin
=
"binary"
CharsetBin
=
"binary"
...
@@ -179,10 +217,10 @@ var collations = []*Collation{
...
@@ -179,10 +217,10 @@ var collations = []*Collation{
{
5
,
"latin1"
,
"latin1_german1_ci"
,
false
},
{
5
,
"latin1"
,
"latin1_german1_ci"
,
false
},
{
6
,
"hp8"
,
"hp8_english_ci"
,
true
},
{
6
,
"hp8"
,
"hp8_english_ci"
,
true
},
{
7
,
"koi8r"
,
"koi8r_general_ci"
,
true
},
{
7
,
"koi8r"
,
"koi8r_general_ci"
,
true
},
{
8
,
"latin1"
,
"latin1_swedish_ci"
,
tru
e
},
{
8
,
"latin1"
,
"latin1_swedish_ci"
,
fals
e
},
{
9
,
"latin2"
,
"latin2_general_ci"
,
true
},
{
9
,
"latin2"
,
"latin2_general_ci"
,
true
},
{
10
,
"swe7"
,
"swe7_swedish_ci"
,
true
},
{
10
,
"swe7"
,
"swe7_swedish_ci"
,
true
},
{
11
,
"ascii"
,
"ascii_general_ci"
,
tru
e
},
{
11
,
"ascii"
,
"ascii_general_ci"
,
fals
e
},
{
12
,
"ujis"
,
"ujis_japanese_ci"
,
true
},
{
12
,
"ujis"
,
"ujis_japanese_ci"
,
true
},
{
13
,
"sjis"
,
"sjis_japanese_ci"
,
true
},
{
13
,
"sjis"
,
"sjis_japanese_ci"
,
true
},
{
14
,
"cp1251"
,
"cp1251_bulgarian_ci"
,
false
},
{
14
,
"cp1251"
,
"cp1251_bulgarian_ci"
,
false
},
...
@@ -203,7 +241,7 @@ var collations = []*Collation{
...
@@ -203,7 +241,7 @@ var collations = []*Collation{
{
30
,
"latin5"
,
"latin5_turkish_ci"
,
true
},
{
30
,
"latin5"
,
"latin5_turkish_ci"
,
true
},
{
31
,
"latin1"
,
"latin1_german2_ci"
,
false
},
{
31
,
"latin1"
,
"latin1_german2_ci"
,
false
},
{
32
,
"armscii8"
,
"armscii8_general_ci"
,
true
},
{
32
,
"armscii8"
,
"armscii8_general_ci"
,
true
},
{
33
,
"utf8"
,
"utf8_general_ci"
,
tru
e
},
{
33
,
"utf8"
,
"utf8_general_ci"
,
fals
e
},
{
34
,
"cp1250"
,
"cp1250_czech_cs"
,
false
},
{
34
,
"cp1250"
,
"cp1250_czech_cs"
,
false
},
{
35
,
"ucs2"
,
"ucs2_general_ci"
,
true
},
{
35
,
"ucs2"
,
"ucs2_general_ci"
,
true
},
{
36
,
"cp866"
,
"cp866_general_ci"
,
true
},
{
36
,
"cp866"
,
"cp866_general_ci"
,
true
},
...
@@ -215,9 +253,9 @@ var collations = []*Collation{
...
@@ -215,9 +253,9 @@ var collations = []*Collation{
{
42
,
"latin7"
,
"latin7_general_cs"
,
false
},
{
42
,
"latin7"
,
"latin7_general_cs"
,
false
},
{
43
,
"macce"
,
"macce_bin"
,
false
},
{
43
,
"macce"
,
"macce_bin"
,
false
},
{
44
,
"cp1250"
,
"cp1250_croatian_ci"
,
false
},
{
44
,
"cp1250"
,
"cp1250_croatian_ci"
,
false
},
{
45
,
"utf8mb4"
,
"utf8mb4_general_ci"
,
tru
e
},
{
45
,
"utf8mb4"
,
"utf8mb4_general_ci"
,
fals
e
},
{
46
,
"utf8mb4"
,
"utf8mb4_bin"
,
fals
e
},
{
46
,
"utf8mb4"
,
"utf8mb4_bin"
,
tru
e
},
{
47
,
"latin1"
,
"latin1_bin"
,
fals
e
},
{
47
,
"latin1"
,
"latin1_bin"
,
tru
e
},
{
48
,
"latin1"
,
"latin1_general_ci"
,
false
},
{
48
,
"latin1"
,
"latin1_general_ci"
,
false
},
{
49
,
"latin1"
,
"latin1_general_cs"
,
false
},
{
49
,
"latin1"
,
"latin1_general_cs"
,
false
},
{
50
,
"cp1251"
,
"cp1251_bin"
,
false
},
{
50
,
"cp1251"
,
"cp1251_bin"
,
false
},
...
@@ -235,7 +273,7 @@ var collations = []*Collation{
...
@@ -235,7 +273,7 @@ var collations = []*Collation{
{
62
,
"utf16le"
,
"utf16le_bin"
,
false
},
{
62
,
"utf16le"
,
"utf16le_bin"
,
false
},
{
63
,
"binary"
,
"binary"
,
true
},
{
63
,
"binary"
,
"binary"
,
true
},
{
64
,
"armscii8"
,
"armscii8_bin"
,
false
},
{
64
,
"armscii8"
,
"armscii8_bin"
,
false
},
{
65
,
"ascii"
,
"ascii_bin"
,
fals
e
},
{
65
,
"ascii"
,
"ascii_bin"
,
tru
e
},
{
66
,
"cp1250"
,
"cp1250_bin"
,
false
},
{
66
,
"cp1250"
,
"cp1250_bin"
,
false
},
{
67
,
"cp1256"
,
"cp1256_bin"
,
false
},
{
67
,
"cp1256"
,
"cp1256_bin"
,
false
},
{
68
,
"cp866"
,
"cp866_bin"
,
false
},
{
68
,
"cp866"
,
"cp866_bin"
,
false
},
...
@@ -252,7 +290,7 @@ var collations = []*Collation{
...
@@ -252,7 +290,7 @@ var collations = []*Collation{
{
80
,
"cp850"
,
"cp850_bin"
,
false
},
{
80
,
"cp850"
,
"cp850_bin"
,
false
},
{
81
,
"cp852"
,
"cp852_bin"
,
false
},
{
81
,
"cp852"
,
"cp852_bin"
,
false
},
{
82
,
"swe7"
,
"swe7_bin"
,
false
},
{
82
,
"swe7"
,
"swe7_bin"
,
false
},
{
83
,
"utf8"
,
"utf8_bin"
,
fals
e
},
{
83
,
"utf8"
,
"utf8_bin"
,
tru
e
},
{
84
,
"big5"
,
"big5_bin"
,
false
},
{
84
,
"big5"
,
"big5_bin"
,
false
},
{
85
,
"euckr"
,
"euckr_bin"
,
false
},
{
85
,
"euckr"
,
"euckr_bin"
,
false
},
{
86
,
"gb2312"
,
"gb2312_bin"
,
false
},
{
86
,
"gb2312"
,
"gb2312_bin"
,
false
},
...
@@ -391,6 +429,7 @@ var collations = []*Collation{
...
@@ -391,6 +429,7 @@ var collations = []*Collation{
{
245
,
"utf8mb4"
,
"utf8mb4_croatian_ci"
,
false
},
{
245
,
"utf8mb4"
,
"utf8mb4_croatian_ci"
,
false
},
{
246
,
"utf8mb4"
,
"utf8mb4_unicode_520_ci"
,
false
},
{
246
,
"utf8mb4"
,
"utf8mb4_unicode_520_ci"
,
false
},
{
247
,
"utf8mb4"
,
"utf8mb4_vietnamese_ci"
,
false
},
{
247
,
"utf8mb4"
,
"utf8mb4_vietnamese_ci"
,
false
},
{
255
,
"utf8mb4"
,
"utf8mb4_0900_ai_ci"
,
false
},
}
}
// init method always puts to the end of file.
// init method always puts to the end of file.
...
@@ -407,11 +446,18 @@ func init() {
...
@@ -407,11 +446,18 @@ func init() {
}
}
for
_
,
c
:=
range
collations
{
for
_
,
c
:=
range
collations
{
collationsMap
[
c
.
ID
]
=
c
collations
ID
Map
[
c
.
ID
]
=
c
charset
,
ok
:=
charsets
[
c
.
CharsetName
]
if
!
ok
{
if
_
,
ok
:=
supportedCollationNames
[
c
.
Name
];
ok
{
continue
supportedCollations
=
append
(
supportedCollations
,
c
)
}
}
if
charset
,
ok
:=
charsets
[
c
.
CharsetName
];
ok
{
charset
.
Collations
[
c
.
Name
]
=
c
charset
.
Collations
[
c
.
Name
]
=
c
}
}
}
for
id
,
name
:=
range
mysql
.
Collations
{
collationsNameMap
[
name
]
=
collationsIDMap
[
int
(
id
)]
}
}
}
vendor/github.com/pingcap/parser/circle.yml
浏览文件 @
82efd3c2
...
@@ -19,6 +19,9 @@ jobs:
...
@@ -19,6 +19,9 @@ jobs:
-
run
:
-
run
:
name
:
"
Build
&
Test"
name
:
"
Build
&
Test"
command
:
make test
command
:
make test
-
run
:
name
:
"
Upload
coverage"
command
:
bash <(curl -s https://codecov.io/bash)
build-integration
:
build-integration
:
docker
:
docker
:
-
image
:
golang:1.11
-
image
:
golang:1.11
...
...
vendor/github.com/pingcap/parser/digester.go
浏览文件 @
82efd3c2
...
@@ -111,6 +111,9 @@ func (d *sqlDigester) normalize(sql string) {
...
@@ -111,6 +111,9 @@ func (d *sqlDigester) normalize(sql string) {
d
.
lexer
.
reset
(
sql
)
d
.
lexer
.
reset
(
sql
)
for
{
for
{
tok
,
pos
,
lit
:=
d
.
lexer
.
scan
()
tok
,
pos
,
lit
:=
d
.
lexer
.
scan
()
if
tok
==
invalid
{
break
}
if
tok
==
unicode
.
ReplacementChar
&&
d
.
lexer
.
r
.
eof
()
{
if
tok
==
unicode
.
ReplacementChar
&&
d
.
lexer
.
r
.
eof
()
{
break
break
}
}
...
...
vendor/github.com/pingcap/parser/format/format.go
浏览文件 @
82efd3c2
...
@@ -216,6 +216,8 @@ const (
...
@@ -216,6 +216,8 @@ const (
RestoreNameLowercase
RestoreNameLowercase
RestoreNameDoubleQuotes
RestoreNameDoubleQuotes
RestoreNameBackQuotes
RestoreNameBackQuotes
RestoreSpacesAroundBinaryOperation
)
)
const
(
const
(
...
@@ -271,6 +273,11 @@ func (rf RestoreFlags) HasNameBackQuotesFlag() bool {
...
@@ -271,6 +273,11 @@ func (rf RestoreFlags) HasNameBackQuotesFlag() bool {
return
rf
.
has
(
RestoreNameBackQuotes
)
return
rf
.
has
(
RestoreNameBackQuotes
)
}
}
// HasSpacesAroundBinaryOperationFlag returns a boolean indicating whether `rf` has `RestoreSpacesAroundBinaryOperation` flag.
func
(
rf
RestoreFlags
)
HasSpacesAroundBinaryOperationFlag
()
bool
{
return
rf
.
has
(
RestoreSpacesAroundBinaryOperation
)
}
// RestoreCtx is `Restore` context to hold flags and writer.
// RestoreCtx is `Restore` context to hold flags and writer.
type
RestoreCtx
struct
{
type
RestoreCtx
struct
{
Flags
RestoreFlags
Flags
RestoreFlags
...
...
vendor/github.com/pingcap/parser/go.mod1
100755 → 100644
浏览文件 @
82efd3c2
...
@@ -8,7 +8,7 @@ require (
...
@@ -8,7 +8,7 @@ require (
github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186
github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186
github.com/cznic/y v0.0.0-20170802143616-045f81c6662a
github.com/cznic/y v0.0.0-20170802143616-045f81c6662a
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8
github.com/pingcap/errors v0.11.
1
github.com/pingcap/errors v0.11.
4
github.com/pingcap/tidb v0.0.0-20190321025159-e8299209340c
github.com/pingcap/tidb v0.0.0-20190321025159-e8299209340c
github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7
github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7
github.com/sirupsen/logrus v1.3.0
github.com/sirupsen/logrus v1.3.0
...
...
vendor/github.com/pingcap/parser/go.sum1
浏览文件 @
82efd3c2
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f h1:5ZfJxyXo8KyX8DgGXC5B7ILL8y51fci/qYz2B4j8iLY=
github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/blacktear23/go-proxyprotocol v0.0.0-20180807104634-af7a81e8dd0d/go.mod h1:VKt7CNAQxpFpSDz3sXyj9hY/GbVsQCr0sB3w59nE7lU=
github.com/blacktear23/go-proxyprotocol v0.0.0-20180807104634-af7a81e8dd0d/go.mod h1:VKt7CNAQxpFpSDz3sXyj9hY/GbVsQCr0sB3w59nE7lU=
github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/coreos/bbolt v1.3.0 h1:HIgH5xUWXT914HCI671AxuTTqjj64UOFr7pHn48LUTI=
github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142 h1:3jFq2xL4ZajGK4aZY8jz+DAF0FHjI51BXjjSwCzS1Dk=
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cznic/golex v0.0.0-20181122101858-9c343928389c h1:G8zTsaqyVfIHpgMFcGgdbhHSFhlNc77rAKkhVbQ9kQg=
github.com/cznic/golex v0.0.0-20181122101858-9c343928389c h1:G8zTsaqyVfIHpgMFcGgdbhHSFhlNc77rAKkhVbQ9kQg=
github.com/cznic/golex v0.0.0-20181122101858-9c343928389c/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc=
github.com/cznic/golex v0.0.0-20181122101858-9c343928389c/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc=
...
@@ -25,49 +35,80 @@ github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0
...
@@ -25,49 +35,80 @@ github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0
github.com/cznic/y v0.0.0-20170802143616-045f81c6662a h1:N2rDAvHuM46OGscJkGX4Dw4BBqZgg6mGNGLYs5utVVo=
github.com/cznic/y v0.0.0-20170802143616-045f81c6662a h1:N2rDAvHuM46OGscJkGX4Dw4BBqZgg6mGNGLYs5utVVo=
github.com/cznic/y v0.0.0-20170802143616-045f81c6662a/go.mod h1:1rk5VM7oSnA4vjp+hrLQ3HWHa+Y4yPCa3/CsJrcNnvs=
github.com/cznic/y v0.0.0-20170802143616-045f81c6662a/go.mod h1:1rk5VM7oSnA4vjp+hrLQ3HWHa+Y4yPCa3/CsJrcNnvs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o=
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
github.com/etcd-io/gofail v0.0.0-20180808172546-51ce9a71510a h1:QNEenQIsGDEEfFNSnN+h6hE1OwnHqTg7Dl9gEk1Cko4=
github.com/etcd-io/gofail v0.0.0-20180808172546-51ce9a71510a/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE=
github.com/etcd-io/gofail v0.0.0-20180808172546-51ce9a71510a/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E=
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
github.com/go-sql-driver/mysql v0.0.0-20170715192408-3955978caca4/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v0.0.0-20170715192408-3955978caca4/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/gogo/protobuf v0.0.0-20180717141946-636bf0302bc9/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v0.0.0-20180717141946-636bf0302bc9/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI=
github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff h1:kOkM9whyQYodu09SJ6W3NCsHG7crFaJILQ22Gozp3lg=
github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v0.0.0-20180814211427-aa810b61a9c7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v0.0.0-20180814211427-aa810b61a9c7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.5.1 h1:3scN4iuXkNOyP98jF55Lv8a9j1o/IwvnDIZ0LHJK1nk=
github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio=
github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe h1:W/GaMY0y69G4cFlmsC6B9sbuo2fP8OFP1ABjt4kPz+w=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe h1:W/GaMY0y69G4cFlmsC6B9sbuo2fP8OFP1ABjt4kPz+w=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808 h1:pmpDGKLw4n82EtrNiLqB+xSz/JQwFOaZuMALYUHwX5s=
github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/myesui/uuid v1.0.0 h1:xCBmH4l5KuvLYc5L7AS7SZg9/jKdIFubM7OVoLqaQUI=
github.com/myesui/uuid v1.0.0/go.mod h1:2CDfNgU0LR8mIdO8vdWd8i9gWWxLlcoIGGpSNgafq84=
github.com/myesui/uuid v1.0.0/go.mod h1:2CDfNgU0LR8mIdO8vdWd8i9gWWxLlcoIGGpSNgafq84=
github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7 h1:7KAv7KMGTTqSmYZtNdcNTgsos+vFzULLwyElndwn+5c=
github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7/go.mod h1:iWMfgwqYW+e8n5lC/jjNEhwcjbRDpl5NT7n2h+4UNcI=
github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7/go.mod h1:iWMfgwqYW+e8n5lC/jjNEhwcjbRDpl5NT7n2h+4UNcI=
github.com/ngaut/sync2 v0.0.0-20141008032647-7a24ed77b2ef h1:K0Fn+DoFqNqktdZtdV3bPQ/0cuYh2H4rkg0tytX/07k=
github.com/ngaut/sync2 v0.0.0-20141008032647-7a24ed77b2ef/go.mod h1:7WjlapSfwQyo6LNmIvEWzsW1hbBQfpUO4JWnuQRmva8=
github.com/ngaut/sync2 v0.0.0-20141008032647-7a24ed77b2ef/go.mod h1:7WjlapSfwQyo6LNmIvEWzsW1hbBQfpUO4JWnuQRmva8=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo=
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
github.com/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg4X946/Y5Zwg=
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ=
github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ=
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
...
@@ -77,13 +118,18 @@ github.com/pingcap/errors v0.11.0 h1:DCJQB8jrHbQ1VVlMFIrbj2ApScNNotVmkSNplu2yUt4
...
@@ -77,13 +118,18 @@ github.com/pingcap/errors v0.11.0 h1:DCJQB8jrHbQ1VVlMFIrbj2ApScNNotVmkSNplu2yUt4
github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.1 h1:BXFZ6MdDd2U1uJUa2sRAWTmm+nieEzuyYM0R4aUTcC8=
github.com/pingcap/errors v0.11.1 h1:BXFZ6MdDd2U1uJUa2sRAWTmm+nieEzuyYM0R4aUTcC8=
github.com/pingcap/errors v0.11.1/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.1/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/gofail v0.0.0-20181217135706-6a951c1e42c3 h1:04yuCf5NMvLU8rB2m4Qs3rynH7EYpMno3lHkewIOdMo=
github.com/pingcap/gofail v0.0.0-20181217135706-6a951c1e42c3/go.mod h1:DazNTg0PTldtpsQiT9I5tVJwV1onHMKBBgXzmJUlMns=
github.com/pingcap/gofail v0.0.0-20181217135706-6a951c1e42c3/go.mod h1:DazNTg0PTldtpsQiT9I5tVJwV1onHMKBBgXzmJUlMns=
github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e h1:P73/4dPCL96rGrobssy1nVy2VaVpNCuLpCbr+FEaTA8=
github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw=
github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw=
github.com/pingcap/kvproto v0.0.0-20190215154024-7f2fc73ef562 h1:32oF1/8lVnBR2JVcCAnKPQATTOX0+ckRDFpjQk4Ngno=
github.com/pingcap/kvproto v0.0.0-20190215154024-7f2fc73ef562 h1:32oF1/8lVnBR2JVcCAnKPQATTOX0+ckRDFpjQk4Ngno=
github.com/pingcap/kvproto v0.0.0-20190215154024-7f2fc73ef562/go.mod h1:QMdbTAXCHzzygQzqcG9uVUgU2fKeSN1GmfMiykdSzzY=
github.com/pingcap/kvproto v0.0.0-20190215154024-7f2fc73ef562/go.mod h1:QMdbTAXCHzzygQzqcG9uVUgU2fKeSN1GmfMiykdSzzY=
github.com/pingcap/log v0.0.0-20190307075452-bd41d9273596 h1:t2OQTpPJnrPDGlvA+3FwJptMTt6MEPdzK1Wt99oaefQ=
github.com/pingcap/log v0.0.0-20190307075452-bd41d9273596 h1:t2OQTpPJnrPDGlvA+3FwJptMTt6MEPdzK1Wt99oaefQ=
github.com/pingcap/log v0.0.0-20190307075452-bd41d9273596/go.mod h1:WpHUKhNZ18v116SvGrmjkA9CBhYmuUTKL+p8JC9ANEw=
github.com/pingcap/log v0.0.0-20190307075452-bd41d9273596/go.mod h1:WpHUKhNZ18v116SvGrmjkA9CBhYmuUTKL+p8JC9ANEw=
github.com/pingcap/parser v0.0.0-20190312024907-3f6280b08c8b/go.mod h1:1FNvfp9+J0wvc4kl8eGNh7Rqrxveg15jJoWo/a0uHwA=
github.com/pingcap/parser v0.0.0-20190312024907-3f6280b08c8b/go.mod h1:1FNvfp9+J0wvc4kl8eGNh7Rqrxveg15jJoWo/a0uHwA=
github.com/pingcap/pd v2.1.0-rc.4+incompatible h1:/buwGk04aHO5odk/+O8ZOXGs4qkUjYTJ2UpCJXna8NE=
github.com/pingcap/pd v2.1.0-rc.4+incompatible/go.mod h1:nD3+EoYes4+aNNODO99ES59V83MZSI+dFbhyr667a0E=
github.com/pingcap/pd v2.1.0-rc.4+incompatible/go.mod h1:nD3+EoYes4+aNNODO99ES59V83MZSI+dFbhyr667a0E=
github.com/pingcap/tidb v0.0.0-20190321025159-e8299209340c h1:n3i2K6zUzXZDe6imOtdOhWltuqCLFtmLropKwS6ljeI=
github.com/pingcap/tidb v0.0.0-20190321025159-e8299209340c h1:n3i2K6zUzXZDe6imOtdOhWltuqCLFtmLropKwS6ljeI=
github.com/pingcap/tidb v0.0.0-20190321025159-e8299209340c/go.mod h1:FcgD4o1kq3YNk08MWtMRwNZXQJpM28bFdb/go9KpmEA=
github.com/pingcap/tidb v0.0.0-20190321025159-e8299209340c/go.mod h1:FcgD4o1kq3YNk08MWtMRwNZXQJpM28bFdb/go9KpmEA=
...
@@ -93,12 +139,17 @@ github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7 h1:wnjdQRhybddDesBVBK
...
@@ -93,12 +139,17 @@ github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7 h1:wnjdQRhybddDesBVBK
github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7/go.mod h1:RtkHW8WbcNxj8lsbzjaILci01CtYnYbIkQhjyZWrWVI=
github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7/go.mod h1:RtkHW8WbcNxj8lsbzjaILci01CtYnYbIkQhjyZWrWVI=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7 h1:gGBSHPOU7g8YjTbhwn+lvFm2VDEhhA+PwDIlstkgSxE=
github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7 h1:gGBSHPOU7g8YjTbhwn+lvFm2VDEhhA+PwDIlstkgSxE=
github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
github.com/prometheus/client_golang v0.9.0 h1:tXuTFVHC03mW0D+Ua1Q2d1EAVqLTuggX50V0VLICCzY=
github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39 h1:Cto4X6SVMWRPBkJ/3YHn1iDGDGc/Z+sW+AEMKHMVvN4=
github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d h1:GoAlyOgbOEIFdaDqxJVlbOQ1DtGmZWs/Qau0hIlk+WQ=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446 h1:/NRJ5vAYoqz+7sG51ubIDHXeWO8DlTSrToPu6q11ziA=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446 h1:/NRJ5vAYoqz+7sG51ubIDHXeWO8DlTSrToPu6q11ziA=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
...
@@ -109,7 +160,9 @@ github.com/shurcooL/vfsgen v0.0.0-20181020040650-a97a25d856ca/go.mod h1:TrYk7fJV
...
@@ -109,7 +160,9 @@ github.com/shurcooL/vfsgen v0.0.0-20181020040650-a97a25d856ca/go.mod h1:TrYk7fJV
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME=
github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME=
github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
...
@@ -120,17 +173,27 @@ github.com/struCoder/pidusage v0.1.2/go.mod h1:pWBlW3YuSwRl6h7R5KbvA4N8oOqe9LjaK
...
@@ -120,17 +173,27 @@ github.com/struCoder/pidusage v0.1.2/go.mod h1:pWBlW3YuSwRl6h7R5KbvA4N8oOqe9LjaK
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2/go.mod h1:2PfKggNGDuadAa0LElHrByyrz4JPZ9fFx6Gs7nx7ZZU=
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2/go.mod h1:2PfKggNGDuadAa0LElHrByyrz4JPZ9fFx6Gs7nx7ZZU=
github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU=
github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU=
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 h1:lYIiVDtZnyTWlNwiAxLj0bbpTcx1BWCFhXjfsvmPdNc=
github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/twinj/uuid v1.0.0 h1:fzz7COZnDrXGTAOHGuUGYd6sG+JMq+AoE7+Jlu0przk=
github.com/twinj/uuid v1.0.0/go.mod h1:mMgcE1RHFUFqe5AfiwlINXisXfDGro23fWdPUfOMjRY=
github.com/twinj/uuid v1.0.0/go.mod h1:mMgcE1RHFUFqe5AfiwlINXisXfDGro23fWdPUfOMjRY=
github.com/uber-go/atomic v1.3.2 h1:Azu9lPBWRNKzYXSIwRfgRuDuS0YKsK4NFhiQv98gkxo=
github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g=
github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g=
github.com/uber/jaeger-client-go v2.15.0+incompatible h1:NP3qsSqNxh8VYr956ur1N/1C1PjvOJnJykCzcD5QHbk=
github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-lib v1.5.0 h1:OHbgr8l656Ub3Fw5k9SWnBfIEwvoHQ+W2y+Aa9D1Uyo=
github.com/uber/jaeger-lib v1.5.0/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
github.com/uber/jaeger-lib v1.5.0/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
github.com/ugorji/go v0.0.0-20171019201919-bdcc60b419d1 h1:UvhxfNjNqlZ/x3cDyqxMhoiUpemd3zXkVQApN6bM/lg=
github.com/ugorji/go v0.0.0-20171019201919-bdcc60b419d1 h1:UvhxfNjNqlZ/x3cDyqxMhoiUpemd3zXkVQApN6bM/lg=
github.com/ugorji/go v0.0.0-20171019201919-bdcc60b419d1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/ugorji/go v0.0.0-20171019201919-bdcc60b419d1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d h1:ggUgChAeyge4NZ4QUw6lhHsVymzwSDJOZcE0s2X8S20=
github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d/go.mod h1:tu82oB5W2ykJRVioYsB+IQKcft7ryBr7w12qMBUPyXg=
github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d/go.mod h1:tu82oB5W2ykJRVioYsB+IQKcft7ryBr7w12qMBUPyXg=
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 h1:MPPkRncZLN9Kh4MEFmbnK4h3BD7AUmskWv2+EeZJCCs=
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
...
@@ -154,6 +217,7 @@ golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb/go.mod h1:STP8DvDyc/dI5b8T5h
...
@@ -154,6 +217,7 @@ golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190130214255-bb1329dc71a0 h1:iRpjPej1fPzmfoBhMFkp3HdqzF+ytPmAwiQhJGV0zGw=
golang.org/x/tools v0.0.0-20190130214255-bb1329dc71a0 h1:iRpjPej1fPzmfoBhMFkp3HdqzF+ytPmAwiQhJGV0zGw=
...
@@ -167,14 +231,20 @@ google.golang.org/grpc v0.0.0-20180607172857-7a6a684ca69e/go.mod h1:yo6s7OP7yaDg
...
@@ -167,14 +231,20 @@ google.golang.org/grpc v0.0.0-20180607172857-7a6a684ca69e/go.mod h1:yo6s7OP7yaDg
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
google.golang.org/grpc v1.17.0 h1:TRJYBgMclJvGYn2rIMjj+h9KtMt5r1Ij7ODVRIZkwhk=
google.golang.org/grpc v1.17.0 h1:TRJYBgMclJvGYn2rIMjj+h9KtMt5r1Ij7ODVRIZkwhk=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/stretchr/testify.v1 v1.2.2 h1:yhQC6Uy5CqibAIlk1wlusa/MJ3iAN49/BsR/dCCKz3M=
gopkg.in/stretchr/testify.v1 v1.2.2/go.mod h1:QI5V/q6UbPmuhtm10CaFZxED9NreB8PnFYN9JcR6TxU=
gopkg.in/stretchr/testify.v1 v1.2.2/go.mod h1:QI5V/q6UbPmuhtm10CaFZxED9NreB8PnFYN9JcR6TxU=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
sourcegraph.com/sourcegraph/appdash v0.0.0-20180531100431-4c381bd170b4 h1:VO9oZbbkvTwqLimlQt15QNdOOBArT2dw/bvzsMZBiqQ=
sourcegraph.com/sourcegraph/appdash v0.0.0-20180531100431-4c381bd170b4/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20180531100431-4c381bd170b4/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k=
sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k=
vendor/github.com/pingcap/parser/misc.go
浏览文件 @
82efd3c2
...
@@ -161,6 +161,7 @@ var tokenMap = map[string]int{
...
@@ -161,6 +161,7 @@ var tokenMap = map[string]int{
"BIT_OR"
:
bitOr
,
"BIT_OR"
:
bitOr
,
"BIT_XOR"
:
bitXor
,
"BIT_XOR"
:
bitXor
,
"BLOB"
:
blobType
,
"BLOB"
:
blobType
,
"BLOCK"
:
block
,
"BOOL"
:
boolType
,
"BOOL"
:
boolType
,
"BOOLEAN"
:
booleanType
,
"BOOLEAN"
:
booleanType
,
"BOTH"
:
both
,
"BOTH"
:
both
,
...
@@ -196,9 +197,11 @@ var tokenMap = map[string]int{
...
@@ -196,9 +197,11 @@ var tokenMap = map[string]int{
"CONNECTION"
:
connection
,
"CONNECTION"
:
connection
,
"CONSISTENT"
:
consistent
,
"CONSISTENT"
:
consistent
,
"CONSTRAINT"
:
constraint
,
"CONSTRAINT"
:
constraint
,
"CONTEXT"
:
context
,
"CONVERT"
:
convert
,
"CONVERT"
:
convert
,
"COPY"
:
copyKwd
,
"COPY"
:
copyKwd
,
"COUNT"
:
count
,
"COUNT"
:
count
,
"CPU"
:
cpu
,
"CREATE"
:
create
,
"CREATE"
:
create
,
"CROSS"
:
cross
,
"CROSS"
:
cross
,
"CURRENT"
:
current
,
"CURRENT"
:
current
,
...
@@ -261,6 +264,7 @@ var tokenMap = map[string]int{
...
@@ -261,6 +264,7 @@ var tokenMap = map[string]int{
"EXPLAIN"
:
explain
,
"EXPLAIN"
:
explain
,
"EXTRACT"
:
extract
,
"EXTRACT"
:
extract
,
"FALSE"
:
falseKwd
,
"FALSE"
:
falseKwd
,
"FAULTS"
:
faultsSym
,
"FIELDS"
:
fields
,
"FIELDS"
:
fields
,
"FIRST"
:
first
,
"FIRST"
:
first
,
"FIXED"
:
fixed
,
"FIXED"
:
fixed
,
...
@@ -293,6 +297,7 @@ var tokenMap = map[string]int{
...
@@ -293,6 +297,7 @@ var tokenMap = map[string]int{
"IF"
:
ifKwd
,
"IF"
:
ifKwd
,
"IGNORE"
:
ignore
,
"IGNORE"
:
ignore
,
"IN"
:
in
,
"IN"
:
in
,
"INCREMENTAL"
:
incremental
,
"INDEX"
:
index
,
"INDEX"
:
index
,
"INDEXES"
:
indexes
,
"INDEXES"
:
indexes
,
"INFILE"
:
infile
,
"INFILE"
:
infile
,
...
@@ -306,6 +311,8 @@ var tokenMap = map[string]int{
...
@@ -306,6 +311,8 @@ var tokenMap = map[string]int{
"INT3"
:
int3Type
,
"INT3"
:
int3Type
,
"INT4"
:
int4Type
,
"INT4"
:
int4Type
,
"INT8"
:
int8Type
,
"INT8"
:
int8Type
,
"IO"
:
io
,
"IPC"
:
ipc
,
"INTEGER"
:
integerType
,
"INTEGER"
:
integerType
,
"INTERVAL"
:
interval
,
"INTERVAL"
:
interval
,
"INTERNAL"
:
internal
,
"INTERNAL"
:
internal
,
...
@@ -352,6 +359,7 @@ var tokenMap = map[string]int{
...
@@ -352,6 +359,7 @@ var tokenMap = map[string]int{
"MEDIUMBLOB"
:
mediumblobType
,
"MEDIUMBLOB"
:
mediumblobType
,
"MEDIUMINT"
:
mediumIntType
,
"MEDIUMINT"
:
mediumIntType
,
"MEDIUMTEXT"
:
mediumtextType
,
"MEDIUMTEXT"
:
mediumtextType
,
"MEMORY"
:
memory
,
"MERGE"
:
merge
,
"MERGE"
:
merge
,
"MICROSECOND"
:
microsecond
,
"MICROSECOND"
:
microsecond
,
"MIN"
:
min
,
"MIN"
:
min
,
...
@@ -382,15 +390,18 @@ var tokenMap = map[string]int{
...
@@ -382,15 +390,18 @@ var tokenMap = map[string]int{
"OFFSET"
:
offset
,
"OFFSET"
:
offset
,
"ON"
:
on
,
"ON"
:
on
,
"ONLY"
:
only
,
"ONLY"
:
only
,
"OPTIMISTIC"
:
optimistic
,
"OPTION"
:
option
,
"OPTION"
:
option
,
"OPTIONALLY"
:
optionally
,
"OPTIONALLY"
:
optionally
,
"OR"
:
or
,
"OR"
:
or
,
"ORDER"
:
order
,
"ORDER"
:
order
,
"OUTER"
:
outer
,
"OUTER"
:
outer
,
"PACK_KEYS"
:
packKeys
,
"PACK_KEYS"
:
packKeys
,
"PAGE"
:
pageSym
,
"PARTITION"
:
partition
,
"PARTITION"
:
partition
,
"PARTITIONS"
:
partitions
,
"PARTITIONS"
:
partitions
,
"PASSWORD"
:
password
,
"PASSWORD"
:
password
,
"PESSIMISTIC"
:
pessimistic
,
"PLUGINS"
:
plugins
,
"PLUGINS"
:
plugins
,
"POSITION"
:
position
,
"POSITION"
:
position
,
"PRECEDING"
:
preceding
,
"PRECEDING"
:
preceding
,
...
@@ -401,6 +412,7 @@ var tokenMap = map[string]int{
...
@@ -401,6 +412,7 @@ var tokenMap = map[string]int{
"PROCEDURE"
:
procedure
,
"PROCEDURE"
:
procedure
,
"PROCESS"
:
process
,
"PROCESS"
:
process
,
"PROCESSLIST"
:
processlist
,
"PROCESSLIST"
:
processlist
,
"PROFILE"
:
profile
,
"PROFILES"
:
profiles
,
"PROFILES"
:
profiles
,
"PUMP"
:
pump
,
"PUMP"
:
pump
,
"QUARTER"
:
quarter
,
"QUARTER"
:
quarter
,
...
@@ -408,6 +420,7 @@ var tokenMap = map[string]int{
...
@@ -408,6 +420,7 @@ var tokenMap = map[string]int{
"QUERIES"
:
queries
,
"QUERIES"
:
queries
,
"QUICK"
:
quick
,
"QUICK"
:
quick
,
"SHARD_ROW_ID_BITS"
:
shardRowIDBits
,
"SHARD_ROW_ID_BITS"
:
shardRowIDBits
,
"PRE_SPLIT_REGIONS"
:
preSplitRegions
,
"RANGE"
:
rangeKwd
,
"RANGE"
:
rangeKwd
,
"RECOVER"
:
recover
,
"RECOVER"
:
recover
,
"READ"
:
read
,
"READ"
:
read
,
...
@@ -454,10 +467,12 @@ var tokenMap = map[string]int{
...
@@ -454,10 +467,12 @@ var tokenMap = map[string]int{
"SMALLINT"
:
smallIntType
,
"SMALLINT"
:
smallIntType
,
"SNAPSHOT"
:
snapshot
,
"SNAPSHOT"
:
snapshot
,
"SOME"
:
some
,
"SOME"
:
some
,
"SPLIT"
:
split
,
"SQL"
:
sql
,
"SQL"
:
sql
,
"SQL_CACHE"
:
sqlCache
,
"SQL_CACHE"
:
sqlCache
,
"SQL_CALC_FOUND_ROWS"
:
sqlCalcFoundRows
,
"SQL_CALC_FOUND_ROWS"
:
sqlCalcFoundRows
,
"SQL_NO_CACHE"
:
sqlNoCache
,
"SQL_NO_CACHE"
:
sqlNoCache
,
"SOURCE"
:
source
,
"SSL"
:
ssl
,
"SSL"
:
ssl
,
"START"
:
start
,
"START"
:
start
,
"STARTING"
:
starting
,
"STARTING"
:
starting
,
...
@@ -468,6 +483,9 @@ var tokenMap = map[string]int{
...
@@ -468,6 +483,9 @@ var tokenMap = map[string]int{
"STATS_META"
:
statsMeta
,
"STATS_META"
:
statsMeta
,
"STATS_PERSISTENT"
:
statsPersistent
,
"STATS_PERSISTENT"
:
statsPersistent
,
"STATUS"
:
status
,
"STATUS"
:
status
,
"SWAPS"
:
swaps
,
"SWITCHES"
:
switchesSym
,
"OPEN"
:
open
,
"STD"
:
stddevPop
,
"STD"
:
stddevPop
,
"STDDEV"
:
stddevPop
,
"STDDEV"
:
stddevPop
,
"STDDEV_POP"
:
stddevPop
,
"STDDEV_POP"
:
stddevPop
,
...
@@ -513,6 +531,7 @@ var tokenMap = map[string]int{
...
@@ -513,6 +531,7 @@ var tokenMap = map[string]int{
"TOKUDB_ZLIB"
:
tokudbZlib
,
"TOKUDB_ZLIB"
:
tokudbZlib
,
"TOP"
:
top
,
"TOP"
:
top
,
"TRACE"
:
trace
,
"TRACE"
:
trace
,
"TRADITIONAL"
:
traditional
,
"TRAILING"
:
trailing
,
"TRAILING"
:
trailing
,
"TRANSACTION"
:
transaction
,
"TRANSACTION"
:
transaction
,
"TRIGGER"
:
trigger
,
"TRIGGER"
:
trigger
,
...
...
vendor/github.com/pingcap/parser/model/ddl.go
浏览文件 @
82efd3c2
...
@@ -55,6 +55,7 @@ const (
...
@@ -55,6 +55,7 @@ const (
ActionTruncateTablePartition
ActionType
=
23
ActionTruncateTablePartition
ActionType
=
23
ActionDropView
ActionType
=
24
ActionDropView
ActionType
=
24
ActionRecoverTable
ActionType
=
25
ActionRecoverTable
ActionType
=
25
ActionModifySchemaCharsetAndCollate
ActionType
=
26
)
)
// AddIndexStr is a string related to the operation of "add index".
// AddIndexStr is a string related to the operation of "add index".
...
@@ -86,6 +87,7 @@ var actionMap = map[ActionType]string{
...
@@ -86,6 +87,7 @@ var actionMap = map[ActionType]string{
ActionTruncateTablePartition
:
"truncate partition"
,
ActionTruncateTablePartition
:
"truncate partition"
,
ActionDropView
:
"drop view"
,
ActionDropView
:
"drop view"
,
ActionRecoverTable
:
"recover table"
,
ActionRecoverTable
:
"recover table"
,
ActionModifySchemaCharsetAndCollate
:
"modify schema charset and collate"
,
}
}
// String return current ddl action in string
// String return current ddl action in string
...
...
vendor/github.com/pingcap/parser/model/model.go
浏览文件 @
82efd3c2
...
@@ -175,9 +175,15 @@ const (
...
@@ -175,9 +175,15 @@ const (
// After version V2.1.2 (PR#8738) , TiDB add UTF8 check, then the user upgrade from v2.0.8 insert some UTF8MB4 characters will got error.
// After version V2.1.2 (PR#8738) , TiDB add UTF8 check, then the user upgrade from v2.0.8 insert some UTF8MB4 characters will got error.
// This is not compatibility for user. Then we try to fix this in PR #9820, and increase the version number.
// This is not compatibility for user. Then we try to fix this in PR #9820, and increase the version number.
TableInfoVersion2
=
uint16
(
2
)
TableInfoVersion2
=
uint16
(
2
)
// TableInfoVersion3 means the table info version is 3.
// This version aims to deal with upper-cased charset name in TableInfo stored by versions prior to TiDB v2.1.9:
// TiDB always suppose all charsets / collations as lower-cased and try to convert them if they're not.
// However, the convert is missed in some scenarios before v2.1.9, so for all those tables prior to TableInfoVersion3, their
// charsets / collations will be converted to lower-case while loading from the storage.
TableInfoVersion3
=
uint16
(
3
)
// CurrLatestTableInfoVersion means the latest table info in the current TiDB.
// CurrLatestTableInfoVersion means the latest table info in the current TiDB.
CurrLatestTableInfoVersion
=
TableInfoVersion
2
CurrLatestTableInfoVersion
=
TableInfoVersion
3
)
)
// ExtraHandleName is the name of ExtraHandle Column.
// ExtraHandleName is the name of ExtraHandle Column.
...
@@ -214,6 +220,10 @@ type TableInfo struct {
...
@@ -214,6 +220,10 @@ type TableInfo struct {
ShardRowIDBits
uint64
ShardRowIDBits
uint64
// MaxShardRowIDBits uses to record the max ShardRowIDBits be used so far.
// MaxShardRowIDBits uses to record the max ShardRowIDBits be used so far.
MaxShardRowIDBits
uint64
`json:"max_shard_row_id_bits"`
MaxShardRowIDBits
uint64
`json:"max_shard_row_id_bits"`
// PreSplitRegions specify the pre-split region when create table.
// The pre-split region num is 2^(PreSplitRegions-1).
// And the PreSplitRegions should less than or equal to ShardRowIDBits.
PreSplitRegions
uint64
`json:"pre_split_regions"`
Partition
*
PartitionInfo
`json:"partition"`
Partition
*
PartitionInfo
`json:"partition"`
...
@@ -716,8 +726,8 @@ func ColumnToProto(c *ColumnInfo) *tipb.ColumnInfo {
...
@@ -716,8 +726,8 @@ func ColumnToProto(c *ColumnInfo) *tipb.ColumnInfo {
// TODO: update it when more collate is supported.
// TODO: update it when more collate is supported.
func
collationToProto
(
c
string
)
int32
{
func
collationToProto
(
c
string
)
int32
{
v
:=
mysql
.
CollationNames
[
c
]
v
:=
mysql
.
CollationNames
[
c
]
if
v
==
mysql
.
BinaryCollationID
{
if
v
==
mysql
.
Binary
Default
CollationID
{
return
int32
(
mysql
.
BinaryCollationID
)
return
int32
(
mysql
.
Binary
Default
CollationID
)
}
}
// We only support binary and utf8_bin collation.
// We only support binary and utf8_bin collation.
// Setting other collations to utf8_bin for old data compatibility.
// Setting other collations to utf8_bin for old data compatibility.
...
...
vendor/github.com/pingcap/parser/mysql/charset.go
浏览文件 @
82efd3c2
...
@@ -20,15 +20,15 @@ func CharsetNameToID(charset string) uint8 {
...
@@ -20,15 +20,15 @@ func CharsetNameToID(charset string) uint8 {
// Use quick path for TiDB to avoid access CharsetIDs map
// Use quick path for TiDB to avoid access CharsetIDs map
// "SHOW CHARACTER SET;" to see all the supported character sets.
// "SHOW CHARACTER SET;" to see all the supported character sets.
if
charset
==
"utf8mb4"
{
if
charset
==
"utf8mb4"
{
return
UTF8MB4CollationID
return
UTF8MB4
Default
CollationID
}
else
if
charset
==
"binary"
{
}
else
if
charset
==
"binary"
{
return
BinaryCollationID
return
Binary
Default
CollationID
}
else
if
charset
==
"utf8"
{
}
else
if
charset
==
"utf8"
{
return
UTF8CollationID
return
UTF8
Default
CollationID
}
else
if
charset
==
"ascii"
{
}
else
if
charset
==
"ascii"
{
return
ASCIICollationID
return
ASCII
Default
CollationID
}
else
if
charset
==
"latin1"
{
}
else
if
charset
==
"latin1"
{
return
Latin1CollationID
return
Latin1
Default
CollationID
}
else
{
}
else
{
return
CharsetIDs
[
charset
]
return
CharsetIDs
[
charset
]
}
}
...
@@ -41,10 +41,10 @@ var CharsetIDs = map[string]uint8{
...
@@ -41,10 +41,10 @@ var CharsetIDs = map[string]uint8{
"cp850"
:
4
,
"cp850"
:
4
,
"hp8"
:
6
,
"hp8"
:
6
,
"koi8r"
:
7
,
"koi8r"
:
7
,
"latin1"
:
Latin1CollationID
,
"latin1"
:
Latin1
Default
CollationID
,
"latin2"
:
9
,
"latin2"
:
9
,
"swe7"
:
10
,
"swe7"
:
10
,
"ascii"
:
ASCIICollationID
,
"ascii"
:
ASCII
Default
CollationID
,
"ujis"
:
12
,
"ujis"
:
12
,
"sjis"
:
13
,
"sjis"
:
13
,
"hebrew"
:
16
,
"hebrew"
:
16
,
...
@@ -57,7 +57,7 @@ var CharsetIDs = map[string]uint8{
...
@@ -57,7 +57,7 @@ var CharsetIDs = map[string]uint8{
"gbk"
:
28
,
"gbk"
:
28
,
"latin5"
:
30
,
"latin5"
:
30
,
"armscii8"
:
32
,
"armscii8"
:
32
,
"utf8"
:
UTF8CollationID
,
"utf8"
:
UTF8
Default
CollationID
,
"ucs2"
:
35
,
"ucs2"
:
35
,
"cp866"
:
36
,
"cp866"
:
36
,
"keybcs2"
:
37
,
"keybcs2"
:
37
,
...
@@ -65,14 +65,14 @@ var CharsetIDs = map[string]uint8{
...
@@ -65,14 +65,14 @@ var CharsetIDs = map[string]uint8{
"macroman"
:
39
,
"macroman"
:
39
,
"cp852"
:
40
,
"cp852"
:
40
,
"latin7"
:
41
,
"latin7"
:
41
,
"utf8mb4"
:
UTF8MB4CollationID
,
"utf8mb4"
:
UTF8MB4
Default
CollationID
,
"cp1251"
:
51
,
"cp1251"
:
51
,
"utf16"
:
54
,
"utf16"
:
54
,
"utf16le"
:
56
,
"utf16le"
:
56
,
"cp1256"
:
57
,
"cp1256"
:
57
,
"cp1257"
:
59
,
"cp1257"
:
59
,
"utf32"
:
60
,
"utf32"
:
60
,
"binary"
:
BinaryCollationID
,
"binary"
:
Binary
Default
CollationID
,
"geostd8"
:
92
,
"geostd8"
:
92
,
"cp932"
:
95
,
"cp932"
:
95
,
"eucjpms"
:
97
,
"eucjpms"
:
97
,
...
@@ -85,10 +85,10 @@ var Charsets = map[string]string{
...
@@ -85,10 +85,10 @@ var Charsets = map[string]string{
"cp850"
:
"cp850_general_ci"
,
"cp850"
:
"cp850_general_ci"
,
"hp8"
:
"hp8_english_ci"
,
"hp8"
:
"hp8_english_ci"
,
"koi8r"
:
"koi8r_general_ci"
,
"koi8r"
:
"koi8r_general_ci"
,
"latin1"
:
"latin1_
swedish_ci
"
,
"latin1"
:
"latin1_
bin
"
,
"latin2"
:
"latin2_general_ci"
,
"latin2"
:
"latin2_general_ci"
,
"swe7"
:
"swe7_swedish_ci"
,
"swe7"
:
"swe7_swedish_ci"
,
"ascii"
:
"ascii_
general_ci
"
,
"ascii"
:
"ascii_
bin
"
,
"ujis"
:
"ujis_japanese_ci"
,
"ujis"
:
"ujis_japanese_ci"
,
"sjis"
:
"sjis_japanese_ci"
,
"sjis"
:
"sjis_japanese_ci"
,
"hebrew"
:
"hebrew_general_ci"
,
"hebrew"
:
"hebrew_general_ci"
,
...
@@ -101,7 +101,7 @@ var Charsets = map[string]string{
...
@@ -101,7 +101,7 @@ var Charsets = map[string]string{
"gbk"
:
"gbk_chinese_ci"
,
"gbk"
:
"gbk_chinese_ci"
,
"latin5"
:
"latin5_turkish_ci"
,
"latin5"
:
"latin5_turkish_ci"
,
"armscii8"
:
"armscii8_general_ci"
,
"armscii8"
:
"armscii8_general_ci"
,
"utf8"
:
"utf8_
general_ci
"
,
"utf8"
:
"utf8_
bin
"
,
"ucs2"
:
"ucs2_general_ci"
,
"ucs2"
:
"ucs2_general_ci"
,
"cp866"
:
"cp866_general_ci"
,
"cp866"
:
"cp866_general_ci"
,
"keybcs2"
:
"keybcs2_general_ci"
,
"keybcs2"
:
"keybcs2_general_ci"
,
...
@@ -109,7 +109,7 @@ var Charsets = map[string]string{
...
@@ -109,7 +109,7 @@ var Charsets = map[string]string{
"macroman"
:
"macroman_general_ci"
,
"macroman"
:
"macroman_general_ci"
,
"cp852"
:
"cp852_general_ci"
,
"cp852"
:
"cp852_general_ci"
,
"latin7"
:
"latin7_general_ci"
,
"latin7"
:
"latin7_general_ci"
,
"utf8mb4"
:
"utf8mb4_
general_ci
"
,
"utf8mb4"
:
"utf8mb4_
bin
"
,
"cp1251"
:
"cp1251_general_ci"
,
"cp1251"
:
"cp1251_general_ci"
,
"utf16"
:
"utf16_general_ci"
,
"utf16"
:
"utf16_general_ci"
,
"utf16le"
:
"utf16le_general_ci"
,
"utf16le"
:
"utf16le_general_ci"
,
...
@@ -122,7 +122,7 @@ var Charsets = map[string]string{
...
@@ -122,7 +122,7 @@ var Charsets = map[string]string{
"eucjpms"
:
"eucjpms_japanese_ci"
,
"eucjpms"
:
"eucjpms_japanese_ci"
,
}
}
// Collations maps MySQL
default
collation ID to its name.
// Collations maps MySQL collation ID to its name.
var
Collations
=
map
[
uint8
]
string
{
var
Collations
=
map
[
uint8
]
string
{
1
:
"big5_chinese_ci"
,
1
:
"big5_chinese_ci"
,
2
:
"latin2_czech_cs"
,
2
:
"latin2_czech_cs"
,
...
@@ -343,9 +343,10 @@ var Collations = map[uint8]string{
...
@@ -343,9 +343,10 @@ var Collations = map[uint8]string{
245
:
"utf8mb4_croatian_ci"
,
245
:
"utf8mb4_croatian_ci"
,
246
:
"utf8mb4_unicode_520_ci"
,
246
:
"utf8mb4_unicode_520_ci"
,
247
:
"utf8mb4_vietnamese_ci"
,
247
:
"utf8mb4_vietnamese_ci"
,
255
:
"utf8mb4_0900_ai_ci"
,
}
}
// CollationNames maps MySQL
default
collation name to its ID
// CollationNames maps MySQL collation name to its ID
var
CollationNames
=
map
[
string
]
uint8
{
var
CollationNames
=
map
[
string
]
uint8
{
"big5_chinese_ci"
:
1
,
"big5_chinese_ci"
:
1
,
"latin2_czech_cs"
:
2
,
"latin2_czech_cs"
:
2
,
...
@@ -566,6 +567,7 @@ var CollationNames = map[string]uint8{
...
@@ -566,6 +567,7 @@ var CollationNames = map[string]uint8{
"utf8mb4_croatian_ci"
:
245
,
"utf8mb4_croatian_ci"
:
245
,
"utf8mb4_unicode_520_ci"
:
246
,
"utf8mb4_unicode_520_ci"
:
246
,
"utf8mb4_vietnamese_ci"
:
247
,
"utf8mb4_vietnamese_ci"
:
247
,
"utf8mb4_0900_ai_ci"
:
255
,
}
}
// MySQL collation information.
// MySQL collation information.
...
@@ -575,11 +577,11 @@ const (
...
@@ -575,11 +577,11 @@ const (
DefaultCharset
=
UTF8MB4Charset
DefaultCharset
=
UTF8MB4Charset
// DefaultCollationID is utf8mb4_bin(46)
// DefaultCollationID is utf8mb4_bin(46)
DefaultCollationID
=
46
DefaultCollationID
=
46
Latin1
CollationID
=
8
Latin1
DefaultCollationID
=
47
ASCII
CollationID
=
11
ASCII
DefaultCollationID
=
65
UTF8
CollationID
=
3
3
UTF8
DefaultCollationID
=
8
3
UTF8MB4
CollationID
=
45
UTF8MB4
DefaultCollationID
=
46
Binary
CollationID
=
63
Binary
DefaultCollationID
=
63
UTF8DefaultCollation
=
"utf8_bin"
UTF8DefaultCollation
=
"utf8_bin"
UTF8MB4DefaultCollation
=
"utf8mb4_bin"
UTF8MB4DefaultCollation
=
"utf8mb4_bin"
DefaultCollationName
=
UTF8MB4DefaultCollation
DefaultCollationName
=
UTF8MB4DefaultCollation
...
...
vendor/github.com/pingcap/parser/mysql/errcode.go
浏览文件 @
82efd3c2
...
@@ -882,6 +882,7 @@ const (
...
@@ -882,6 +882,7 @@ const (
ErrMustChangePasswordLogin
=
1862
ErrMustChangePasswordLogin
=
1862
ErrRowInWrongPartition
=
1863
ErrRowInWrongPartition
=
1863
ErrErrorLast
=
1863
ErrErrorLast
=
1863
ErrInvalidJSONData
=
3069
ErrGeneratedColumnFunctionIsNotAllowed
=
3102
ErrGeneratedColumnFunctionIsNotAllowed
=
3102
ErrBadGeneratedColumn
=
3105
ErrBadGeneratedColumn
=
3105
ErrUnsupportedOnGeneratedColumn
=
3106
ErrUnsupportedOnGeneratedColumn
=
3106
...
@@ -890,10 +891,11 @@ const (
...
@@ -890,10 +891,11 @@ const (
ErrGeneratedColumnRefAutoInc
=
3109
ErrGeneratedColumnRefAutoInc
=
3109
ErrInvalidJSONText
=
3140
ErrInvalidJSONText
=
3140
ErrInvalidJSONPath
=
3143
ErrInvalidJSONPath
=
3143
ErrInvalid
JSONData
=
3146
ErrInvalid
TypeForJSON
=
3146
ErrInvalidJSONPathWildcard
=
3149
ErrInvalidJSONPathWildcard
=
3149
ErrInvalidJSONContainsPathType
=
3150
ErrInvalidJSONContainsPathType
=
3150
ErrJSONUsedAsKey
=
3152
ErrJSONUsedAsKey
=
3152
ErrBadUser
=
3162
ErrRoleNotGranted
=
3530
ErrRoleNotGranted
=
3530
ErrWindowNoSuchWindow
=
3579
ErrWindowNoSuchWindow
=
3579
ErrWindowCircularityInWindowGraph
=
3580
ErrWindowCircularityInWindowGraph
=
3580
...
@@ -921,6 +923,8 @@ const (
...
@@ -921,6 +923,8 @@ const (
ErrMemExceedThreshold
=
8001
ErrMemExceedThreshold
=
8001
ErrForUpdateCantRetry
=
8002
ErrForUpdateCantRetry
=
8002
ErrAdminCheckTable
=
8003
ErrAdminCheckTable
=
8003
ErrTxnTooLarge
=
8004
ErrWriteConflictInTiDB
=
8005
ErrInvalidPluginID
=
8101
ErrInvalidPluginID
=
8101
ErrInvalidPluginManifest
=
8102
ErrInvalidPluginManifest
=
8102
ErrInvalidPluginName
=
8103
ErrInvalidPluginName
=
8103
...
@@ -938,6 +942,5 @@ const (
...
@@ -938,6 +942,5 @@ const (
ErrResolveLockTimeout
=
9004
ErrResolveLockTimeout
=
9004
ErrRegionUnavailable
=
9005
ErrRegionUnavailable
=
9005
ErrGCTooEarly
=
9006
ErrGCTooEarly
=
9006
ErrWriteConflict
=
9007
ErrTxnTooLarge
=
9500
)
)
vendor/github.com/pingcap/parser/mysql/errname.go
浏览文件 @
82efd3c2
...
@@ -885,9 +885,10 @@ var MySQLErrName = map[uint16]string{
...
@@ -885,9 +885,10 @@ var MySQLErrName = map[uint16]string{
ErrDependentByGeneratedColumn
:
"Column '%s' has a generated column dependency."
,
ErrDependentByGeneratedColumn
:
"Column '%s' has a generated column dependency."
,
ErrGeneratedColumnFunctionIsNotAllowed
:
"Expression of generated column '%s' contains a disallowed function."
,
ErrGeneratedColumnFunctionIsNotAllowed
:
"Expression of generated column '%s' contains a disallowed function."
,
ErrGeneratedColumnRefAutoInc
:
"Generated column '%s' cannot refer to auto-increment column."
,
ErrGeneratedColumnRefAutoInc
:
"Generated column '%s' cannot refer to auto-increment column."
,
ErrInvalidJSONData
:
"Invalid JSON data provided to function %s: %s"
,
ErrInvalidJSONText
:
"Invalid JSON text: %-.192s"
,
ErrInvalidJSONText
:
"Invalid JSON text: %-.192s"
,
ErrInvalidJSONPath
:
"Invalid JSON path expression %s."
,
ErrInvalidJSONPath
:
"Invalid JSON path expression %s."
,
ErrInvalid
JSONData
:
"Invalid data type for JSON data
"
,
ErrInvalid
TypeForJSON
:
"Invalid data type for JSON data in argument %d to function %s; a JSON string or JSON type is required.
"
,
ErrInvalidJSONPathWildcard
:
"In this situation, path expressions may not contain the * and ** tokens."
,
ErrInvalidJSONPathWildcard
:
"In this situation, path expressions may not contain the * and ** tokens."
,
ErrInvalidJSONContainsPathType
:
"The second argument can only be either 'one' or 'all'."
,
ErrInvalidJSONContainsPathType
:
"The second argument can only be either 'one' or 'all'."
,
ErrJSONUsedAsKey
:
"JSON column '%-.192s' cannot be used in key specification."
,
ErrJSONUsedAsKey
:
"JSON column '%-.192s' cannot be used in key specification."
,
...
@@ -918,7 +919,8 @@ var MySQLErrName = map[uint16]string{
...
@@ -918,7 +919,8 @@ var MySQLErrName = map[uint16]string{
ErrMemExceedThreshold
:
"%s holds %dB memory, exceeds threshold %dB.%s"
,
ErrMemExceedThreshold
:
"%s holds %dB memory, exceeds threshold %dB.%s"
,
ErrForUpdateCantRetry
:
"[%d] can not retry select for update statement"
,
ErrForUpdateCantRetry
:
"[%d] can not retry select for update statement"
,
ErrAdminCheckTable
:
"TiDB admin check table failed."
,
ErrAdminCheckTable
:
"TiDB admin check table failed."
,
ErrTxnTooLarge
:
"Transaction is too large"
,
ErrWriteConflictInTiDB
:
"Write conflict, txnStartTS %d is stale"
,
ErrInvalidPluginID
:
"Wrong plugin id: %s, valid plugin id is [name]-[version], both name and version should not contain '-'"
,
ErrInvalidPluginID
:
"Wrong plugin id: %s, valid plugin id is [name]-[version], both name and version should not contain '-'"
,
ErrInvalidPluginManifest
:
"Cannot read plugin %s's manifest"
,
ErrInvalidPluginManifest
:
"Cannot read plugin %s's manifest"
,
ErrInvalidPluginName
:
"Plugin load with %s but got wrong name %s"
,
ErrInvalidPluginName
:
"Plugin load with %s but got wrong name %s"
,
...
@@ -936,6 +938,5 @@ var MySQLErrName = map[uint16]string{
...
@@ -936,6 +938,5 @@ var MySQLErrName = map[uint16]string{
ErrResolveLockTimeout
:
"Resolve lock timeout"
,
ErrResolveLockTimeout
:
"Resolve lock timeout"
,
ErrRegionUnavailable
:
"Region is unavailable"
,
ErrRegionUnavailable
:
"Region is unavailable"
,
ErrGCTooEarly
:
"GC life time is shorter than transaction duration, transaction starts at %v, GC safe point is %v"
,
ErrGCTooEarly
:
"GC life time is shorter than transaction duration, transaction starts at %v, GC safe point is %v"
,
ErrWriteConflict
:
"Write conflict, txnStartTS=%d, conflictStartTS=%d, conflictCommitTS=%d, key=%s"
,
ErrTxnTooLarge
:
"Transaction is too large"
,
}
}
vendor/github.com/pingcap/parser/parser.go
浏览文件 @
82efd3c2
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
vendor/github.com/pingcap/parser/parser.y
浏览文件 @
82efd3c2
...
@@ -203,6 +203,7 @@ import (
...
@@ -203,6 +203,7 @@ import (
primary
"PRIMARY"
primary
"PRIMARY"
procedure
"PROCEDURE"
procedure
"PROCEDURE"
shardRowIDBits
"SHARD_ROW_ID_BITS"
shardRowIDBits
"SHARD_ROW_ID_BITS"
preSplitRegions
"PRE_SPLIT_REGIONS"
rangeKwd
"RANGE"
rangeKwd
"RANGE"
rank
"RANK"
rank
"RANK"
read
"READ"
read
"READ"
...
@@ -281,6 +282,7 @@ import (
...
@@ -281,6 +282,7 @@ import (
begin
"BEGIN"
begin
"BEGIN"
binlog
"BINLOG"
binlog
"BINLOG"
bitType
"BIT"
bitType
"BIT"
block
"BLOCK"
booleanType
"BOOLEAN"
booleanType
"BOOLEAN"
boolType
"BOOL"
boolType
"BOOL"
btree
"BTREE"
btree
"BTREE"
...
@@ -302,6 +304,8 @@ import (
...
@@ -302,6 +304,8 @@ import (
compression
"COMPRESSION"
compression
"COMPRESSION"
connection
"CONNECTION"
connection
"CONNECTION"
consistent
"CONSISTENT"
consistent
"CONSISTENT"
context
"CONTEXT"
cpu
"CPU"
current
"CURRENT"
current
"CURRENT"
day
"DAY"
day
"DAY"
data
"DATA"
data
"DATA"
...
@@ -325,6 +329,7 @@ import (
...
@@ -325,6 +329,7 @@ import (
exclusive
"EXCLUSIVE"
exclusive
"EXCLUSIVE"
execute
"EXECUTE"
execute
"EXECUTE"
expire
"EXPIRE"
expire
"EXPIRE"
faultsSym
"FAULTS"
fields
"FIELDS"
fields
"FIELDS"
first
"FIRST"
first
"FIRST"
fixed
"FIXED"
fixed
"FIXED"
...
@@ -339,8 +344,11 @@ import (
...
@@ -339,8 +344,11 @@ import (
identified
"IDENTIFIED"
identified
"IDENTIFIED"
isolation
"ISOLATION"
isolation
"ISOLATION"
issuer
"ISSUER"
issuer
"ISSUER"
incremental
"INCREMENTAL"
indexes
"INDEXES"
indexes
"INDEXES"
invoker
"INVOKER"
invoker
"INVOKER"
io
"IO"
ipc
"IPC"
jsonType
"JSON"
jsonType
"JSON"
keyBlockSize
"KEY_BLOCK_SIZE"
keyBlockSize
"KEY_BLOCK_SIZE"
local
"LOCAL"
local
"LOCAL"
...
@@ -358,6 +366,7 @@ import (
...
@@ -358,6 +366,7 @@ import (
maxQueriesPerHour
"MAX_QUERIES_PER_HOUR"
maxQueriesPerHour
"MAX_QUERIES_PER_HOUR"
maxUpdatesPerHour
"MAX_UPDATES_PER_HOUR"
maxUpdatesPerHour
"MAX_UPDATES_PER_HOUR"
maxUserConnections
"MAX_USER_CONNECTIONS"
maxUserConnections
"MAX_USER_CONNECTIONS"
memory
"MEMORY"
merge
"MERGE"
merge
"MERGE"
minRows
"MIN_ROWS"
minRows
"MIN_ROWS"
names
"NAMES"
names
"NAMES"
...
@@ -368,6 +377,7 @@ import (
...
@@ -368,6 +377,7 @@ import (
nulls
"NULLS"
nulls
"NULLS"
offset
"OFFSET"
offset
"OFFSET"
only
"ONLY"
only
"ONLY"
pageSym
"PAGE"
password
"PASSWORD"
password
"PASSWORD"
partitions
"PARTITIONS"
partitions
"PARTITIONS"
pipesAsOr
pipesAsOr
...
@@ -377,6 +387,7 @@ import (
...
@@ -377,6 +387,7 @@ import (
privileges
"PRIVILEGES"
privileges
"PRIVILEGES"
process
"PROCESS"
process
"PROCESS"
processlist
"PROCESSLIST"
processlist
"PROCESSLIST"
profile
"PROFILE"
profiles
"PROFILES"
profiles
"PROFILES"
quarter
"QUARTER"
quarter
"QUARTER"
query
"QUERY"
query
"QUERY"
...
@@ -410,6 +421,10 @@ import (
...
@@ -410,6 +421,10 @@ import (
start
"START"
start
"START"
statsPersistent
"STATS_PERSISTENT"
statsPersistent
"STATS_PERSISTENT"
status
"STATUS"
status
"STATUS"
swaps
"SWAPS"
switchesSym
"SWITCHES"
open
"OPEN"
source
"SOURCE"
subject
"SUBJECT"
subject
"SUBJECT"
subpartition
"SUBPARTITION"
subpartition
"SUBPARTITION"
subpartitions
"SUBPARTITIONS"
subpartitions
"SUBPARTITIONS"
...
@@ -425,6 +440,7 @@ import (
...
@@ -425,6 +440,7 @@ import (
timeType
"TIME"
timeType
"TIME"
timestampType
"TIMESTAMP"
timestampType
"TIMESTAMP"
trace
"TRACE"
trace
"TRACE"
traditional
"TRADITIONAL"
transaction
"TRANSACTION"
transaction
"TRANSACTION"
triggers
"TRIGGERS"
triggers
"TRIGGERS"
truncate
"TRUNCATE"
truncate
"TRUNCATE"
...
@@ -501,6 +517,8 @@ import (
...
@@ -501,6 +517,8 @@ import (
job
"JOB"
job
"JOB"
nodeID
"NODE_ID"
nodeID
"NODE_ID"
nodeState
"NODE_STATE"
nodeState
"NODE_STATE"
optimistic
"OPTIMISTIC"
pessimistic
"PESSIMISTIC"
pump
"PUMP"
pump
"PUMP"
stats
"STATS"
stats
"STATS"
statsMeta
"STATS_META"
statsMeta
"STATS_META"
...
@@ -511,6 +529,7 @@ import (
...
@@ -511,6 +529,7 @@ import (
tidbHJ
"TIDB_HJ"
tidbHJ
"TIDB_HJ"
tidbSMJ
"TIDB_SMJ"
tidbSMJ
"TIDB_SMJ"
tidbINLJ
"TIDB_INLJ"
tidbINLJ
"TIDB_INLJ"
split
"SPLIT"
builtinAddDate
builtinAddDate
builtinBitAnd
builtinBitAnd
...
@@ -590,15 +609,13 @@ import (
...
@@ -590,15 +609,13 @@ import (
%
type
<
statement
>
%
type
<
statement
>
AdminStmt
"Check table statement or show ddl statement"
AdminStmt
"Check table statement or show ddl statement"
AlterDatabaseStmt
"Alter database statement"
AlterTableStmt
"Alter table statement"
AlterTableStmt
"Alter table statement"
AlterUserStmt
"Alter user statement"
AlterUserStmt
"Alter user statement"
AnalyzeTableStmt
"Analyze table statement"
AnalyzeTableStmt
"Analyze table statement"
BeginTransactionStmt
"BEGIN TRANSACTION statement"
BeginTransactionStmt
"BEGIN TRANSACTION statement"
BinlogStmt
"Binlog base64 statement"
BinlogStmt
"Binlog base64 statement"
CommitStmt
"COMMIT statement"
CommitStmt
"COMMIT statement"
ConnectionOption
"single connection options"
ConnectionOptionList
"connection options for CREATE USER statement"
ConnectionOptions
"optional connection options for CREATE USER statement"
CreateTableStmt
"CREATE TABLE statement"
CreateTableStmt
"CREATE TABLE statement"
CreateViewStmt
"CREATE VIEW stetement"
CreateViewStmt
"CREATE VIEW stetement"
CreateUserStmt
"CREATE User statement"
CreateUserStmt
"CREATE User statement"
...
@@ -637,6 +654,7 @@ import (
...
@@ -637,6 +654,7 @@ import (
RevokeStmt
"Revoke statement"
RevokeStmt
"Revoke statement"
RevokeRoleStmt
"Revoke role statement"
RevokeRoleStmt
"Revoke role statement"
RollbackStmt
"ROLLBACK statement"
RollbackStmt
"ROLLBACK statement"
SplitIndexRegionStmt
"Split index region statement"
SetStmt
"Set variable statement"
SetStmt
"Set variable statement"
ChangeStmt
"Change statement"
ChangeStmt
"Change statement"
SetRoleStmt
"Set active role statement"
SetRoleStmt
"Set active role statement"
...
@@ -644,7 +662,7 @@ import (
...
@@ -644,7 +662,7 @@ import (
ShowStmt
"Show engines/databases/tables/user/columns/warnings/status statement"
ShowStmt
"Show engines/databases/tables/user/columns/warnings/status statement"
Statement
"statement"
Statement
"statement"
TraceStmt
"TRACE statement"
TraceStmt
"TRACE statement"
TraceableStmt
"traceable statment"
TraceableStmt
"traceable stat
e
ment"
TruncateTableStmt
"TRUNCATE TABLE statement"
TruncateTableStmt
"TRUNCATE TABLE statement"
UnlockTablesStmt
"Unlock tables statement"
UnlockTablesStmt
"Unlock tables statement"
UpdateStmt
"UPDATE statement"
UpdateStmt
"UPDATE statement"
...
@@ -667,13 +685,17 @@ import (
...
@@ -667,13 +685,17 @@ import (
CastType
"Cast function target type"
CastType
"Cast function target type"
CharsetName
"Character set name"
CharsetName
"Character set name"
ClearPasswordExpireOptions
"Clear password expire options"
ClearPasswordExpireOptions
"Clear password expire options"
CollationName
"Collation name"
ColumnDef
"table column definition"
ColumnDef
"table column definition"
ColumnDefList
"table column definition list"
ColumnDefList
"table column definition list"
ColumnName
"column name"
ColumnName
"column name"
ColumnNameOrUserVariable
"column name or user variable"
ColumnNameList
"column name list"
ColumnNameList
"column name list"
ColumnNameOrUserVariableList
"column name or user variable list"
ColumnList
"column list"
ColumnList
"column list"
ColumnNameListOpt
"column name list opt"
ColumnNameListOpt
"column name list opt"
ColumnNameListOptWithBrackets
"column name list opt with brackets"
ColumnNameOrUserVarListOpt
"column name or user vairiabe list opt"
ColumnNameOrUserVarListOptWithBrackets
"column name or user variable list opt with brackets"
ColumnSetValue
"insert statement set value by column name"
ColumnSetValue
"insert statement set value by column name"
ColumnSetValueList
"insert statement set value by column name list"
ColumnSetValueList
"insert statement set value by column name list"
CompareOp
"Compare opcode"
CompareOp
"Compare opcode"
...
@@ -681,6 +703,9 @@ import (
...
@@ -681,6 +703,9 @@ import (
ColumnOptionList
"column definition option list"
ColumnOptionList
"column definition option list"
VirtualOrStored
"indicate generated column is stored or not"
VirtualOrStored
"indicate generated column is stored or not"
ColumnOptionListOpt
"optional column definition option list"
ColumnOptionListOpt
"optional column definition option list"
ConnectionOption
"single connection options"
ConnectionOptionList
"connection options for CREATE USER statement"
ConnectionOptions
"optional connection options for CREATE USER statement"
Constraint
"table constraint"
Constraint
"table constraint"
ConstraintElem
"table constraint element"
ConstraintElem
"table constraint element"
ConstraintKeywordOpt
"Constraint Keyword or empty"
ConstraintKeywordOpt
"Constraint Keyword or empty"
...
@@ -695,11 +720,10 @@ import (
...
@@ -695,11 +720,10 @@ import (
DefaultFalseDistinctOpt
"Distinct option which defaults to false"
DefaultFalseDistinctOpt
"Distinct option which defaults to false"
DefaultTrueDistinctOpt
"Distinct option which defaults to true"
DefaultTrueDistinctOpt
"Distinct option which defaults to true"
BuggyDefaultFalseDistinctOpt
"Distinct option which accepts DISTINCT ALL and defaults to false"
BuggyDefaultFalseDistinctOpt
"Distinct option which accepts DISTINCT ALL and defaults to false"
Enclosed
"Enclosed by"
RequireClause
"Encrypted connections options"
RequireClause
"Encrypted connections options"
EqOpt
"= or empty"
EqOpt
"= or empty"
EscapedTableRef
"escaped table reference"
EscapedTableRef
"escaped table reference"
E
scaped
"Escaped by
"
E
xplainFormatType
"explain format type
"
ExpressionList
"expression list"
ExpressionList
"expression list"
MaxValueOrExpressionList
"maxvalue or expression list"
MaxValueOrExpressionList
"maxvalue or expression list"
ExpressionListOpt
"expression list opt"
ExpressionListOpt
"expression list opt"
...
@@ -707,13 +731,14 @@ import (
...
@@ -707,13 +731,14 @@ import (
FuncDatetimePrecList
"Function datetime precision list"
FuncDatetimePrecList
"Function datetime precision list"
Field
"field expression"
Field
"field expression"
Fields
"Fields clause"
Fields
"Fields clause"
FieldsTerminated
"Fields terminated by"
FieldAsName
"Field alias name"
FieldAsName
"Field alias name"
FieldAsNameOpt
"Field alias name opt"
FieldAsNameOpt
"Field alias name opt"
FieldList
"field expression list"
FieldList
"field expression list"
FlushOption
"Flush option"
FlushOption
"Flush option"
PluginNameList
"Plugin Name List"
PluginNameList
"Plugin Name List"
TableRefsClause
"Table references clause"
TableRefsClause
"Table references clause"
FieldItem
"Field item for load data clause"
FieldItemList
"Field items for load data clause"
FuncDatetimePrec
"Function datetime precision"
FuncDatetimePrec
"Function datetime precision"
GlobalScope
"The scope of variable"
GlobalScope
"The scope of variable"
GroupByClause
"GROUP BY clause"
GroupByClause
"GROUP BY clause"
...
@@ -747,6 +772,9 @@ import (
...
@@ -747,6 +772,9 @@ import (
LimitOption
"Limit option could be integer or parameter marker."
LimitOption
"Limit option could be integer or parameter marker."
Lines
"Lines clause"
Lines
"Lines clause"
LinesTerminated
"Lines terminated by"
LinesTerminated
"Lines terminated by"
LoadDataSetSpecOpt
"Optional load data specification"
LoadDataSetList
"Load data specifications"
LoadDataSetItem
"Single load data specification"
LocalOpt
"Local opt"
LocalOpt
"Local opt"
LockClause
"Alter table lock clause"
LockClause
"Alter table lock clause"
MaxNumBuckets
"Max number of buckets"
MaxNumBuckets
"Max number of buckets"
...
@@ -754,7 +782,7 @@ import (
...
@@ -754,7 +782,7 @@ import (
NoWriteToBinLogAliasOpt
"NO_WRITE_TO_BINLOG alias LOCAL or empty"
NoWriteToBinLogAliasOpt
"NO_WRITE_TO_BINLOG alias LOCAL or empty"
ObjectType
"Grant statement object type"
ObjectType
"Grant statement object type"
OnDuplicateKeyUpdate
"ON DUPLICATE KEY UPDATE value list"
OnDuplicateKeyUpdate
"ON DUPLICATE KEY UPDATE value list"
DuplicateOpt
"[IGNORE|REPLACE] in CREATE TABLE ... SELECT statement"
DuplicateOpt
"[IGNORE|REPLACE] in CREATE TABLE ... SELECT statement
or LOAD DATA statement
"
OptFull
"Full or empty"
OptFull
"Full or empty"
Order
"ORDER BY clause optional collation specification"
Order
"ORDER BY clause optional collation specification"
OrderBy
"ORDER BY clause"
OrderBy
"ORDER BY clause"
...
@@ -817,6 +845,10 @@ import (
...
@@ -817,6 +845,10 @@ import (
ShowDatabaseNameOpt
"Show tables/columns statement database name option"
ShowDatabaseNameOpt
"Show tables/columns statement database name option"
ShowTableAliasOpt
"Show table alias option"
ShowTableAliasOpt
"Show table alias option"
ShowLikeOrWhereOpt
"Show like or where clause option"
ShowLikeOrWhereOpt
"Show like or where clause option"
ShowProfileArgsOpt
"Show profile args option"
ShowProfileTypesOpt
"Show profile types option"
ShowProfileType
"Show profile type"
ShowProfileTypes
"Show profile types"
Starting
"Starting by"
Starting
"Starting by"
StatementList
"statement list"
StatementList
"statement list"
StatsPersistentVal
"stats_persistent value"
StatsPersistentVal
"stats_persistent value"
...
@@ -854,6 +886,7 @@ import (
...
@@ -854,6 +886,7 @@ import (
UserSpec
"Username and auth option"
UserSpec
"Username and auth option"
UserSpecList
"Username and auth option list"
UserSpecList
"Username and auth option list"
UserVariableList
"User defined variable name list"
UserVariableList
"User defined variable name list"
UsingRoles
"UsingRoles is role option for SHOW GRANT"
Values
"values"
Values
"values"
ValuesList
"values list"
ValuesList
"values list"
ValuesOpt
"values optional"
ValuesOpt
"values optional"
...
@@ -995,6 +1028,8 @@ import (
...
@@ -995,6 +1028,8 @@ import (
%
precedence
insertValues
%
precedence
insertValues
%
precedence
lowerThanCreateTableSelect
%
precedence
lowerThanCreateTableSelect
%
precedence
createTableSelect
%
precedence
createTableSelect
%
precedence
lowerThanCharsetKwd
%
precedence
charsetKwd
%
precedence
lowerThanKey
%
precedence
lowerThanKey
%
precedence
key
%
precedence
key
...
@@ -1437,6 +1472,24 @@ RecoverTableStmt:
...
@@ -1437,6 +1472,24 @@ RecoverTableStmt:
}
}
}
}
/*******************************************************************
*
*
Split
index
region
statement
*
*
Example
:
*
SPLIT
TABLE
table_name
INDEX
index_name
BY
(
val1
...),(
val2
...)...
*
*******************************************************************/
SplitIndexRegionStmt
:
"SPLIT"
"TABLE"
TableName
"INDEX"
IndexName
"BY"
ValuesList
{
$$
=
&
ast
.
SplitIndexRegionStmt
{
Table
:
$
3.
(*
ast
.
TableName
),
IndexName
:
$
5.
(
string
),
ValueLists
:
$
7.
([][]
ast
.
ExprNode
),
}
}
/*******************************************************************************************/
/*******************************************************************************************/
AnalyzeTableStmt
:
AnalyzeTableStmt
:
...
@@ -1448,6 +1501,10 @@ AnalyzeTableStmt:
...
@@ -1448,6 +1501,10 @@ AnalyzeTableStmt:
{
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
3.
(*
ast
.
TableName
)},
IndexNames
:
$
5.
([]
model
.
CIStr
),
IndexFlag
:
true
,
MaxNumBuckets
:
$
6.
(
uint64
)}
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
3.
(*
ast
.
TableName
)},
IndexNames
:
$
5.
([]
model
.
CIStr
),
IndexFlag
:
true
,
MaxNumBuckets
:
$
6.
(
uint64
)}
}
}
|
"ANALYZE"
"INCREMENTAL"
"TABLE"
TableName
"INDEX"
IndexNameList
MaxNumBuckets
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
IndexNames
:
$
6.
([]
model
.
CIStr
),
IndexFlag
:
true
,
Incremental
:
true
,
MaxNumBuckets
:
$
7.
(
uint64
)}
}
|
"ANALYZE"
"TABLE"
TableName
"PARTITION"
PartitionNameList
MaxNumBuckets
|
"ANALYZE"
"TABLE"
TableName
"PARTITION"
PartitionNameList
MaxNumBuckets
{
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
3.
(*
ast
.
TableName
)},
PartitionNames
:
$
5.
([]
model
.
CIStr
),
MaxNumBuckets
:
$
6.
(
uint64
),}
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
3.
(*
ast
.
TableName
)},
PartitionNames
:
$
5.
([]
model
.
CIStr
),
MaxNumBuckets
:
$
6.
(
uint64
),}
...
@@ -1462,6 +1519,17 @@ AnalyzeTableStmt:
...
@@ -1462,6 +1519,17 @@ AnalyzeTableStmt:
MaxNumBuckets
:
$
8.
(
uint64
),
MaxNumBuckets
:
$
8.
(
uint64
),
}
}
}
}
|
"ANALYZE"
"INCREMENTAL"
"TABLE"
TableName
"PARTITION"
PartitionNameList
"INDEX"
IndexNameList
MaxNumBuckets
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
PartitionNames
:
$
6.
([]
model
.
CIStr
),
IndexNames
:
$
8.
([]
model
.
CIStr
),
IndexFlag
:
true
,
Incremental
:
true
,
MaxNumBuckets
:
$
9.
(
uint64
),
}
}
MaxNumBuckets
:
MaxNumBuckets
:
{
{
...
@@ -1501,6 +1569,18 @@ BeginTransactionStmt:
...
@@ -1501,6 +1569,18 @@ BeginTransactionStmt:
{
{
$$
=
&
ast
.
BeginStmt
{}
$$
=
&
ast
.
BeginStmt
{}
}
}
|
"BEGIN"
"PESSIMISTIC"
{
$$
=
&
ast
.
BeginStmt
{
Mode
:
ast
.
Pessimistic
,
}
}
|
"BEGIN"
"OPTIMISTIC"
{
$$
=
&
ast
.
BeginStmt
{
Mode
:
ast
.
Optimistic
,
}
}
|
"START"
"TRANSACTION"
|
"START"
"TRANSACTION"
{
{
$$
=
&
ast
.
BeginStmt
{}
$$
=
&
ast
.
BeginStmt
{}
...
@@ -1529,7 +1609,12 @@ ColumnDefList:
...
@@ -1529,7 +1609,12 @@ ColumnDefList:
ColumnDef
:
ColumnDef
:
ColumnName
Type
ColumnOptionListOpt
ColumnName
Type
ColumnOptionListOpt
{
{
$$
=
&
ast
.
ColumnDef
{
Name
:
$
1.
(*
ast
.
ColumnName
),
Tp
:
$
2.
(*
types
.
FieldType
),
Options
:
$
3.
([]*
ast
.
ColumnOption
)}
colDef
:=
&
ast
.
ColumnDef
{
Name
:
$
1.
(*
ast
.
ColumnName
),
Tp
:
$
2.
(*
types
.
FieldType
),
Options
:
$
3.
([]*
ast
.
ColumnOption
)}
if
!colDef.Validate() {
yylex
.
AppendError
(
yylex
.
Errorf
(
"Invalid column definition"
))
return
1
}
$$
=
colDef
}
}
ColumnName
:
ColumnName
:
...
@@ -1566,14 +1651,44 @@ ColumnNameListOpt:
...
@@ -1566,14 +1651,44 @@ ColumnNameListOpt:
$$
=
$
1.
([]*
ast
.
ColumnName
)
$$
=
$
1.
([]*
ast
.
ColumnName
)
}
}
ColumnName
ListOptWithBrackets
:
ColumnName
OrUserVarListOpt
:
/*
EMPTY
*/
/*
EMPTY
*/
{
{
$$
=
[]*
ast
.
ColumnName
{}
$$
=
[]*
ast
.
ColumnName
OrUserVar
{}
}
}
|
'('
ColumnNameListOpt
')'
|
ColumnNameOrUserVariableList
{
{
$$
=
$
2.
([]*
ast
.
ColumnName
)
$$
=
$
1.
([]*
ast
.
ColumnNameOrUserVar
)
}
ColumnNameOrUserVariableList
:
ColumnNameOrUserVariable
{
$$
=
[]*
ast
.
ColumnNameOrUserVar
{$
1.
(*
ast
.
ColumnNameOrUserVar
)}
}
|
ColumnNameOrUserVariableList
','
ColumnNameOrUserVariable
{
$$
=
append
($
1.
([]*
ast
.
ColumnNameOrUserVar
),
$
3.
(*
ast
.
ColumnNameOrUserVar
))
}
ColumnNameOrUserVariable
:
ColumnName
{
$$
=
&
ast
.
ColumnNameOrUserVar
{
ColumnName
:
$
1.
(*
ast
.
ColumnName
)}
}
|
UserVariable
{
$$
=
&
ast
.
ColumnNameOrUserVar
{
UserVar
:
$
1.
(*
ast
.
VariableExpr
)}
}
ColumnNameOrUserVarListOptWithBrackets
:
/*
EMPTY
*/
{
$$
=
[]*
ast
.
ColumnNameOrUserVar
{}
}
|
'('
ColumnNameOrUserVarListOpt
')'
{
$$
=
$
2.
([]*
ast
.
ColumnNameOrUserVar
)
}
}
CommitStmt
:
CommitStmt
:
...
@@ -1620,8 +1735,7 @@ ColumnOption:
...
@@ -1620,8 +1735,7 @@ ColumnOption:
}
}
|
"ON"
"UPDATE"
NowSymOptionFraction
|
"ON"
"UPDATE"
NowSymOptionFraction
{
{
nowFunc
:=
&
ast
.
FuncCallExpr
{
FnName
:
model
.
NewCIStr
(
"CURRENT_TIMESTAMP"
)}
$$
=
&
ast
.
ColumnOption
{
Tp
:
ast
.
ColumnOptionOnUpdate
,
Expr
:
$
3
}
$$
=
&
ast
.
ColumnOption
{
Tp
:
ast
.
ColumnOptionOnUpdate
,
Expr
:
nowFunc
}
}
}
|
"COMMENT"
stringLit
|
"COMMENT"
stringLit
{
{
...
@@ -1653,7 +1767,7 @@ ColumnOption:
...
@@ -1653,7 +1767,7 @@ ColumnOption:
Refer
:
$
1.
(*
ast
.
ReferenceDef
),
Refer
:
$
1.
(*
ast
.
ReferenceDef
),
}
}
}
}
|
"COLLATE"
String
Name
|
"COLLATE"
Collation
Name
{
{
$$
=
&
ast
.
ColumnOption
{
Tp
:
ast
.
ColumnOptionCollate
,
StrValue
:
$
2.
(
string
)}
$$
=
&
ast
.
ColumnOption
{
Tp
:
ast
.
ColumnOptionCollate
,
StrValue
:
$
2.
(
string
)}
}
}
...
@@ -1935,6 +2049,35 @@ IndexColNameList:
...
@@ -1935,6 +2049,35 @@ IndexColNameList:
/**************************************
AlterDatabaseStmt
***************************************
*
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
alter
-
database
.
html
*
'ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME'
is
not
supported
yet
.
*
*
ALTER
{
DATABASE
|
SCHEMA
}
[
db_name
]
*
alter_specification
...
*
*
alter_specification
:
*
[
DEFAULT
]
CHARACTER
SET
[=]
charset_name
*
|
[
DEFAULT
]
COLLATE
[=]
collation_name
*******************************************************************************************/
AlterDatabaseStmt
:
"ALTER"
DatabaseSym
DBName
DatabaseOptionList
{
$$
=
&
ast
.
AlterDatabaseStmt
{
Name
:
$
3.
(
string
),
AlterDefaultDatabase
:
false
,
Options
:
$
4.
([]*
ast
.
DatabaseOption
),
}
}
|
"ALTER"
DatabaseSym
DatabaseOptionList
{
$$
=
&
ast
.
AlterDatabaseStmt
{
Name
:
""
,
AlterDefaultDatabase
:
true
,
Options
:
$
3.
([]*
ast
.
DatabaseOption
),
}
}
/*******************************************************************
/*******************************************************************
*
*
*
Create
Database
Statement
*
Create
Database
Statement
...
@@ -1966,7 +2109,7 @@ DatabaseOption:
...
@@ -1966,7 +2109,7 @@ DatabaseOption:
{
{
$$
=
&
ast
.
DatabaseOption
{
Tp
:
ast
.
DatabaseOptionCharset
,
Value
:
$
4.
(
string
)}
$$
=
&
ast
.
DatabaseOption
{
Tp
:
ast
.
DatabaseOptionCharset
,
Value
:
$
4.
(
string
)}
}
}
|
DefaultKwdOpt
"COLLATE"
EqOpt
String
Name
|
DefaultKwdOpt
"COLLATE"
EqOpt
Collation
Name
{
{
$$
=
&
ast
.
DatabaseOption
{
Tp
:
ast
.
DatabaseOptionCollate
,
Value
:
$
4.
(
string
)}
$$
=
&
ast
.
DatabaseOption
{
Tp
:
ast
.
DatabaseOptionCollate
,
Value
:
$
4.
(
string
)}
}
}
...
@@ -2013,7 +2156,7 @@ CreateTableStmt:
...
@@ -2013,7 +2156,7 @@ CreateTableStmt:
if
$
7
!= nil {
if
$
7
!= nil {
stmt
.
Partition
=
$
7.
(*
ast
.
PartitionOptions
)
stmt
.
Partition
=
$
7.
(*
ast
.
PartitionOptions
)
}
}
stmt
.
OnDuplicate
=
$
8.
(
ast
.
OnDuplicate
CreateTableSelect
Type
)
stmt
.
OnDuplicate
=
$
8.
(
ast
.
OnDuplicate
KeyHandling
Type
)
stmt
.
Select
=
$
10.
(*
ast
.
CreateTableStmt
).
Select
stmt
.
Select
=
$
10.
(*
ast
.
CreateTableStmt
).
Select
$$
=
stmt
$$
=
stmt
}
}
...
@@ -2027,6 +2170,7 @@ CreateTableStmt:
...
@@ -2027,6 +2170,7 @@ CreateTableStmt:
}
}
DefaultKwdOpt
:
DefaultKwdOpt
:
%
prec
lowerThanCharsetKwd
{}
{}
|
"DEFAULT"
|
"DEFAULT"
...
@@ -2204,15 +2348,15 @@ PartDefValuesOpt:
...
@@ -2204,15 +2348,15 @@ PartDefValuesOpt:
DuplicateOpt
:
DuplicateOpt
:
{
{
$$
=
ast
.
OnDuplicate
CreateTableSelect
Error
$$
=
ast
.
OnDuplicate
KeyHandling
Error
}
}
|
"IGNORE"
|
"IGNORE"
{
{
$$
=
ast
.
OnDuplicate
CreateTableSelect
Ignore
$$
=
ast
.
OnDuplicate
KeyHandling
Ignore
}
}
|
"REPLACE"
|
"REPLACE"
{
{
$$
=
ast
.
OnDuplicate
CreateTableSelect
Replace
$$
=
ast
.
OnDuplicate
KeyHandling
Replace
}
}
AsOpt
:
AsOpt
:
...
@@ -2624,6 +2768,20 @@ ExplainStmt:
...
@@ -2624,6 +2768,20 @@ ExplainStmt:
Format
:
$
4
,
Format
:
$
4
,
}
}
}
}
|
ExplainSym
"FORMAT"
"="
ExplainFormatType
"FOR"
"CONNECTION"
NUM
{
$$
=
&
ast
.
ExplainForStmt
{
Format
:
$
4.
(
string
),
ConnectionID
:
getUint64FromNUM
($
7
),
}
}
|
ExplainSym
"FORMAT"
"="
ExplainFormatType
ExplainableStmt
{
$$
=
&
ast
.
ExplainStmt
{
Stmt
:
$
5
,
Format
:
$
4.
(
string
),
}
}
|
ExplainSym
"ANALYZE"
ExplainableStmt
|
ExplainSym
"ANALYZE"
ExplainableStmt
{
{
$$
=
&
ast
.
ExplainStmt
{
$$
=
&
ast
.
ExplainStmt
{
...
@@ -2633,6 +2791,16 @@ ExplainStmt:
...
@@ -2633,6 +2791,16 @@ ExplainStmt:
}
}
}
}
ExplainFormatType
:
"TRADITIONAL"
{
$$
=
"row"
}
|
"JSON"
{
$$
=
"json"
}
LengthNum
:
LengthNum
:
NUM
NUM
{
{
...
@@ -2903,7 +3071,7 @@ PredicateExpr:
...
@@ -2903,7 +3071,7 @@ PredicateExpr:
{
{
escape
:=
$
4.
(
string
)
escape
:=
$
4.
(
string
)
if
len
(
escape
)
>
1
{
if
len
(
escape
)
>
1
{
yylex
.
AppendError
(
yylex
.
Errorf
(
"Incorrect arguments %s to ESCAPE"
,
escape
))
yylex
.
AppendError
(
ErrWrongArguments
.
GenWithStackByArgs
(
"ESCAPE"
))
return
1
return
1
}
else
if
len
(
escape
)
==
0
{
}
else
if
len
(
escape
)
==
0
{
escape
=
"
\\
"
escape
=
"
\\
"
...
@@ -3136,26 +3304,28 @@ Identifier:
...
@@ -3136,26 +3304,28 @@ Identifier:
identifier
|
UnReservedKeyword
|
NotKeywordToken
|
TiDBKeyword
identifier
|
UnReservedKeyword
|
NotKeywordToken
|
TiDBKeyword
UnReservedKeyword
:
UnReservedKeyword
:
"ACTION"
|
"ASCII"
|
"AUTO_INCREMENT"
|
"AFTER"
|
"ALWAYS"
|
"AVG"
|
"BEGIN"
|
"BIT"
|
"BOOL"
|
"BOOLEAN"
|
"BTREE"
|
"BYTE"
|
"CLEANUP"
|
"CHARSET"
"ACTION"
|
"ASCII"
|
"AUTO_INCREMENT"
|
"AFTER"
|
"ALWAYS"
|
"AVG"
|
"BEGIN"
|
"BIT"
|
"BOOL"
|
"BOOLEAN"
|
"BTREE"
|
"BYTE"
|
"CLEANUP"
|
"CHARSET"
%
prec
charsetKwd
|
"COLUMNS"
|
"COMMIT"
|
"COMPACT"
|
"COMPRESSED"
|
"CONSISTENT"
|
"CURRENT"
|
"DATA"
|
"DATE"
%
prec
lowerThanStringLitToken
|
"DATETIME"
|
"DAY"
|
"DEALLOCATE"
|
"DO"
|
"DUPLICATE"
|
"COLUMNS"
|
"COMMIT"
|
"COMPACT"
|
"COMPRESSED"
|
"CONSISTENT"
|
"CURRENT"
|
"DATA"
|
"DATE"
%
prec
lowerThanStringLitToken
|
"DATETIME"
|
"DAY"
|
"DEALLOCATE"
|
"DO"
|
"DUPLICATE"
|
"DYNAMIC"
|
"END"
|
"ENGINE"
|
"ENGINES"
|
"ENUM"
|
"ERRORS"
|
"ESCAPE"
|
"EXECUTE"
|
"FIELDS"
|
"FIRST"
|
"FIXED"
|
"FLUSH"
|
"FOLLOWING"
|
"FORMAT"
|
"FULL"
|
"GLOBAL"
|
"DYNAMIC"
|
"END"
|
"ENGINE"
|
"ENGINES"
|
"ENUM"
|
"ERRORS"
|
"ESCAPE"
|
"EXECUTE"
|
"FIELDS"
|
"FIRST"
|
"FIXED"
|
"FLUSH"
|
"FOLLOWING"
|
"FORMAT"
|
"FULL"
|
"GLOBAL"
|
"HASH"
|
"HOUR"
|
"LESS"
|
"LOCAL"
|
"LAST"
|
"NAMES"
|
"OFFSET"
|
"PASSWORD"
%
prec
lowerThanEq
|
"PREPARE"
|
"QUICK"
|
"REDUNDANT"
|
"HASH"
|
"HOUR"
|
"LESS"
|
"LOCAL"
|
"LAST"
|
"NAMES"
|
"OFFSET"
|
"PASSWORD"
%
prec
lowerThanEq
|
"PREPARE"
|
"QUICK"
|
"REDUNDANT"
|
"ROLE"
|
"ROLLBACK"
|
"SESSION"
|
"SIGNED"
|
"SNAPSHOT"
|
"START"
|
"STATUS"
|
"SUBPARTITIONS"
|
"SUBPARTITION"
|
"TABLES"
|
"TABLESPACE"
|
"TEXT"
|
"THAN"
|
"TIME"
%
prec
lowerThanStringLitToken
|
"ROLE"
|
"ROLLBACK"
|
"SESSION"
|
"SIGNED"
|
"SNAPSHOT"
|
"START"
|
"STATUS"
|
"
OPEN"
|
"
SUBPARTITIONS"
|
"SUBPARTITION"
|
"TABLES"
|
"TABLESPACE"
|
"TEXT"
|
"THAN"
|
"TIME"
%
prec
lowerThanStringLitToken
|
"TIMESTAMP"
%
prec
lowerThanStringLitToken
|
"TRACE"
|
"TRANSACTION"
|
"TRUNCATE"
|
"UNBOUNDED"
|
"UNKNOWN"
|
"VALUE"
|
"WARNINGS"
|
"YEAR"
|
"MODE"
|
"WEEK"
|
"ANY"
|
"SOME"
|
"USER"
|
"IDENTIFIED"
|
"TIMESTAMP"
%
prec
lowerThanStringLitToken
|
"TRACE"
|
"TRANSACTION"
|
"TRUNCATE"
|
"UNBOUNDED"
|
"UNKNOWN"
|
"VALUE"
|
"WARNINGS"
|
"YEAR"
|
"MODE"
|
"WEEK"
|
"ANY"
|
"SOME"
|
"USER"
|
"IDENTIFIED"
|
"COLLATION"
|
"COMMENT"
|
"AVG_ROW_LENGTH"
|
"CONNECTION"
|
"CHECKSUM"
|
"COMPRESSION"
|
"KEY_BLOCK_SIZE"
|
"MASTER"
|
"MAX_ROWS"
|
"COLLATION"
|
"COMMENT"
|
"AVG_ROW_LENGTH"
|
"CONNECTION"
|
"CHECKSUM"
|
"COMPRESSION"
|
"KEY_BLOCK_SIZE"
|
"MASTER"
|
"MAX_ROWS"
|
"MIN_ROWS"
|
"NATIONAL"
|
"ROW_FORMAT"
|
"QUARTER"
|
"GRANTS"
|
"TRIGGERS"
|
"DELAY_KEY_WRITE"
|
"ISOLATION"
|
"JSON"
|
"MIN_ROWS"
|
"NATIONAL"
|
"ROW_FORMAT"
|
"QUARTER"
|
"GRANTS"
|
"TRIGGERS"
|
"DELAY_KEY_WRITE"
|
"ISOLATION"
|
"JSON"
|
"REPEATABLE"
|
"RESPECT"
|
"COMMITTED"
|
"UNCOMMITTED"
|
"ONLY"
|
"SERIALIZABLE"
|
"LEVEL"
|
"VARIABLES"
|
"SQL_CACHE"
|
"INDEXES"
|
"PROCESSLIST"
|
"REPEATABLE"
|
"RESPECT"
|
"COMMITTED"
|
"UNCOMMITTED"
|
"ONLY"
|
"SERIALIZABLE"
|
"LEVEL"
|
"VARIABLES"
|
"SQL_CACHE"
|
"INDEXES"
|
"PROCESSLIST"
|
"SQL_NO_CACHE"
|
"DISABLE"
|
"ENABLE"
|
"REVERSE"
|
"PRIVILEGES"
|
"NO"
|
"BINLOG"
|
"FUNCTION"
|
"VIEW"
|
"BINDING"
|
"BINDINGS"
|
"MODIFY"
|
"EVENTS"
|
"PARTITIONS"
|
"SQL_NO_CACHE"
|
"DISABLE"
|
"ENABLE"
|
"REVERSE"
|
"PRIVILEGES"
|
"NO"
|
"BINLOG"
|
"FUNCTION"
|
"VIEW"
|
"BINDING"
|
"BINDINGS"
|
"MODIFY"
|
"EVENTS"
|
"PARTITIONS"
|
"NONE"
|
"NULLS"
|
"SUPER"
|
"EXCLUSIVE"
|
"STATS_PERSISTENT"
|
"ROW_COUNT"
|
"COALESCE"
|
"MONTH"
|
"PROCESS"
|
"PROFILES"
|
"NONE"
|
"NULLS"
|
"SUPER"
|
"EXCLUSIVE"
|
"STATS_PERSISTENT"
|
"ROW_COUNT"
|
"COALESCE"
|
"MONTH"
|
"PROCESS"
|
"PROFILE
"
|
"PROFILE
S"
|
"MICROSECOND"
|
"MINUTE"
|
"PLUGINS"
|
"PRECEDING"
|
"QUERY"
|
"QUERIES"
|
"SECOND"
|
"SEPARATOR"
|
"SHARE"
|
"SHARED"
|
"SLOW"
|
"MAX_CONNECTIONS_PER_HOUR"
|
"MAX_QUERIES_PER_HOUR"
|
"MAX_UPDATES_PER_HOUR"
|
"MICROSECOND"
|
"MINUTE"
|
"PLUGINS"
|
"PRECEDING"
|
"QUERY"
|
"QUERIES"
|
"SECOND"
|
"SEPARATOR"
|
"SHARE"
|
"SHARED"
|
"SLOW"
|
"MAX_CONNECTIONS_PER_HOUR"
|
"MAX_QUERIES_PER_HOUR"
|
"MAX_UPDATES_PER_HOUR"
|
"MAX_USER_CONNECTIONS"
|
"REPLICATION"
|
"CLIENT"
|
"SLAVE"
|
"RELOAD"
|
"TEMPORARY"
|
"ROUTINE"
|
"EVENT"
|
"ALGORITHM"
|
"DEFINER"
|
"INVOKER"
|
"MERGE"
|
"TEMPTABLE"
|
"UNDEFINED"
|
"SECURITY"
|
"CASCADED"
|
"RECOVER"
|
"CIPHER"
|
"SUBJECT"
|
"ISSUER"
|
"X509"
|
"NEVER"
|
"EXPIRE"
|
"ACCOUNT"
|
"MAX_USER_CONNECTIONS"
|
"REPLICATION"
|
"CLIENT"
|
"SLAVE"
|
"RELOAD"
|
"TEMPORARY"
|
"ROUTINE"
|
"EVENT"
|
"ALGORITHM"
|
"DEFINER"
|
"INVOKER"
|
"MERGE"
|
"TEMPTABLE"
|
"UNDEFINED"
|
"SECURITY"
|
"CASCADED"
|
"RECOVER"
|
"CIPHER"
|
"SUBJECT"
|
"ISSUER"
|
"X509"
|
"NEVER"
|
"EXPIRE"
|
"ACCOUNT"
|
"INCREMENTAL"
|
"CPU"
|
"MEMORY"
|
"BLOCK"
|
"IO"
|
"CONTEXT"
|
"SWITCHES"
|
"PAGE"
|
"FAULTS"
|
"IPC"
|
"SWAPS"
|
"SOURCE"
|
"TRADITIONAL"
TiDBKeyword
:
TiDBKeyword
:
"ADMIN"
|
"BUCKETS"
|
"CANCEL"
|
"DDL"
|
"DRAINER"
|
"JOBS"
|
"JOB"
|
"NODE_ID"
|
"NODE_STATE"
|
"PUMP"
|
"STATS"
|
"STATS_META"
|
"STATS_HISTOGRAMS"
|
"STATS_BUCKETS"
|
"STATS_HEALTHY"
|
"TIDB"
|
"TIDB_HJ"
"ADMIN"
|
"BUCKETS"
|
"CANCEL"
|
"DDL"
|
"DRAINER"
|
"JOBS"
|
"JOB"
|
"NODE_ID"
|
"NODE_STATE"
|
"PUMP"
|
"STATS"
|
"STATS_META"
|
"STATS_HISTOGRAMS"
|
"STATS_BUCKETS"
|
"STATS_HEALTHY"
|
"TIDB"
|
"TIDB_HJ"
|
"TIDB_SMJ"
|
"TIDB_INLJ"
|
"TIDB_SMJ"
|
"TIDB_INLJ"
|
"SPLIT"
|
"OPTIMISTIC"
|
"PESSIMISTIC"
NotKeywordToken
:
NotKeywordToken
:
"ADDDATE"
|
"BIT_AND"
|
"BIT_OR"
|
"BIT_XOR"
|
"CAST"
|
"COPY"
|
"COUNT"
|
"CURTIME"
|
"DATE_ADD"
|
"DATE_SUB"
|
"EXTRACT"
|
"GET_FORMAT"
|
"GROUP_CONCAT"
"ADDDATE"
|
"BIT_AND"
|
"BIT_OR"
|
"BIT_XOR"
|
"CAST"
|
"COPY"
|
"COUNT"
|
"CURTIME"
|
"DATE_ADD"
|
"DATE_SUB"
|
"EXTRACT"
|
"GET_FORMAT"
|
"GROUP_CONCAT"
...
@@ -5680,6 +5850,12 @@ SetRoleStmt:
...
@@ -5680,6 +5850,12 @@ SetRoleStmt:
SetDefaultRoleStmt
:
SetDefaultRoleStmt
:
"SET"
"DEFAULT"
"ROLE"
SetDefaultRoleOpt
"TO"
UsernameList
"SET"
"DEFAULT"
"ROLE"
SetDefaultRoleOpt
"TO"
UsernameList
{
{
tmp
:=
$
4.
(*
ast
.
SetRoleStmt
)
$$
=
&
ast
.
SetDefaultRoleStmt
{
SetRoleOpt
:
tmp
.
SetRoleOpt
,
RoleList
:
tmp
.
RoleList
,
UserList
:
$
6.
([]*
auth
.
UserIdentity
),
}
}
}
SetDefaultRoleOpt
:
SetDefaultRoleOpt
:
...
@@ -5857,20 +6033,31 @@ CharsetName:
...
@@ -5857,20 +6033,31 @@ CharsetName:
StringName
StringName
{
{
//
Validate
input
charset
name
to
keep
the
same
behavior
as
parser
of
MySQL
.
//
Validate
input
charset
name
to
keep
the
same
behavior
as
parser
of
MySQL
.
_
,
_
,
err
:=
charset
.
GetCharsetInfo
($
1.
(
string
))
name
,
_
,
err
:=
charset
.
GetCharsetInfo
($
1.
(
string
))
if
err
!= nil {
if
err
!= nil {
yylex
.
AppendError
(
ErrUnknownCharacterSet
.
GenWithStackByArgs
($
1
))
yylex
.
AppendError
(
ErrUnknownCharacterSet
.
GenWithStackByArgs
($
1
))
return
1
return
1
}
}
//
Use
$
1
instead
of
charset
name
returned
from
charset
.
GetCharsetInfo
(),
//
Use
charset
name
returned
from
charset
.
GetCharsetInfo
(),
//
to
keep
upper
-
lower
case
of
input
for
restore
.
//
to
keep
lower
case
of
input
for
generated
column
restore
.
$$
=
$
1
$$
=
name
}
}
|
binaryType
|
binaryType
{
{
$$
=
charset
.
CharsetBin
$$
=
charset
.
CharsetBin
}
}
CollationName
:
StringName
{
info
,
err
:=
charset
.
GetCollationByName
($
1.
(
string
))
if
err
!= nil {
yylex
.
AppendError
(
err
)
return
1
}
$$
=
info
.
Name
}
VariableAssignmentList
:
VariableAssignmentList
:
{
{
$$
=
[]*
ast
.
VariableAssignment
{}
$$
=
[]*
ast
.
VariableAssignment
{}
...
@@ -6196,12 +6383,21 @@ ShowStmt:
...
@@ -6196,12 +6383,21 @@ ShowStmt:
//
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
show
-
grants
.
html
//
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
show
-
grants
.
html
$$
=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowGrants
}
$$
=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowGrants
}
}
}
|
"SHOW"
"GRANTS"
"FOR"
Username
|
"SHOW"
"GRANTS"
"FOR"
Username
UsingRoles
{
{
//
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
show
-
grants
.
html
//
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
show
-
grants
.
html
if
$
5
!= nil {
$$
=
&
ast
.
ShowStmt
{
$$
=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowGrants
,
Tp
:
ast
.
ShowGrants
,
User
:
$
4.
(*
auth
.
UserIdentity
),
User
:
$
4.
(*
auth
.
UserIdentity
),
Roles
:
$
5.
([]*
auth
.
RoleIdentity
),
}
}
else
{
$$
=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowGrants
,
User
:
$
4.
(*
auth
.
UserIdentity
),
Roles
:
nil
,
}
}
}
}
}
|
"SHOW"
"MASTER"
"STATUS"
|
"SHOW"
"MASTER"
"STATUS"
...
@@ -6279,12 +6475,121 @@ ShowStmt:
...
@@ -6279,12 +6475,121 @@ ShowStmt:
Tp
:
ast
.
ShowProfiles
,
Tp
:
ast
.
ShowProfiles
,
}
}
}
}
|
"SHOW"
"PROFILE"
ShowProfileTypesOpt
ShowProfileArgsOpt
SelectStmtLimit
{
v
:=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowProfile
,
}
if
$
3
!= nil {
v
.
ShowProfileTypes
=
$
3.
([]
int
)
}
if
$
4
!= nil {
v
.
ShowProfileArgs
=
$
4.
(*
int64
)
}
if
$
5
!= nil {
v
.
ShowProfileLimit
=
$
5.
(*
ast
.
Limit
)
}
$$
=
v
}
|
"SHOW"
"PRIVILEGES"
|
"SHOW"
"PRIVILEGES"
{
{
$$
=
&
ast
.
ShowStmt
{
$$
=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowPrivileges
,
Tp
:
ast
.
ShowPrivileges
,
}
}
}
}
|
"SHOW"
"ANALYZE"
"STATUS"
ShowLikeOrWhereOpt
{
stmt
:=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowAnalyzeStatus
,
}
if
$
4
!= nil {
if
x
,
ok
:=
$
4.
(*
ast
.
PatternLikeExpr
);
ok
&&
x
.
Expr
==
nil
{
stmt
.
Pattern
=
x
}
else
{
stmt
.
Where
=
$
4.
(
ast
.
ExprNode
)
}
}
$$
=
stmt
}
ShowProfileTypesOpt
:
{
$$
=
nil
}
|
ShowProfileTypes
{
$$
=
$
1
}
ShowProfileTypes
:
ShowProfileType
{
$$
=
[]
int
{$
1.
(
int
)}
}
|
ShowProfileTypes
','
ShowProfileType
{
l
:=
$
1.
([]
int
)
l
=
append
(
l
,
$
3.
(
int
))
$$
=
l
}
ShowProfileType
:
"CPU"
{
$$
=
ast
.
ProfileTypeCPU
}
|
"MEMORY"
{
$$
=
ast
.
ProfileTypeMemory
}
|
"BLOCK"
"IO"
{
$$
=
ast
.
ProfileTypeBlockIo
}
|
"CONTEXT"
"SWITCHES"
{
$$
=
ast
.
ProfileTypeContextSwitch
}
|
"PAGE"
"FAULTS"
{
$$
=
ast
.
ProfileTypePageFaults
}
|
"IPC"
{
$$
=
ast
.
ProfileTypeIpc
}
|
"SWAPS"
{
$$
=
ast
.
ProfileTypeSwaps
}
|
"SOURCE"
{
$$
=
ast
.
ProfileTypeSource
}
|
"ALL"
{
$$
=
ast
.
ProfileTypeAll
}
ShowProfileArgsOpt
:
{
$$
=
nil
}
|
"FOR"
"QUERY"
NUM
{
v
:=
$
3.
(
int64
)
$$
=
&
v
}
UsingRoles
:
{
$$
=
nil
}
|
"USING"
RolenameList
{
$$
=
$
2.
([]*
auth
.
RoleIdentity
)
}
ShowIndexKwd
:
ShowIndexKwd
:
"INDEX"
"INDEX"
...
@@ -6315,6 +6620,13 @@ ShowTargetFilterable:
...
@@ -6315,6 +6620,13 @@ ShowTargetFilterable:
Full
:
$
1.
(
bool
),
Full
:
$
1.
(
bool
),
}
}
}
}
|
"OPEN"
"TABLES"
ShowDatabaseNameOpt
{
$$
=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowOpenTables
,
DBName
:
$
3.
(
string
),
}
}
|
"TABLE"
"STATUS"
ShowDatabaseNameOpt
|
"TABLE"
"STATUS"
ShowDatabaseNameOpt
{
{
$$
=
&
ast
.
ShowStmt
{
$$
=
&
ast
.
ShowStmt
{
...
@@ -6574,6 +6886,7 @@ WithReadLockOpt:
...
@@ -6574,6 +6886,7 @@ WithReadLockOpt:
Statement
:
Statement
:
EmptyStmt
EmptyStmt
|
AdminStmt
|
AdminStmt
|
AlterDatabaseStmt
|
AlterTableStmt
|
AlterTableStmt
|
AlterUserStmt
|
AlterUserStmt
|
AnalyzeTableStmt
|
AnalyzeTableStmt
...
@@ -6620,6 +6933,7 @@ Statement:
...
@@ -6620,6 +6933,7 @@ Statement:
|
SetStmt
|
SetStmt
|
SetRoleStmt
|
SetRoleStmt
|
SetDefaultRoleStmt
|
SetDefaultRoleStmt
|
SplitIndexRegionStmt
|
ShowStmt
|
ShowStmt
|
SubSelect
|
SubSelect
{
{
...
@@ -6758,7 +7072,7 @@ TableOption:
...
@@ -6758,7 +7072,7 @@ TableOption:
{
{
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionCharset
,
StrValue
:
$
4.
(
string
)}
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionCharset
,
StrValue
:
$
4.
(
string
)}
}
}
|
DefaultKwdOpt
"COLLATE"
EqOpt
String
Name
|
DefaultKwdOpt
"COLLATE"
EqOpt
Collation
Name
{
{
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionCollate
,
StrValue
:
$
4.
(
string
)}
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionCollate
,
StrValue
:
$
4.
(
string
)}
}
}
...
@@ -6818,6 +7132,10 @@ TableOption:
...
@@ -6818,6 +7132,10 @@ TableOption:
{
{
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionShardRowID
,
UintValue
:
$
3.
(
uint64
)}
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionShardRowID
,
UintValue
:
$
3.
(
uint64
)}
}
}
|
"PRE_SPLIT_REGIONS"
EqOpt
LengthNum
{
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionPreSplitRegion
,
UintValue
:
$
3.
(
uint64
)}
}
|
"PACK_KEYS"
EqOpt
StatsPersistentVal
|
"PACK_KEYS"
EqOpt
StatsPersistentVal
{
{
//
Parse
it
but
will
ignore
it
.
//
Parse
it
but
will
ignore
it
.
...
@@ -7015,7 +7333,7 @@ NumericType:
...
@@ -7015,7 +7333,7 @@ NumericType:
if
x
.
Flen
==
types
.
UnspecifiedLength
||
x
.
Flen
==
0
{
if
x
.
Flen
==
types
.
UnspecifiedLength
||
x
.
Flen
==
0
{
x
.
Flen
=
1
x
.
Flen
=
1
}
else
if
x
.
Flen
>
64
{
}
else
if
x
.
Flen
>
64
{
yylex
.
AppendError
(
yylex
.
Errorf
(
"invalid field length %d for bit type, must in [1, 64]"
,
x
.
Flen
))
yylex
.
AppendError
(
ErrTooBigDisplayWidth
.
GenWithStackByArgs
(
x
.
Flen
))
}
}
$$
=
x
$$
=
x
}
}
...
@@ -7433,7 +7751,7 @@ OptCollate:
...
@@ -7433,7 +7751,7 @@ OptCollate:
{
{
$$
=
""
$$
=
""
}
}
|
"COLLATE"
String
Name
|
"COLLATE"
Collation
Name
{
{
$$
=
$
2.
(
string
)
$$
=
$
2.
(
string
)
}
}
...
@@ -7546,6 +7864,9 @@ CreateUserStmt:
...
@@ -7546,6 +7864,9 @@ CreateUserStmt:
IsCreateRole
:
false
,
IsCreateRole
:
false
,
IfNotExists
:
$
3.
(
bool
),
IfNotExists
:
$
3.
(
bool
),
Specs
:
$
4.
([]*
ast
.
UserSpec
),
Specs
:
$
4.
([]*
ast
.
UserSpec
),
TslOptions
:
$
5.
([]*
ast
.
TslOption
),
ResourceOptions
:
$
6.
([]*
ast
.
ResourceOption
),
PasswordOrLockOptions
:
$
7.
([]*
ast
.
PasswordOrLockOption
),
}
}
}
}
...
@@ -7605,127 +7926,182 @@ UserSpecList:
...
@@ -7605,127 +7926,182 @@ UserSpecList:
ConnectionOptions
:
ConnectionOptions
:
{
{
$$
=
nil
l
:=
[]*
ast
.
ResourceOption
{}
$$
=
l
}
}
|
"WITH"
ConnectionOptionList
|
"WITH"
ConnectionOptionList
{
{
$$
=
nil
$$
=
$
2
}
}
ConnectionOptionList
:
ConnectionOptionList
:
ConnectionOption
ConnectionOption
{
{
$$
=
nil
$$
=
[]*
ast
.
ResourceOption
{$
1.
(*
ast
.
ResourceOption
)}
}
}
|
ConnectionOptionList
ConnectionOption
|
ConnectionOptionList
ConnectionOption
{
{
$$
=
nil
l
:=
$
1.
([]*
ast
.
ResourceOption
)
l
=
append
(
l
,
$
2.
(*
ast
.
ResourceOption
))
$$
=
l
}
}
ConnectionOption
:
ConnectionOption
:
"MAX_QUERIES_PER_HOUR"
NUM
"MAX_QUERIES_PER_HOUR"
NUM
{
{
$$
=
nil
$$
=
&
ast
.
ResourceOption
{
Type
:
ast
.
MaxQueriesPerHour
,
Count
:
$
2.
(
int64
),
}
}
}
|
"MAX_UPDATES_PER_HOUR"
NUM
|
"MAX_UPDATES_PER_HOUR"
NUM
{
{
$$
=
nil
$$
=
&
ast
.
ResourceOption
{
Type
:
ast
.
MaxUpdatesPerHour
,
Count
:
$
2.
(
int64
),
}
}
}
|
"MAX_CONNECTIONS_PER_HOUR"
NUM
|
"MAX_CONNECTIONS_PER_HOUR"
NUM
{
{
$$
=
nil
$$
=
&
ast
.
ResourceOption
{
Type
:
ast
.
MaxConnectionsPerHour
,
Count
:
$
2.
(
int64
),
}
}
}
|
"MAX_USER_CONNECTIONS"
NUM
|
"MAX_USER_CONNECTIONS"
NUM
{
{
$$
=
nil
$$
=
&
ast
.
ResourceOption
{
Type
:
ast
.
MaxUserConnections
,
Count
:
$
2.
(
int64
),
}
}
}
RequireClause
:
RequireClause
:
{
{
$$
=
nil
l
:=
[]*
ast
.
TslOption
{}
$$
=
l
}
}
|
"REQUIRE"
"NONE"
|
"REQUIRE"
"NONE"
{
{
$$
=
nil
t
:=
&
ast
.
TslOption
{
Type
:
ast
.
TslNone
,
}
$$
=
[]*
ast
.
TslOption
{
t
}
}
}
|
"REQUIRE"
"SSL"
|
"REQUIRE"
"SSL"
{
{
$$
=
nil
t
:=
&
ast
.
TslOption
{
Type
:
ast
.
Ssl
,
}
$$
=
[]*
ast
.
TslOption
{
t
}
}
}
|
"REQUIRE"
"X509"
|
"REQUIRE"
"X509"
{
{
$$
=
nil
t
:=
&
ast
.
TslOption
{
Type
:
ast
.
X509
,
}
$$
=
[]*
ast
.
TslOption
{
t
}
}
}
|
"REQUIRE"
RequireList
|
"REQUIRE"
RequireList
{
{
$$
=
nil
$$
=
$
2
}
}
RequireList
:
RequireList
:
RequireListElement
RequireListElement
{
{
$$
=
nil
$$
=
[]*
ast
.
TslOption
{$
1.
(*
ast
.
TslOption
)}
}
}
|
RequireListElement
"AND"
RequireList
|
RequireListElement
"AND"
RequireList
{
{
$$
=
nil
l
:=
$
3.
([]*
ast
.
TslOption
)
l
=
append
(
l
,
$
1.
(*
ast
.
TslOption
))
$$
=
l
}
}
RequireListElement
:
RequireListElement
:
"ISSUER"
StringLiteral
"ISSUER"
stringLit
{
{
$$
=
nil
$$
=
&
ast
.
TslOption
{
Type
:
ast
.
Issuer
,
Value
:
$
2
,
}
}
}
|
"SUBJECT"
StringLiteral
|
"SUBJECT"
stringLit
{
{
$$
=
nil
$$
=
&
ast
.
TslOption
{
Type
:
ast
.
Subject
,
Value
:
$
2
,
}
}
}
|
"CIPHER"
StringLiteral
|
"CIPHER"
stringLit
{
{
$$
=
nil
$$
=
&
ast
.
TslOption
{
Type
:
ast
.
Cipher
,
Value
:
$
2
,
}
}
}
PasswordOrLockOptions
:
PasswordOrLockOptions
:
{
{
$$
=
nil
l
:=
[]*
ast
.
PasswordOrLockOption
{}
$$
=
l
}
}
|
PasswordOrLockOptionList
|
PasswordOrLockOptionList
{
{
$$
=
nil
$$
=
$
1
}
}
PasswordOrLockOptionList
:
PasswordOrLockOptionList
:
PasswordOrLockOption
PasswordOrLockOption
{
{
$$
=
nil
$$
=
[]*
ast
.
PasswordOrLockOption
{$
1.
(*
ast
.
PasswordOrLockOption
)}
}
}
|
PasswordOrLockOptionList
PasswordOrLockOption
|
PasswordOrLockOptionList
PasswordOrLockOption
{
{
$$
=
nil
l
:=
$
1.
([]*
ast
.
PasswordOrLockOption
)
l
=
append
(
l
,
$
2.
(*
ast
.
PasswordOrLockOption
))
$$
=
l
}
}
PasswordOrLockOption
:
PasswordOrLockOption
:
"ACCOUNT"
"UNLOCK"
"ACCOUNT"
"UNLOCK"
{
{
$$
=
nil
$$
=
&
ast
.
PasswordOrLockOption
{
Type
:
ast
.
Unlock
,
}
}
}
|
"ACCOUNT"
"LOCK"
|
"ACCOUNT"
"LOCK"
{
{
$$
=
nil
$$
=
&
ast
.
PasswordOrLockOption
{
Type
:
ast
.
Lock
,
}
}
}
|
PasswordExpire
|
PasswordExpire
{
{
$$
=
nil
$$
=
&
ast
.
PasswordOrLockOption
{
Type
:
ast
.
PasswordExpire
,
}
}
}
|
PasswordExpire
"INTERVAL"
NUM
"DAY"
|
PasswordExpire
"INTERVAL"
NUM
"DAY"
{
{
$$
=
nil
$$
=
&
ast
.
PasswordOrLockOption
{
Type
:
ast
.
PasswordExpireInterval
,
Count
:
$
3.
(
int64
),
}
}
}
|
PasswordExpire
"NEVER"
|
PasswordExpire
"NEVER"
{
{
$$
=
nil
$$
=
&
ast
.
PasswordOrLockOption
{
Type
:
ast
.
PasswordExpireNever
,
}
}
}
|
PasswordExpire
"DEFAULT"
|
PasswordExpire
"DEFAULT"
{
$$
=
&
ast
.
PasswordOrLockOption
{
Type
:
ast
.
PasswordExpireDefault
,
}
}
PasswordExpire
:
PasswordExpire
:
"PASSWORD"
"EXPIRE"
ClearPasswordExpireOptions
"PASSWORD"
"EXPIRE"
ClearPasswordExpireOptions
...
@@ -8125,23 +8501,40 @@ RevokeRoleStmt:
...
@@ -8125,23 +8501,40 @@ RevokeRoleStmt:
*
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
load
-
data
.
html
*
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
load
-
data
.
html
*******************************************************************************************/
*******************************************************************************************/
LoadDataStmt
:
LoadDataStmt
:
"LOAD"
"DATA"
LocalOpt
"INFILE"
stringLit
"INTO"
"TABLE"
TableName
CharsetOpt
Fields
Lines
IgnoreLines
ColumnNameListOptWithBrackets
"LOAD"
"DATA"
LocalOpt
"INFILE"
stringLit
DuplicateOpt
"INTO"
"TABLE"
TableName
CharsetOpt
Fields
Lines
IgnoreLines
ColumnNameOrUserVarListOptWithBrackets
LoadDataSetSpecOpt
{
{
x
:=
&
ast
.
LoadDataStmt
{
x
:=
&
ast
.
LoadDataStmt
{
Path
:
$
5
,
Path
:
$
5
,
Table
:
$
8.
(*
ast
.
TableName
),
OnDuplicate
:
$
6.
(
ast
.
OnDuplicateKeyHandlingType
),
Columns
:
$
13.
([]*
ast
.
ColumnName
),
Table
:
$
9.
(*
ast
.
TableName
),
IgnoreLines
:$
12.
(
uint64
),
ColumnsAndUserVars
:
$
14.
([]*
ast
.
ColumnNameOrUserVar
),
IgnoreLines
:
$
13.
(
uint64
),
}
}
if
$
3
!= nil {
if
$
3
!= nil {
x
.
IsLocal
=
true
x
.
IsLocal
=
true
//
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
load
-
data
.
html
#
load
-
data
-
duplicate
-
key
-
handling
//
If
you
do
not
specify
IGNORE
or
REPLACE
modifier
,
then
we
set
default
behavior
to
IGNORE
when
LOCAL
modifier
is
specified
if
x
.
OnDuplicate
==
ast
.
OnDuplicateKeyHandlingError
{
x
.
OnDuplicate
=
ast
.
OnDuplicateKeyHandlingIgnore
}
}
if
$
10
!= nil {
x
.
FieldsInfo
=
$
10.
(*
ast
.
FieldsClause
)
}
}
if
$
11
!= nil {
if
$
11
!= nil {
x
.
LinesInfo
=
$
11.
(*
ast
.
LinesClause
)
x
.
FieldsInfo
=
$
11.
(*
ast
.
FieldsClause
)
}
if
$
12
!= nil {
x
.
LinesInfo
=
$
12.
(*
ast
.
LinesClause
)
}
if
$
15
!= nil {
x
.
ColumnAssignments
=
$
15.
([]*
ast
.
Assignment
)
}
}
columns
:=
[]*
ast
.
ColumnName
{}
for
_
,
v
:=
range
x
.
ColumnsAndUserVars
{
if
v
.
ColumnName
!= nil {
columns
=
append
(
columns
,
v
.
ColumnName
)
}
}
x
.
Columns
=
columns
$$
=
x
$$
=
x
}
}
...
@@ -8175,64 +8568,93 @@ Fields:
...
@@ -8175,64 +8568,93 @@ Fields:
Escaped
:
escape
[
0
],
Escaped
:
escape
[
0
],
}
}
}
}
|
FieldsOrColumns
Field
sTerminated
Enclosed
Escaped
|
FieldsOrColumns
Field
ItemList
{
{
escape
:=
$
4.
(
string
)
fieldsClause
:=
&
ast
.
FieldsClause
{
if
escape
!= "\\" && len(escape) > 1 {
Terminated
:
"
\t
"
,
yylex
.
AppendError
(
yylex
.
Errorf
(
"Incorrect arguments %s to ESCAPE"
,
escape
))
Escaped
:
[]
byte
(
"
\\
"
)[
0
],
return
1
}
}
fieldItems
:=
$
2.
([]*
ast
.
FieldItem
)
for
_
,
item
:=
range
fieldItems
{
switch
item
.
Type
{
case
ast
.
Terminated
:
fieldsClause
.
Terminated
=
item
.
Value
case
ast
.
Enclosed
:
var
enclosed
byte
var
enclosed
byte
str
:=
$
3.
(
string
)
if
len
(
item
.
Value
)
>
0
{
if
len
(
str
)
>
1
{
enclosed
=
item
.
Value
[
0
]
yylex
.
AppendError
(
yylex
.
Errorf
(
"Incorrect arguments %s to ENCLOSED"
,
escape
))
return
1
}
else
if
len
(
str
)
!= 0 {
enclosed
=
str
[
0
]
}
}
fieldsClause
.
Enclosed
=
enclosed
case
ast
.
Escaped
:
var
escaped
byte
var
escaped
byte
if
len
(
escap
e
)
>
0
{
if
len
(
item
.
Valu
e
)
>
0
{
escaped
=
escap
e
[
0
]
escaped
=
item
.
Valu
e
[
0
]
}
}
$$
=
&
ast
.
FieldsClause
{
fieldsClause
.
Escaped
=
escaped
Terminated
:
$
2.
(
string
),
Enclosed
:
enclosed
,
Escaped
:
escaped
,
}
}
}
}
$$
=
fieldsClause
}
FieldsOrColumns
:
FieldsOrColumns
:
"FIELDS"
|
"COLUMNS"
"FIELDS"
|
"COLUMNS"
FieldsTerminated
:
FieldItemList
:
FieldItemList
FieldItem
{
{
$$
=
"
\t
"
fieldItems
:=
$
1.
([]*
ast
.
FieldItem
)
$$
=
append
(
fieldItems
,
$
2.
(*
ast
.
FieldItem
))
}
}
|
"TERMINATED"
"BY"
stringLit
|
FieldItem
{
{
$$
=
$
3
fieldItems
:=
make
([]*
ast
.
FieldItem
,
1
,
1
)
fieldItems
[
0
]
=
$
1.
(*
ast
.
FieldItem
)
$$
=
fieldItems
}
}
Enclosed
:
FieldItem
:
"TERMINATED"
"BY"
stringLit
{
{
$$
=
""
$$
=
&
ast
.
FieldItem
{
Type
:
ast
.
Terminated
,
Value
:
$
3
,
}
}
}
|
"OPTIONALLY"
"ENCLOSED"
"BY"
stringLit
|
"OPTIONALLY"
"ENCLOSED"
"BY"
stringLit
{
{
$$
=
$
4
str
:=
$
4
if
str
!= "\\" && len(str) > 1 {
yylex
.
AppendError
(
ErrWrongFieldTerminators
.
GenWithStackByArgs
())
return
1
}
$$
=
&
ast
.
FieldItem
{
Type
:
ast
.
Enclosed
,
Value
:
str
,
}
}
}
|
"ENCLOSED"
"BY"
stringLit
|
"ENCLOSED"
"BY"
stringLit
{
{
$$
=
$
3
str
:=
$
3
if
str
!= "\\" && len(str) > 1 {
yylex
.
AppendError
(
ErrWrongFieldTerminators
.
GenWithStackByArgs
())
return
1
}
$$
=
&
ast
.
FieldItem
{
Type
:
ast
.
Enclosed
,
Value
:
str
,
}
}
Escaped
:
{
$$
=
"
\\
"
}
}
|
"ESCAPED"
"BY"
stringLit
|
"ESCAPED"
"BY"
stringLit
{
{
$$
=
$
3
str
:=
$
3
if
str
!= "\\" && len(str) > 1 {
yylex
.
AppendError
(
ErrWrongFieldTerminators
.
GenWithStackByArgs
())
return
1
}
$$
=
&
ast
.
FieldItem
{
Type
:
ast
.
Escaped
,
Value
:
str
,
}
}
}
Lines
:
Lines
:
...
@@ -8262,6 +8684,38 @@ LinesTerminated:
...
@@ -8262,6 +8684,38 @@ LinesTerminated:
$$
=
$
3
$$
=
$
3
}
}
LoadDataSetSpecOpt
:
{
$$
=
nil
}
|
"SET"
LoadDataSetList
{
$$
=
$
2
}
LoadDataSetList
:
LoadDataSetList
','
LoadDataSetItem
{
l
:=
$
1.
([]*
ast
.
Assignment
)
$$
=
append
(
l
,
$
3.
(*
ast
.
Assignment
))
}
|
LoadDataSetItem
{
$$
=
[]*
ast
.
Assignment
{$
1.
(*
ast
.
Assignment
)}
}
LoadDataSetItem
:
SimpleIdent
"="
ExprOrDefault
{
$$
=
&
ast
.
Assignment
{
Column
:
$
1.
(*
ast
.
ColumnNameExpr
).
Name
,
Expr
:
$
3
,
}
}
/*********************************************************************
/*********************************************************************
*
Lock
/
Unlock
Tables
*
Lock
/
Unlock
Tables
...
...
vendor/github.com/pingcap/parser/terror/terror.go
浏览文件 @
82efd3c2
...
@@ -239,7 +239,15 @@ func (e *Error) FastGen(format string, args ...interface{}) error {
...
@@ -239,7 +239,15 @@ func (e *Error) FastGen(format string, args ...interface{}) error {
err
:=
*
e
err
:=
*
e
err
.
message
=
format
err
.
message
=
format
err
.
args
=
args
err
.
args
=
args
return
&
err
return
errors
.
SuspendStack
(
&
err
)
}
// FastGen generates a new *Error with the same class and code, and a new arguments.
// This will not call runtime.Caller to get file and line.
func
(
e
*
Error
)
FastGenByArgs
(
args
...
interface
{})
error
{
err
:=
*
e
err
.
args
=
args
return
errors
.
SuspendStack
(
&
err
)
}
}
// Equal checks if err is equal to e.
// Equal checks if err is equal to e.
...
...
vendor/github.com/pingcap/parser/test.sh
浏览文件 @
82efd3c2
{
{
mv
go.mod1 go.mod
mv
go.mod1 go.mod
mv
go.sum1 go.sum
mv
go.sum1 go.sum
GO111MODULE
=
on go
test
./...
GO111MODULE
=
on go
test
-race
-covermode
=
atomic
-coverprofile
=
coverage.txt
./...
}
||
{
}
||
{
mv
go.mod go.mod1
mv
go.mod go.mod1
mv
go.sum go.sum1
mv
go.sum go.sum1
...
...
vendor/github.com/pingcap/parser/types/field_type.go
浏览文件 @
82efd3c2
...
@@ -252,54 +252,63 @@ func (ft *FieldType) Restore(ctx *format.RestoreCtx) error {
...
@@ -252,54 +252,63 @@ func (ft *FieldType) Restore(ctx *format.RestoreCtx) error {
return
nil
return
nil
}
}
//
Format
AsCastType is used for write AST back to string.
//
Restore
AsCastType is used for write AST back to string.
func
(
ft
*
FieldType
)
FormatAsCastType
(
w
io
.
Writer
)
{
func
(
ft
*
FieldType
)
RestoreAsCastType
(
ctx
*
format
.
RestoreCtx
)
{
switch
ft
.
Tp
{
switch
ft
.
Tp
{
case
mysql
.
TypeVarString
:
case
mysql
.
TypeVarString
:
if
ft
.
Charset
==
charset
.
CharsetBin
&&
ft
.
Collate
==
charset
.
CollationBin
{
if
ft
.
Charset
==
charset
.
CharsetBin
&&
ft
.
Collate
==
charset
.
CollationBin
{
fmt
.
Fprint
(
w
,
"BINARY"
)
ctx
.
WriteKeyWord
(
"BINARY"
)
}
else
{
}
else
{
fmt
.
Fprint
(
w
,
"CHAR"
)
ctx
.
WriteKeyWord
(
"CHAR"
)
}
}
if
ft
.
Flen
!=
UnspecifiedLength
{
if
ft
.
Flen
!=
UnspecifiedLength
{
fmt
.
Fprintf
(
w
,
"(%d)"
,
ft
.
Flen
)
ctx
.
WritePlainf
(
"(%d)"
,
ft
.
Flen
)
}
}
if
ft
.
Flag
&
mysql
.
BinaryFlag
!=
0
{
if
ft
.
Flag
&
mysql
.
BinaryFlag
!=
0
{
fmt
.
Fprint
(
w
,
" BINARY"
)
ctx
.
WriteKeyWord
(
" BINARY"
)
}
}
if
ft
.
Charset
!=
charset
.
CharsetBin
&&
ft
.
Charset
!=
mysql
.
DefaultCharset
{
if
ft
.
Charset
!=
charset
.
CharsetBin
&&
ft
.
Charset
!=
mysql
.
DefaultCharset
{
fmt
.
Fprintf
(
w
,
" CHARACTER SET %s"
,
ft
.
Charset
)
ctx
.
WriteKeyWord
(
" CHARSET "
)
ctx
.
WriteKeyWord
(
ft
.
Charset
)
}
}
case
mysql
.
TypeDate
:
case
mysql
.
TypeDate
:
fmt
.
Fprint
(
w
,
"DATE"
)
ctx
.
WriteKeyWord
(
"DATE"
)
case
mysql
.
TypeDatetime
:
case
mysql
.
TypeDatetime
:
fmt
.
Fprint
(
w
,
"DATETIME"
)
ctx
.
WriteKeyWord
(
"DATETIME"
)
if
ft
.
Decimal
>
0
{
if
ft
.
Decimal
>
0
{
fmt
.
Fprintf
(
w
,
"(%d)"
,
ft
.
Decimal
)
ctx
.
WritePlainf
(
"(%d)"
,
ft
.
Decimal
)
}
}
case
mysql
.
TypeNewDecimal
:
case
mysql
.
TypeNewDecimal
:
fmt
.
Fprint
(
w
,
"DECIMAL"
)
ctx
.
WriteKeyWord
(
"DECIMAL"
)
if
ft
.
Flen
>
0
&&
ft
.
Decimal
>
0
{
if
ft
.
Flen
>
0
&&
ft
.
Decimal
>
0
{
fmt
.
Fprintf
(
w
,
"(%d, %d)"
,
ft
.
Flen
,
ft
.
Decimal
)
ctx
.
WritePlainf
(
"(%d, %d)"
,
ft
.
Flen
,
ft
.
Decimal
)
}
else
if
ft
.
Flen
>
0
{
}
else
if
ft
.
Flen
>
0
{
fmt
.
Fprintf
(
w
,
"(%d)"
,
ft
.
Flen
)
ctx
.
WritePlainf
(
"(%d)"
,
ft
.
Flen
)
}
}
case
mysql
.
TypeDuration
:
case
mysql
.
TypeDuration
:
fmt
.
Fprint
(
w
,
"TIME"
)
ctx
.
WriteKeyWord
(
"TIME"
)
if
ft
.
Decimal
>
0
{
if
ft
.
Decimal
>
0
{
fmt
.
Fprintf
(
w
,
"(%d)"
,
ft
.
Decimal
)
ctx
.
WritePlainf
(
"(%d)"
,
ft
.
Decimal
)
}
}
case
mysql
.
TypeLonglong
:
case
mysql
.
TypeLonglong
:
if
ft
.
Flag
&
mysql
.
UnsignedFlag
!=
0
{
if
ft
.
Flag
&
mysql
.
UnsignedFlag
!=
0
{
fmt
.
Fprint
(
w
,
"UNSIGNED"
)
ctx
.
WriteKeyWord
(
"UNSIGNED"
)
}
else
{
}
else
{
fmt
.
Fprint
(
w
,
"SIGNED"
)
ctx
.
WriteKeyWord
(
"SIGNED"
)
}
}
case
mysql
.
TypeJSON
:
case
mysql
.
TypeJSON
:
fmt
.
Fprint
(
w
,
"JSON"
)
ctx
.
WriteKeyWord
(
"JSON"
)
}
}
}
}
// FormatAsCastType is used for write AST back to string.
func
(
ft
*
FieldType
)
FormatAsCastType
(
w
io
.
Writer
)
{
var
sb
strings
.
Builder
restoreCtx
:=
format
.
NewRestoreCtx
(
format
.
DefaultRestoreFlags
,
&
sb
)
ft
.
RestoreAsCastType
(
restoreCtx
)
fmt
.
Fprint
(
w
,
sb
.
String
())
}
// VarStorageLen indicates this column is a variable length column.
// VarStorageLen indicates this column is a variable length column.
const
VarStorageLen
=
-
1
const
VarStorageLen
=
-
1
...
...
vendor/github.com/pingcap/parser/yy_parser.go
浏览文件 @
82efd3c2
...
@@ -31,6 +31,9 @@ const (
...
@@ -31,6 +31,9 @@ const (
codeErrSyntax
=
terror
.
ErrCode
(
mysql
.
ErrSyntax
)
codeErrSyntax
=
terror
.
ErrCode
(
mysql
.
ErrSyntax
)
codeErrUnknownCharacterSet
=
terror
.
ErrCode
(
mysql
.
ErrUnknownCharacterSet
)
codeErrUnknownCharacterSet
=
terror
.
ErrCode
(
mysql
.
ErrUnknownCharacterSet
)
codeErrInvalidYearColumnLength
=
terror
.
ErrCode
(
mysql
.
ErrInvalidYearColumnLength
)
codeErrInvalidYearColumnLength
=
terror
.
ErrCode
(
mysql
.
ErrInvalidYearColumnLength
)
codeWrongArgument
=
terror
.
ErrCode
(
mysql
.
ErrWrongArguments
)
codeWrongFieldTerminators
=
terror
.
ErrCode
(
mysql
.
ErrWrongFieldTerminators
)
codeTooBigDisplayWidth
=
terror
.
ErrCode
(
mysql
.
ErrTooBigDisplaywidth
)
)
)
var
(
var
(
...
@@ -42,6 +45,13 @@ var (
...
@@ -42,6 +45,13 @@ var (
ErrUnknownCharacterSet
=
terror
.
ClassParser
.
New
(
codeErrUnknownCharacterSet
,
mysql
.
MySQLErrName
[
mysql
.
ErrUnknownCharacterSet
])
ErrUnknownCharacterSet
=
terror
.
ClassParser
.
New
(
codeErrUnknownCharacterSet
,
mysql
.
MySQLErrName
[
mysql
.
ErrUnknownCharacterSet
])
// ErrInvalidYearColumnLength returns for illegal column length for year type.
// ErrInvalidYearColumnLength returns for illegal column length for year type.
ErrInvalidYearColumnLength
=
terror
.
ClassParser
.
New
(
codeErrInvalidYearColumnLength
,
mysql
.
MySQLErrName
[
mysql
.
ErrInvalidYearColumnLength
])
ErrInvalidYearColumnLength
=
terror
.
ClassParser
.
New
(
codeErrInvalidYearColumnLength
,
mysql
.
MySQLErrName
[
mysql
.
ErrInvalidYearColumnLength
])
// ErrWrongArguments returns for illegal argument.
ErrWrongArguments
=
terror
.
ClassParser
.
New
(
codeWrongArgument
,
mysql
.
MySQLErrName
[
mysql
.
ErrWrongArguments
])
// ErrWrongFieldTerminators returns for illegal field terminators.
ErrWrongFieldTerminators
=
terror
.
ClassParser
.
New
(
codeWrongFieldTerminators
,
mysql
.
MySQLErrName
[
mysql
.
ErrWrongFieldTerminators
])
// ErrTooBigDisplayWidth returns for data display width exceed limit .
ErrTooBigDisplayWidth
=
terror
.
ClassParser
.
New
(
codeTooBigDisplayWidth
,
mysql
.
MySQLErrName
[
mysql
.
ErrTooBigDisplaywidth
])
// SpecFieldPattern special result field pattern
// SpecFieldPattern special result field pattern
SpecFieldPattern
=
regexp
.
MustCompile
(
`(\/\*!(M?[0-9]{5,6})?|\*\/)`
)
SpecFieldPattern
=
regexp
.
MustCompile
(
`(\/\*!(M?[0-9]{5,6})?|\*\/)`
)
specCodePattern
=
regexp
.
MustCompile
(
`\/\*!(M?[0-9]{5,6})?([^*]|\*+[^*/])*\*+\/`
)
specCodePattern
=
regexp
.
MustCompile
(
`\/\*!(M?[0-9]{5,6})?([^*]|\*+[^*/])*\*+\/`
)
...
@@ -55,6 +65,9 @@ func init() {
...
@@ -55,6 +65,9 @@ func init() {
codeErrParse
:
mysql
.
ErrParse
,
codeErrParse
:
mysql
.
ErrParse
,
codeErrUnknownCharacterSet
:
mysql
.
ErrUnknownCharacterSet
,
codeErrUnknownCharacterSet
:
mysql
.
ErrUnknownCharacterSet
,
codeErrInvalidYearColumnLength
:
mysql
.
ErrInvalidYearColumnLength
,
codeErrInvalidYearColumnLength
:
mysql
.
ErrInvalidYearColumnLength
,
codeWrongArgument
:
mysql
.
ErrWrongArguments
,
codeWrongFieldTerminators
:
mysql
.
ErrWrongFieldTerminators
,
codeTooBigDisplayWidth
:
mysql
.
ErrTooBigDisplaywidth
,
}
}
terror
.
ErrClassToMySQLCodes
[
terror
.
ClassParser
]
=
parserMySQLErrCodes
terror
.
ErrClassToMySQLCodes
[
terror
.
ClassParser
]
=
parserMySQLErrCodes
}
}
...
...
vendor/github.com/pingcap/tidb/sessionctx/stmtctx/stmtctx.go
浏览文件 @
82efd3c2
...
@@ -15,6 +15,8 @@ package stmtctx
...
@@ -15,6 +15,8 @@ package stmtctx
import
(
import
(
"math"
"math"
"sort"
"strconv"
"sync"
"sync"
"time"
"time"
...
@@ -93,8 +95,10 @@ type StatementContext struct {
...
@@ -93,8 +95,10 @@ type StatementContext struct {
message
string
message
string
warnings
[]
SQLWarn
warnings
[]
SQLWarn
errorCount
uint16
histogramsNotLoad
bool
histogramsNotLoad
bool
execDetails
execdetails
.
ExecDetails
execDetails
execdetails
.
ExecDetails
allExecDetails
[]
*
execdetails
.
ExecDetails
}
}
// PrevAffectedRows is the affected-rows value(DDL is 0, DML is the number of affected rows).
// PrevAffectedRows is the affected-rows value(DDL is 0, DML is the number of affected rows).
PrevAffectedRows
int64
PrevAffectedRows
int64
...
@@ -265,31 +269,42 @@ func (sc *StatementContext) WarningCount() uint16 {
...
@@ -265,31 +269,42 @@ func (sc *StatementContext) WarningCount() uint16 {
return
wc
return
wc
}
}
// NumWarnings gets warning count. It's different from `WarningCount` in that
const
zero
=
"0"
// `WarningCount` return the warning count of the last executed command, so if
// the last command is a SHOW statement, `WarningCount` return 0. On the other
// NumErrorWarnings gets warning and error count.
// hand, `NumWarnings` always return number of warnings(or errors if `errOnly`
func
(
sc
*
StatementContext
)
NumErrorWarnings
()
(
ec
,
wc
string
)
{
// is set).
var
(
func
(
sc
*
StatementContext
)
NumWarnings
(
errOnly
bool
)
uint16
{
ecNum
uint16
var
wc
uint16
wcNum
int
)
sc
.
mu
.
Lock
()
sc
.
mu
.
Lock
()
defer
sc
.
mu
.
Unlock
()
ecNum
=
sc
.
mu
.
errorCount
if
errOnly
{
wcNum
=
len
(
sc
.
mu
.
warnings
)
for
_
,
warn
:=
range
sc
.
mu
.
warnings
{
sc
.
mu
.
Unlock
()
if
warn
.
Level
==
WarnLevelError
{
wc
++
if
ecNum
==
0
{
}
ec
=
zero
}
else
{
ec
=
strconv
.
Itoa
(
int
(
ecNum
))
}
}
if
wcNum
==
0
{
wc
=
zero
}
else
{
}
else
{
wc
=
uint16
(
len
(
sc
.
mu
.
warnings
)
)
wc
=
strconv
.
Itoa
(
wcNum
)
}
}
return
wc
return
}
}
// SetWarnings sets warnings.
// SetWarnings sets warnings.
func
(
sc
*
StatementContext
)
SetWarnings
(
warns
[]
SQLWarn
)
{
func
(
sc
*
StatementContext
)
SetWarnings
(
warns
[]
SQLWarn
)
{
sc
.
mu
.
Lock
()
sc
.
mu
.
Lock
()
sc
.
mu
.
warnings
=
warns
sc
.
mu
.
warnings
=
warns
for
_
,
w
:=
range
warns
{
if
w
.
Level
==
WarnLevelError
{
sc
.
mu
.
errorCount
++
}
}
sc
.
mu
.
Unlock
()
sc
.
mu
.
Unlock
()
}
}
...
@@ -316,6 +331,7 @@ func (sc *StatementContext) AppendError(warn error) {
...
@@ -316,6 +331,7 @@ func (sc *StatementContext) AppendError(warn error) {
sc
.
mu
.
Lock
()
sc
.
mu
.
Lock
()
if
len
(
sc
.
mu
.
warnings
)
<
math
.
MaxUint16
{
if
len
(
sc
.
mu
.
warnings
)
<
math
.
MaxUint16
{
sc
.
mu
.
warnings
=
append
(
sc
.
mu
.
warnings
,
SQLWarn
{
WarnLevelError
,
warn
})
sc
.
mu
.
warnings
=
append
(
sc
.
mu
.
warnings
,
SQLWarn
{
WarnLevelError
,
warn
})
sc
.
mu
.
errorCount
++
}
}
sc
.
mu
.
Unlock
()
sc
.
mu
.
Unlock
()
}
}
...
@@ -375,7 +391,10 @@ func (sc *StatementContext) ResetForRetry() {
...
@@ -375,7 +391,10 @@ func (sc *StatementContext) ResetForRetry() {
sc
.
mu
.
copied
=
0
sc
.
mu
.
copied
=
0
sc
.
mu
.
touched
=
0
sc
.
mu
.
touched
=
0
sc
.
mu
.
message
=
""
sc
.
mu
.
message
=
""
sc
.
mu
.
errorCount
=
0
sc
.
mu
.
warnings
=
nil
sc
.
mu
.
warnings
=
nil
sc
.
mu
.
execDetails
=
execdetails
.
ExecDetails
{}
sc
.
mu
.
allExecDetails
=
make
([]
*
execdetails
.
ExecDetails
,
0
,
4
)
sc
.
mu
.
Unlock
()
sc
.
mu
.
Unlock
()
sc
.
TableIDs
=
sc
.
TableIDs
[
:
0
]
sc
.
TableIDs
=
sc
.
TableIDs
[
:
0
]
sc
.
IndexIDs
=
sc
.
IndexIDs
[
:
0
]
sc
.
IndexIDs
=
sc
.
IndexIDs
[
:
0
]
...
@@ -392,6 +411,7 @@ func (sc *StatementContext) MergeExecDetails(details *execdetails.ExecDetails, c
...
@@ -392,6 +411,7 @@ func (sc *StatementContext) MergeExecDetails(details *execdetails.ExecDetails, c
sc
.
mu
.
execDetails
.
RequestCount
++
sc
.
mu
.
execDetails
.
RequestCount
++
sc
.
mu
.
execDetails
.
TotalKeys
+=
details
.
TotalKeys
sc
.
mu
.
execDetails
.
TotalKeys
+=
details
.
TotalKeys
sc
.
mu
.
execDetails
.
ProcessedKeys
+=
details
.
ProcessedKeys
sc
.
mu
.
execDetails
.
ProcessedKeys
+=
details
.
ProcessedKeys
sc
.
mu
.
allExecDetails
=
append
(
sc
.
mu
.
allExecDetails
,
details
)
}
}
sc
.
mu
.
execDetails
.
CommitDetail
=
commitDetails
sc
.
mu
.
execDetails
.
CommitDetail
=
commitDetails
sc
.
mu
.
Unlock
()
sc
.
mu
.
Unlock
()
...
@@ -423,3 +443,46 @@ func (sc *StatementContext) ShouldIgnoreOverflowError() bool {
...
@@ -423,3 +443,46 @@ func (sc *StatementContext) ShouldIgnoreOverflowError() bool {
}
}
return
false
return
false
}
}
// CopTasksDetails returns some useful information of cop-tasks during execution.
func
(
sc
*
StatementContext
)
CopTasksDetails
()
*
CopTasksDetails
{
sc
.
mu
.
Lock
()
defer
sc
.
mu
.
Unlock
()
n
:=
len
(
sc
.
mu
.
allExecDetails
)
d
:=
&
CopTasksDetails
{
NumCopTasks
:
n
}
if
n
==
0
{
return
d
}
d
.
AvgProcessTime
=
sc
.
mu
.
execDetails
.
ProcessTime
/
time
.
Duration
(
n
)
d
.
AvgWaitTime
=
sc
.
mu
.
execDetails
.
WaitTime
/
time
.
Duration
(
n
)
sort
.
Slice
(
sc
.
mu
.
allExecDetails
,
func
(
i
,
j
int
)
bool
{
return
sc
.
mu
.
allExecDetails
[
i
]
.
ProcessTime
<
sc
.
mu
.
allExecDetails
[
j
]
.
ProcessTime
})
d
.
P90ProcessTime
=
sc
.
mu
.
allExecDetails
[
n
*
9
/
10
]
.
ProcessTime
d
.
MaxProcessTime
=
sc
.
mu
.
allExecDetails
[
n
-
1
]
.
ProcessTime
d
.
MaxProcessAddress
=
sc
.
mu
.
allExecDetails
[
n
-
1
]
.
CalleeAddress
sort
.
Slice
(
sc
.
mu
.
allExecDetails
,
func
(
i
,
j
int
)
bool
{
return
sc
.
mu
.
allExecDetails
[
i
]
.
WaitTime
<
sc
.
mu
.
allExecDetails
[
j
]
.
WaitTime
})
d
.
P90WaitTime
=
sc
.
mu
.
allExecDetails
[
n
*
9
/
10
]
.
WaitTime
d
.
MaxWaitTime
=
sc
.
mu
.
allExecDetails
[
n
-
1
]
.
WaitTime
d
.
MaxWaitAddress
=
sc
.
mu
.
allExecDetails
[
n
-
1
]
.
CalleeAddress
return
d
}
//CopTasksDetails collects some useful information of cop-tasks during execution.
type
CopTasksDetails
struct
{
NumCopTasks
int
AvgProcessTime
time
.
Duration
P90ProcessTime
time
.
Duration
MaxProcessAddress
string
MaxProcessTime
time
.
Duration
AvgWaitTime
time
.
Duration
P90WaitTime
time
.
Duration
MaxWaitAddress
string
MaxWaitTime
time
.
Duration
}
vendor/github.com/pingcap/tidb/types/convert.go
浏览文件 @
82efd3c2
...
@@ -173,6 +173,99 @@ func ConvertFloatToUint(sc *stmtctx.StatementContext, fval float64, upperBound u
...
@@ -173,6 +173,99 @@ func ConvertFloatToUint(sc *stmtctx.StatementContext, fval float64, upperBound u
return
uint64
(
val
),
nil
return
uint64
(
val
),
nil
}
}
// convertScientificNotation converts a decimal string with scientific notation to a normal decimal string.
// 1E6 => 1000000, .12345E+5 => 12345
func
convertScientificNotation
(
str
string
)
(
string
,
error
)
{
// https://golang.org/ref/spec#Floating-point_literals
eIdx
:=
-
1
point
:=
-
1
for
i
:=
0
;
i
<
len
(
str
);
i
++
{
if
str
[
i
]
==
'.'
{
point
=
i
}
if
str
[
i
]
==
'e'
||
str
[
i
]
==
'E'
{
eIdx
=
i
if
point
==
-
1
{
point
=
i
}
break
}
}
if
eIdx
==
-
1
{
return
str
,
nil
}
exp
,
err
:=
strconv
.
ParseInt
(
str
[
eIdx
+
1
:
],
10
,
64
)
if
err
!=
nil
{
return
""
,
errors
.
WithStack
(
err
)
}
f
:=
str
[
:
eIdx
]
if
exp
==
0
{
return
f
,
nil
}
else
if
exp
>
0
{
// move point right
if
point
+
int
(
exp
)
==
len
(
f
)
-
1
{
// 123.456 >> 3 = 123456. = 123456
return
f
[
:
point
]
+
f
[
point
+
1
:
],
nil
}
else
if
point
+
int
(
exp
)
<
len
(
f
)
-
1
{
// 123.456 >> 2 = 12345.6
return
f
[
:
point
]
+
f
[
point
+
1
:
point
+
1
+
int
(
exp
)]
+
"."
+
f
[
point
+
1
+
int
(
exp
)
:
],
nil
}
// 123.456 >> 5 = 12345600
return
f
[
:
point
]
+
f
[
point
+
1
:
]
+
strings
.
Repeat
(
"0"
,
point
+
int
(
exp
)
-
len
(
f
)
+
1
),
nil
}
else
{
// move point left
exp
=
-
exp
if
int
(
exp
)
<
point
{
// 123.456 << 2 = 1.23456
return
f
[
:
point
-
int
(
exp
)]
+
"."
+
f
[
point
-
int
(
exp
)
:
point
]
+
f
[
point
+
1
:
],
nil
}
// 123.456 << 5 = 0.00123456
return
"0."
+
strings
.
Repeat
(
"0"
,
int
(
exp
)
-
point
)
+
f
[
:
point
]
+
f
[
point
+
1
:
],
nil
}
}
func
convertDecimalStrToUint
(
sc
*
stmtctx
.
StatementContext
,
str
string
,
upperBound
uint64
,
tp
byte
)
(
uint64
,
error
)
{
str
,
err
:=
convertScientificNotation
(
str
)
if
err
!=
nil
{
return
0
,
err
}
var
intStr
,
fracStr
string
p
:=
strings
.
Index
(
str
,
"."
)
if
p
==
-
1
{
intStr
=
str
}
else
{
intStr
=
str
[
:
p
]
fracStr
=
str
[
p
+
1
:
]
}
intStr
=
strings
.
TrimLeft
(
intStr
,
"0"
)
if
intStr
==
""
{
intStr
=
"0"
}
if
sc
.
ShouldClipToZero
()
&&
intStr
[
0
]
==
'-'
{
return
0
,
overflow
(
str
,
tp
)
}
var
round
uint64
if
fracStr
!=
""
&&
fracStr
[
0
]
>=
'5'
{
round
++
}
upperBound
-=
round
upperStr
:=
strconv
.
FormatUint
(
upperBound
,
10
)
if
len
(
intStr
)
>
len
(
upperStr
)
||
(
len
(
intStr
)
==
len
(
upperStr
)
&&
intStr
>
upperStr
)
{
return
upperBound
,
overflow
(
str
,
tp
)
}
val
,
err
:=
strconv
.
ParseUint
(
intStr
,
10
,
64
)
if
err
!=
nil
{
return
val
,
err
}
return
val
+
round
,
nil
}
// ConvertDecimalToUint converts a decimal to a uint by converting it to a string first to avoid float overflow (#10181).
func
ConvertDecimalToUint
(
sc
*
stmtctx
.
StatementContext
,
d
*
MyDecimal
,
upperBound
uint64
,
tp
byte
)
(
uint64
,
error
)
{
return
convertDecimalStrToUint
(
sc
,
string
(
d
.
ToString
()),
upperBound
,
tp
)
}
// StrToInt converts a string to an integer at the best-effort.
// StrToInt converts a string to an integer at the best-effort.
func
StrToInt
(
sc
*
stmtctx
.
StatementContext
,
str
string
)
(
int64
,
error
)
{
func
StrToInt
(
sc
*
stmtctx
.
StatementContext
,
str
string
)
(
int64
,
error
)
{
str
=
strings
.
TrimSpace
(
str
)
str
=
strings
.
TrimSpace
(
str
)
...
...
vendor/github.com/pingcap/tidb/types/datum.go
浏览文件 @
82efd3c2
...
@@ -911,11 +911,7 @@ func (d *Datum) convertToUint(sc *stmtctx.StatementContext, target *FieldType) (
...
@@ -911,11 +911,7 @@ func (d *Datum) convertToUint(sc *stmtctx.StatementContext, target *FieldType) (
val
,
err
=
ConvertIntToUint
(
sc
,
ival
,
upperBound
,
tp
)
val
,
err
=
ConvertIntToUint
(
sc
,
ival
,
upperBound
,
tp
)
}
}
case
KindMysqlDecimal
:
case
KindMysqlDecimal
:
fval
,
err1
:=
d
.
GetMysqlDecimal
()
.
ToFloat64
()
val
,
err
=
ConvertDecimalToUint
(
sc
,
d
.
GetMysqlDecimal
(),
upperBound
,
tp
)
val
,
err
=
ConvertFloatToUint
(
sc
,
fval
,
upperBound
,
tp
)
if
err
==
nil
{
err
=
err1
}
case
KindMysqlEnum
:
case
KindMysqlEnum
:
val
,
err
=
ConvertFloatToUint
(
sc
,
d
.
GetMysqlEnum
()
.
ToNumber
(),
upperBound
,
tp
)
val
,
err
=
ConvertFloatToUint
(
sc
,
d
.
GetMysqlEnum
()
.
ToNumber
(),
upperBound
,
tp
)
case
KindMysqlSet
:
case
KindMysqlSet
:
...
@@ -1835,14 +1831,14 @@ func DatumsToStrNoErr(datums []Datum) string {
...
@@ -1835,14 +1831,14 @@ func DatumsToStrNoErr(datums []Datum) string {
return
str
return
str
}
}
// C
opy
Datum returns a new copy of the datum.
// C
lone
Datum returns a new copy of the datum.
// TODO: Abandon this function.
// TODO: Abandon this function.
func
C
opy
Datum
(
datum
Datum
)
Datum
{
func
C
lone
Datum
(
datum
Datum
)
Datum
{
return
*
datum
.
Copy
()
return
*
datum
.
Copy
()
}
}
// C
opy
Row deep copies a Datum slice.
// C
lone
Row deep copies a Datum slice.
func
C
opy
Row
(
dr
[]
Datum
)
[]
Datum
{
func
C
lone
Row
(
dr
[]
Datum
)
[]
Datum
{
c
:=
make
([]
Datum
,
len
(
dr
))
c
:=
make
([]
Datum
,
len
(
dr
))
for
i
,
d
:=
range
dr
{
for
i
,
d
:=
range
dr
{
c
[
i
]
=
*
d
.
Copy
()
c
[
i
]
=
*
d
.
Copy
()
...
...
vendor/github.com/pingcap/tidb/types/errors.go
浏览文件 @
82efd3c2
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
package
types
package
types
import
(
import
(
"github.com/pingcap/errors"
"github.com/pingcap/parser/mysql"
"github.com/pingcap/parser/mysql"
"github.com/pingcap/parser/terror"
"github.com/pingcap/parser/terror"
parser_types
"github.com/pingcap/parser/types"
parser_types
"github.com/pingcap/parser/types"
...
@@ -59,6 +60,20 @@ var (
...
@@ -59,6 +60,20 @@ var (
ErrWarnDataOutOfRange
=
terror
.
ClassTypes
.
New
(
codeDataOutOfRange
,
mysql
.
MySQLErrName
[
mysql
.
ErrWarnDataOutOfRange
])
ErrWarnDataOutOfRange
=
terror
.
ClassTypes
.
New
(
codeDataOutOfRange
,
mysql
.
MySQLErrName
[
mysql
.
ErrWarnDataOutOfRange
])
// ErrDuplicatedValueInType is returned when enum column has duplicated value.
// ErrDuplicatedValueInType is returned when enum column has duplicated value.
ErrDuplicatedValueInType
=
terror
.
ClassTypes
.
New
(
codeDuplicatedValueInType
,
mysql
.
MySQLErrName
[
mysql
.
ErrDuplicatedValueInType
])
ErrDuplicatedValueInType
=
terror
.
ClassTypes
.
New
(
codeDuplicatedValueInType
,
mysql
.
MySQLErrName
[
mysql
.
ErrDuplicatedValueInType
])
// ErrDatetimeFunctionOverflow is returned when the calculation in datetime function cause overflow.
ErrDatetimeFunctionOverflow
=
terror
.
ClassTypes
.
New
(
codeDatetimeFunctionOverflow
,
mysql
.
MySQLErrName
[
mysql
.
ErrDatetimeFunctionOverflow
])
// ErrInvalidTimeFormat is returned when the time format is not correct.
ErrInvalidTimeFormat
=
terror
.
ClassTypes
.
New
(
mysql
.
ErrTruncatedWrongValue
,
"invalid time format: '%v'"
)
// ErrInvalidWeekModeFormat is returned when the week mode is wrong.
ErrInvalidWeekModeFormat
=
terror
.
ClassTypes
.
New
(
mysql
.
ErrTruncatedWrongValue
,
"invalid week mode format: '%v'"
)
// ErrInvalidYearFormat is returned when the input is not a valid year format.
ErrInvalidYearFormat
=
errors
.
New
(
"invalid year format"
)
// ErrInvalidYear is returned when the input value is not a valid year.
ErrInvalidYear
=
errors
.
New
(
"invalid year"
)
// ErrIncorrectDatetimeValue is returned when the input is not valid date time value.
ErrIncorrectDatetimeValue
=
terror
.
ClassTypes
.
New
(
mysql
.
ErrTruncatedWrongValue
,
"Incorrect datetime value: '%s'"
)
// ErrTruncatedWrongValue is returned then
ErrTruncatedWrongValue
=
terror
.
ClassTypes
.
New
(
mysql
.
ErrTruncatedWrongValue
,
mysql
.
MySQLErrName
[
mysql
.
ErrTruncatedWrongValue
])
)
)
const
(
const
(
...
@@ -81,6 +96,7 @@ const (
...
@@ -81,6 +96,7 @@ const (
codeMBiggerThanD
=
terror
.
ErrCode
(
mysql
.
ErrMBiggerThanD
)
codeMBiggerThanD
=
terror
.
ErrCode
(
mysql
.
ErrMBiggerThanD
)
codeDataOutOfRange
=
terror
.
ErrCode
(
mysql
.
ErrWarnDataOutOfRange
)
codeDataOutOfRange
=
terror
.
ErrCode
(
mysql
.
ErrWarnDataOutOfRange
)
codeDuplicatedValueInType
=
terror
.
ErrCode
(
mysql
.
ErrDuplicatedValueInType
)
codeDuplicatedValueInType
=
terror
.
ErrCode
(
mysql
.
ErrDuplicatedValueInType
)
codeDatetimeFunctionOverflow
=
terror
.
ErrCode
(
mysql
.
ErrDatetimeFunctionOverflow
)
)
)
var
(
var
(
...
@@ -109,6 +125,7 @@ func init() {
...
@@ -109,6 +125,7 @@ func init() {
codeMBiggerThanD
:
mysql
.
ErrMBiggerThanD
,
codeMBiggerThanD
:
mysql
.
ErrMBiggerThanD
,
codeDataOutOfRange
:
mysql
.
ErrWarnDataOutOfRange
,
codeDataOutOfRange
:
mysql
.
ErrWarnDataOutOfRange
,
codeDuplicatedValueInType
:
mysql
.
ErrDuplicatedValueInType
,
codeDuplicatedValueInType
:
mysql
.
ErrDuplicatedValueInType
,
codeDatetimeFunctionOverflow
:
mysql
.
ErrDatetimeFunctionOverflow
,
}
}
terror
.
ErrClassToMySQLCodes
[
terror
.
ClassTypes
]
=
typesMySQLErrCodes
terror
.
ErrClassToMySQLCodes
[
terror
.
ClassTypes
]
=
typesMySQLErrCodes
}
}
vendor/github.com/pingcap/tidb/types/json/binary_functions.go
浏览文件 @
82efd3c2
...
@@ -149,6 +149,67 @@ func decodeEscapedUnicode(s []byte) (char [4]byte, size int, err error) {
...
@@ -149,6 +149,67 @@ func decodeEscapedUnicode(s []byte) (char [4]byte, size int, err error) {
return
return
}
}
// quoteString escapes interior quote and other characters for JSON_QUOTE
// https://dev.mysql.com/doc/refman/5.7/en/json-creation-functions.html#function_json-quote
// TODO: add JSON_QUOTE builtin
func
quoteString
(
s
string
)
string
{
var
escapeByteMap
=
map
[
byte
]
string
{
'\\'
:
"
\\\\
"
,
'"'
:
"
\\\"
"
,
'\b'
:
"
\\
b"
,
'\f'
:
"
\\
f"
,
'\n'
:
"
\\
n"
,
'\r'
:
"
\\
r"
,
'\t'
:
"
\\
t"
,
}
ret
:=
new
(
bytes
.
Buffer
)
ret
.
WriteByte
(
'"'
)
start
:=
0
hasEscaped
:=
false
for
i
:=
0
;
i
<
len
(
s
);
{
if
b
:=
s
[
i
];
b
<
utf8
.
RuneSelf
{
escaped
,
ok
:=
escapeByteMap
[
b
]
if
ok
{
if
start
<
i
{
ret
.
WriteString
(
s
[
start
:
i
])
}
hasEscaped
=
true
ret
.
WriteString
(
escaped
)
i
++
start
=
i
}
else
{
i
++
}
}
else
{
c
,
size
:=
utf8
.
DecodeRune
([]
byte
(
s
[
i
:
]))
if
c
==
utf8
.
RuneError
&&
size
==
1
{
// refer to codes of `binary.marshalStringTo`
if
start
<
i
{
ret
.
WriteString
(
s
[
start
:
i
])
}
hasEscaped
=
true
ret
.
WriteString
(
`\ufffd`
)
i
+=
size
start
=
i
continue
}
i
+=
size
}
}
if
start
<
len
(
s
)
{
ret
.
WriteString
(
s
[
start
:
])
}
if
hasEscaped
{
ret
.
WriteByte
(
'"'
)
return
ret
.
String
()
}
return
ret
.
String
()[
1
:
]
}
// Extract receives several path expressions as arguments, matches them in bj, and returns:
// Extract receives several path expressions as arguments, matches them in bj, and returns:
// ret: target JSON matched any path expressions. maybe autowrapped as an array.
// ret: target JSON matched any path expressions. maybe autowrapped as an array.
// found: true if any path expressions matched.
// found: true if any path expressions matched.
...
@@ -778,3 +839,148 @@ func (bj BinaryJSON) GetElemDepth() int {
...
@@ -778,3 +839,148 @@ func (bj BinaryJSON) GetElemDepth() int {
return
1
return
1
}
}
}
}
// extractCallbackFn: the type of CALLBACK function for extractToCallback
type
extractCallbackFn
func
(
fullpath
PathExpression
,
bj
BinaryJSON
)
(
stop
bool
,
err
error
)
// extractToCallback: callback alternative of extractTo
// would be more effective when walk through the whole JSON is unnecessary
// NOTICE: path [0] & [*] for JSON object other than array is INVALID, which is different from extractTo.
func
(
bj
BinaryJSON
)
extractToCallback
(
pathExpr
PathExpression
,
callbackFn
extractCallbackFn
,
fullpath
PathExpression
)
(
stop
bool
,
err
error
)
{
if
len
(
pathExpr
.
legs
)
==
0
{
return
callbackFn
(
fullpath
,
bj
)
}
currentLeg
,
subPathExpr
:=
pathExpr
.
popOneLeg
()
if
currentLeg
.
typ
==
pathLegIndex
&&
bj
.
TypeCode
==
TypeCodeArray
{
elemCount
:=
bj
.
GetElemCount
()
if
currentLeg
.
arrayIndex
==
arrayIndexAsterisk
{
for
i
:=
0
;
i
<
elemCount
;
i
++
{
//buf = bj.arrayGetElem(i).extractTo(buf, subPathExpr)
path
:=
fullpath
.
pushBackOneIndexLeg
(
i
)
stop
,
err
=
bj
.
arrayGetElem
(
i
)
.
extractToCallback
(
subPathExpr
,
callbackFn
,
path
)
if
stop
||
err
!=
nil
{
return
}
}
}
else
if
currentLeg
.
arrayIndex
<
elemCount
{
//buf = bj.arrayGetElem(currentLeg.arrayIndex).extractTo(buf, subPathExpr)
path
:=
fullpath
.
pushBackOneIndexLeg
(
currentLeg
.
arrayIndex
)
stop
,
err
=
bj
.
arrayGetElem
(
currentLeg
.
arrayIndex
)
.
extractToCallback
(
subPathExpr
,
callbackFn
,
path
)
if
stop
||
err
!=
nil
{
return
}
}
}
else
if
currentLeg
.
typ
==
pathLegKey
&&
bj
.
TypeCode
==
TypeCodeObject
{
elemCount
:=
bj
.
GetElemCount
()
if
currentLeg
.
dotKey
==
"*"
{
for
i
:=
0
;
i
<
elemCount
;
i
++
{
//buf = bj.objectGetVal(i).extractTo(buf, subPathExpr)
path
:=
fullpath
.
pushBackOneKeyLeg
(
string
(
bj
.
objectGetKey
(
i
)))
stop
,
err
=
bj
.
objectGetVal
(
i
)
.
extractToCallback
(
subPathExpr
,
callbackFn
,
path
)
if
stop
||
err
!=
nil
{
return
}
}
}
else
{
child
,
ok
:=
bj
.
objectSearchKey
(
hack
.
Slice
(
currentLeg
.
dotKey
))
if
ok
{
//buf = child.extractTo(buf, subPathExpr)
path
:=
fullpath
.
pushBackOneKeyLeg
(
currentLeg
.
dotKey
)
stop
,
err
=
child
.
extractToCallback
(
subPathExpr
,
callbackFn
,
path
)
if
stop
||
err
!=
nil
{
return
}
}
}
}
else
if
currentLeg
.
typ
==
pathLegDoubleAsterisk
{
//buf = bj.extractTo(buf, subPathExpr)
stop
,
err
=
bj
.
extractToCallback
(
subPathExpr
,
callbackFn
,
fullpath
)
if
stop
||
err
!=
nil
{
return
}
if
bj
.
TypeCode
==
TypeCodeArray
{
elemCount
:=
bj
.
GetElemCount
()
for
i
:=
0
;
i
<
elemCount
;
i
++
{
//buf = bj.arrayGetElem(i).extractTo(buf, pathExpr)
path
:=
fullpath
.
pushBackOneIndexLeg
(
i
)
stop
,
err
=
bj
.
arrayGetElem
(
i
)
.
extractToCallback
(
pathExpr
,
callbackFn
,
path
)
if
stop
||
err
!=
nil
{
return
}
}
}
else
if
bj
.
TypeCode
==
TypeCodeObject
{
elemCount
:=
bj
.
GetElemCount
()
for
i
:=
0
;
i
<
elemCount
;
i
++
{
//buf = bj.objectGetVal(i).extractTo(buf, pathExpr)
path
:=
fullpath
.
pushBackOneKeyLeg
(
string
(
bj
.
objectGetKey
(
i
)))
stop
,
err
=
bj
.
objectGetVal
(
i
)
.
extractToCallback
(
pathExpr
,
callbackFn
,
path
)
if
stop
||
err
!=
nil
{
return
}
}
}
}
return
false
,
nil
}
// BinaryJSONWalkFunc is used as callback function for BinaryJSON.Walk
type
BinaryJSONWalkFunc
func
(
fullpath
PathExpression
,
bj
BinaryJSON
)
(
stop
bool
,
err
error
)
// Walk traverse BinaryJSON objects
func
(
bj
BinaryJSON
)
Walk
(
walkFn
BinaryJSONWalkFunc
,
pathExprList
...
PathExpression
)
(
err
error
)
{
pathSet
:=
make
(
map
[
string
]
bool
)
var
doWalk
extractCallbackFn
doWalk
=
func
(
fullpath
PathExpression
,
bj
BinaryJSON
)
(
stop
bool
,
err
error
)
{
pathStr
:=
fullpath
.
String
()
if
_
,
ok
:=
pathSet
[
pathStr
];
ok
{
return
false
,
nil
}
stop
,
err
=
walkFn
(
fullpath
,
bj
)
pathSet
[
pathStr
]
=
true
if
stop
||
err
!=
nil
{
return
}
if
bj
.
TypeCode
==
TypeCodeArray
{
elemCount
:=
bj
.
GetElemCount
()
for
i
:=
0
;
i
<
elemCount
;
i
++
{
path
:=
fullpath
.
pushBackOneIndexLeg
(
i
)
stop
,
err
=
doWalk
(
path
,
bj
.
arrayGetElem
(
i
))
if
stop
||
err
!=
nil
{
return
}
}
}
else
if
bj
.
TypeCode
==
TypeCodeObject
{
elemCount
:=
bj
.
GetElemCount
()
for
i
:=
0
;
i
<
elemCount
;
i
++
{
path
:=
fullpath
.
pushBackOneKeyLeg
(
string
(
bj
.
objectGetKey
(
i
)))
stop
,
err
=
doWalk
(
path
,
bj
.
objectGetVal
(
i
))
if
stop
||
err
!=
nil
{
return
}
}
}
return
false
,
nil
}
fullpath
:=
PathExpression
{
legs
:
make
([]
pathLeg
,
0
,
32
),
flags
:
pathExpressionFlag
(
0
)}
if
len
(
pathExprList
)
>
0
{
for
_
,
pathExpr
:=
range
pathExprList
{
var
stop
bool
stop
,
err
=
bj
.
extractToCallback
(
pathExpr
,
doWalk
,
fullpath
)
if
stop
||
err
!=
nil
{
return
err
}
}
}
else
{
_
,
err
=
doWalk
(
fullpath
,
bj
)
if
err
!=
nil
{
return
}
}
return
nil
}
vendor/github.com/pingcap/tidb/types/json/path_expr.go
浏览文件 @
82efd3c2
...
@@ -117,6 +117,30 @@ func (pe PathExpression) popOneLastLeg() (PathExpression, pathLeg) {
...
@@ -117,6 +117,30 @@ func (pe PathExpression) popOneLastLeg() (PathExpression, pathLeg) {
return
PathExpression
{
legs
:
pe
.
legs
[
:
lastLegIdx
]},
lastLeg
return
PathExpression
{
legs
:
pe
.
legs
[
:
lastLegIdx
]},
lastLeg
}
}
// pushBackOneIndexLeg pushback one leg of INDEX type
func
(
pe
PathExpression
)
pushBackOneIndexLeg
(
index
int
)
PathExpression
{
newPe
:=
PathExpression
{
legs
:
append
(
pe
.
legs
,
pathLeg
{
typ
:
pathLegIndex
,
arrayIndex
:
index
}),
flags
:
pe
.
flags
,
}
if
index
==
-
1
{
newPe
.
flags
|=
pathExpressionContainsAsterisk
}
return
newPe
}
// pushBackOneKeyLeg pushback one leg of KEY type
func
(
pe
PathExpression
)
pushBackOneKeyLeg
(
key
string
)
PathExpression
{
newPe
:=
PathExpression
{
legs
:
append
(
pe
.
legs
,
pathLeg
{
typ
:
pathLegKey
,
dotKey
:
key
}),
flags
:
pe
.
flags
,
}
if
key
==
"*"
{
newPe
.
flags
|=
pathExpressionContainsAsterisk
}
return
newPe
}
// ContainsAnyAsterisk returns true if pe contains any asterisk.
// ContainsAnyAsterisk returns true if pe contains any asterisk.
func
(
pe
PathExpression
)
ContainsAnyAsterisk
()
bool
{
func
(
pe
PathExpression
)
ContainsAnyAsterisk
()
bool
{
return
pe
.
flags
.
containsAnyAsterisk
()
return
pe
.
flags
.
containsAnyAsterisk
()
...
@@ -212,3 +236,27 @@ func isBlank(c rune) bool {
...
@@ -212,3 +236,27 @@ func isBlank(c rune) bool {
}
}
return
false
return
false
}
}
func
(
pe
PathExpression
)
String
()
string
{
var
s
strings
.
Builder
s
.
WriteString
(
"$"
)
for
_
,
leg
:=
range
pe
.
legs
{
switch
leg
.
typ
{
case
pathLegIndex
:
if
leg
.
arrayIndex
==
-
1
{
s
.
WriteString
(
"[*]"
)
}
else
{
s
.
WriteString
(
"["
)
s
.
WriteString
(
strconv
.
Itoa
(
leg
.
arrayIndex
))
s
.
WriteString
(
"]"
)
}
case
pathLegKey
:
s
.
WriteString
(
"."
)
s
.
WriteString
(
quoteString
(
leg
.
dotKey
))
case
pathLegDoubleAsterisk
:
s
.
WriteString
(
"**"
)
}
}
return
s
.
String
()
}
vendor/github.com/pingcap/tidb/types/time.go
浏览文件 @
82efd3c2
...
@@ -29,18 +29,7 @@ import (
...
@@ -29,18 +29,7 @@ import (
"github.com/pingcap/parser/terror"
"github.com/pingcap/parser/terror"
"github.com/pingcap/tidb/sessionctx/stmtctx"
"github.com/pingcap/tidb/sessionctx/stmtctx"
"github.com/pingcap/tidb/util/logutil"
"github.com/pingcap/tidb/util/logutil"
)
tidbMath
"github.com/pingcap/tidb/util/math"
// Portable analogs of some common call errors.
var
(
ErrInvalidTimeFormat
=
terror
.
ClassTypes
.
New
(
mysql
.
ErrTruncatedWrongValue
,
"invalid time format: '%v'"
)
ErrInvalidWeekModeFormat
=
terror
.
ClassTypes
.
New
(
mysql
.
ErrTruncatedWrongValue
,
"invalid week mode format: '%v'"
)
ErrInvalidYearFormat
=
errors
.
New
(
"invalid year format"
)
ErrInvalidYear
=
errors
.
New
(
"invalid year"
)
ErrZeroDate
=
errors
.
New
(
"datetime zero in date"
)
ErrIncorrectDatetimeValue
=
terror
.
ClassTypes
.
New
(
mysql
.
ErrTruncatedWrongValue
,
"Incorrect datetime value: '%s'"
)
ErrDatetimeFunctionOverflow
=
terror
.
ClassTypes
.
New
(
mysql
.
ErrDatetimeFunctionOverflow
,
mysql
.
MySQLErrName
[
mysql
.
ErrDatetimeFunctionOverflow
])
ErrTruncatedWrongValue
=
terror
.
ClassTypes
.
New
(
mysql
.
ErrTruncatedWrongValue
,
mysql
.
MySQLErrName
[
mysql
.
ErrTruncatedWrongValue
])
)
)
// Time format without fractional seconds precision.
// Time format without fractional seconds precision.
...
@@ -196,6 +185,13 @@ var (
...
@@ -196,6 +185,13 @@ var (
}
}
)
)
const
(
// GoDurationDay is the gotime.Duration which equals to a Day.
GoDurationDay
=
gotime
.
Hour
*
24
// GoDurationWeek is the gotime.Duration which equals to a Week.
GoDurationWeek
=
GoDurationDay
*
7
)
// FromGoTime translates time.Time to mysql time internal representation.
// FromGoTime translates time.Time to mysql time internal representation.
func
FromGoTime
(
t
gotime
.
Time
)
MysqlTime
{
func
FromGoTime
(
t
gotime
.
Time
)
MysqlTime
{
year
,
month
,
day
:=
t
.
Date
()
year
,
month
,
day
:=
t
.
Date
()
...
@@ -1198,9 +1194,9 @@ func ParseDuration(sc *stmtctx.StatementContext, str string, fsp int) (Duration,
...
@@ -1198,9 +1194,9 @@ func ParseDuration(sc *stmtctx.StatementContext, str string, fsp int) (Duration,
// TruncateOverflowMySQLTime truncates d when it overflows, and return ErrTruncatedWrongVal.
// TruncateOverflowMySQLTime truncates d when it overflows, and return ErrTruncatedWrongVal.
func
TruncateOverflowMySQLTime
(
d
gotime
.
Duration
)
(
gotime
.
Duration
,
error
)
{
func
TruncateOverflowMySQLTime
(
d
gotime
.
Duration
)
(
gotime
.
Duration
,
error
)
{
if
d
>
MaxTime
{
if
d
>
MaxTime
{
return
MaxTime
,
ErrTruncatedWrongVal
.
GenWithStackByArgs
(
"time"
,
d
.
String
()
)
return
MaxTime
,
ErrTruncatedWrongVal
.
GenWithStackByArgs
(
"time"
,
d
)
}
else
if
d
<
MinTime
{
}
else
if
d
<
MinTime
{
return
MinTime
,
ErrTruncatedWrongVal
.
GenWithStackByArgs
(
"time"
,
d
.
String
()
)
return
MinTime
,
ErrTruncatedWrongVal
.
GenWithStackByArgs
(
"time"
,
d
)
}
}
return
d
,
nil
return
d
,
nil
...
@@ -1474,7 +1470,7 @@ func checkDateRange(t MysqlTime) error {
...
@@ -1474,7 +1470,7 @@ func checkDateRange(t MysqlTime) error {
func
checkMonthDay
(
year
,
month
,
day
int
,
allowInvalidDate
bool
)
error
{
func
checkMonthDay
(
year
,
month
,
day
int
,
allowInvalidDate
bool
)
error
{
if
month
<
0
||
month
>
12
{
if
month
<
0
||
month
>
12
{
return
errors
.
Trace
(
ErrIn
validTimeFormat
.
GenWithStackByArgs
(
month
))
return
errors
.
Trace
(
ErrIn
correctDatetimeValue
.
GenWithStackByArgs
(
month
))
}
}
maxDay
:=
31
maxDay
:=
31
...
@@ -1482,13 +1478,13 @@ func checkMonthDay(year, month, day int, allowInvalidDate bool) error {
...
@@ -1482,13 +1478,13 @@ func checkMonthDay(year, month, day int, allowInvalidDate bool) error {
if
month
>
0
{
if
month
>
0
{
maxDay
=
maxDaysInMonth
[
month
-
1
]
maxDay
=
maxDaysInMonth
[
month
-
1
]
}
}
if
month
==
2
&&
year
%
4
!=
0
{
if
month
==
2
&&
!
isLeapYear
(
uint16
(
year
))
{
maxDay
=
28
maxDay
=
28
}
}
}
}
if
day
<
0
||
day
>
maxDay
{
if
day
<
0
||
day
>
maxDay
{
return
errors
.
Trace
(
ErrIn
validTimeFormat
.
GenWithStackByArgs
(
day
))
return
errors
.
Trace
(
ErrIn
correctDatetimeValue
.
GenWithStackByArgs
(
day
))
}
}
return
nil
return
nil
}
}
...
@@ -1545,6 +1541,7 @@ func checkDatetimeType(t MysqlTime, allowZeroInDate, allowInvalidDate bool) erro
...
@@ -1545,6 +1541,7 @@ func checkDatetimeType(t MysqlTime, allowZeroInDate, allowInvalidDate bool) erro
// ExtractDatetimeNum extracts time value number from datetime unit and format.
// ExtractDatetimeNum extracts time value number from datetime unit and format.
func
ExtractDatetimeNum
(
t
*
Time
,
unit
string
)
(
int64
,
error
)
{
func
ExtractDatetimeNum
(
t
*
Time
,
unit
string
)
(
int64
,
error
)
{
// TODO: Consider time_zone variable.
switch
strings
.
ToUpper
(
unit
)
{
switch
strings
.
ToUpper
(
unit
)
{
case
"DAY"
:
case
"DAY"
:
return
int64
(
t
.
Time
.
Day
()),
nil
return
int64
(
t
.
Time
.
Day
()),
nil
...
@@ -1552,12 +1549,7 @@ func ExtractDatetimeNum(t *Time, unit string) (int64, error) {
...
@@ -1552,12 +1549,7 @@ func ExtractDatetimeNum(t *Time, unit string) (int64, error) {
week
:=
t
.
Time
.
Week
(
0
)
week
:=
t
.
Time
.
Week
(
0
)
return
int64
(
week
),
nil
return
int64
(
week
),
nil
case
"MONTH"
:
case
"MONTH"
:
// TODO: Consider time_zone variable.
return
int64
(
t
.
Time
.
Month
()),
nil
t1
,
err
:=
t
.
Time
.
GoTime
(
gotime
.
Local
)
if
err
!=
nil
{
return
0
,
errors
.
Trace
(
err
)
}
return
int64
(
t1
.
Month
()),
nil
case
"QUARTER"
:
case
"QUARTER"
:
m
:=
int64
(
t
.
Time
.
Month
())
m
:=
int64
(
t
.
Time
.
Month
())
// 1 - 3 -> 1
// 1 - 3 -> 1
...
@@ -1619,41 +1611,110 @@ func ExtractDurationNum(d *Duration, unit string) (int64, error) {
...
@@ -1619,41 +1611,110 @@ func ExtractDurationNum(d *Duration, unit string) (int64, error) {
}
}
}
}
func
extractSingleTimeValue
(
unit
string
,
format
string
)
(
int64
,
int64
,
int64
,
float64
,
error
)
{
// parseSingleTimeValue parse the format according the given unit. If we set strictCheck true, we'll check whether
fv
,
err
:=
strconv
.
ParseFloat
(
format
,
64
)
// the converted value not exceed the range of MySQL's TIME type.
// The first four returned values are year, month, day and nanosecond.
func
parseSingleTimeValue
(
unit
string
,
format
string
,
strictCheck
bool
)
(
int64
,
int64
,
int64
,
int64
,
error
)
{
// Format is a preformatted number, it format should be A[.[B]].
decimalPointPos
:=
strings
.
IndexRune
(
format
,
'.'
)
if
decimalPointPos
==
-
1
{
decimalPointPos
=
len
(
format
)
}
sign
:=
int64
(
1
)
if
len
(
format
)
>
0
&&
format
[
0
]
==
'-'
{
sign
=
int64
(
-
1
)
}
iv
,
err
:=
strconv
.
ParseInt
(
format
[
0
:
decimalPointPos
],
10
,
64
)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
format
)
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
format
)
}
}
iv
:=
int64
(
math
.
Round
(
fv
))
riv
:=
iv
// Rounded integer value
dv
:=
int64
(
0
)
lf
:=
len
(
format
)
-
1
// Has fraction part
if
decimalPointPos
<
lf
{
if
lf
-
decimalPointPos
>=
6
{
// MySQL rounds down to 1e-6.
if
dv
,
err
=
strconv
.
ParseInt
(
format
[
decimalPointPos
+
1
:
decimalPointPos
+
7
],
10
,
64
);
err
!=
nil
{
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
format
)
}
}
else
{
if
dv
,
err
=
strconv
.
ParseInt
(
format
[
decimalPointPos
+
1
:
]
+
"000000"
[
:
6
-
(
lf
-
decimalPointPos
)],
10
,
64
);
err
!=
nil
{
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
format
)
}
}
if
dv
>=
500000
{
// Round up, and we should keep 6 digits for microsecond, so dv should in [000000, 999999].
riv
+=
sign
}
if
unit
!=
"SECOND"
{
err
=
ErrTruncatedWrongValue
.
GenWithStackByArgs
(
format
)
}
}
switch
strings
.
ToUpper
(
unit
)
{
switch
strings
.
ToUpper
(
unit
)
{
case
"MICROSECOND"
:
case
"MICROSECOND"
:
return
0
,
0
,
0
,
fv
*
float64
(
gotime
.
Microsecond
),
nil
if
strictCheck
&&
tidbMath
.
Abs
(
riv
)
>
TimeMaxValueSeconds
*
1000
{
return
0
,
0
,
0
,
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
dayCount
:=
riv
/
int64
(
GoDurationDay
/
gotime
.
Microsecond
)
riv
%=
int64
(
GoDurationDay
/
gotime
.
Microsecond
)
return
0
,
0
,
dayCount
,
riv
*
int64
(
gotime
.
Microsecond
),
err
case
"SECOND"
:
case
"SECOND"
:
return
0
,
0
,
0
,
fv
*
float64
(
gotime
.
Second
),
nil
if
strictCheck
&&
tidbMath
.
Abs
(
iv
)
>
TimeMaxValueSeconds
{
return
0
,
0
,
0
,
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
dayCount
:=
iv
/
int64
(
GoDurationDay
/
gotime
.
Second
)
iv
%=
int64
(
GoDurationDay
/
gotime
.
Second
)
return
0
,
0
,
dayCount
,
iv
*
int64
(
gotime
.
Second
)
+
dv
*
int64
(
gotime
.
Microsecond
),
err
case
"MINUTE"
:
case
"MINUTE"
:
return
0
,
0
,
0
,
float64
(
iv
*
int64
(
gotime
.
Minute
)),
nil
if
strictCheck
&&
tidbMath
.
Abs
(
riv
)
>
TimeMaxHour
*
60
+
TimeMaxMinute
{
return
0
,
0
,
0
,
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
dayCount
:=
riv
/
int64
(
GoDurationDay
/
gotime
.
Minute
)
riv
%=
int64
(
GoDurationDay
/
gotime
.
Minute
)
return
0
,
0
,
dayCount
,
riv
*
int64
(
gotime
.
Minute
),
err
case
"HOUR"
:
case
"HOUR"
:
return
0
,
0
,
0
,
float64
(
iv
*
int64
(
gotime
.
Hour
)),
nil
if
strictCheck
&&
tidbMath
.
Abs
(
riv
)
>
TimeMaxHour
{
return
0
,
0
,
0
,
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
dayCount
:=
riv
/
24
riv
%=
24
return
0
,
0
,
dayCount
,
riv
*
int64
(
gotime
.
Hour
),
err
case
"DAY"
:
case
"DAY"
:
return
0
,
0
,
iv
,
0
,
nil
if
strictCheck
&&
tidbMath
.
Abs
(
riv
)
>
TimeMaxHour
/
24
{
return
0
,
0
,
0
,
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
return
0
,
0
,
riv
,
0
,
err
case
"WEEK"
:
case
"WEEK"
:
return
0
,
0
,
7
*
iv
,
0
,
nil
if
strictCheck
&&
7
*
tidbMath
.
Abs
(
riv
)
>
TimeMaxHour
/
24
{
return
0
,
0
,
0
,
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
return
0
,
0
,
7
*
riv
,
0
,
err
case
"MONTH"
:
case
"MONTH"
:
return
0
,
iv
,
0
,
0
,
nil
if
strictCheck
&&
tidbMath
.
Abs
(
riv
)
>
1
{
return
0
,
0
,
0
,
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
return
0
,
riv
,
0
,
0
,
err
case
"QUARTER"
:
case
"QUARTER"
:
return
0
,
3
*
iv
,
0
,
0
,
nil
if
strictCheck
{
return
0
,
0
,
0
,
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
return
0
,
3
*
riv
,
0
,
0
,
err
case
"YEAR"
:
case
"YEAR"
:
return
iv
,
0
,
0
,
0
,
nil
if
strictCheck
{
return
0
,
0
,
0
,
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
return
riv
,
0
,
0
,
0
,
err
}
}
return
0
,
0
,
0
,
0
,
errors
.
Errorf
(
"invalid singel timeunit - %s"
,
unit
)
return
0
,
0
,
0
,
0
,
errors
.
Errorf
(
"invalid singel timeunit - %s"
,
unit
)
}
}
// extractTimeValue extracts years, months, days, microseconds from a string
// parseTimeValue gets years, months, days, nanoseconds from a string
// nanosecond will not exceed length of single day
// MySQL permits any punctuation delimiter in the expr format.
// MySQL permits any punctuation delimiter in the expr format.
// See https://dev.mysql.com/doc/refman/8.0/en/expressions.html#temporal-intervals
// See https://dev.mysql.com/doc/refman/8.0/en/expressions.html#temporal-intervals
func
extractTimeValue
(
format
string
,
index
,
cnt
int
)
(
int64
,
int64
,
int64
,
floa
t64
,
error
)
{
func
parseTimeValue
(
format
string
,
index
,
cnt
int
)
(
int64
,
int64
,
int64
,
in
t64
,
error
)
{
neg
:=
false
neg
:=
false
originalFmt
:=
format
originalFmt
:=
format
format
=
strings
.
TrimSpace
(
format
)
format
=
strings
.
TrimSpace
(
format
)
...
@@ -1691,57 +1752,160 @@ func extractTimeValue(format string, index, cnt int) (int64, int64, int64, float
...
@@ -1691,57 +1752,160 @@ func extractTimeValue(format string, index, cnt int) (int64, int64, int64, float
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
}
}
hours
,
err
:=
strconv
.
Parse
Float
(
fields
[
HourIndex
]
,
64
)
hours
,
err
:=
strconv
.
Parse
Int
(
fields
[
HourIndex
],
10
,
64
)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
}
}
minutes
,
err
:=
strconv
.
Parse
Float
(
fields
[
MinuteIndex
]
,
64
)
minutes
,
err
:=
strconv
.
Parse
Int
(
fields
[
MinuteIndex
],
10
,
64
)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
}
}
seconds
,
err
:=
strconv
.
Parse
Float
(
fields
[
SecondIndex
]
,
64
)
seconds
,
err
:=
strconv
.
Parse
Int
(
fields
[
SecondIndex
],
10
,
64
)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
}
}
microseconds
,
err
:=
strconv
.
Parse
Float
(
alignFrac
(
fields
[
MicrosecondIndex
],
MaxFsp
)
,
64
)
microseconds
,
err
:=
strconv
.
Parse
Int
(
alignFrac
(
fields
[
MicrosecondIndex
],
MaxFsp
),
10
,
64
)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
return
0
,
0
,
0
,
0
,
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
originalFmt
)
}
}
durations
:=
hours
*
float64
(
gotime
.
Hour
)
+
minutes
*
float64
(
gotime
.
Minute
)
+
seconds
=
hours
*
3600
+
minutes
*
60
+
seconds
seconds
*
float64
(
gotime
.
Second
)
+
microseconds
*
float64
(
gotime
.
Microsecond
)
days
+=
seconds
/
(
3600
*
24
)
seconds
%=
3600
*
24
return
years
,
months
,
days
,
seconds
*
int64
(
gotime
.
Second
)
+
microseconds
*
int64
(
gotime
.
Microsecond
),
nil
}
return
years
,
months
,
days
,
durations
,
nil
func
parseAndValidateDurationValue
(
format
string
,
index
,
cnt
int
)
(
int64
,
error
)
{
year
,
month
,
day
,
nano
,
err
:=
parseTimeValue
(
format
,
index
,
cnt
)
if
err
!=
nil
{
return
0
,
err
}
if
year
!=
0
||
month
!=
0
||
tidbMath
.
Abs
(
day
)
>
TimeMaxHour
/
24
{
return
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
dur
:=
day
*
int64
(
GoDurationDay
)
+
nano
if
tidbMath
.
Abs
(
dur
)
>
int64
(
MaxTime
)
{
return
0
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
}
return
dur
,
nil
}
}
// ExtractTimeValue extracts time value from time unit and format.
// ParseDurationValue parses time value from time unit and format.
func
ExtractTimeValue
(
unit
string
,
format
string
)
(
int64
,
int64
,
int64
,
float64
,
error
)
{
// Returns y years m months d days + n nanoseconds
// Nanoseconds will no longer than one day.
func
ParseDurationValue
(
unit
string
,
format
string
)
(
y
int64
,
m
int64
,
d
int64
,
n
int64
,
_
error
)
{
switch
strings
.
ToUpper
(
unit
)
{
switch
strings
.
ToUpper
(
unit
)
{
case
"MICROSECOND"
,
"SECOND"
,
"MINUTE"
,
"HOUR"
,
"DAY"
,
"WEEK"
,
"MONTH"
,
"QUARTER"
,
"YEAR"
:
case
"MICROSECOND"
,
"SECOND"
,
"MINUTE"
,
"HOUR"
,
"DAY"
,
"WEEK"
,
"MONTH"
,
"QUARTER"
,
"YEAR"
:
return
extractSingleTimeValue
(
unit
,
format
)
return
parseSingleTimeValue
(
unit
,
format
,
false
)
case
"SECOND_MICROSECOND"
:
case
"SECOND_MICROSECOND"
:
return
extract
TimeValue
(
format
,
MicrosecondIndex
,
SecondMicrosecondMaxCnt
)
return
parse
TimeValue
(
format
,
MicrosecondIndex
,
SecondMicrosecondMaxCnt
)
case
"MINUTE_MICROSECOND"
:
case
"MINUTE_MICROSECOND"
:
return
extract
TimeValue
(
format
,
MicrosecondIndex
,
MinuteMicrosecondMaxCnt
)
return
parse
TimeValue
(
format
,
MicrosecondIndex
,
MinuteMicrosecondMaxCnt
)
case
"MINUTE_SECOND"
:
case
"MINUTE_SECOND"
:
return
extract
TimeValue
(
format
,
SecondIndex
,
MinuteSecondMaxCnt
)
return
parse
TimeValue
(
format
,
SecondIndex
,
MinuteSecondMaxCnt
)
case
"HOUR_MICROSECOND"
:
case
"HOUR_MICROSECOND"
:
return
extract
TimeValue
(
format
,
MicrosecondIndex
,
HourMicrosecondMaxCnt
)
return
parse
TimeValue
(
format
,
MicrosecondIndex
,
HourMicrosecondMaxCnt
)
case
"HOUR_SECOND"
:
case
"HOUR_SECOND"
:
return
extract
TimeValue
(
format
,
SecondIndex
,
HourSecondMaxCnt
)
return
parse
TimeValue
(
format
,
SecondIndex
,
HourSecondMaxCnt
)
case
"HOUR_MINUTE"
:
case
"HOUR_MINUTE"
:
return
extract
TimeValue
(
format
,
MinuteIndex
,
HourMinuteMaxCnt
)
return
parse
TimeValue
(
format
,
MinuteIndex
,
HourMinuteMaxCnt
)
case
"DAY_MICROSECOND"
:
case
"DAY_MICROSECOND"
:
return
extract
TimeValue
(
format
,
MicrosecondIndex
,
DayMicrosecondMaxCnt
)
return
parse
TimeValue
(
format
,
MicrosecondIndex
,
DayMicrosecondMaxCnt
)
case
"DAY_SECOND"
:
case
"DAY_SECOND"
:
return
extract
TimeValue
(
format
,
SecondIndex
,
DaySecondMaxCnt
)
return
parse
TimeValue
(
format
,
SecondIndex
,
DaySecondMaxCnt
)
case
"DAY_MINUTE"
:
case
"DAY_MINUTE"
:
return
extract
TimeValue
(
format
,
MinuteIndex
,
DayMinuteMaxCnt
)
return
parse
TimeValue
(
format
,
MinuteIndex
,
DayMinuteMaxCnt
)
case
"DAY_HOUR"
:
case
"DAY_HOUR"
:
return
extract
TimeValue
(
format
,
HourIndex
,
DayHourMaxCnt
)
return
parse
TimeValue
(
format
,
HourIndex
,
DayHourMaxCnt
)
case
"YEAR_MONTH"
:
case
"YEAR_MONTH"
:
return
extract
TimeValue
(
format
,
MonthIndex
,
YearMonthMaxCnt
)
return
parse
TimeValue
(
format
,
MonthIndex
,
YearMonthMaxCnt
)
default
:
default
:
return
0
,
0
,
0
,
0
,
errors
.
Errorf
(
"invalid singel timeunit - %s"
,
unit
)
return
0
,
0
,
0
,
0
,
errors
.
Errorf
(
"invalid single timeunit - %s"
,
unit
)
}
}
// ExtractDurationValue extract the value from format to Duration.
func
ExtractDurationValue
(
unit
string
,
format
string
)
(
Duration
,
error
)
{
unit
=
strings
.
ToUpper
(
unit
)
switch
unit
{
case
"MICROSECOND"
,
"SECOND"
,
"MINUTE"
,
"HOUR"
,
"DAY"
,
"WEEK"
,
"MONTH"
,
"QUARTER"
,
"YEAR"
:
_
,
month
,
day
,
nano
,
err
:=
parseSingleTimeValue
(
unit
,
format
,
true
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
dur
:=
Duration
{
Duration
:
gotime
.
Duration
((
month
*
30
+
day
)
*
int64
(
GoDurationDay
)
+
nano
)}
if
unit
==
"MICROSECOND"
{
dur
.
Fsp
=
MaxFsp
}
return
dur
,
err
case
"SECOND_MICROSECOND"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
MicrosecondIndex
,
SecondMicrosecondMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
MaxFsp
},
nil
case
"MINUTE_MICROSECOND"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
MicrosecondIndex
,
MinuteMicrosecondMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
MaxFsp
},
nil
case
"MINUTE_SECOND"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
SecondIndex
,
MinuteSecondMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
MaxFsp
},
nil
case
"HOUR_MICROSECOND"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
MicrosecondIndex
,
HourMicrosecondMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
MaxFsp
},
nil
case
"HOUR_SECOND"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
SecondIndex
,
HourSecondMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
MaxFsp
},
nil
case
"HOUR_MINUTE"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
MinuteIndex
,
HourMinuteMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
0
},
nil
case
"DAY_MICROSECOND"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
MicrosecondIndex
,
DayMicrosecondMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
MaxFsp
},
nil
case
"DAY_SECOND"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
SecondIndex
,
DaySecondMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
MaxFsp
},
nil
case
"DAY_MINUTE"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
MinuteIndex
,
DayMinuteMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
0
},
nil
case
"DAY_HOUR"
:
d
,
err
:=
parseAndValidateDurationValue
(
format
,
HourIndex
,
DayHourMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
return
Duration
{
Duration
:
gotime
.
Duration
(
d
),
Fsp
:
0
},
nil
case
"YEAR_MONTH"
:
_
,
err
:=
parseAndValidateDurationValue
(
format
,
MonthIndex
,
YearMonthMaxCnt
)
if
err
!=
nil
{
return
ZeroDuration
,
err
}
// MONTH must exceed the limit of mysql's duration. So just return overflow error.
return
ZeroDuration
,
ErrDatetimeFunctionOverflow
.
GenWithStackByArgs
(
"time"
)
default
:
return
ZeroDuration
,
errors
.
Errorf
(
"invalid single timeunit - %s"
,
unit
)
}
}
}
}
...
...
vendor/github.com/pingcap/tidb/util/logutil/log.go
浏览文件 @
82efd3c2
...
@@ -22,6 +22,7 @@ import (
...
@@ -22,6 +22,7 @@ import (
"runtime"
"runtime"
"sort"
"sort"
"strings"
"strings"
"time"
"github.com/pingcap/errors"
"github.com/pingcap/errors"
zaplog
"github.com/pingcap/log"
zaplog
"github.com/pingcap/log"
...
@@ -208,7 +209,9 @@ func (f *textFormatter) Format(entry *log.Entry) ([]byte, error) {
...
@@ -208,7 +209,9 @@ func (f *textFormatter) Format(entry *log.Entry) ([]byte, error) {
const
(
const
(
// SlowLogTimeFormat is the time format for slow log.
// SlowLogTimeFormat is the time format for slow log.
SlowLogTimeFormat
=
"2006-01-02-15:04:05.999999999 -0700"
SlowLogTimeFormat
=
time
.
RFC3339Nano
// OldSlowLogTimeFormat is the first version of the the time format for slow log, This is use for compatibility.
OldSlowLogTimeFormat
=
"2006-01-02-15:04:05.999999999 -0700"
)
)
type
slowLogFormatter
struct
{}
type
slowLogFormatter
struct
{}
...
...
vendor/github.com/pingcap/tidb/util/math/math.go
浏览文件 @
82efd3c2
...
@@ -15,8 +15,8 @@ package math
...
@@ -15,8 +15,8 @@ package math
import
"math"
import
"math"
// http://cavaliercoder.com/blog/optimized-abs-for-int64-in-go.html
//
Abs implement the abs function according to
http://cavaliercoder.com/blog/optimized-abs-for-int64-in-go.html
func
a
bs
(
n
int64
)
int64
{
func
A
bs
(
n
int64
)
int64
{
y
:=
n
>>
63
y
:=
n
>>
63
return
(
n
^
y
)
-
y
return
(
n
^
y
)
-
y
}
}
...
@@ -46,5 +46,5 @@ func StrLenOfInt64Fast(x int64) int {
...
@@ -46,5 +46,5 @@ func StrLenOfInt64Fast(x int64) int {
if
x
<
0
{
if
x
<
0
{
size
=
1
// add "-" sign on the length count
size
=
1
// add "-" sign on the length count
}
}
return
size
+
StrLenOfUint64Fast
(
uint64
(
a
bs
(
x
)))
return
size
+
StrLenOfUint64Fast
(
uint64
(
A
bs
(
x
)))
}
}
vendor/github.com/pingcap/tidb/util/memory/tracker.go
浏览文件 @
82efd3c2
...
@@ -43,9 +43,10 @@ type Tracker struct {
...
@@ -43,9 +43,10 @@ type Tracker struct {
children
[]
*
Tracker
// The children memory trackers
children
[]
*
Tracker
// The children memory trackers
}
}
label
string
// Label of this "Tracker".
label
fmt
.
Stringer
// Label of this "Tracker".
bytesConsumed
int64
// Consumed bytes.
bytesConsumed
int64
// Consumed bytes.
bytesLimit
int64
// Negative value means no limit.
bytesLimit
int64
// Negative value means no limit.
maxConsumed
int64
// max number of bytes consumed during execution.
actionOnExceed
ActionOnExceed
actionOnExceed
ActionOnExceed
parent
*
Tracker
// The parent memory tracker.
parent
*
Tracker
// The parent memory tracker.
}
}
...
@@ -53,7 +54,7 @@ type Tracker struct {
...
@@ -53,7 +54,7 @@ type Tracker struct {
// NewTracker creates a memory tracker.
// NewTracker creates a memory tracker.
// 1. "label" is the label used in the usage string.
// 1. "label" is the label used in the usage string.
// 2. "bytesLimit < 0" means no limit.
// 2. "bytesLimit < 0" means no limit.
func
NewTracker
(
label
string
,
bytesLimit
int64
)
*
Tracker
{
func
NewTracker
(
label
fmt
.
Stringer
,
bytesLimit
int64
)
*
Tracker
{
return
&
Tracker
{
return
&
Tracker
{
label
:
label
,
label
:
label
,
bytesLimit
:
bytesLimit
,
bytesLimit
:
bytesLimit
,
...
@@ -67,7 +68,7 @@ func (t *Tracker) SetActionOnExceed(a ActionOnExceed) {
...
@@ -67,7 +68,7 @@ func (t *Tracker) SetActionOnExceed(a ActionOnExceed) {
}
}
// SetLabel sets the label of a Tracker.
// SetLabel sets the label of a Tracker.
func
(
t
*
Tracker
)
SetLabel
(
label
string
)
{
func
(
t
*
Tracker
)
SetLabel
(
label
fmt
.
Stringer
)
{
t
.
label
=
label
t
.
label
=
label
}
}
...
@@ -142,6 +143,19 @@ func (t *Tracker) Consume(bytes int64) {
...
@@ -142,6 +143,19 @@ func (t *Tracker) Consume(bytes int64) {
if
atomic
.
AddInt64
(
&
tracker
.
bytesConsumed
,
bytes
)
>=
tracker
.
bytesLimit
&&
tracker
.
bytesLimit
>
0
{
if
atomic
.
AddInt64
(
&
tracker
.
bytesConsumed
,
bytes
)
>=
tracker
.
bytesLimit
&&
tracker
.
bytesLimit
>
0
{
rootExceed
=
tracker
rootExceed
=
tracker
}
}
if
tracker
.
parent
==
nil
{
// since we only need a total memory usage during execution,
// we only record max consumed bytes in root(statement-level) for performance.
for
{
maxNow
:=
atomic
.
LoadInt64
(
&
tracker
.
maxConsumed
)
consumed
:=
atomic
.
LoadInt64
(
&
tracker
.
bytesConsumed
)
if
consumed
>
maxNow
&&
!
atomic
.
CompareAndSwapInt64
(
&
tracker
.
maxConsumed
,
maxNow
,
consumed
)
{
continue
}
break
}
}
}
}
if
rootExceed
!=
nil
{
if
rootExceed
!=
nil
{
rootExceed
.
actionOnExceed
.
Action
(
rootExceed
)
rootExceed
.
actionOnExceed
.
Action
(
rootExceed
)
...
@@ -153,6 +167,11 @@ func (t *Tracker) BytesConsumed() int64 {
...
@@ -153,6 +167,11 @@ func (t *Tracker) BytesConsumed() int64 {
return
atomic
.
LoadInt64
(
&
t
.
bytesConsumed
)
return
atomic
.
LoadInt64
(
&
t
.
bytesConsumed
)
}
}
// MaxConsumed returns max number of bytes consumed during execution.
func
(
t
*
Tracker
)
MaxConsumed
()
int64
{
return
atomic
.
LoadInt64
(
&
t
.
maxConsumed
)
}
// String returns the string representation of this Tracker tree.
// String returns the string representation of this Tracker tree.
func
(
t
*
Tracker
)
String
()
string
{
func
(
t
*
Tracker
)
String
()
string
{
buffer
:=
bytes
.
NewBufferString
(
"
\n
"
)
buffer
:=
bytes
.
NewBufferString
(
"
\n
"
)
...
...
vendor/vendor.json
浏览文件 @
82efd3c2
...
@@ -105,10 +105,10 @@
...
@@ -105,10 +105,10 @@
"revisionTime"
:
"2018-09-19T09:01:24Z"
"revisionTime"
:
"2018-09-19T09:01:24Z"
},
},
{
{
"checksumSHA1"
:
"
QPt6+cvPrmKkLeujdqEKgRH84Mw
="
,
"checksumSHA1"
:
"
wFLw18XvRl2NnXP3wReuyB4KXk4
="
,
"path"
:
"github.com/pingcap/errors"
,
"path"
:
"github.com/pingcap/errors"
,
"revision"
:
"
1176802fff62540cc87d289bd40c52a2d6b2ea1
6"
,
"revision"
:
"
fc6e4ce558343e6eab2450e7653502fee61d9ad
6"
,
"revisionTime"
:
"201
8-10-24T15:10:47
Z"
"revisionTime"
:
"201
9-05-15T08:44:45
Z"
},
},
{
{
"checksumSHA1"
:
"eIqELR/hEESdiBCcpk5kmdu2e3U="
,
"checksumSHA1"
:
"eIqELR/hEESdiBCcpk5kmdu2e3U="
,
...
@@ -117,118 +117,118 @@
...
@@ -117,118 +117,118 @@
"revisionTime"
:
"2019-03-07T07:54:52Z"
"revisionTime"
:
"2019-03-07T07:54:52Z"
},
},
{
{
"checksumSHA1"
:
"
Spi5+PnYjhKAZ1u62Ym5OGzBkbo
="
,
"checksumSHA1"
:
"
IB9wW2GmSlnLVDRkaUXcF3CJ15g
="
,
"path"
:
"github.com/pingcap/parser"
,
"path"
:
"github.com/pingcap/parser"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"
2E4g3rvXdR/N0IA7vTngW+I2dlI
="
,
"checksumSHA1"
:
"
qeft79GIpt7bP++Qlg1UNSdXL3E
="
,
"path"
:
"github.com/pingcap/parser/ast"
,
"path"
:
"github.com/pingcap/parser/ast"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"xiv40YqnvHcbIhaEzJqjh5K7ehM="
,
"checksumSHA1"
:
"xiv40YqnvHcbIhaEzJqjh5K7ehM="
,
"path"
:
"github.com/pingcap/parser/auth"
,
"path"
:
"github.com/pingcap/parser/auth"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"
TNatzumortkzsN5ShBPORCLX0ww
="
,
"checksumSHA1"
:
"
EvDXpplklIXmKqLclzWzaN/uHKQ
="
,
"path"
:
"github.com/pingcap/parser/charset"
,
"path"
:
"github.com/pingcap/parser/charset"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"
ohLJW2u9NJEzYIJL/AjOqcuKfMY
="
,
"checksumSHA1"
:
"
Aao6Mul/qqogOwPwM2arBKZkYZs
="
,
"path"
:
"github.com/pingcap/parser/format"
,
"path"
:
"github.com/pingcap/parser/format"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"
owbn76pdlOudJtIi4vPJ+3SlKuk
="
,
"checksumSHA1"
:
"
YN9BYMOMxEXjrUCPPYQREN90BC0
="
,
"path"
:
"github.com/pingcap/parser/model"
,
"path"
:
"github.com/pingcap/parser/model"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"
10eiqFEB//6VqEAaViZGoQP2zoQ
="
,
"checksumSHA1"
:
"
/qaOJqnSLO0dZbyQDnq75wUPiLo
="
,
"path"
:
"github.com/pingcap/parser/mysql"
,
"path"
:
"github.com/pingcap/parser/mysql"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"olapD16WCMBU9vrA5PtlERGFfXw="
,
"checksumSHA1"
:
"olapD16WCMBU9vrA5PtlERGFfXw="
,
"path"
:
"github.com/pingcap/parser/opcode"
,
"path"
:
"github.com/pingcap/parser/opcode"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"
TF2rMYy9ewgZpFsJb+jaGXXqZqc
="
,
"checksumSHA1"
:
"
kNunWp0HfikkRiZlOzfD1bvHruM
="
,
"path"
:
"github.com/pingcap/parser/terror"
,
"path"
:
"github.com/pingcap/parser/terror"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"
99wS/t3dZNvqLZ+DK/V9D4or3R8
="
,
"checksumSHA1"
:
"
abJKAbu4Cro4oJZ2IeI+n+0R87A
="
,
"path"
:
"github.com/pingcap/parser/types"
,
"path"
:
"github.com/pingcap/parser/types"
,
"revision"
:
"
cdceeb2c5476084c21987c42bc9405cdcbc290ef
"
,
"revision"
:
"
89ae120307cc42a1cccc4daba2c589966db77055
"
,
"revisionTime"
:
"2019-0
4-08T06:41:40
Z"
"revisionTime"
:
"2019-0
5-23T11:32:41
Z"
},
},
{
{
"checksumSHA1"
:
"
hOYJW5hSqstxumyNG8+tItUtmhU
="
,
"checksumSHA1"
:
"
t0O+34iPgOlRt020Cn36smUWhwQ
="
,
"path"
:
"github.com/pingcap/tidb/sessionctx/stmtctx"
,
"path"
:
"github.com/pingcap/tidb/sessionctx/stmtctx"
,
"revision"
:
"
f6a36e0b3634759b0e8f8afef63c70c06707279c
"
,
"revision"
:
"
cc74145ffa9e48edcae0fb394618ada43b2776c0
"
,
"revisionTime"
:
"2019-0
4-09T02:17:41
Z"
"revisionTime"
:
"2019-0
5-24T06:40:04
Z"
},
},
{
{
"checksumSHA1"
:
"
p2EXSv26CqDA/O8oA1jkig+42tU
="
,
"checksumSHA1"
:
"
1INT6BSMg5WA9x4ftRegJBhDJQg
="
,
"path"
:
"github.com/pingcap/tidb/types"
,
"path"
:
"github.com/pingcap/tidb/types"
,
"revision"
:
"
f6a36e0b3634759b0e8f8afef63c70c06707279c
"
,
"revision"
:
"
cc74145ffa9e48edcae0fb394618ada43b2776c0
"
,
"revisionTime"
:
"2019-0
4-09T02:17:41
Z"
"revisionTime"
:
"2019-0
5-24T06:40:04
Z"
},
},
{
{
"checksumSHA1"
:
"
fPdBwAtPVKOr7YAyOMnRxyHixoM
="
,
"checksumSHA1"
:
"
PwXMuapqcWj1+hMEcRIJhLJ3NsY
="
,
"path"
:
"github.com/pingcap/tidb/types/json"
,
"path"
:
"github.com/pingcap/tidb/types/json"
,
"revision"
:
"
f6a36e0b3634759b0e8f8afef63c70c06707279c
"
,
"revision"
:
"
cc74145ffa9e48edcae0fb394618ada43b2776c0
"
,
"revisionTime"
:
"2019-0
4-09T02:17:41
Z"
"revisionTime"
:
"2019-0
5-24T06:40:04
Z"
},
},
{
{
"checksumSHA1"
:
"45zWX5Q6D6aTEWtc4p/lbD9WD4o="
,
"checksumSHA1"
:
"45zWX5Q6D6aTEWtc4p/lbD9WD4o="
,
"path"
:
"github.com/pingcap/tidb/types/parser_driver"
,
"path"
:
"github.com/pingcap/tidb/types/parser_driver"
,
"revision"
:
"
f6a36e0b3634759b0e8f8afef63c70c06707279c
"
,
"revision"
:
"
cc74145ffa9e48edcae0fb394618ada43b2776c0
"
,
"revisionTime"
:
"2019-0
4-09T02:17:41
Z"
"revisionTime"
:
"2019-0
5-24T06:40:04
Z"
},
},
{
{
"checksumSHA1"
:
"za/7NvrgGTXpUf/A4/MCtgeNp+Y="
,
"checksumSHA1"
:
"za/7NvrgGTXpUf/A4/MCtgeNp+Y="
,
"path"
:
"github.com/pingcap/tidb/util/execdetails"
,
"path"
:
"github.com/pingcap/tidb/util/execdetails"
,
"revision"
:
"
f6a36e0b3634759b0e8f8afef63c70c06707279c
"
,
"revision"
:
"
cc74145ffa9e48edcae0fb394618ada43b2776c0
"
,
"revisionTime"
:
"2019-0
4-09T02:17:41
Z"
"revisionTime"
:
"2019-0
5-24T06:40:04
Z"
},
},
{
{
"checksumSHA1"
:
"RdbHgQWMHjRtKjqPcTX81k1V3sw="
,
"checksumSHA1"
:
"RdbHgQWMHjRtKjqPcTX81k1V3sw="
,
"path"
:
"github.com/pingcap/tidb/util/hack"
,
"path"
:
"github.com/pingcap/tidb/util/hack"
,
"revision"
:
"
f6a36e0b3634759b0e8f8afef63c70c06707279c
"
,
"revision"
:
"
cc74145ffa9e48edcae0fb394618ada43b2776c0
"
,
"revisionTime"
:
"2019-0
4-09T02:17:41
Z"
"revisionTime"
:
"2019-0
5-24T06:40:04
Z"
},
},
{
{
"checksumSHA1"
:
"
wlgkvTvOR4cyv/X16Kt07HzAWeo
="
,
"checksumSHA1"
:
"
JYbZwZe2uuqKVVV40ZU4G9zGEBE
="
,
"path"
:
"github.com/pingcap/tidb/util/logutil"
,
"path"
:
"github.com/pingcap/tidb/util/logutil"
,
"revision"
:
"
f6a36e0b3634759b0e8f8afef63c70c06707279c
"
,
"revision"
:
"
cc74145ffa9e48edcae0fb394618ada43b2776c0
"
,
"revisionTime"
:
"2019-0
4-09T02:17:41
Z"
"revisionTime"
:
"2019-0
5-24T06:40:04
Z"
},
},
{
{
"checksumSHA1"
:
"
UoBGdswa5v8jGAVQxP3RRrMsq9w
="
,
"checksumSHA1"
:
"
OveQu0ABBJmMEwmmthqSRQC2Ef0
="
,
"path"
:
"github.com/pingcap/tidb/util/math"
,
"path"
:
"github.com/pingcap/tidb/util/math"
,
"revision"
:
"
f6a36e0b3634759b0e8f8afef63c70c06707279c
"
,
"revision"
:
"
cc74145ffa9e48edcae0fb394618ada43b2776c0
"
,
"revisionTime"
:
"2019-0
4-09T02:17:41
Z"
"revisionTime"
:
"2019-0
5-24T06:40:04
Z"
},
},
{
{
"checksumSHA1"
:
"
0teuFRow8w3BahNYK6IrAtgZsUs
="
,
"checksumSHA1"
:
"
9q+/RZZoN4cq/FbCUCD0uVAyqeU
="
,
"path"
:
"github.com/pingcap/tidb/util/memory"
,
"path"
:
"github.com/pingcap/tidb/util/memory"
,
"revision"
:
"
f6a36e0b3634759b0e8f8afef63c70c06707279c
"
,
"revision"
:
"
cc74145ffa9e48edcae0fb394618ada43b2776c0
"
,
"revisionTime"
:
"2019-0
4-09T02:17:41
Z"
"revisionTime"
:
"2019-0
5-24T06:40:04
Z"
},
},
{
{
"checksumSHA1"
:
"QPIBwDNUFF5Whrnd41S3mkKa4gQ="
,
"checksumSHA1"
:
"QPIBwDNUFF5Whrnd41S3mkKa4gQ="
,
...
@@ -485,62 +485,62 @@
...
@@ -485,62 +485,62 @@
{
{
"checksumSHA1"
:
"aKn1oKcY74N8TRLm3Ayt7Q4bbI4="
,
"checksumSHA1"
:
"aKn1oKcY74N8TRLm3Ayt7Q4bbI4="
,
"path"
:
"vitess.io/vitess/go/bytes2"
,
"path"
:
"vitess.io/vitess/go/bytes2"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
},
},
{
{
"checksumSHA1"
:
"bhE6CGQgZTIgLPp9lnvlKW/47xc="
,
"checksumSHA1"
:
"bhE6CGQgZTIgLPp9lnvlKW/47xc="
,
"path"
:
"vitess.io/vitess/go/hack"
,
"path"
:
"vitess.io/vitess/go/hack"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
},
},
{
{
"checksumSHA1"
:
"
w4BH8HL/CgT6aBWojJeZHOj5DZg
="
,
"checksumSHA1"
:
"
RERqgxOX48XzRIoe5fQzvWSJV0Y
="
,
"path"
:
"vitess.io/vitess/go/sqltypes"
,
"path"
:
"vitess.io/vitess/go/sqltypes"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
},
},
{
{
"checksumSHA1"
:
"vAIRxI6MHsq3x1hLQwIyw5AvqtI="
,
"checksumSHA1"
:
"vAIRxI6MHsq3x1hLQwIyw5AvqtI="
,
"path"
:
"vitess.io/vitess/go/vt/log"
,
"path"
:
"vitess.io/vitess/go/vt/log"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
},
},
{
{
"checksumSHA1"
:
"87Zndvk3Y+M+QxMx3uFa0iSbvWY="
,
"checksumSHA1"
:
"87Zndvk3Y+M+QxMx3uFa0iSbvWY="
,
"path"
:
"vitess.io/vitess/go/vt/proto/query"
,
"path"
:
"vitess.io/vitess/go/vt/proto/query"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
},
},
{
{
"checksumSHA1"
:
"xpcb9NfXMEeHhEPStbJntIfa5GQ="
,
"checksumSHA1"
:
"xpcb9NfXMEeHhEPStbJntIfa5GQ="
,
"path"
:
"vitess.io/vitess/go/vt/proto/topodata"
,
"path"
:
"vitess.io/vitess/go/vt/proto/topodata"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
},
},
{
{
"checksumSHA1"
:
"
7rQUJ9mz64dMJpFhIGNkMvG2Zqs
="
,
"checksumSHA1"
:
"
l9fmSuOJyoq+EKM4QxfoSw8hLPY
="
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtgate"
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtgate"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
},
},
{
{
"checksumSHA1"
:
"qz32abYdmm9NfKTc++K0l1EvXXM="
,
"checksumSHA1"
:
"qz32abYdmm9NfKTc++K0l1EvXXM="
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtrpc"
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtrpc"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
},
},
{
{
"checksumSHA1"
:
"
WIWzi5IyyoFxkJDG+Oj/DnwpEXg
="
,
"checksumSHA1"
:
"
/V79kL29yMBxAofQBL/XqxJv/GE
="
,
"path"
:
"vitess.io/vitess/go/vt/sqlparser"
,
"path"
:
"vitess.io/vitess/go/vt/sqlparser"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
},
},
{
{
"checksumSHA1"
:
"
U6rh56fSka/7xLGnl1OnWgBItn8
="
,
"checksumSHA1"
:
"
qhGH2j3onpaSh+fbs1fKPoTxUcw
="
,
"path"
:
"vitess.io/vitess/go/vt/vterrors"
,
"path"
:
"vitess.io/vitess/go/vt/vterrors"
,
"revision"
:
"
1dc74aace0998ae1424845f9a4590c60ad622e45
"
,
"revision"
:
"
eb2d057927b37c5a6f144ab5baa762881cffae8d
"
,
"revisionTime"
:
"2019-0
4-07T19:11:39
Z"
"revisionTime"
:
"2019-0
5-23T12:28:24
Z"
}
}
],
],
"rootPath"
:
"github.com/XiaoMi/soar"
"rootPath"
:
"github.com/XiaoMi/soar"
...
...
vendor/vitess.io/vitess/go/sqltypes/bind_variables.go
浏览文件 @
82efd3c2
...
@@ -57,6 +57,11 @@ func BuildBindVariables(in map[string]interface{}) (map[string]*querypb.BindVari
...
@@ -57,6 +57,11 @@ func BuildBindVariables(in map[string]interface{}) (map[string]*querypb.BindVari
return
out
,
nil
return
out
,
nil
}
}
// Int8BindVariable converts an int8 to a bind var.
func
Int8BindVariable
(
v
int8
)
*
querypb
.
BindVariable
{
return
ValueBindVariable
(
NewInt8
(
v
))
}
// Int32BindVariable converts an int32 to a bind var.
// Int32BindVariable converts an int32 to a bind var.
func
Int32BindVariable
(
v
int32
)
*
querypb
.
BindVariable
{
func
Int32BindVariable
(
v
int32
)
*
querypb
.
BindVariable
{
return
ValueBindVariable
(
NewInt32
(
v
))
return
ValueBindVariable
(
NewInt32
(
v
))
...
@@ -99,6 +104,11 @@ func BuildBindVariable(v interface{}) (*querypb.BindVariable, error) {
...
@@ -99,6 +104,11 @@ func BuildBindVariable(v interface{}) (*querypb.BindVariable, error) {
return
StringBindVariable
(
v
),
nil
return
StringBindVariable
(
v
),
nil
case
[]
byte
:
case
[]
byte
:
return
BytesBindVariable
(
v
),
nil
return
BytesBindVariable
(
v
),
nil
case
bool
:
if
v
{
return
Int8BindVariable
(
1
),
nil
}
return
Int8BindVariable
(
0
),
nil
case
int
:
case
int
:
return
&
querypb
.
BindVariable
{
return
&
querypb
.
BindVariable
{
Type
:
querypb
.
Type_INT64
,
Type
:
querypb
.
Type_INT64
,
...
...
vendor/vitess.io/vitess/go/sqltypes/value.go
浏览文件 @
82efd3c2
...
@@ -100,6 +100,11 @@ func NewInt64(v int64) Value {
...
@@ -100,6 +100,11 @@ func NewInt64(v int64) Value {
return
MakeTrusted
(
Int64
,
strconv
.
AppendInt
(
nil
,
v
,
10
))
return
MakeTrusted
(
Int64
,
strconv
.
AppendInt
(
nil
,
v
,
10
))
}
}
// NewInt8 builds an Int8 Value.
func
NewInt8
(
v
int8
)
Value
{
return
MakeTrusted
(
Int8
,
strconv
.
AppendInt
(
nil
,
int64
(
v
),
10
))
}
// NewInt32 builds an Int64 Value.
// NewInt32 builds an Int64 Value.
func
NewInt32
(
v
int32
)
Value
{
func
NewInt32
(
v
int32
)
Value
{
return
MakeTrusted
(
Int32
,
strconv
.
AppendInt
(
nil
,
int64
(
v
),
10
))
return
MakeTrusted
(
Int32
,
strconv
.
AppendInt
(
nil
,
int64
(
v
),
10
))
...
...
vendor/vitess.io/vitess/go/vt/proto/vtgate/vtgate.pb.go
浏览文件 @
82efd3c2
...
@@ -53,7 +53,42 @@ func (x TransactionMode) String() string {
...
@@ -53,7 +53,42 @@ func (x TransactionMode) String() string {
return
proto
.
EnumName
(
TransactionMode_name
,
int32
(
x
))
return
proto
.
EnumName
(
TransactionMode_name
,
int32
(
x
))
}
}
func
(
TransactionMode
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
func
(
TransactionMode
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1d4a858d9b127f46
,
[]
int
{
0
}
return
fileDescriptor_vtgate_178abacf9cf673c8
,
[]
int
{
0
}
}
// CommitOrder is used to designate which of the ShardSessions
// get used for transactions.
type
CommitOrder
int32
const
(
// NORMAL is the default commit order.
CommitOrder_NORMAL
CommitOrder
=
0
// PRE is used to designate pre_sessions.
CommitOrder_PRE
CommitOrder
=
1
// POST is used to designate post_sessions.
CommitOrder_POST
CommitOrder
=
2
// AUTOCOMMIT is used to run the statement as autocommitted transaction.
CommitOrder_AUTOCOMMIT
CommitOrder
=
3
)
var
CommitOrder_name
=
map
[
int32
]
string
{
0
:
"NORMAL"
,
1
:
"PRE"
,
2
:
"POST"
,
3
:
"AUTOCOMMIT"
,
}
var
CommitOrder_value
=
map
[
string
]
int32
{
"NORMAL"
:
0
,
"PRE"
:
1
,
"POST"
:
2
,
"AUTOCOMMIT"
:
3
,
}
func
(
x
CommitOrder
)
String
()
string
{
return
proto
.
EnumName
(
CommitOrder_name
,
int32
(
x
))
}
func
(
CommitOrder
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_178abacf9cf673c8
,
[]
int
{
1
}
}
}
// Session objects are exchanged like cookies through various
// Session objects are exchanged like cookies through various
...
@@ -89,6 +124,10 @@ type Session struct {
...
@@ -89,6 +124,10 @@ type Session struct {
TransactionMode
TransactionMode
`protobuf:"varint,7,opt,name=transaction_mode,json=transactionMode,proto3,enum=vtgate.TransactionMode" json:"transaction_mode,omitempty"`
TransactionMode
TransactionMode
`protobuf:"varint,7,opt,name=transaction_mode,json=transactionMode,proto3,enum=vtgate.TransactionMode" json:"transaction_mode,omitempty"`
// warnings contains non-fatal warnings from the previous query
// warnings contains non-fatal warnings from the previous query
Warnings
[]
*
query
.
QueryWarning
`protobuf:"bytes,8,rep,name=warnings,proto3" json:"warnings,omitempty"`
Warnings
[]
*
query
.
QueryWarning
`protobuf:"bytes,8,rep,name=warnings,proto3" json:"warnings,omitempty"`
// pre_sessions contains sessions that have to be committed first.
PreSessions
[]
*
Session_ShardSession
`protobuf:"bytes,9,rep,name=pre_sessions,json=preSessions,proto3" json:"pre_sessions,omitempty"`
// post_sessions contains sessions that have to be committed last.
PostSessions
[]
*
Session_ShardSession
`protobuf:"bytes,10,rep,name=post_sessions,json=postSessions,proto3" json:"post_sessions,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
@@ -98,7 +137,7 @@ func (m *Session) Reset() { *m = Session{} }
...
@@ -98,7 +137,7 @@ func (m *Session) Reset() { *m = Session{} }
func
(
m
*
Session
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
Session
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Session
)
ProtoMessage
()
{}
func
(
*
Session
)
ProtoMessage
()
{}
func
(
*
Session
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Session
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
0
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
0
}
}
}
func
(
m
*
Session
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Session
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_Session
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_Session
.
Unmarshal
(
m
,
b
)
...
@@ -174,6 +213,20 @@ func (m *Session) GetWarnings() []*query.QueryWarning {
...
@@ -174,6 +213,20 @@ func (m *Session) GetWarnings() []*query.QueryWarning {
return
nil
return
nil
}
}
func
(
m
*
Session
)
GetPreSessions
()
[]
*
Session_ShardSession
{
if
m
!=
nil
{
return
m
.
PreSessions
}
return
nil
}
func
(
m
*
Session
)
GetPostSessions
()
[]
*
Session_ShardSession
{
if
m
!=
nil
{
return
m
.
PostSessions
}
return
nil
}
type
Session_ShardSession
struct
{
type
Session_ShardSession
struct
{
Target
*
query
.
Target
`protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
Target
*
query
.
Target
`protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
TransactionId
int64
`protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
TransactionId
int64
`protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
...
@@ -186,7 +239,7 @@ func (m *Session_ShardSession) Reset() { *m = Session_ShardSession{} }
...
@@ -186,7 +239,7 @@ func (m *Session_ShardSession) Reset() { *m = Session_ShardSession{} }
func
(
m
*
Session_ShardSession
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
Session_ShardSession
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Session_ShardSession
)
ProtoMessage
()
{}
func
(
*
Session_ShardSession
)
ProtoMessage
()
{}
func
(
*
Session_ShardSession
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Session_ShardSession
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
0
,
0
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
0
,
0
}
}
}
func
(
m
*
Session_ShardSession
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Session_ShardSession
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_Session_ShardSession
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_Session_ShardSession
.
Unmarshal
(
m
,
b
)
...
@@ -244,7 +297,7 @@ func (m *ExecuteRequest) Reset() { *m = ExecuteRequest{} }
...
@@ -244,7 +297,7 @@ func (m *ExecuteRequest) Reset() { *m = ExecuteRequest{} }
func
(
m
*
ExecuteRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
1
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
1
}
}
}
func
(
m
*
ExecuteRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteRequest
.
Unmarshal
(
m
,
b
)
...
@@ -332,7 +385,7 @@ func (m *ExecuteResponse) Reset() { *m = ExecuteResponse{} }
...
@@ -332,7 +385,7 @@ func (m *ExecuteResponse) Reset() { *m = ExecuteResponse{} }
func
(
m
*
ExecuteResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
2
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
2
}
}
}
func
(
m
*
ExecuteResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteResponse
.
Unmarshal
(
m
,
b
)
...
@@ -402,7 +455,7 @@ func (m *ExecuteShardsRequest) Reset() { *m = ExecuteShardsRequest{} }
...
@@ -402,7 +455,7 @@ func (m *ExecuteShardsRequest) Reset() { *m = ExecuteShardsRequest{} }
func
(
m
*
ExecuteShardsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteShardsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteShardsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteShardsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteShardsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteShardsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
3
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
3
}
}
}
func
(
m
*
ExecuteShardsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteShardsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteShardsRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteShardsRequest
.
Unmarshal
(
m
,
b
)
...
@@ -497,7 +550,7 @@ func (m *ExecuteShardsResponse) Reset() { *m = ExecuteShardsResponse{} }
...
@@ -497,7 +550,7 @@ func (m *ExecuteShardsResponse) Reset() { *m = ExecuteShardsResponse{} }
func
(
m
*
ExecuteShardsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteShardsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteShardsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteShardsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteShardsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteShardsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
4
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
4
}
}
}
func
(
m
*
ExecuteShardsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteShardsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteShardsResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteShardsResponse
.
Unmarshal
(
m
,
b
)
...
@@ -568,7 +621,7 @@ func (m *ExecuteKeyspaceIdsRequest) Reset() { *m = ExecuteKeyspaceIdsReq
...
@@ -568,7 +621,7 @@ func (m *ExecuteKeyspaceIdsRequest) Reset() { *m = ExecuteKeyspaceIdsReq
func
(
m
*
ExecuteKeyspaceIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteKeyspaceIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteKeyspaceIdsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteKeyspaceIdsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteKeyspaceIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteKeyspaceIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
5
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
5
}
}
}
func
(
m
*
ExecuteKeyspaceIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteKeyspaceIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteKeyspaceIdsRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteKeyspaceIdsRequest
.
Unmarshal
(
m
,
b
)
...
@@ -663,7 +716,7 @@ func (m *ExecuteKeyspaceIdsResponse) Reset() { *m = ExecuteKeyspaceIdsRe
...
@@ -663,7 +716,7 @@ func (m *ExecuteKeyspaceIdsResponse) Reset() { *m = ExecuteKeyspaceIdsRe
func
(
m
*
ExecuteKeyspaceIdsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteKeyspaceIdsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteKeyspaceIdsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteKeyspaceIdsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteKeyspaceIdsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteKeyspaceIdsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
6
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
6
}
}
}
func
(
m
*
ExecuteKeyspaceIdsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteKeyspaceIdsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteKeyspaceIdsResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteKeyspaceIdsResponse
.
Unmarshal
(
m
,
b
)
...
@@ -734,7 +787,7 @@ func (m *ExecuteKeyRangesRequest) Reset() { *m = ExecuteKeyRangesRequest
...
@@ -734,7 +787,7 @@ func (m *ExecuteKeyRangesRequest) Reset() { *m = ExecuteKeyRangesRequest
func
(
m
*
ExecuteKeyRangesRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteKeyRangesRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteKeyRangesRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteKeyRangesRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteKeyRangesRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteKeyRangesRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
7
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
7
}
}
}
func
(
m
*
ExecuteKeyRangesRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteKeyRangesRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteKeyRangesRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteKeyRangesRequest
.
Unmarshal
(
m
,
b
)
...
@@ -829,7 +882,7 @@ func (m *ExecuteKeyRangesResponse) Reset() { *m = ExecuteKeyRangesRespon
...
@@ -829,7 +882,7 @@ func (m *ExecuteKeyRangesResponse) Reset() { *m = ExecuteKeyRangesRespon
func
(
m
*
ExecuteKeyRangesResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteKeyRangesResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteKeyRangesResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteKeyRangesResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteKeyRangesResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteKeyRangesResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
8
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
8
}
}
}
func
(
m
*
ExecuteKeyRangesResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteKeyRangesResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteKeyRangesResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteKeyRangesResponse
.
Unmarshal
(
m
,
b
)
...
@@ -902,7 +955,7 @@ func (m *ExecuteEntityIdsRequest) Reset() { *m = ExecuteEntityIdsRequest
...
@@ -902,7 +955,7 @@ func (m *ExecuteEntityIdsRequest) Reset() { *m = ExecuteEntityIdsRequest
func
(
m
*
ExecuteEntityIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteEntityIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteEntityIdsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteEntityIdsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteEntityIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteEntityIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
9
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
9
}
}
}
func
(
m
*
ExecuteEntityIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteEntityIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteEntityIdsRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteEntityIdsRequest
.
Unmarshal
(
m
,
b
)
...
@@ -1001,7 +1054,7 @@ func (m *ExecuteEntityIdsRequest_EntityId) Reset() { *m = ExecuteEntityI
...
@@ -1001,7 +1054,7 @@ func (m *ExecuteEntityIdsRequest_EntityId) Reset() { *m = ExecuteEntityI
func
(
m
*
ExecuteEntityIdsRequest_EntityId
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteEntityIdsRequest_EntityId
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteEntityIdsRequest_EntityId
)
ProtoMessage
()
{}
func
(
*
ExecuteEntityIdsRequest_EntityId
)
ProtoMessage
()
{}
func
(
*
ExecuteEntityIdsRequest_EntityId
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteEntityIdsRequest_EntityId
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
9
,
0
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
9
,
0
}
}
}
func
(
m
*
ExecuteEntityIdsRequest_EntityId
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteEntityIdsRequest_EntityId
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteEntityIdsRequest_EntityId
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteEntityIdsRequest_EntityId
.
Unmarshal
(
m
,
b
)
...
@@ -1061,7 +1114,7 @@ func (m *ExecuteEntityIdsResponse) Reset() { *m = ExecuteEntityIdsRespon
...
@@ -1061,7 +1114,7 @@ func (m *ExecuteEntityIdsResponse) Reset() { *m = ExecuteEntityIdsRespon
func
(
m
*
ExecuteEntityIdsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteEntityIdsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteEntityIdsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteEntityIdsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteEntityIdsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteEntityIdsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
10
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
10
}
}
}
func
(
m
*
ExecuteEntityIdsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteEntityIdsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteEntityIdsResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteEntityIdsResponse
.
Unmarshal
(
m
,
b
)
...
@@ -1126,7 +1179,7 @@ func (m *ExecuteBatchRequest) Reset() { *m = ExecuteBatchRequest{} }
...
@@ -1126,7 +1179,7 @@ func (m *ExecuteBatchRequest) Reset() { *m = ExecuteBatchRequest{} }
func
(
m
*
ExecuteBatchRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteBatchRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteBatchRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteBatchRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
11
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
11
}
}
}
func
(
m
*
ExecuteBatchRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteBatchRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteBatchRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteBatchRequest
.
Unmarshal
(
m
,
b
)
...
@@ -1214,7 +1267,7 @@ func (m *ExecuteBatchResponse) Reset() { *m = ExecuteBatchResponse{} }
...
@@ -1214,7 +1267,7 @@ func (m *ExecuteBatchResponse) Reset() { *m = ExecuteBatchResponse{} }
func
(
m
*
ExecuteBatchResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteBatchResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteBatchResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteBatchResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
12
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
12
}
}
}
func
(
m
*
ExecuteBatchResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteBatchResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteBatchResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteBatchResponse
.
Unmarshal
(
m
,
b
)
...
@@ -1274,7 +1327,7 @@ func (m *BoundShardQuery) Reset() { *m = BoundShardQuery{} }
...
@@ -1274,7 +1327,7 @@ func (m *BoundShardQuery) Reset() { *m = BoundShardQuery{} }
func
(
m
*
BoundShardQuery
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
BoundShardQuery
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
BoundShardQuery
)
ProtoMessage
()
{}
func
(
*
BoundShardQuery
)
ProtoMessage
()
{}
func
(
*
BoundShardQuery
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
BoundShardQuery
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
13
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
13
}
}
}
func
(
m
*
BoundShardQuery
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
BoundShardQuery
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_BoundShardQuery
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_BoundShardQuery
.
Unmarshal
(
m
,
b
)
...
@@ -1342,7 +1395,7 @@ func (m *ExecuteBatchShardsRequest) Reset() { *m = ExecuteBatchShardsReq
...
@@ -1342,7 +1395,7 @@ func (m *ExecuteBatchShardsRequest) Reset() { *m = ExecuteBatchShardsReq
func
(
m
*
ExecuteBatchShardsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteBatchShardsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteBatchShardsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchShardsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchShardsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteBatchShardsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
14
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
14
}
}
}
func
(
m
*
ExecuteBatchShardsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteBatchShardsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteBatchShardsRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteBatchShardsRequest
.
Unmarshal
(
m
,
b
)
...
@@ -1423,7 +1476,7 @@ func (m *ExecuteBatchShardsResponse) Reset() { *m = ExecuteBatchShardsRe
...
@@ -1423,7 +1476,7 @@ func (m *ExecuteBatchShardsResponse) Reset() { *m = ExecuteBatchShardsRe
func
(
m
*
ExecuteBatchShardsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteBatchShardsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteBatchShardsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchShardsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchShardsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteBatchShardsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
15
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
15
}
}
}
func
(
m
*
ExecuteBatchShardsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteBatchShardsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteBatchShardsResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteBatchShardsResponse
.
Unmarshal
(
m
,
b
)
...
@@ -1484,7 +1537,7 @@ func (m *BoundKeyspaceIdQuery) Reset() { *m = BoundKeyspaceIdQuery{} }
...
@@ -1484,7 +1537,7 @@ func (m *BoundKeyspaceIdQuery) Reset() { *m = BoundKeyspaceIdQuery{} }
func
(
m
*
BoundKeyspaceIdQuery
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
BoundKeyspaceIdQuery
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
BoundKeyspaceIdQuery
)
ProtoMessage
()
{}
func
(
*
BoundKeyspaceIdQuery
)
ProtoMessage
()
{}
func
(
*
BoundKeyspaceIdQuery
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
BoundKeyspaceIdQuery
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
16
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
16
}
}
}
func
(
m
*
BoundKeyspaceIdQuery
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
BoundKeyspaceIdQuery
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_BoundKeyspaceIdQuery
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_BoundKeyspaceIdQuery
.
Unmarshal
(
m
,
b
)
...
@@ -1551,7 +1604,7 @@ func (m *ExecuteBatchKeyspaceIdsRequest) Reset() { *m = ExecuteBatchKeys
...
@@ -1551,7 +1604,7 @@ func (m *ExecuteBatchKeyspaceIdsRequest) Reset() { *m = ExecuteBatchKeys
func
(
m
*
ExecuteBatchKeyspaceIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteBatchKeyspaceIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteBatchKeyspaceIdsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchKeyspaceIdsRequest
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchKeyspaceIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteBatchKeyspaceIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
17
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
17
}
}
}
func
(
m
*
ExecuteBatchKeyspaceIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteBatchKeyspaceIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteBatchKeyspaceIdsRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteBatchKeyspaceIdsRequest
.
Unmarshal
(
m
,
b
)
...
@@ -1632,7 +1685,7 @@ func (m *ExecuteBatchKeyspaceIdsResponse) Reset() { *m = ExecuteBatchKey
...
@@ -1632,7 +1685,7 @@ func (m *ExecuteBatchKeyspaceIdsResponse) Reset() { *m = ExecuteBatchKey
func
(
m
*
ExecuteBatchKeyspaceIdsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ExecuteBatchKeyspaceIdsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ExecuteBatchKeyspaceIdsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchKeyspaceIdsResponse
)
ProtoMessage
()
{}
func
(
*
ExecuteBatchKeyspaceIdsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ExecuteBatchKeyspaceIdsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
18
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
18
}
}
}
func
(
m
*
ExecuteBatchKeyspaceIdsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ExecuteBatchKeyspaceIdsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ExecuteBatchKeyspaceIdsResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ExecuteBatchKeyspaceIdsResponse
.
Unmarshal
(
m
,
b
)
...
@@ -1696,7 +1749,7 @@ func (m *StreamExecuteRequest) Reset() { *m = StreamExecuteRequest{} }
...
@@ -1696,7 +1749,7 @@ func (m *StreamExecuteRequest) Reset() { *m = StreamExecuteRequest{} }
func
(
m
*
StreamExecuteRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
StreamExecuteRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StreamExecuteRequest
)
ProtoMessage
()
{}
func
(
*
StreamExecuteRequest
)
ProtoMessage
()
{}
func
(
*
StreamExecuteRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StreamExecuteRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
19
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
19
}
}
}
func
(
m
*
StreamExecuteRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StreamExecuteRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_StreamExecuteRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_StreamExecuteRequest
.
Unmarshal
(
m
,
b
)
...
@@ -1775,7 +1828,7 @@ func (m *StreamExecuteResponse) Reset() { *m = StreamExecuteResponse{} }
...
@@ -1775,7 +1828,7 @@ func (m *StreamExecuteResponse) Reset() { *m = StreamExecuteResponse{} }
func
(
m
*
StreamExecuteResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
StreamExecuteResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StreamExecuteResponse
)
ProtoMessage
()
{}
func
(
*
StreamExecuteResponse
)
ProtoMessage
()
{}
func
(
*
StreamExecuteResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StreamExecuteResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
20
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
20
}
}
}
func
(
m
*
StreamExecuteResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StreamExecuteResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_StreamExecuteResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_StreamExecuteResponse
.
Unmarshal
(
m
,
b
)
...
@@ -1826,7 +1879,7 @@ func (m *StreamExecuteShardsRequest) Reset() { *m = StreamExecuteShardsR
...
@@ -1826,7 +1879,7 @@ func (m *StreamExecuteShardsRequest) Reset() { *m = StreamExecuteShardsR
func
(
m
*
StreamExecuteShardsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
StreamExecuteShardsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StreamExecuteShardsRequest
)
ProtoMessage
()
{}
func
(
*
StreamExecuteShardsRequest
)
ProtoMessage
()
{}
func
(
*
StreamExecuteShardsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StreamExecuteShardsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
21
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
21
}
}
}
func
(
m
*
StreamExecuteShardsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StreamExecuteShardsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_StreamExecuteShardsRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_StreamExecuteShardsRequest
.
Unmarshal
(
m
,
b
)
...
@@ -1903,7 +1956,7 @@ func (m *StreamExecuteShardsResponse) Reset() { *m = StreamExecuteShards
...
@@ -1903,7 +1956,7 @@ func (m *StreamExecuteShardsResponse) Reset() { *m = StreamExecuteShards
func
(
m
*
StreamExecuteShardsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
StreamExecuteShardsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StreamExecuteShardsResponse
)
ProtoMessage
()
{}
func
(
*
StreamExecuteShardsResponse
)
ProtoMessage
()
{}
func
(
*
StreamExecuteShardsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StreamExecuteShardsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
22
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
22
}
}
}
func
(
m
*
StreamExecuteShardsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StreamExecuteShardsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_StreamExecuteShardsResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_StreamExecuteShardsResponse
.
Unmarshal
(
m
,
b
)
...
@@ -1955,7 +2008,7 @@ func (m *StreamExecuteKeyspaceIdsRequest) Reset() { *m = StreamExecuteKe
...
@@ -1955,7 +2008,7 @@ func (m *StreamExecuteKeyspaceIdsRequest) Reset() { *m = StreamExecuteKe
func
(
m
*
StreamExecuteKeyspaceIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
StreamExecuteKeyspaceIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StreamExecuteKeyspaceIdsRequest
)
ProtoMessage
()
{}
func
(
*
StreamExecuteKeyspaceIdsRequest
)
ProtoMessage
()
{}
func
(
*
StreamExecuteKeyspaceIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StreamExecuteKeyspaceIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
23
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
23
}
}
}
func
(
m
*
StreamExecuteKeyspaceIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StreamExecuteKeyspaceIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_StreamExecuteKeyspaceIdsRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_StreamExecuteKeyspaceIdsRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2032,7 +2085,7 @@ func (m *StreamExecuteKeyspaceIdsResponse) Reset() { *m = StreamExecuteK
...
@@ -2032,7 +2085,7 @@ func (m *StreamExecuteKeyspaceIdsResponse) Reset() { *m = StreamExecuteK
func
(
m
*
StreamExecuteKeyspaceIdsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
StreamExecuteKeyspaceIdsResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StreamExecuteKeyspaceIdsResponse
)
ProtoMessage
()
{}
func
(
*
StreamExecuteKeyspaceIdsResponse
)
ProtoMessage
()
{}
func
(
*
StreamExecuteKeyspaceIdsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StreamExecuteKeyspaceIdsResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
24
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
24
}
}
}
func
(
m
*
StreamExecuteKeyspaceIdsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StreamExecuteKeyspaceIdsResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_StreamExecuteKeyspaceIdsResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_StreamExecuteKeyspaceIdsResponse
.
Unmarshal
(
m
,
b
)
...
@@ -2084,7 +2137,7 @@ func (m *StreamExecuteKeyRangesRequest) Reset() { *m = StreamExecuteKeyR
...
@@ -2084,7 +2137,7 @@ func (m *StreamExecuteKeyRangesRequest) Reset() { *m = StreamExecuteKeyR
func
(
m
*
StreamExecuteKeyRangesRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
StreamExecuteKeyRangesRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StreamExecuteKeyRangesRequest
)
ProtoMessage
()
{}
func
(
*
StreamExecuteKeyRangesRequest
)
ProtoMessage
()
{}
func
(
*
StreamExecuteKeyRangesRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StreamExecuteKeyRangesRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
25
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
25
}
}
}
func
(
m
*
StreamExecuteKeyRangesRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StreamExecuteKeyRangesRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_StreamExecuteKeyRangesRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_StreamExecuteKeyRangesRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2161,7 +2214,7 @@ func (m *StreamExecuteKeyRangesResponse) Reset() { *m = StreamExecuteKey
...
@@ -2161,7 +2214,7 @@ func (m *StreamExecuteKeyRangesResponse) Reset() { *m = StreamExecuteKey
func
(
m
*
StreamExecuteKeyRangesResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
StreamExecuteKeyRangesResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StreamExecuteKeyRangesResponse
)
ProtoMessage
()
{}
func
(
*
StreamExecuteKeyRangesResponse
)
ProtoMessage
()
{}
func
(
*
StreamExecuteKeyRangesResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StreamExecuteKeyRangesResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
26
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
26
}
}
}
func
(
m
*
StreamExecuteKeyRangesResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StreamExecuteKeyRangesResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_StreamExecuteKeyRangesResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_StreamExecuteKeyRangesResponse
.
Unmarshal
(
m
,
b
)
...
@@ -2207,7 +2260,7 @@ func (m *BeginRequest) Reset() { *m = BeginRequest{} }
...
@@ -2207,7 +2260,7 @@ func (m *BeginRequest) Reset() { *m = BeginRequest{} }
func
(
m
*
BeginRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
BeginRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
BeginRequest
)
ProtoMessage
()
{}
func
(
*
BeginRequest
)
ProtoMessage
()
{}
func
(
*
BeginRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
BeginRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
27
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
27
}
}
}
func
(
m
*
BeginRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
BeginRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_BeginRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_BeginRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2254,7 +2307,7 @@ func (m *BeginResponse) Reset() { *m = BeginResponse{} }
...
@@ -2254,7 +2307,7 @@ func (m *BeginResponse) Reset() { *m = BeginResponse{} }
func
(
m
*
BeginResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
BeginResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
BeginResponse
)
ProtoMessage
()
{}
func
(
*
BeginResponse
)
ProtoMessage
()
{}
func
(
*
BeginResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
BeginResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
28
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
28
}
}
}
func
(
m
*
BeginResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
BeginResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_BeginResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_BeginResponse
.
Unmarshal
(
m
,
b
)
...
@@ -2302,7 +2355,7 @@ func (m *CommitRequest) Reset() { *m = CommitRequest{} }
...
@@ -2302,7 +2355,7 @@ func (m *CommitRequest) Reset() { *m = CommitRequest{} }
func
(
m
*
CommitRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
CommitRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
CommitRequest
)
ProtoMessage
()
{}
func
(
*
CommitRequest
)
ProtoMessage
()
{}
func
(
*
CommitRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
CommitRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
29
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
29
}
}
}
func
(
m
*
CommitRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
CommitRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_CommitRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_CommitRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2354,7 +2407,7 @@ func (m *CommitResponse) Reset() { *m = CommitResponse{} }
...
@@ -2354,7 +2407,7 @@ func (m *CommitResponse) Reset() { *m = CommitResponse{} }
func
(
m
*
CommitResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
CommitResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
CommitResponse
)
ProtoMessage
()
{}
func
(
*
CommitResponse
)
ProtoMessage
()
{}
func
(
*
CommitResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
CommitResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
30
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
30
}
}
}
func
(
m
*
CommitResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
CommitResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_CommitResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_CommitResponse
.
Unmarshal
(
m
,
b
)
...
@@ -2390,7 +2443,7 @@ func (m *RollbackRequest) Reset() { *m = RollbackRequest{} }
...
@@ -2390,7 +2443,7 @@ func (m *RollbackRequest) Reset() { *m = RollbackRequest{} }
func
(
m
*
RollbackRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
RollbackRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RollbackRequest
)
ProtoMessage
()
{}
func
(
*
RollbackRequest
)
ProtoMessage
()
{}
func
(
*
RollbackRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
RollbackRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
31
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
31
}
}
}
func
(
m
*
RollbackRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
RollbackRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_RollbackRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_RollbackRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2435,7 +2488,7 @@ func (m *RollbackResponse) Reset() { *m = RollbackResponse{} }
...
@@ -2435,7 +2488,7 @@ func (m *RollbackResponse) Reset() { *m = RollbackResponse{} }
func
(
m
*
RollbackResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
RollbackResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RollbackResponse
)
ProtoMessage
()
{}
func
(
*
RollbackResponse
)
ProtoMessage
()
{}
func
(
*
RollbackResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
RollbackResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
32
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
32
}
}
}
func
(
m
*
RollbackResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
RollbackResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_RollbackResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_RollbackResponse
.
Unmarshal
(
m
,
b
)
...
@@ -2471,7 +2524,7 @@ func (m *ResolveTransactionRequest) Reset() { *m = ResolveTransactionReq
...
@@ -2471,7 +2524,7 @@ func (m *ResolveTransactionRequest) Reset() { *m = ResolveTransactionReq
func
(
m
*
ResolveTransactionRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ResolveTransactionRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ResolveTransactionRequest
)
ProtoMessage
()
{}
func
(
*
ResolveTransactionRequest
)
ProtoMessage
()
{}
func
(
*
ResolveTransactionRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ResolveTransactionRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
33
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
33
}
}
}
func
(
m
*
ResolveTransactionRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ResolveTransactionRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ResolveTransactionRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ResolveTransactionRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2527,7 +2580,7 @@ func (m *MessageStreamRequest) Reset() { *m = MessageStreamRequest{} }
...
@@ -2527,7 +2580,7 @@ func (m *MessageStreamRequest) Reset() { *m = MessageStreamRequest{} }
func
(
m
*
MessageStreamRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
MessageStreamRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
MessageStreamRequest
)
ProtoMessage
()
{}
func
(
*
MessageStreamRequest
)
ProtoMessage
()
{}
func
(
*
MessageStreamRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
MessageStreamRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
34
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
34
}
}
}
func
(
m
*
MessageStreamRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
MessageStreamRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_MessageStreamRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_MessageStreamRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2602,7 +2655,7 @@ func (m *MessageAckRequest) Reset() { *m = MessageAckRequest{} }
...
@@ -2602,7 +2655,7 @@ func (m *MessageAckRequest) Reset() { *m = MessageAckRequest{} }
func
(
m
*
MessageAckRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
MessageAckRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
MessageAckRequest
)
ProtoMessage
()
{}
func
(
*
MessageAckRequest
)
ProtoMessage
()
{}
func
(
*
MessageAckRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
MessageAckRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
35
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
35
}
}
}
func
(
m
*
MessageAckRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
MessageAckRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_MessageAckRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_MessageAckRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2666,7 +2719,7 @@ func (m *IdKeyspaceId) Reset() { *m = IdKeyspaceId{} }
...
@@ -2666,7 +2719,7 @@ func (m *IdKeyspaceId) Reset() { *m = IdKeyspaceId{} }
func
(
m
*
IdKeyspaceId
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
IdKeyspaceId
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
IdKeyspaceId
)
ProtoMessage
()
{}
func
(
*
IdKeyspaceId
)
ProtoMessage
()
{}
func
(
*
IdKeyspaceId
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
IdKeyspaceId
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
36
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
36
}
}
}
func
(
m
*
IdKeyspaceId
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
IdKeyspaceId
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_IdKeyspaceId
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_IdKeyspaceId
.
Unmarshal
(
m
,
b
)
...
@@ -2719,7 +2772,7 @@ func (m *MessageAckKeyspaceIdsRequest) Reset() { *m = MessageAckKeyspace
...
@@ -2719,7 +2772,7 @@ func (m *MessageAckKeyspaceIdsRequest) Reset() { *m = MessageAckKeyspace
func
(
m
*
MessageAckKeyspaceIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
MessageAckKeyspaceIdsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
MessageAckKeyspaceIdsRequest
)
ProtoMessage
()
{}
func
(
*
MessageAckKeyspaceIdsRequest
)
ProtoMessage
()
{}
func
(
*
MessageAckKeyspaceIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
MessageAckKeyspaceIdsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
37
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
37
}
}
}
func
(
m
*
MessageAckKeyspaceIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
MessageAckKeyspaceIdsRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_MessageAckKeyspaceIdsRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_MessageAckKeyspaceIdsRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2778,7 +2831,7 @@ func (m *ResolveTransactionResponse) Reset() { *m = ResolveTransactionRe
...
@@ -2778,7 +2831,7 @@ func (m *ResolveTransactionResponse) Reset() { *m = ResolveTransactionRe
func
(
m
*
ResolveTransactionResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ResolveTransactionResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ResolveTransactionResponse
)
ProtoMessage
()
{}
func
(
*
ResolveTransactionResponse
)
ProtoMessage
()
{}
func
(
*
ResolveTransactionResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ResolveTransactionResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
38
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
38
}
}
}
func
(
m
*
ResolveTransactionResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ResolveTransactionResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ResolveTransactionResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_ResolveTransactionResponse
.
Unmarshal
(
m
,
b
)
...
@@ -2896,7 +2949,7 @@ func (m *SplitQueryRequest) Reset() { *m = SplitQueryRequest{} }
...
@@ -2896,7 +2949,7 @@ func (m *SplitQueryRequest) Reset() { *m = SplitQueryRequest{} }
func
(
m
*
SplitQueryRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
SplitQueryRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SplitQueryRequest
)
ProtoMessage
()
{}
func
(
*
SplitQueryRequest
)
ProtoMessage
()
{}
func
(
*
SplitQueryRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
SplitQueryRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
39
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
39
}
}
}
func
(
m
*
SplitQueryRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
SplitQueryRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_SplitQueryRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_SplitQueryRequest
.
Unmarshal
(
m
,
b
)
...
@@ -2985,7 +3038,7 @@ func (m *SplitQueryResponse) Reset() { *m = SplitQueryResponse{} }
...
@@ -2985,7 +3038,7 @@ func (m *SplitQueryResponse) Reset() { *m = SplitQueryResponse{} }
func
(
m
*
SplitQueryResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
SplitQueryResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SplitQueryResponse
)
ProtoMessage
()
{}
func
(
*
SplitQueryResponse
)
ProtoMessage
()
{}
func
(
*
SplitQueryResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
SplitQueryResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
40
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
40
}
}
}
func
(
m
*
SplitQueryResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
SplitQueryResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_SplitQueryResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_SplitQueryResponse
.
Unmarshal
(
m
,
b
)
...
@@ -3026,7 +3079,7 @@ func (m *SplitQueryResponse_KeyRangePart) Reset() { *m = SplitQueryRespo
...
@@ -3026,7 +3079,7 @@ func (m *SplitQueryResponse_KeyRangePart) Reset() { *m = SplitQueryRespo
func
(
m
*
SplitQueryResponse_KeyRangePart
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
SplitQueryResponse_KeyRangePart
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SplitQueryResponse_KeyRangePart
)
ProtoMessage
()
{}
func
(
*
SplitQueryResponse_KeyRangePart
)
ProtoMessage
()
{}
func
(
*
SplitQueryResponse_KeyRangePart
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
SplitQueryResponse_KeyRangePart
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
40
,
0
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
40
,
0
}
}
}
func
(
m
*
SplitQueryResponse_KeyRangePart
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
SplitQueryResponse_KeyRangePart
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_SplitQueryResponse_KeyRangePart
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_SplitQueryResponse_KeyRangePart
.
Unmarshal
(
m
,
b
)
...
@@ -3074,7 +3127,7 @@ func (m *SplitQueryResponse_ShardPart) Reset() { *m = SplitQueryResponse
...
@@ -3074,7 +3127,7 @@ func (m *SplitQueryResponse_ShardPart) Reset() { *m = SplitQueryResponse
func
(
m
*
SplitQueryResponse_ShardPart
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
SplitQueryResponse_ShardPart
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SplitQueryResponse_ShardPart
)
ProtoMessage
()
{}
func
(
*
SplitQueryResponse_ShardPart
)
ProtoMessage
()
{}
func
(
*
SplitQueryResponse_ShardPart
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
SplitQueryResponse_ShardPart
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
40
,
1
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
40
,
1
}
}
}
func
(
m
*
SplitQueryResponse_ShardPart
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
SplitQueryResponse_ShardPart
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_SplitQueryResponse_ShardPart
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_SplitQueryResponse_ShardPart
.
Unmarshal
(
m
,
b
)
...
@@ -3127,7 +3180,7 @@ func (m *SplitQueryResponse_Part) Reset() { *m = SplitQueryResponse_Part
...
@@ -3127,7 +3180,7 @@ func (m *SplitQueryResponse_Part) Reset() { *m = SplitQueryResponse_Part
func
(
m
*
SplitQueryResponse_Part
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
SplitQueryResponse_Part
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SplitQueryResponse_Part
)
ProtoMessage
()
{}
func
(
*
SplitQueryResponse_Part
)
ProtoMessage
()
{}
func
(
*
SplitQueryResponse_Part
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
SplitQueryResponse_Part
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
40
,
2
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
40
,
2
}
}
}
func
(
m
*
SplitQueryResponse_Part
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
SplitQueryResponse_Part
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_SplitQueryResponse_Part
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_SplitQueryResponse_Part
.
Unmarshal
(
m
,
b
)
...
@@ -3188,7 +3241,7 @@ func (m *GetSrvKeyspaceRequest) Reset() { *m = GetSrvKeyspaceRequest{} }
...
@@ -3188,7 +3241,7 @@ func (m *GetSrvKeyspaceRequest) Reset() { *m = GetSrvKeyspaceRequest{} }
func
(
m
*
GetSrvKeyspaceRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
GetSrvKeyspaceRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetSrvKeyspaceRequest
)
ProtoMessage
()
{}
func
(
*
GetSrvKeyspaceRequest
)
ProtoMessage
()
{}
func
(
*
GetSrvKeyspaceRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
GetSrvKeyspaceRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
41
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
41
}
}
}
func
(
m
*
GetSrvKeyspaceRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
GetSrvKeyspaceRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_GetSrvKeyspaceRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_GetSrvKeyspaceRequest
.
Unmarshal
(
m
,
b
)
...
@@ -3228,7 +3281,7 @@ func (m *GetSrvKeyspaceResponse) Reset() { *m = GetSrvKeyspaceResponse{}
...
@@ -3228,7 +3281,7 @@ func (m *GetSrvKeyspaceResponse) Reset() { *m = GetSrvKeyspaceResponse{}
func
(
m
*
GetSrvKeyspaceResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
GetSrvKeyspaceResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetSrvKeyspaceResponse
)
ProtoMessage
()
{}
func
(
*
GetSrvKeyspaceResponse
)
ProtoMessage
()
{}
func
(
*
GetSrvKeyspaceResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
GetSrvKeyspaceResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
42
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
42
}
}
}
func
(
m
*
GetSrvKeyspaceResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
GetSrvKeyspaceResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_GetSrvKeyspaceResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_GetSrvKeyspaceResponse
.
Unmarshal
(
m
,
b
)
...
@@ -3286,7 +3339,7 @@ func (m *UpdateStreamRequest) Reset() { *m = UpdateStreamRequest{} }
...
@@ -3286,7 +3339,7 @@ func (m *UpdateStreamRequest) Reset() { *m = UpdateStreamRequest{} }
func
(
m
*
UpdateStreamRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
UpdateStreamRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UpdateStreamRequest
)
ProtoMessage
()
{}
func
(
*
UpdateStreamRequest
)
ProtoMessage
()
{}
func
(
*
UpdateStreamRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UpdateStreamRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
43
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
43
}
}
}
func
(
m
*
UpdateStreamRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
UpdateStreamRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_UpdateStreamRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_UpdateStreamRequest
.
Unmarshal
(
m
,
b
)
...
@@ -3374,7 +3427,7 @@ func (m *UpdateStreamResponse) Reset() { *m = UpdateStreamResponse{} }
...
@@ -3374,7 +3427,7 @@ func (m *UpdateStreamResponse) Reset() { *m = UpdateStreamResponse{} }
func
(
m
*
UpdateStreamResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
UpdateStreamResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UpdateStreamResponse
)
ProtoMessage
()
{}
func
(
*
UpdateStreamResponse
)
ProtoMessage
()
{}
func
(
*
UpdateStreamResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UpdateStreamResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_1
d4a858d9b127f46
,
[]
int
{
44
}
return
fileDescriptor_vtgate_1
78abacf9cf673c8
,
[]
int
{
44
}
}
}
func
(
m
*
UpdateStreamResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
UpdateStreamResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_UpdateStreamResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_UpdateStreamResponse
.
Unmarshal
(
m
,
b
)
...
@@ -3460,128 +3513,134 @@ func init() {
...
@@ -3460,128 +3513,134 @@ func init() {
proto
.
RegisterType
((
*
UpdateStreamRequest
)(
nil
),
"vtgate.UpdateStreamRequest"
)
proto
.
RegisterType
((
*
UpdateStreamRequest
)(
nil
),
"vtgate.UpdateStreamRequest"
)
proto
.
RegisterType
((
*
UpdateStreamResponse
)(
nil
),
"vtgate.UpdateStreamResponse"
)
proto
.
RegisterType
((
*
UpdateStreamResponse
)(
nil
),
"vtgate.UpdateStreamResponse"
)
proto
.
RegisterEnum
(
"vtgate.TransactionMode"
,
TransactionMode_name
,
TransactionMode_value
)
proto
.
RegisterEnum
(
"vtgate.TransactionMode"
,
TransactionMode_name
,
TransactionMode_value
)
}
proto
.
RegisterEnum
(
"vtgate.CommitOrder"
,
CommitOrder_name
,
CommitOrder_value
)
}
func
init
()
{
proto
.
RegisterFile
(
"vtgate.proto"
,
fileDescriptor_vtgate_1d4a858d9b127f46
)
}
func
init
()
{
proto
.
RegisterFile
(
"vtgate.proto"
,
fileDescriptor_vtgate_178abacf9cf673c8
)
}
var
fileDescriptor_vtgate_1d4a858d9b127f46
=
[]
byte
{
// 1883 bytes of a gzipped FileDescriptorProto
var
fileDescriptor_vtgate_178abacf9cf673c8
=
[]
byte
{
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xd4
,
0x5a
,
0x4f
,
0x8f
,
0x23
,
0x47
,
// 1962 bytes of a gzipped FileDescriptorProto
0x15
,
0xa7
,
0xbb
,
0xfd
,
0xf7
,
0xf9
,
0xef
,
0xd6
,
0x78
,
0x77
,
0x1d
,
0x67
,
0xd8
,
0x99
,
0x74
,
0x18
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xd4
,
0x5a
,
0xcd
,
0x8f
,
0x23
,
0x47
,
0xc5
,
0x49
,
0x56
,
0x36
,
0x71
,
0x20
,
0x20
,
0x84
,
0x04
,
0x19
,
0xef
,
0x10
,
0x59
,
0xd9
,
0xd9
,
0x0c
,
0x15
,
0x4f
,
0x77
,
0xfb
,
0xf3
,
0xb5
,
0xbf
,
0xb6
,
0xd6
,
0xbb
,
0xeb
,
0x38
,
0xc3
,
0xce
,
0xa4
,
0xc3
,
0x65
,
0x6f
,
0x16
,
0x10
,
0x51
,
0xab
,
0xc7
,
0x2e
,
0x79
,
0x1b
,
0xdb
,
0xdd
,
0x4e
,
0x57
,
0xd9
,
0xcb
,
0x28
,
0xce
,
0x66
,
0xe5
,
0x21
,
0x0e
,
0x04
,
0x84
,
0x22
,
0x85
,
0x19
,
0xef
,
0x10
,
0x59
,
0xd9
,
0xf9
,
0x70
,
0x40
,
0xf9
,
0x06
,
0x11
,
0x07
,
0x24
,
0x14
,
0x21
,
0x21
,
0x24
,
0x24
,
0x4e
,
0x5c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
0x94
,
0x87
,
0xf4
,
0xde
,
0x93
,
0xc7
,
0xbd
,
0x4e
,
0x45
,
0xf5
,
0x00
,
0xff
,
0xff
,
0x52
,
0xf0
,
0x0f
,
0xdd
,
0xc8
,
0x23
,
0x00
,
0x00
,
0x1f
,
0x7b
,
0x4f
,
0x0f
,
0x0e
,
0xdb
,
0x15
,
0xed
,
0xc1
,
0x87
,
0xa0
,
0x8b
,
0x5a
,
0xe8
,
0xc0
,
0x1b
,
0x10
,
0xcf
,
0x9f
,
0xb0
,
0x7f
,
0x80
,
0xf7
,
0xb6
,
0x1f
,
0x57
,
0x5e
,
0x43
,
0x59
,
0xd0
,
0x0e
,
0xb1
,
0x3f
,
0x33
,
0x07
,
0xa9
,
0xc3
,
0x83
,
0x6e
,
0xaf
,
0xa2
,
0xa2
,
0x12
,
0xc0
,
0xf6
,
0x93
,
0xde
,
0x41
,
0xfb
,
0x60
,
0x6f
,
0xaf
,
0xd3
,
0xab
,
0x68
,
0x3b
,
0x1f
,
0x40
,
0xd9
,
0x76
,
0x9b
,
0x33
,
0x9b
,
0x11
,
0x4a
,
0xc5
,
0x9f
,
0x83
,
0x7e
,
0xfc
,
0x96
,
0x6c
,
0xd9
,
0xee
,
0x96
,
0x78
,
0xda
,
0x1a
,
0xba
,
0x5b
,
0x33
,
0xb6
,
0xc5
,
0x7b
,
0xb7
,
0xc4
,
0xa6
,
0x38
,
0xca
,
0xf0
,
0xd6
,
0xfb
,
0xff
,
0x0f
,
0x00
,
0x00
,
0xff
,
0xff
,
0x43
,
0xd4
,
0xfe
,
0x66
,
0x8a
,
0x24
,
0x00
,
0x00
,
}
}
vendor/vitess.io/vitess/go/vt/sqlparser/ast.go
浏览文件 @
82efd3c2
...
@@ -532,7 +532,7 @@ func (node *Stream) walkSubtree(visit Visit) error {
...
@@ -532,7 +532,7 @@ func (node *Stream) walkSubtree(visit Visit) error {
// the row and re-inserts with new values. For that reason we keep it as an Insert struct.
// the row and re-inserts with new values. For that reason we keep it as an Insert struct.
// Replaces are currently disallowed in sharded schemas because
// Replaces are currently disallowed in sharded schemas because
// of the implications the deletion part may have on vindexes.
// of the implications the deletion part may have on vindexes.
// If you add fields here, consider adding them to calls to validate
SubquerySamePlan
.
// If you add fields here, consider adding them to calls to validate
UnshardedRoute
.
type
Insert
struct
{
type
Insert
struct
{
Action
string
Action
string
Comments
Comments
Comments
Comments
...
@@ -584,7 +584,7 @@ func (Values) iInsertRows() {}
...
@@ -584,7 +584,7 @@ func (Values) iInsertRows() {}
func
(
*
ParenSelect
)
iInsertRows
()
{}
func
(
*
ParenSelect
)
iInsertRows
()
{}
// Update represents an UPDATE statement.
// Update represents an UPDATE statement.
// If you add fields here, consider adding them to calls to validate
SubquerySamePlan
.
// If you add fields here, consider adding them to calls to validate
UnshardedRoute
.
type
Update
struct
{
type
Update
struct
{
Comments
Comments
Comments
Comments
Ignore
string
Ignore
string
...
@@ -618,7 +618,7 @@ func (node *Update) walkSubtree(visit Visit) error {
...
@@ -618,7 +618,7 @@ func (node *Update) walkSubtree(visit Visit) error {
}
}
// Delete represents a DELETE statement.
// Delete represents a DELETE statement.
// If you add fields here, consider adding them to calls to validate
SubquerySamePlan
.
// If you add fields here, consider adding them to calls to validate
UnshardedRoute
.
type
Delete
struct
{
type
Delete
struct
{
Comments
Comments
Comments
Comments
Targets
TableNames
Targets
TableNames
...
...
vendor/vitess.io/vitess/go/vt/sqlparser/normalizer.go
浏览文件 @
82efd3c2
...
@@ -88,6 +88,9 @@ func (nz *normalizer) WalkSelect(node SQLNode) (bool, error) {
...
@@ -88,6 +88,9 @@ func (nz *normalizer) WalkSelect(node SQLNode) (bool, error) {
// Common node types that never contain SQLVals or ListArgs but create a lot of object
// Common node types that never contain SQLVals or ListArgs but create a lot of object
// allocations.
// allocations.
return
false
,
nil
return
false
,
nil
case
OrderBy
,
GroupBy
:
// do not make a bind var for order by column_position
return
false
,
nil
}
}
return
true
,
nil
return
true
,
nil
}
}
...
...
vendor/vitess.io/vitess/go/vt/sqlparser/parsed_query.go
浏览文件 @
82efd3c2
...
@@ -53,23 +53,31 @@ func (pq *ParsedQuery) GenerateQuery(bindVariables map[string]*querypb.BindVaria
...
@@ -53,23 +53,31 @@ func (pq *ParsedQuery) GenerateQuery(bindVariables map[string]*querypb.BindVaria
}
}
var
buf
strings
.
Builder
var
buf
strings
.
Builder
buf
.
Grow
(
len
(
pq
.
Query
))
buf
.
Grow
(
len
(
pq
.
Query
))
if
err
:=
pq
.
Append
(
&
buf
,
bindVariables
,
extras
);
err
!=
nil
{
return
""
,
err
}
return
buf
.
String
(),
nil
}
// Append appends the generated query to the provided buffer.
func
(
pq
*
ParsedQuery
)
Append
(
buf
*
strings
.
Builder
,
bindVariables
map
[
string
]
*
querypb
.
BindVariable
,
extras
map
[
string
]
Encodable
)
error
{
current
:=
0
current
:=
0
for
_
,
loc
:=
range
pq
.
bindLocations
{
for
_
,
loc
:=
range
pq
.
bindLocations
{
buf
.
WriteString
(
pq
.
Query
[
current
:
loc
.
offset
])
buf
.
WriteString
(
pq
.
Query
[
current
:
loc
.
offset
])
name
:=
pq
.
Query
[
loc
.
offset
:
loc
.
offset
+
loc
.
length
]
name
:=
pq
.
Query
[
loc
.
offset
:
loc
.
offset
+
loc
.
length
]
if
encodable
,
ok
:=
extras
[
name
[
1
:
]];
ok
{
if
encodable
,
ok
:=
extras
[
name
[
1
:
]];
ok
{
encodable
.
EncodeSQL
(
&
buf
)
encodable
.
EncodeSQL
(
buf
)
}
else
{
}
else
{
supplied
,
_
,
err
:=
FetchBindVar
(
name
,
bindVariables
)
supplied
,
_
,
err
:=
FetchBindVar
(
name
,
bindVariables
)
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
err
return
err
}
}
EncodeValue
(
&
buf
,
supplied
)
EncodeValue
(
buf
,
supplied
)
}
}
current
=
loc
.
offset
+
loc
.
length
current
=
loc
.
offset
+
loc
.
length
}
}
buf
.
WriteString
(
pq
.
Query
[
current
:
])
buf
.
WriteString
(
pq
.
Query
[
current
:
])
return
buf
.
String
(),
nil
return
nil
}
}
// MarshalJSON is a custom JSON marshaler for ParsedQuery.
// MarshalJSON is a custom JSON marshaler for ParsedQuery.
...
...
vendor/vitess.io/vitess/go/vt/sqlparser/sql.go
浏览文件 @
82efd3c2
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
vendor/vitess.io/vitess/go/vt/sqlparser/sql.y
浏览文件 @
82efd3c2
...
@@ -181,7 +181,7 @@ func skipToEnd(yylex interface{}) {
...
@@ -181,7 +181,7 @@ func skipToEnd(yylex interface{}) {
%token <bytes> NULLX AUTO_INCREMENT APPROXNUM SIGNED UNSIGNED ZEROFILL
%token <bytes> NULLX AUTO_INCREMENT APPROXNUM SIGNED UNSIGNED ZEROFILL
// Supported SHOW tokens
// Supported SHOW tokens
%token <bytes> COLLATION DATABASES TABLES VITESS_KEYSPACES VITESS_SHARDS VITESS_TABLETS VSCHEMA VSCHEMA_TABLES VITESS_TARGET FULL PROCESSLIST COLUMNS FIELDS ENGINES PLUGINS
%token <bytes> COLLATION DATABASES
SCHEMAS
TABLES VITESS_KEYSPACES VITESS_SHARDS VITESS_TABLETS VSCHEMA VSCHEMA_TABLES VITESS_TARGET FULL PROCESSLIST COLUMNS FIELDS ENGINES PLUGINS
// SET tokens
// SET tokens
%token <bytes> NAMES CHARSET GLOBAL SESSION ISOLATION LEVEL READ WRITE ONLY REPEATABLE COMMITTED UNCOMMITTED SERIALIZABLE
%token <bytes> NAMES CHARSET GLOBAL SESSION ISOLATION LEVEL READ WRITE ONLY REPEATABLE COMMITTED UNCOMMITTED SERIALIZABLE
...
@@ -1485,6 +1485,10 @@ show_statement:
...
@@ -1485,6 +1485,10 @@ show_statement:
{
{
$$ = &Show{Type: string($2)}
$$ = &Show{Type: string($2)}
}
}
| SHOW SCHEMAS ddl_skip_to_end
{
$$ = &Show{Type: string($2)}
}
| SHOW ENGINES
| SHOW ENGINES
{
{
$$ = &Show{Type: string($2)}
$$ = &Show{Type: string($2)}
...
@@ -2450,50 +2454,18 @@ function_call_keyword:
...
@@ -2450,50 +2454,18 @@ function_call_keyword:
{
{
$$ = &ConvertUsingExpr{Expr: $3, Type: $5}
$$ = &ConvertUsingExpr{Expr: $3, Type: $5}
}
}
| SUBSTR openb column_name '
,
' value_expression closeb
{
$$ = &SubstrExpr{Name: $3, From: $5, To: nil}
}
| SUBSTR openb column_name '
,
' value_expression '
,
' value_expression closeb
{
$$ = &SubstrExpr{Name: $3, From: $5, To: $7}
}
| SUBSTR openb column_name FROM value_expression FOR value_expression closeb
| SUBSTR openb column_name FROM value_expression FOR value_expression closeb
{
{
$$ = &SubstrExpr{Name: $3, From: $5, To: $7}
$$ = &SubstrExpr{Name: $3, From: $5, To: $7}
}
}
| SUBSTRING openb column_name '
,
' value_expression closeb
{
$$ = &SubstrExpr{Name: $3, From: $5, To: nil}
}
| SUBSTRING openb column_name '
,
' value_expression '
,
' value_expression closeb
{
$$ = &SubstrExpr{Name: $3, From: $5, To: $7}
}
| SUBSTRING openb column_name FROM value_expression FOR value_expression closeb
| SUBSTRING openb column_name FROM value_expression FOR value_expression closeb
{
{
$$ = &SubstrExpr{Name: $3, From: $5, To: $7}
$$ = &SubstrExpr{Name: $3, From: $5, To: $7}
}
}
| SUBSTR openb STRING '
,
' value_expression closeb
{
$$ = &SubstrExpr{StrVal: NewStrVal($3), From: $5, To: nil}
}
| SUBSTR openb STRING '
,
' value_expression '
,
' value_expression closeb
{
$$ = &SubstrExpr{StrVal: NewStrVal($3), From: $5, To: $7}
}
| SUBSTR openb STRING FROM value_expression FOR value_expression closeb
| SUBSTR openb STRING FROM value_expression FOR value_expression closeb
{
{
$$ = &SubstrExpr{StrVal: NewStrVal($3), From: $5, To: $7}
$$ = &SubstrExpr{StrVal: NewStrVal($3), From: $5, To: $7}
}
}
| SUBSTRING openb STRING '
,
' value_expression closeb
{
$$ = &SubstrExpr{StrVal: NewStrVal($3), From: $5, To: nil}
}
| SUBSTRING openb STRING '
,
' value_expression '
,
' value_expression closeb
{
$$ = &SubstrExpr{StrVal: NewStrVal($3), From: $5, To: $7}
}
| SUBSTRING openb STRING FROM value_expression FOR value_expression closeb
| SUBSTRING openb STRING FROM value_expression FOR value_expression closeb
{
{
$$ = &SubstrExpr{StrVal: NewStrVal($3), From: $5, To: $7}
$$ = &SubstrExpr{StrVal: NewStrVal($3), From: $5, To: $7}
...
@@ -2626,6 +2598,14 @@ function_call_conflict:
...
@@ -2626,6 +2598,14 @@ function_call_conflict:
{
{
$$ = &FuncExpr{Name: NewColIdent("replace"), Exprs: $3}
$$ = &FuncExpr{Name: NewColIdent("replace"), Exprs: $3}
}
}
| SUBSTR openb select_expression_list closeb
{
$$ = &FuncExpr{Name: NewColIdent("substr"), Exprs: $3}
}
| SUBSTRING openb select_expression_list closeb
{
$$ = &FuncExpr{Name: NewColIdent("substr"), Exprs: $3}
}
match_option:
match_option:
/*empty*/
/*empty*/
...
@@ -3364,6 +3344,7 @@ non_reserved_keyword:
...
@@ -3364,6 +3344,7 @@ non_reserved_keyword:
| REPEATABLE
| REPEATABLE
| RESTRICT
| RESTRICT
| ROLLBACK
| ROLLBACK
| SCHEMAS
| SESSION
| SESSION
| SERIALIZABLE
| SERIALIZABLE
| SHARE
| SHARE
...
...
vendor/vitess.io/vitess/go/vt/sqlparser/token.go
浏览文件 @
82efd3c2
...
@@ -318,7 +318,7 @@ var keywords = map[string]int{
...
@@ -318,7 +318,7 @@ var keywords = map[string]int{
"rlike"
:
REGEXP
,
"rlike"
:
REGEXP
,
"rollback"
:
ROLLBACK
,
"rollback"
:
ROLLBACK
,
"schema"
:
SCHEMA
,
"schema"
:
SCHEMA
,
"schemas"
:
UNUSED
,
"schemas"
:
SCHEMAS
,
"second_microsecond"
:
UNUSED
,
"second_microsecond"
:
UNUSED
,
"select"
:
SELECT
,
"select"
:
SELECT
,
"sensitive"
:
UNUSED
,
"sensitive"
:
UNUSED
,
...
...
vendor/vitess.io/vitess/go/vt/vterrors/vterrors.go
浏览文件 @
82efd3c2
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
package
vterrors
package
vterrors
import
(
import
(
"flag"
"fmt"
"fmt"
"io"
"io"
...
@@ -77,6 +78,14 @@ import (
...
@@ -77,6 +78,14 @@ import (
vtrpcpb
"vitess.io/vitess/go/vt/proto/vtrpc"
vtrpcpb
"vitess.io/vitess/go/vt/proto/vtrpc"
)
)
// LogErrStacks controls whether or not printing errors includes the
// embedded stack trace in the output.
var
LogErrStacks
bool
func
init
()
{
flag
.
BoolVar
(
&
LogErrStacks
,
"LogErrStacks"
,
false
,
"log stack traces in errors"
)
}
// New returns an error with the supplied message.
// New returns an error with the supplied message.
// New also records the stack trace at the point it was called.
// New also records the stack trace at the point it was called.
func
New
(
code
vtrpcpb
.
Code
,
message
string
)
error
{
func
New
(
code
vtrpcpb
.
Code
,
message
string
)
error
{
...
@@ -122,7 +131,9 @@ func (f *fundamental) Format(s fmt.State, verb rune) {
...
@@ -122,7 +131,9 @@ func (f *fundamental) Format(s fmt.State, verb rune) {
case
'v'
:
case
'v'
:
panicIfError
(
io
.
WriteString
(
s
,
"Code: "
+
f
.
code
.
String
()
+
"
\n
"
))
panicIfError
(
io
.
WriteString
(
s
,
"Code: "
+
f
.
code
.
String
()
+
"
\n
"
))
panicIfError
(
io
.
WriteString
(
s
,
f
.
msg
+
"
\n
"
))
panicIfError
(
io
.
WriteString
(
s
,
f
.
msg
+
"
\n
"
))
if
LogErrStacks
{
f
.
stack
.
Format
(
s
,
verb
)
f
.
stack
.
Format
(
s
,
verb
)
}
return
return
case
's'
:
case
's'
:
panicIfError
(
io
.
WriteString
(
s
,
f
.
msg
))
panicIfError
(
io
.
WriteString
(
s
,
f
.
msg
))
...
@@ -198,7 +209,9 @@ func (w *wrapping) Format(s fmt.State, verb rune) {
...
@@ -198,7 +209,9 @@ func (w *wrapping) Format(s fmt.State, verb rune) {
if
rune
(
'v'
)
==
verb
{
if
rune
(
'v'
)
==
verb
{
panicIfError
(
fmt
.
Fprintf
(
s
,
"%v
\n
"
,
w
.
Cause
()))
panicIfError
(
fmt
.
Fprintf
(
s
,
"%v
\n
"
,
w
.
Cause
()))
panicIfError
(
io
.
WriteString
(
s
,
w
.
msg
))
panicIfError
(
io
.
WriteString
(
s
,
w
.
msg
))
if
LogErrStacks
{
w
.
stack
.
Format
(
s
,
verb
)
w
.
stack
.
Format
(
s
,
verb
)
}
return
return
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录