Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小雨青年
soar
提交
ed7d982a
S
soar
项目概览
小雨青年
/
soar
与 Fork 源项目一致
Fork自
Xiaomi / soar
通知
1
Star
0
Fork
0
代码
文件
提交
分支
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看板
提交
ed7d982a
编写于
7月 31, 2019
作者:
martianzhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update vendor
上级
441b0e88
变更
37
隐藏空白更改
内联
并排
Showing
37 changed file
with
11690 addition
and
10261 deletion
+11690
-10261
vendor/github.com/pingcap/parser/ast/ddl.go
vendor/github.com/pingcap/parser/ast/ddl.go
+191
-7
vendor/github.com/pingcap/parser/ast/dml.go
vendor/github.com/pingcap/parser/ast/dml.go
+14
-1
vendor/github.com/pingcap/parser/ast/functions.go
vendor/github.com/pingcap/parser/ast/functions.go
+1
-0
vendor/github.com/pingcap/parser/ast/misc.go
vendor/github.com/pingcap/parser/ast/misc.go
+46
-48
vendor/github.com/pingcap/parser/ast/stats.go
vendor/github.com/pingcap/parser/ast/stats.go
+35
-5
vendor/github.com/pingcap/parser/ast/util.go
vendor/github.com/pingcap/parser/ast/util.go
+3
-1
vendor/github.com/pingcap/parser/go.mod1
vendor/github.com/pingcap/parser/go.mod1
+2
-2
vendor/github.com/pingcap/parser/go.sum1
vendor/github.com/pingcap/parser/go.sum1
+94
-0
vendor/github.com/pingcap/parser/lexer.go
vendor/github.com/pingcap/parser/lexer.go
+4
-2
vendor/github.com/pingcap/parser/misc.go
vendor/github.com/pingcap/parser/misc.go
+16
-0
vendor/github.com/pingcap/parser/model/flags.go
vendor/github.com/pingcap/parser/model/flags.go
+2
-0
vendor/github.com/pingcap/parser/mysql/const.go
vendor/github.com/pingcap/parser/mysql/const.go
+89
-67
vendor/github.com/pingcap/parser/mysql/state.go
vendor/github.com/pingcap/parser/mysql/state.go
+1
-0
vendor/github.com/pingcap/parser/mysql/util.go
vendor/github.com/pingcap/parser/mysql/util.go
+1
-0
vendor/github.com/pingcap/parser/parser.go
vendor/github.com/pingcap/parser/parser.go
+7662
-7142
vendor/github.com/pingcap/parser/parser.y
vendor/github.com/pingcap/parser/parser.y
+464
-144
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
+2
-0
vendor/github.com/pingcap/parser/yy_parser.go
vendor/github.com/pingcap/parser/yy_parser.go
+8
-1
vendor/github.com/pingcap/tidb/sessionctx/stmtctx/stmtctx.go
vendor/github.com/pingcap/tidb/sessionctx/stmtctx/stmtctx.go
+56
-10
vendor/github.com/pingcap/tidb/types/binary_literal.go
vendor/github.com/pingcap/tidb/types/binary_literal.go
+10
-0
vendor/github.com/pingcap/tidb/types/convert.go
vendor/github.com/pingcap/tidb/types/convert.go
+64
-26
vendor/github.com/pingcap/tidb/types/datum.go
vendor/github.com/pingcap/tidb/types/datum.go
+4
-5
vendor/github.com/pingcap/tidb/types/fsp.go
vendor/github.com/pingcap/tidb/types/fsp.go
+4
-1
vendor/github.com/pingcap/tidb/types/json/binary_functions.go
...or/github.com/pingcap/tidb/types/json/binary_functions.go
+43
-0
vendor/github.com/pingcap/tidb/types/json/constants.go
vendor/github.com/pingcap/tidb/types/json/constants.go
+3
-0
vendor/github.com/pingcap/tidb/types/mydecimal.go
vendor/github.com/pingcap/tidb/types/mydecimal.go
+11
-3
vendor/github.com/pingcap/tidb/types/mytime.go
vendor/github.com/pingcap/tidb/types/mytime.go
+2
-1
vendor/github.com/pingcap/tidb/types/time.go
vendor/github.com/pingcap/tidb/types/time.go
+3
-4
vendor/github.com/pingcap/tidb/util/logutil/log.go
vendor/github.com/pingcap/tidb/util/logutil/log.go
+5
-0
vendor/github.com/pingcap/tidb/util/memory/action.go
vendor/github.com/pingcap/tidb/util/memory/action.go
+32
-9
vendor/github.com/pingcap/tidb/util/memory/tracker.go
vendor/github.com/pingcap/tidb/util/memory/tracker.go
+21
-15
vendor/vendor.json
vendor/vendor.json
+73
-73
vendor/vitess.io/vitess/go/sqltypes/arithmetic.go
vendor/vitess.io/vitess/go/sqltypes/arithmetic.go
+7
-2
vendor/vitess.io/vitess/go/vt/proto/vtgate/vtgate.pb.go
vendor/vitess.io/vitess/go/vt/proto/vtgate/vtgate.pb.go
+57
-57
vendor/vitess.io/vitess/go/vt/sqlparser/sql.go
vendor/vitess.io/vitess/go/vt/sqlparser/sql.go
+2637
-2632
vendor/vitess.io/vitess/go/vt/sqlparser/sql.y
vendor/vitess.io/vitess/go/vt/sqlparser/sql.y
+22
-2
未找到文件。
vendor/github.com/pingcap/parser/ast/ddl.go
100755 → 100644
浏览文件 @
ed7d982a
...
@@ -222,6 +222,17 @@ func (n *IndexColName) Accept(v Visitor) (Node, bool) {
...
@@ -222,6 +222,17 @@ func (n *IndexColName) Accept(v Visitor) (Node, bool) {
return
v
.
Leave
(
n
)
return
v
.
Leave
(
n
)
}
}
// MatchType is the type for reference match type.
type
MatchType
int
// match type
const
(
MatchNone
MatchType
=
iota
MatchFull
MatchPartial
MatchSimple
)
// ReferenceDef is used for parsing foreign key reference option from SQL.
// ReferenceDef is used for parsing foreign key reference option from SQL.
// See http://dev.mysql.com/doc/refman/5.7/en/create-table-foreign-keys.html
// See http://dev.mysql.com/doc/refman/5.7/en/create-table-foreign-keys.html
type
ReferenceDef
struct
{
type
ReferenceDef
struct
{
...
@@ -231,6 +242,7 @@ type ReferenceDef struct {
...
@@ -231,6 +242,7 @@ type ReferenceDef struct {
IndexColNames
[]
*
IndexColName
IndexColNames
[]
*
IndexColName
OnDelete
*
OnDeleteOpt
OnDelete
*
OnDeleteOpt
OnUpdate
*
OnUpdateOpt
OnUpdate
*
OnUpdateOpt
Match
MatchType
}
}
// Restore implements Node interface.
// Restore implements Node interface.
...
@@ -251,6 +263,17 @@ func (n *ReferenceDef) Restore(ctx *RestoreCtx) error {
...
@@ -251,6 +263,17 @@ func (n *ReferenceDef) Restore(ctx *RestoreCtx) error {
}
}
}
}
ctx
.
WritePlain
(
")"
)
ctx
.
WritePlain
(
")"
)
if
n
.
Match
!=
MatchNone
{
ctx
.
WriteKeyWord
(
" MATCH "
)
switch
n
.
Match
{
case
MatchFull
:
ctx
.
WriteKeyWord
(
"FULL"
)
case
MatchPartial
:
ctx
.
WriteKeyWord
(
"PARTIAL"
)
case
MatchSimple
:
ctx
.
WriteKeyWord
(
"SIMPLE"
)
}
}
if
n
.
OnDelete
.
ReferOpt
!=
ReferOptionNoOption
{
if
n
.
OnDelete
.
ReferOpt
!=
ReferOptionNoOption
{
ctx
.
WritePlain
(
" "
)
ctx
.
WritePlain
(
" "
)
if
err
:=
n
.
OnDelete
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
OnDelete
.
Restore
(
ctx
);
err
!=
nil
{
...
@@ -308,6 +331,7 @@ const (
...
@@ -308,6 +331,7 @@ const (
ReferOptionCascade
ReferOptionCascade
ReferOptionSetNull
ReferOptionSetNull
ReferOptionNoAction
ReferOptionNoAction
ReferOptionSetDefault
)
)
// String implements fmt.Stringer interface.
// String implements fmt.Stringer interface.
...
@@ -321,6 +345,8 @@ func (r ReferOptionType) String() string {
...
@@ -321,6 +345,8 @@ func (r ReferOptionType) String() string {
return
"SET NULL"
return
"SET NULL"
case
ReferOptionNoAction
:
case
ReferOptionNoAction
:
return
"NO ACTION"
return
"NO ACTION"
case
ReferOptionSetDefault
:
return
"SET DEFAULT"
}
}
return
""
return
""
}
}
...
@@ -393,6 +419,7 @@ const (
...
@@ -393,6 +419,7 @@ const (
ColumnOptionGenerated
ColumnOptionGenerated
ColumnOptionReference
ColumnOptionReference
ColumnOptionCollate
ColumnOptionCollate
ColumnOptionCheck
)
)
var
(
var
(
...
@@ -417,6 +444,8 @@ type ColumnOption struct {
...
@@ -417,6 +444,8 @@ type ColumnOption struct {
// Refer is used for foreign key.
// Refer is used for foreign key.
Refer
*
ReferenceDef
Refer
*
ReferenceDef
StrValue
string
StrValue
string
// Enforced is only for Check, default is true.
Enforced
bool
}
}
// Restore implements Node interface.
// Restore implements Node interface.
...
@@ -473,6 +502,18 @@ func (n *ColumnOption) Restore(ctx *RestoreCtx) error {
...
@@ -473,6 +502,18 @@ func (n *ColumnOption) Restore(ctx *RestoreCtx) error {
}
}
ctx
.
WriteKeyWord
(
"COLLATE "
)
ctx
.
WriteKeyWord
(
"COLLATE "
)
ctx
.
WritePlain
(
n
.
StrValue
)
ctx
.
WritePlain
(
n
.
StrValue
)
case
ColumnOptionCheck
:
ctx
.
WriteKeyWord
(
"CHECK"
)
ctx
.
WritePlain
(
"("
)
if
err
:=
n
.
Expr
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Trace
(
err
)
}
ctx
.
WritePlain
(
")"
)
if
n
.
Enforced
{
ctx
.
WriteKeyWord
(
" ENFORCED"
)
}
else
{
ctx
.
WriteKeyWord
(
" NOT ENFORCED"
)
}
default
:
default
:
return
errors
.
New
(
"An error occurred while splicing ColumnOption"
)
return
errors
.
New
(
"An error occurred while splicing ColumnOption"
)
}
}
...
@@ -562,12 +603,17 @@ const (
...
@@ -562,12 +603,17 @@ const (
ConstraintUniqIndex
ConstraintUniqIndex
ConstraintForeignKey
ConstraintForeignKey
ConstraintFulltext
ConstraintFulltext
ConstraintCheck
)
)
// Constraint is constraint for table definition.
// Constraint is constraint for table definition.
type
Constraint
struct
{
type
Constraint
struct
{
node
node
// only supported by MariaDB 10.0.2+ (ADD {INDEX|KEY}, ADD FOREIGN KEY),
// see https://mariadb.com/kb/en/library/alter-table/
IfNotExists
bool
Tp
ConstraintType
Tp
ConstraintType
Name
string
Name
string
...
@@ -576,6 +622,10 @@ type Constraint struct {
...
@@ -576,6 +622,10 @@ type Constraint struct {
Refer
*
ReferenceDef
// Used for foreign key.
Refer
*
ReferenceDef
// Used for foreign key.
Option
*
IndexOption
// Index Options
Option
*
IndexOption
// Index Options
Expr
ExprNode
// Used for Check
Enforced
bool
// Used for Check
}
}
// Restore implements Node interface.
// Restore implements Node interface.
...
@@ -587,8 +637,14 @@ func (n *Constraint) Restore(ctx *RestoreCtx) error {
...
@@ -587,8 +637,14 @@ func (n *Constraint) Restore(ctx *RestoreCtx) error {
ctx
.
WriteKeyWord
(
"PRIMARY KEY"
)
ctx
.
WriteKeyWord
(
"PRIMARY KEY"
)
case
ConstraintKey
:
case
ConstraintKey
:
ctx
.
WriteKeyWord
(
"KEY"
)
ctx
.
WriteKeyWord
(
"KEY"
)
if
n
.
IfNotExists
{
ctx
.
WriteKeyWord
(
" IF NOT EXISTS"
)
}
case
ConstraintIndex
:
case
ConstraintIndex
:
ctx
.
WriteKeyWord
(
"INDEX"
)
ctx
.
WriteKeyWord
(
"INDEX"
)
if
n
.
IfNotExists
{
ctx
.
WriteKeyWord
(
" IF NOT EXISTS"
)
}
case
ConstraintUniq
:
case
ConstraintUniq
:
ctx
.
WriteKeyWord
(
"UNIQUE"
)
ctx
.
WriteKeyWord
(
"UNIQUE"
)
case
ConstraintUniqKey
:
case
ConstraintUniqKey
:
...
@@ -597,6 +653,24 @@ func (n *Constraint) Restore(ctx *RestoreCtx) error {
...
@@ -597,6 +653,24 @@ func (n *Constraint) Restore(ctx *RestoreCtx) error {
ctx
.
WriteKeyWord
(
"UNIQUE INDEX"
)
ctx
.
WriteKeyWord
(
"UNIQUE INDEX"
)
case
ConstraintFulltext
:
case
ConstraintFulltext
:
ctx
.
WriteKeyWord
(
"FULLTEXT"
)
ctx
.
WriteKeyWord
(
"FULLTEXT"
)
case
ConstraintCheck
:
if
n
.
Name
!=
""
{
ctx
.
WriteKeyWord
(
"CONSTRAINT "
)
ctx
.
WriteName
(
n
.
Name
)
ctx
.
WritePlain
(
" "
)
}
ctx
.
WriteKeyWord
(
"CHECK"
)
ctx
.
WritePlain
(
"("
)
if
err
:=
n
.
Expr
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Trace
(
err
)
}
ctx
.
WritePlain
(
") "
)
if
n
.
Enforced
{
ctx
.
WriteKeyWord
(
"ENFORCED"
)
}
else
{
ctx
.
WriteKeyWord
(
"NOT ENFORCED"
)
}
return
nil
}
}
if
n
.
Tp
==
ConstraintForeignKey
{
if
n
.
Tp
==
ConstraintForeignKey
{
...
@@ -606,6 +680,9 @@ func (n *Constraint) Restore(ctx *RestoreCtx) error {
...
@@ -606,6 +680,9 @@ func (n *Constraint) Restore(ctx *RestoreCtx) error {
ctx
.
WritePlain
(
" "
)
ctx
.
WritePlain
(
" "
)
}
}
ctx
.
WriteKeyWord
(
"FOREIGN KEY "
)
ctx
.
WriteKeyWord
(
"FOREIGN KEY "
)
if
n
.
IfNotExists
{
ctx
.
WriteKeyWord
(
"IF NOT EXISTS "
)
}
}
else
if
n
.
Name
!=
""
{
}
else
if
n
.
Name
!=
""
{
ctx
.
WritePlain
(
" "
)
ctx
.
WritePlain
(
" "
)
ctx
.
WriteName
(
n
.
Name
)
ctx
.
WriteName
(
n
.
Name
)
...
@@ -882,9 +959,10 @@ func (n *CreateTableStmt) Accept(v Visitor) (Node, bool) {
...
@@ -882,9 +959,10 @@ func (n *CreateTableStmt) Accept(v Visitor) (Node, bool) {
type
DropTableStmt
struct
{
type
DropTableStmt
struct
{
ddlNode
ddlNode
IfExists
bool
IfExists
bool
Tables
[]
*
TableName
Tables
[]
*
TableName
IsView
bool
IsView
bool
IsTemporary
bool
// make sense ONLY if/when IsView == false
}
}
// Restore implements Node interface.
// Restore implements Node interface.
...
@@ -892,7 +970,11 @@ func (n *DropTableStmt) Restore(ctx *RestoreCtx) error {
...
@@ -892,7 +970,11 @@ func (n *DropTableStmt) Restore(ctx *RestoreCtx) error {
if
n
.
IsView
{
if
n
.
IsView
{
ctx
.
WriteKeyWord
(
"DROP VIEW "
)
ctx
.
WriteKeyWord
(
"DROP VIEW "
)
}
else
{
}
else
{
ctx
.
WriteKeyWord
(
"DROP TABLE "
)
if
n
.
IsTemporary
{
ctx
.
WriteKeyWord
(
"DROP TEMPORARY TABLE "
)
}
else
{
ctx
.
WriteKeyWord
(
"DROP TABLE "
)
}
}
}
if
n
.
IfExists
{
if
n
.
IfExists
{
ctx
.
WriteKeyWord
(
"IF EXISTS "
)
ctx
.
WriteKeyWord
(
"IF EXISTS "
)
...
@@ -1120,6 +1202,10 @@ func (n *CreateViewStmt) Accept(v Visitor) (Node, bool) {
...
@@ -1120,6 +1202,10 @@ func (n *CreateViewStmt) Accept(v Visitor) (Node, bool) {
type
CreateIndexStmt
struct
{
type
CreateIndexStmt
struct
{
ddlNode
ddlNode
// only supported by MariaDB 10.0.2+,
// see https://mariadb.com/kb/en/library/create-index/
IfNotExists
bool
IndexName
string
IndexName
string
Table
*
TableName
Table
*
TableName
Unique
bool
Unique
bool
...
@@ -1134,6 +1220,9 @@ func (n *CreateIndexStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1134,6 +1220,9 @@ func (n *CreateIndexStmt) Restore(ctx *RestoreCtx) error {
ctx
.
WriteKeyWord
(
"UNIQUE "
)
ctx
.
WriteKeyWord
(
"UNIQUE "
)
}
}
ctx
.
WriteKeyWord
(
"INDEX "
)
ctx
.
WriteKeyWord
(
"INDEX "
)
if
n
.
IfNotExists
{
ctx
.
WriteKeyWord
(
"IF NOT EXISTS "
)
}
ctx
.
WriteName
(
n
.
IndexName
)
ctx
.
WriteName
(
n
.
IndexName
)
ctx
.
WriteKeyWord
(
" ON "
)
ctx
.
WriteKeyWord
(
" ON "
)
if
err
:=
n
.
Table
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
Table
.
Restore
(
ctx
);
err
!=
nil
{
...
@@ -1293,6 +1382,44 @@ func (n *UnlockTablesStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1293,6 +1382,44 @@ func (n *UnlockTablesStmt) Restore(ctx *RestoreCtx) error {
return
nil
return
nil
}
}
// CleanupTableLockStmt is a statement to cleanup table lock.
type
CleanupTableLockStmt
struct
{
ddlNode
Tables
[]
*
TableName
}
// Accept implements Node Accept interface.
func
(
n
*
CleanupTableLockStmt
)
Accept
(
v
Visitor
)
(
Node
,
bool
)
{
newNode
,
skipChildren
:=
v
.
Enter
(
n
)
if
skipChildren
{
return
v
.
Leave
(
newNode
)
}
n
=
newNode
.
(
*
CleanupTableLockStmt
)
for
i
:=
range
n
.
Tables
{
node
,
ok
:=
n
.
Tables
[
i
]
.
Accept
(
v
)
if
!
ok
{
return
n
,
false
}
n
.
Tables
[
i
]
=
node
.
(
*
TableName
)
}
return
v
.
Leave
(
n
)
}
// Restore implements Node interface.
func
(
n
*
CleanupTableLockStmt
)
Restore
(
ctx
*
RestoreCtx
)
error
{
ctx
.
WriteKeyWord
(
"ADMIN CLEANUP TABLE LOCK "
)
for
i
,
v
:=
range
n
.
Tables
{
if
i
!=
0
{
ctx
.
WritePlain
(
", "
)
}
if
err
:=
v
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotatef
(
err
,
"An error occurred while restore CleanupTableLockStmt.Tables[%d]"
,
i
)
}
}
return
nil
}
// TableOptionType is the type for TableOption
// TableOptionType is the type for TableOption
type
TableOptionType
int
type
TableOptionType
int
...
@@ -1322,6 +1449,8 @@ const (
...
@@ -1322,6 +1449,8 @@ const (
TableOptionNodegroup
TableOptionNodegroup
TableOptionDataDirectory
TableOptionDataDirectory
TableOptionIndexDirectory
TableOptionIndexDirectory
TableOptionStorageMedia
TableOptionStatsSamplePages
)
)
// RowFormat types
// RowFormat types
...
@@ -1491,6 +1620,17 @@ func (n *TableOption) Restore(ctx *RestoreCtx) error {
...
@@ -1491,6 +1620,17 @@ func (n *TableOption) Restore(ctx *RestoreCtx) error {
ctx
.
WriteKeyWord
(
"INDEX DIRECTORY "
)
ctx
.
WriteKeyWord
(
"INDEX DIRECTORY "
)
ctx
.
WritePlain
(
"= "
)
ctx
.
WritePlain
(
"= "
)
ctx
.
WriteString
(
n
.
StrValue
)
ctx
.
WriteString
(
n
.
StrValue
)
case
TableOptionStorageMedia
:
ctx
.
WriteKeyWord
(
"STORAGE "
)
ctx
.
WriteKeyWord
(
n
.
StrValue
)
case
TableOptionStatsSamplePages
:
ctx
.
WriteKeyWord
(
"STATS_SAMPLE_PAGES "
)
ctx
.
WritePlain
(
"= "
)
if
n
.
UintValue
==
0
{
ctx
.
WriteKeyWord
(
"DEFAULT"
)
}
else
{
ctx
.
WritePlainf
(
"%d"
,
n
.
UintValue
)
}
default
:
default
:
return
errors
.
Errorf
(
"invalid TableOption: %d"
,
n
.
Tp
)
return
errors
.
Errorf
(
"invalid TableOption: %d"
,
n
.
Tp
)
}
}
...
@@ -1578,6 +1718,7 @@ const (
...
@@ -1578,6 +1718,7 @@ const (
AlterTablePartition
AlterTablePartition
AlterTableEnableKeys
AlterTableEnableKeys
AlterTableDisableKeys
AlterTableDisableKeys
AlterTableRemovePartitioning
// TODO: Add more actions
// TODO: Add more actions
)
)
...
@@ -1641,6 +1782,14 @@ func (a AlterAlgorithm) String() string {
...
@@ -1641,6 +1782,14 @@ func (a AlterAlgorithm) String() string {
type
AlterTableSpec
struct
{
type
AlterTableSpec
struct
{
node
node
// only supported by MariaDB 10.0.2+ (DROP COLUMN, CHANGE COLUMN, MODIFY COLUMN, DROP INDEX, DROP FOREIGN KEY, DROP PARTITION)
// see https://mariadb.com/kb/en/library/alter-table/
IfExists
bool
// only supported by MariaDB 10.0.2+ (ADD COLUMN, ADD PARTITION)
// see https://mariadb.com/kb/en/library/alter-table/
IfNotExists
bool
Tp
AlterTableType
Tp
AlterTableType
Name
string
Name
string
Constraint
*
Constraint
Constraint
*
Constraint
...
@@ -1684,6 +1833,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
...
@@ -1684,6 +1833,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
}
}
case
AlterTableAddColumns
:
case
AlterTableAddColumns
:
ctx
.
WriteKeyWord
(
"ADD COLUMN "
)
ctx
.
WriteKeyWord
(
"ADD COLUMN "
)
if
n
.
IfNotExists
{
ctx
.
WriteKeyWord
(
"IF NOT EXISTS "
)
}
if
n
.
Position
!=
nil
&&
len
(
n
.
NewColumns
)
==
1
{
if
n
.
Position
!=
nil
&&
len
(
n
.
NewColumns
)
==
1
{
if
err
:=
n
.
NewColumns
[
0
]
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
NewColumns
[
0
]
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotatef
(
err
,
"An error occurred while restore AlterTableSpec.NewColumns[%d]"
,
0
)
return
errors
.
Annotatef
(
err
,
"An error occurred while restore AlterTableSpec.NewColumns[%d]"
,
0
)
...
@@ -1713,6 +1865,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
...
@@ -1713,6 +1865,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
}
}
case
AlterTableDropColumn
:
case
AlterTableDropColumn
:
ctx
.
WriteKeyWord
(
"DROP COLUMN "
)
ctx
.
WriteKeyWord
(
"DROP COLUMN "
)
if
n
.
IfExists
{
ctx
.
WriteKeyWord
(
"IF EXISTS "
)
}
if
err
:=
n
.
OldColumnName
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
OldColumnName
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableSpec.OldColumnName"
)
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableSpec.OldColumnName"
)
}
}
...
@@ -1721,12 +1876,21 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
...
@@ -1721,12 +1876,21 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
ctx
.
WriteKeyWord
(
"DROP PRIMARY KEY"
)
ctx
.
WriteKeyWord
(
"DROP PRIMARY KEY"
)
case
AlterTableDropIndex
:
case
AlterTableDropIndex
:
ctx
.
WriteKeyWord
(
"DROP INDEX "
)
ctx
.
WriteKeyWord
(
"DROP INDEX "
)
if
n
.
IfExists
{
ctx
.
WriteKeyWord
(
"IF EXISTS "
)
}
ctx
.
WriteName
(
n
.
Name
)
ctx
.
WriteName
(
n
.
Name
)
case
AlterTableDropForeignKey
:
case
AlterTableDropForeignKey
:
ctx
.
WriteKeyWord
(
"DROP FOREIGN KEY "
)
ctx
.
WriteKeyWord
(
"DROP FOREIGN KEY "
)
if
n
.
IfExists
{
ctx
.
WriteKeyWord
(
"IF EXISTS "
)
}
ctx
.
WriteName
(
n
.
Name
)
ctx
.
WriteName
(
n
.
Name
)
case
AlterTableModifyColumn
:
case
AlterTableModifyColumn
:
ctx
.
WriteKeyWord
(
"MODIFY COLUMN "
)
ctx
.
WriteKeyWord
(
"MODIFY COLUMN "
)
if
n
.
IfExists
{
ctx
.
WriteKeyWord
(
"IF EXISTS "
)
}
if
err
:=
n
.
NewColumns
[
0
]
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
NewColumns
[
0
]
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableSpec.NewColumns[0]"
)
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableSpec.NewColumns[0]"
)
}
}
...
@@ -1738,6 +1902,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
...
@@ -1738,6 +1902,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
}
}
case
AlterTableChangeColumn
:
case
AlterTableChangeColumn
:
ctx
.
WriteKeyWord
(
"CHANGE COLUMN "
)
ctx
.
WriteKeyWord
(
"CHANGE COLUMN "
)
if
n
.
IfExists
{
ctx
.
WriteKeyWord
(
"IF EXISTS "
)
}
if
err
:=
n
.
OldColumnName
.
Restore
(
ctx
);
err
!=
nil
{
if
err
:=
n
.
OldColumnName
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableSpec.OldColumnName"
)
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableSpec.OldColumnName"
)
}
}
...
@@ -1763,8 +1930,17 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
...
@@ -1763,8 +1930,17 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
}
}
if
len
(
n
.
NewColumns
[
0
]
.
Options
)
==
1
{
if
len
(
n
.
NewColumns
[
0
]
.
Options
)
==
1
{
ctx
.
WriteKeyWord
(
"SET DEFAULT "
)
ctx
.
WriteKeyWord
(
"SET DEFAULT "
)
if
err
:=
n
.
NewColumns
[
0
]
.
Options
[
0
]
.
Expr
.
Restore
(
ctx
);
err
!=
nil
{
expr
:=
n
.
NewColumns
[
0
]
.
Options
[
0
]
.
Expr
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableSpec.NewColumns[0].Options[0].Expr"
)
if
valueExpr
,
ok
:=
expr
.
(
ValueExpr
);
ok
{
if
err
:=
valueExpr
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableSpec.NewColumns[0].Options[0].Expr"
)
}
}
else
{
ctx
.
WritePlain
(
"("
)
if
err
:=
expr
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableSpec.NewColumns[0].Options[0].Expr"
)
}
ctx
.
WritePlain
(
")"
)
}
}
}
else
{
}
else
{
ctx
.
WriteKeyWord
(
" DROP DEFAULT"
)
ctx
.
WriteKeyWord
(
" DROP DEFAULT"
)
...
@@ -1788,6 +1964,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
...
@@ -1788,6 +1964,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
ctx
.
WritePlain
(
" /* AlterTableForce is not supported */ "
)
ctx
.
WritePlain
(
" /* AlterTableForce is not supported */ "
)
case
AlterTableAddPartitions
:
case
AlterTableAddPartitions
:
ctx
.
WriteKeyWord
(
"ADD PARTITION"
)
ctx
.
WriteKeyWord
(
"ADD PARTITION"
)
if
n
.
IfNotExists
{
ctx
.
WriteKeyWord
(
" IF NOT EXISTS"
)
}
if
n
.
PartDefinitions
!=
nil
{
if
n
.
PartDefinitions
!=
nil
{
ctx
.
WritePlain
(
" ("
)
ctx
.
WritePlain
(
" ("
)
for
i
,
def
:=
range
n
.
PartDefinitions
{
for
i
,
def
:=
range
n
.
PartDefinitions
{
...
@@ -1808,6 +1987,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
...
@@ -1808,6 +1987,9 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
ctx
.
WritePlainf
(
"%d"
,
n
.
Num
)
ctx
.
WritePlainf
(
"%d"
,
n
.
Num
)
case
AlterTableDropPartition
:
case
AlterTableDropPartition
:
ctx
.
WriteKeyWord
(
"DROP PARTITION "
)
ctx
.
WriteKeyWord
(
"DROP PARTITION "
)
if
n
.
IfExists
{
ctx
.
WriteKeyWord
(
"IF EXISTS "
)
}
for
i
,
name
:=
range
n
.
PartitionNames
{
for
i
,
name
:=
range
n
.
PartitionNames
{
if
i
!=
0
{
if
i
!=
0
{
ctx
.
WritePlain
(
","
)
ctx
.
WritePlain
(
","
)
...
@@ -1830,6 +2012,8 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
...
@@ -1830,6 +2012,8 @@ func (n *AlterTableSpec) Restore(ctx *RestoreCtx) error {
ctx
.
WriteKeyWord
(
"ENABLE KEYS"
)
ctx
.
WriteKeyWord
(
"ENABLE KEYS"
)
case
AlterTableDisableKeys
:
case
AlterTableDisableKeys
:
ctx
.
WriteKeyWord
(
"DISABLE KEYS"
)
ctx
.
WriteKeyWord
(
"DISABLE KEYS"
)
case
AlterTableRemovePartitioning
:
ctx
.
WriteKeyWord
(
"REMOVE PARTITIONING"
)
default
:
default
:
// TODO: not support
// TODO: not support
ctx
.
WritePlainf
(
" /* AlterTableType(%d) is not supported */ "
,
n
.
Tp
)
ctx
.
WritePlainf
(
" /* AlterTableType(%d) is not supported */ "
,
n
.
Tp
)
...
@@ -1898,7 +2082,7 @@ func (n *AlterTableStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1898,7 +2082,7 @@ func (n *AlterTableStmt) Restore(ctx *RestoreCtx) error {
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableStmt.Table"
)
return
errors
.
Annotate
(
err
,
"An error occurred while restore AlterTableStmt.Table"
)
}
}
for
i
,
spec
:=
range
n
.
Specs
{
for
i
,
spec
:=
range
n
.
Specs
{
if
i
==
0
||
spec
.
Tp
==
AlterTablePartition
{
if
i
==
0
||
spec
.
Tp
==
AlterTablePartition
||
spec
.
Tp
==
AlterTableRemovePartitioning
{
ctx
.
WritePlain
(
" "
)
ctx
.
WritePlain
(
" "
)
}
else
{
}
else
{
ctx
.
WritePlain
(
", "
)
ctx
.
WritePlain
(
", "
)
...
...
vendor/github.com/pingcap/parser/ast/dml.go
浏览文件 @
ed7d982a
...
@@ -1827,6 +1827,7 @@ const (
...
@@ -1827,6 +1827,7 @@ const (
ShowDrainerStatus
ShowDrainerStatus
ShowOpenTables
ShowOpenTables
ShowAnalyzeStatus
ShowAnalyzeStatus
ShowRegions
)
)
const
(
const
(
...
@@ -1852,7 +1853,8 @@ type ShowStmt struct {
...
@@ -1852,7 +1853,8 @@ type ShowStmt struct {
DBName
string
DBName
string
Table
*
TableName
// Used for showing columns.
Table
*
TableName
// Used for showing columns.
Column
*
ColumnName
// Used for `desc table column`.
Column
*
ColumnName
// Used for `desc table column`.
Flag
int
// Some flag parsed from sql, such as FULL.
IndexName
model
.
CIStr
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
Roles
[]
*
auth
.
RoleIdentity
// Used for show grants .. using
...
@@ -2088,6 +2090,17 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
...
@@ -2088,6 +2090,17 @@ func (n *ShowStmt) Restore(ctx *RestoreCtx) error {
ctx
.
WriteKeyWord
(
"DRAINER STATUS"
)
ctx
.
WriteKeyWord
(
"DRAINER STATUS"
)
case
ShowAnalyzeStatus
:
case
ShowAnalyzeStatus
:
ctx
.
WriteKeyWord
(
"ANALYZE STATUS"
)
ctx
.
WriteKeyWord
(
"ANALYZE STATUS"
)
case
ShowRegions
:
ctx
.
WriteKeyWord
(
"TABLE "
)
if
err
:=
n
.
Table
.
Restore
(
ctx
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while restore SplitIndexRegionStmt.Table"
)
}
if
len
(
n
.
IndexName
.
L
)
>
0
{
ctx
.
WriteKeyWord
(
" INDEX "
)
ctx
.
WriteName
(
n
.
IndexName
.
String
())
}
ctx
.
WriteKeyWord
(
" REGIONS"
)
return
nil
default
:
default
:
return
errors
.
New
(
"Unknown ShowStmt type"
)
return
errors
.
New
(
"Unknown ShowStmt type"
)
}
}
...
...
vendor/github.com/pingcap/parser/ast/functions.go
浏览文件 @
ed7d982a
...
@@ -200,6 +200,7 @@ const (
...
@@ -200,6 +200,7 @@ const (
MakeSet
=
"make_set"
MakeSet
=
"make_set"
Mid
=
"mid"
Mid
=
"mid"
Oct
=
"oct"
Oct
=
"oct"
OctetLength
=
"octet_length"
Ord
=
"ord"
Ord
=
"ord"
Position
=
"position"
Position
=
"position"
Quote
=
"quote"
Quote
=
"quote"
...
...
vendor/github.com/pingcap/parser/ast/misc.go
浏览文件 @
ed7d982a
...
@@ -327,9 +327,10 @@ type Prepared struct {
...
@@ -327,9 +327,10 @@ type Prepared struct {
type
ExecuteStmt
struct
{
type
ExecuteStmt
struct
{
stmtNode
stmtNode
Name
string
Name
string
UsingVars
[]
ExprNode
UsingVars
[]
ExprNode
ExecID
uint32
BinaryArgs
interface
{}
ExecID
uint32
}
}
// Restore implements Node interface.
// Restore implements Node interface.
...
@@ -1380,6 +1381,9 @@ const (
...
@@ -1380,6 +1381,9 @@ const (
AdminShowSlow
AdminShowSlow
AdminShowNextRowID
AdminShowNextRowID
AdminReloadExprPushdownBlacklist
AdminReloadExprPushdownBlacklist
AdminReloadOptRuleBlacklist
AdminPluginDisable
AdminPluginEnable
)
)
// HandleRange represents a range where handle value >= Begin and < End.
// HandleRange represents a range where handle value >= Begin and < End.
...
@@ -1455,6 +1459,7 @@ type AdminStmt struct {
...
@@ -1455,6 +1459,7 @@ type AdminStmt struct {
HandleRanges
[]
HandleRange
HandleRanges
[]
HandleRange
ShowSlow
*
ShowSlow
ShowSlow
*
ShowSlow
Plugins
[]
string
}
}
// Restore implements Node interface.
// Restore implements Node interface.
...
@@ -1550,6 +1555,28 @@ func (n *AdminStmt) Restore(ctx *RestoreCtx) error {
...
@@ -1550,6 +1555,28 @@ func (n *AdminStmt) Restore(ctx *RestoreCtx) error {
}
}
case
AdminReloadExprPushdownBlacklist
:
case
AdminReloadExprPushdownBlacklist
:
ctx
.
WriteKeyWord
(
"RELOAD EXPR_PUSHDOWN_BLACKLIST"
)
ctx
.
WriteKeyWord
(
"RELOAD EXPR_PUSHDOWN_BLACKLIST"
)
case
AdminReloadOptRuleBlacklist
:
ctx
.
WriteKeyWord
(
"RELOAD OPT_RULE_BLACKLIST"
)
case
AdminPluginEnable
:
ctx
.
WriteKeyWord
(
"PLUGINS ENABLE"
)
for
i
,
v
:=
range
n
.
Plugins
{
if
i
==
0
{
ctx
.
WritePlain
(
" "
)
}
else
{
ctx
.
WritePlain
(
", "
)
}
ctx
.
WritePlain
(
v
)
}
case
AdminPluginDisable
:
ctx
.
WriteKeyWord
(
"PLUGINS DISABLE"
)
for
i
,
v
:=
range
n
.
Plugins
{
if
i
==
0
{
ctx
.
WritePlain
(
" "
)
}
else
{
ctx
.
WritePlain
(
", "
)
}
ctx
.
WritePlain
(
v
)
}
default
:
default
:
return
errors
.
New
(
"Unsupported AdminStmt type"
)
return
errors
.
New
(
"Unsupported AdminStmt type"
)
}
}
...
@@ -1585,51 +1612,17 @@ type PrivElem struct {
...
@@ -1585,51 +1612,17 @@ type PrivElem struct {
// Restore implements Node interface.
// Restore implements Node interface.
func
(
n
*
PrivElem
)
Restore
(
ctx
*
RestoreCtx
)
error
{
func
(
n
*
PrivElem
)
Restore
(
ctx
*
RestoreCtx
)
error
{
switch
n
.
Priv
{
if
n
.
Priv
==
0
{
case
0
:
ctx
.
WritePlain
(
"/* UNSUPPORTED TYPE */"
)
ctx
.
WritePlain
(
"/* UNSUPPORTED TYPE */"
)
case
mysql
.
AllPriv
:
}
else
if
n
.
Priv
==
mysql
.
AllPriv
{
ctx
.
WriteKeyWord
(
"ALL"
)
ctx
.
WriteKeyWord
(
"ALL"
)
case
mysql
.
AlterPriv
:
}
else
{
ctx
.
WriteKeyWord
(
"ALTER"
)
str
,
ok
:=
mysql
.
Priv2Str
[
n
.
Priv
]
case
mysql
.
CreatePriv
:
if
ok
{
ctx
.
WriteKeyWord
(
"CREATE"
)
ctx
.
WriteKeyWord
(
str
)
case
mysql
.
CreateUserPriv
:
}
else
{
ctx
.
WriteKeyWord
(
"CREATE USER"
)
return
errors
.
New
(
"Undefined privilege type"
)
case
mysql
.
CreateRolePriv
:
}
ctx
.
WriteKeyWord
(
"CREATE ROLE"
)
case
mysql
.
TriggerPriv
:
ctx
.
WriteKeyWord
(
"TRIGGER"
)
case
mysql
.
DeletePriv
:
ctx
.
WriteKeyWord
(
"DELETE"
)
case
mysql
.
DropPriv
:
ctx
.
WriteKeyWord
(
"DROP"
)
case
mysql
.
ProcessPriv
:
ctx
.
WriteKeyWord
(
"PROCESS"
)
case
mysql
.
ExecutePriv
:
ctx
.
WriteKeyWord
(
"EXECUTE"
)
case
mysql
.
IndexPriv
:
ctx
.
WriteKeyWord
(
"INDEX"
)
case
mysql
.
InsertPriv
:
ctx
.
WriteKeyWord
(
"INSERT"
)
case
mysql
.
SelectPriv
:
ctx
.
WriteKeyWord
(
"SELECT"
)
case
mysql
.
SuperPriv
:
ctx
.
WriteKeyWord
(
"SUPER"
)
case
mysql
.
ShowDBPriv
:
ctx
.
WriteKeyWord
(
"SHOW DATABASES"
)
case
mysql
.
UpdatePriv
:
ctx
.
WriteKeyWord
(
"UPDATE"
)
case
mysql
.
GrantPriv
:
ctx
.
WriteKeyWord
(
"GRANT OPTION"
)
case
mysql
.
ReferencesPriv
:
ctx
.
WriteKeyWord
(
"REFERENCES"
)
case
mysql
.
CreateViewPriv
:
ctx
.
WriteKeyWord
(
"CREATE VIEW"
)
case
mysql
.
ShowViewPriv
:
ctx
.
WriteKeyWord
(
"SHOW VIEW"
)
default
:
return
errors
.
New
(
"Undefined privilege type"
)
}
}
if
n
.
Cols
!=
nil
{
if
n
.
Cols
!=
nil
{
ctx
.
WritePlain
(
" ("
)
ctx
.
WritePlain
(
" ("
)
...
@@ -2005,9 +1998,10 @@ type TableOptimizerHint struct {
...
@@ -2005,9 +1998,10 @@ type TableOptimizerHint struct {
func
(
n
*
TableOptimizerHint
)
Restore
(
ctx
*
RestoreCtx
)
error
{
func
(
n
*
TableOptimizerHint
)
Restore
(
ctx
*
RestoreCtx
)
error
{
ctx
.
WriteKeyWord
(
n
.
HintName
.
String
())
ctx
.
WriteKeyWord
(
n
.
HintName
.
String
())
ctx
.
WritePlain
(
"("
)
ctx
.
WritePlain
(
"("
)
if
n
.
HintName
.
L
==
"max_execution_time"
{
switch
n
.
HintName
.
L
{
case
"max_execution_time"
:
ctx
.
WritePlainf
(
"%d"
,
n
.
MaxExecutionTime
)
ctx
.
WritePlainf
(
"%d"
,
n
.
MaxExecutionTime
)
}
else
{
case
"tidb_hj"
,
"tidb_smj"
,
"tidb_inlj"
:
for
i
,
table
:=
range
n
.
Tables
{
for
i
,
table
:=
range
n
.
Tables
{
if
i
!=
0
{
if
i
!=
0
{
ctx
.
WritePlain
(
", "
)
ctx
.
WritePlain
(
", "
)
...
@@ -2029,6 +2023,10 @@ func (n *TableOptimizerHint) Accept(v Visitor) (Node, bool) {
...
@@ -2029,6 +2023,10 @@ func (n *TableOptimizerHint) Accept(v Visitor) (Node, bool) {
return
v
.
Leave
(
n
)
return
v
.
Leave
(
n
)
}
}
type
BinaryLiteral
interface
{
ToString
()
string
}
// NewDecimal creates a types.Decimal value, it's provided by parser driver.
// NewDecimal creates a types.Decimal value, it's provided by parser driver.
var
NewDecimal
func
(
string
)
(
interface
{},
error
)
var
NewDecimal
func
(
string
)
(
interface
{},
error
)
...
...
vendor/github.com/pingcap/parser/ast/stats.go
浏览文件 @
ed7d982a
...
@@ -32,13 +32,38 @@ type AnalyzeTableStmt struct {
...
@@ -32,13 +32,38 @@ type AnalyzeTableStmt struct {
TableNames
[]
*
TableName
TableNames
[]
*
TableName
PartitionNames
[]
model
.
CIStr
PartitionNames
[]
model
.
CIStr
IndexNames
[]
model
.
CIStr
IndexNames
[]
model
.
CIStr
MaxNumBuckets
uint64
AnalyzeOpts
[]
AnalyzeOpt
// 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
Incremental
bool
}
}
// AnalyzeOptType is the type for analyze options.
type
AnalyzeOptionType
int
// Analyze option types.
const
(
AnalyzeOptNumBuckets
=
iota
AnalyzeOptNumTopN
AnalyzeOptCMSketchDepth
AnalyzeOptCMSketchWidth
)
// AnalyzeOptionString stores the string form of analyze options.
var
AnalyzeOptionString
=
map
[
AnalyzeOptionType
]
string
{
AnalyzeOptNumBuckets
:
"BUCKETS"
,
AnalyzeOptNumTopN
:
"TOPN"
,
AnalyzeOptCMSketchWidth
:
"CMSKETCH WIDTH"
,
AnalyzeOptCMSketchDepth
:
"CMSKETCH DEPTH"
,
}
// AnalyzeOpt stores the analyze option type and value.
type
AnalyzeOpt
struct
{
Type
AnalyzeOptionType
Value
uint64
}
// 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
{
if
n
.
Incremental
{
...
@@ -74,10 +99,15 @@ func (n *AnalyzeTableStmt) Restore(ctx *RestoreCtx) error {
...
@@ -74,10 +99,15 @@ func (n *AnalyzeTableStmt) Restore(ctx *RestoreCtx) error {
}
}
ctx
.
WriteName
(
index
.
O
)
ctx
.
WriteName
(
index
.
O
)
}
}
if
n
.
MaxNumBuckets
!=
0
{
if
len
(
n
.
AnalyzeOpts
)
!=
0
{
ctx
.
WriteKeyWord
(
" WITH "
)
ctx
.
WriteKeyWord
(
" WITH"
)
ctx
.
WritePlainf
(
"%d"
,
n
.
MaxNumBuckets
)
for
i
,
opt
:=
range
n
.
AnalyzeOpts
{
ctx
.
WriteKeyWord
(
" BUCKETS"
)
if
i
!=
0
{
ctx
.
WritePlain
(
","
)
}
ctx
.
WritePlainf
(
" %d "
,
opt
.
Value
)
ctx
.
WritePlain
(
AnalyzeOptionString
[
opt
.
Type
])
}
}
}
return
nil
return
nil
}
}
...
...
vendor/github.com/pingcap/parser/ast/util.go
浏览文件 @
ed7d982a
...
@@ -27,7 +27,9 @@ func IsReadOnly(node Node) bool {
...
@@ -27,7 +27,9 @@ func IsReadOnly(node Node) bool {
node
.
Accept
(
&
checker
)
node
.
Accept
(
&
checker
)
return
checker
.
readOnly
return
checker
.
readOnly
case
*
ExplainStmt
,
*
DoStmt
:
case
*
ExplainStmt
:
return
!
st
.
Analyze
||
IsReadOnly
(
st
.
Stmt
)
case
*
DoStmt
:
return
true
return
true
default
:
default
:
return
false
return
false
...
...
vendor/github.com/pingcap/parser/go.mod1
浏览文件 @
ed7d982a
...
@@ -9,8 +9,8 @@ require (
...
@@ -9,8 +9,8 @@ require (
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.4
github.com/pingcap/errors v0.11.4
github.com/pingcap/tidb v0.0.0-20190
321025159-e8299209340c
github.com/pingcap/tidb v0.0.0-20190
703092821-755875aacb5a
github.com/pingcap/tipb v0.0.0-20190
107072121-abbec73437b7
github.com/pingcap/tipb v0.0.0-20190
428032612-535e1abaa330
github.com/sirupsen/logrus v1.3.0
github.com/sirupsen/logrus v1.3.0
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2
)
)
vendor/github.com/pingcap/parser/go.sum1
浏览文件 @
ed7d982a
...
@@ -3,22 +3,31 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ
...
@@ -3,22 +3,31 @@ 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 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/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
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/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
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 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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20171208011716-f6d7a1f6fbf3/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
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 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 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/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=
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/etcd v3.3.13+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 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-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142 h1:3jFq2xL4ZajGK4aZY8jz+DAF0FHjI51BXjjSwCzS1Dk=
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-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
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=
...
@@ -39,24 +48,32 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
...
@@ -39,24 +48,32 @@ 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 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/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v0.0.0-20180421182945-02af3965c54e/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
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 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 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/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
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 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/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I=
github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E=
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-playground/overalls v0.0.0-20180201144345-22ec1a223b7c/go.mod h1:UqxAgEOt89sCiXlrc/ycnx00LVvUO/eS8tMUkWX4R7w=
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.0.0/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 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-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff h1:kOkM9whyQYodu09SJ6W3NCsHG7crFaJILQ22Gozp3lg=
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=
...
@@ -66,33 +83,58 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM
...
@@ -66,33 +83,58 @@ 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 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-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw=
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/google/shlex v0.0.0-20181106134648-c34317bd91bf/go.mod h1:RpwtwJQFrIEPstU94h88MWPXP2ektJZ8cZ0YntAmXiE=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
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.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk=
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 v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
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 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-middleware v1.0.1-0.20190118093823-f849b5445de4/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 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.4.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
github.com/grpc-ecosystem/grpc-gateway v1.5.1 h1:3scN4iuXkNOyP98jF55Lv8a9j1o/IwvnDIZ0LHJK1nk=
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 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/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
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/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk=
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 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 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/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.0.0/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
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/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
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/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/montanaflynn/stats v0.0.0-20151014174947-eeaced052adb/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808 h1:pmpDGKLw4n82EtrNiLqB+xSz/JQwFOaZuMALYUHwX5s=
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 h1:xCBmH4l5KuvLYc5L7AS7SZg9/jKdIFubM7OVoLqaQUI=
...
@@ -101,62 +143,89 @@ github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7 h1:7KAv7KMGTTqSmYZtNdc
...
@@ -101,62 +143,89 @@ github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7 h1:7KAv7KMGTTqSmYZtNdc
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 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/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q=
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
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 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.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
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 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 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/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo=
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=
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8 h1:USx2/E1bX46VG32FIw034Au6seQ2fY9NEILmNh/UlQg=
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8 h1:USx2/E1bX46VG32FIw034Au6seQ2fY9NEILmNh/UlQg=
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8/go.mod h1:B1+S9LNcuMyLH/4HMTViQOJevkGiik3wW2AN9zb2fNQ=
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8/go.mod h1:B1+S9LNcuMyLH/4HMTViQOJevkGiik3wW2AN9zb2fNQ=
github.com/pingcap/errcode v0.0.0-20180921232412-a1a7271709d9/go.mod h1:4b2X8xSqxIroj/IZ9MX/VGZhAwc11wB9wRIzHvz6SeM=
github.com/pingcap/errors v0.10.1/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.0 h1:DCJQB8jrHbQ1VVlMFIrbj2ApScNNotVmkSNplu2yUt4=
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 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/failpoint v0.0.0-20190512135322-30cc7431d99c/go.mod h1:DNS3Qg7bEDhU6EXNHF+XSv/PGznQaMJ5FWvctpm6pQI=
github.com/pingcap/gofail v0.0.0-20181217135706-6a951c1e42c3 h1:04yuCf5NMvLU8rB2m4Qs3rynH7EYpMno3lHkewIOdMo=
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 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/kvproto v0.0.0-20190516013202-4cf58ad90b6c/go.mod h1:QMdbTAXCHzzygQzqcG9uVUgU2fKeSN1GmfMiykdSzzY=
github.com/pingcap/kvproto v0.0.0-20190619024611-a4759dfe3753/go.mod h1:QMdbTAXCHzzygQzqcG9uVUgU2fKeSN1GmfMiykdSzzY=
github.com/pingcap/log v0.0.0-20190214045112-b37da76f67a7/go.mod h1:xsfkWVaFVV5B8e1K9seWfyJWFrIhbtUTAD8NV1Pq3+w=
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/parser v0.0.0-20190701123046-5768e68c1e65/go.mod h1:1FNvfp9+J0wvc4kl8eGNh7Rqrxveg15jJoWo/a0uHwA=
github.com/pingcap/pd v0.0.0-20190617100349-293d4b5189bf/go.mod h1:3DlDlFT7EF64A1bmb/tulZb6wbPSagm5G4p1AlhaEDs=
github.com/pingcap/pd v2.1.0-rc.4+incompatible h1:/buwGk04aHO5odk/+O8ZOXGs4qkUjYTJ2UpCJXna8NE=
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=
github.com/pingcap/tidb v0.0.0-20190703092821-755875aacb5a h1:YfYdeUJC7LwGt2HYAWqtOuNAidYIg6uKPYWpNe+Px3s=
github.com/pingcap/tidb v0.0.0-20190703092821-755875aacb5a/go.mod h1:DU3S1YEJN8b1BookBt3g27hljItkONKZSJR+Bu/C/9g=
github.com/pingcap/tidb-tools v2.1.3-0.20190116051332-34c808eef588+incompatible h1:e9Gi/LP9181HT3gBfSOeSBA+5JfemuE4aEAhqNgoE4k=
github.com/pingcap/tidb-tools v2.1.3-0.20190116051332-34c808eef588+incompatible h1:e9Gi/LP9181HT3gBfSOeSBA+5JfemuE4aEAhqNgoE4k=
github.com/pingcap/tidb-tools v2.1.3-0.20190116051332-34c808eef588+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM=
github.com/pingcap/tidb-tools v2.1.3-0.20190116051332-34c808eef588+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM=
github.com/pingcap/tidb-tools v2.1.3-0.20190321065848-1e8b48f5c168+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM=
github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7 h1:wnjdQRhybddDesBVBKyOLUPgDaOFdtqA92pduBgWvVQ=
github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7 h1:wnjdQRhybddDesBVBKyOLUPgDaOFdtqA92pduBgWvVQ=
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/pingcap/tipb v0.0.0-20190428032612-535e1abaa330 h1:rRMLMjIMFulCX9sGKZ1hoov/iROMsKyC8Snc02nSukw=
github.com/pingcap/tipb v0.0.0-20190428032612-535e1abaa330/go.mod h1:RtkHW8WbcNxj8lsbzjaILci01CtYnYbIkQhjyZWrWVI=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
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 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.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.0 h1:tXuTFVHC03mW0D+Ua1Q2d1EAVqLTuggX50V0VLICCzY=
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-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8=
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-20180518154759-7600349dcfe1/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39 h1:Cto4X6SVMWRPBkJ/3YHn1iDGDGc/Z+sW+AEMKHMVvN4=
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-20180612222113-7d6f385de8be/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d h1:GoAlyOgbOEIFdaDqxJVlbOQ1DtGmZWs/Qau0hIlk+WQ=
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=
github.com/remyoudompheng/bigfft v0.0.0-20190512091148-babf20351dd7 h1:FUL3b97ZY2EPqg2NbXKuMHs5pXJB9hjj1fDHnF2vl28=
github.com/remyoudompheng/bigfft v0.0.0-20190512091148-babf20351dd7/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/shirou/gopsutil v2.18.10+incompatible h1:cy84jW6EVRPa5g9HAHrlbxMSIjBhDSX0OFYyMYminYs=
github.com/shirou/gopsutil v2.18.10+incompatible h1:cy84jW6EVRPa5g9HAHrlbxMSIjBhDSX0OFYyMYminYs=
github.com/shirou/gopsutil v2.18.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shirou/gopsutil v2.18.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
github.com/shurcooL/vfsgen v0.0.0-20181020040650-a97a25d856ca/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/shurcooL/vfsgen v0.0.0-20181020040650-a97a25d856ca/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
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=
...
@@ -164,15 +233,19 @@ github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
...
@@ -164,15 +233,19 @@ 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 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/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
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=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/struCoder/pidusage v0.1.2/go.mod h1:pWBlW3YuSwRl6h7R5KbvA4N8oOqe9LjaKW5CwT1SPjI=
github.com/struCoder/pidusage v0.1.2/go.mod h1:pWBlW3YuSwRl6h7R5KbvA4N8oOqe9LjaKW5CwT1SPjI=
github.com/syndtr/goleveldb v0.0.0-20180815032940-ae2bd5eed72d/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
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-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 h1:lYIiVDtZnyTWlNwiAxLj0bbpTcx1BWCFhXjfsvmPdNc=
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 h1:fzz7COZnDrXGTAOHGuUGYd6sG+JMq+AoE7+Jlu0przk=
...
@@ -185,16 +258,27 @@ github.com/uber/jaeger-lib v1.5.0 h1:OHbgr8l656Ub3Fw5k9SWnBfIEwvoHQ+W2y+Aa9D1Uyo
...
@@ -185,16 +258,27 @@ 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/ugorji/go v1.1.2/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43/go.mod h1:iT03XoTwV7xq/+UGwKO3UbC1nNNlopQiY61beSdrtOA=
github.com/unrolled/render v0.0.0-20171102162132-65450fb6b2d3/go.mod h1:tu82oB5W2ykJRVioYsB+IQKcft7ryBr7w12qMBUPyXg=
github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d h1:ggUgChAeyge4NZ4QUw6lhHsVymzwSDJOZcE0s2X8S20=
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/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/negroni v0.3.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 h1:MPPkRncZLN9Kh4MEFmbnK4h3BD7AUmskWv2+EeZJCCs=
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=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yookoala/realpath v1.0.0/go.mod h1:gJJMA9wuX7AcqLy1+ffPatSCySA1FQ2S8Ya9AIoYBpE=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/etcd v0.0.0-20190320044326-77d4b742cdbf/go.mod h1:KSGwdbiFchh5KIC9My2+ZVl5/3ANcwohw50dpPwa2cw=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
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 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 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-20180608092829-8ac0e0d97ce4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
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=
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
...
@@ -217,24 +301,34 @@ golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb/go.mod h1:STP8DvDyc/dI5b8T5h
...
@@ -217,24 +301,34 @@ 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-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg=
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/time v0.0.0-20190308202827-9d24e82272b4/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=
golang.org/x/tools v0.0.0-20190130214255-bb1329dc71a0/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190130214255-bb1329dc71a0/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20181004005441-af9cb2a35e7f/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20181004005441-af9cb2a35e7f/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190108161440-ae2f86662275 h1:9oFlwfEGIvmxXTcY53ygNyxIQtWciRHjrnUvZJCYXYU=
google.golang.org/genproto v0.0.0-20190108161440-ae2f86662275 h1:9oFlwfEGIvmxXTcY53ygNyxIQtWciRHjrnUvZJCYXYU=
google.golang.org/genproto v0.0.0-20190108161440-ae2f86662275/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg=
google.golang.org/genproto v0.0.0-20190108161440-ae2f86662275/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg=
google.golang.org/grpc v0.0.0-20180607172857-7a6a684ca69e/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v0.0.0-20180607172857-7a6a684ca69e/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
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/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/gometalinter.v2 v2.0.12/go.mod h1:NDRytsqEZyolNuAgTzJkZMkSQM7FIKyzVzGhjB/qfYo=
gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20180810215634-df19058c872c/go.mod h1:3HH7i1SgMqlzxCcBmUHW657sD4Kvv9sC3HpL3YukzwA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
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/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
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/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
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 h1:yhQC6Uy5CqibAIlk1wlusa/MJ3iAN49/BsR/dCCKz3M=
...
...
vendor/github.com/pingcap/parser/lexer.go
浏览文件 @
ed7d982a
...
@@ -211,9 +211,11 @@ func (s *Scanner) Lex(v *yySymType) int {
...
@@ -211,9 +211,11 @@ func (s *Scanner) Lex(v *yySymType) int {
case
quotedIdentifier
:
case
quotedIdentifier
:
tok
=
identifier
tok
=
identifier
}
}
if
tok
==
unicode
.
ReplacementChar
&&
s
.
r
.
eof
()
{
return
0
if
tok
==
unicode
.
ReplacementChar
{
return
invalid
}
}
return
tok
return
tok
}
}
...
...
vendor/github.com/pingcap/parser/misc.go
浏览文件 @
ed7d982a
...
@@ -183,6 +183,7 @@ var tokenMap = map[string]int{
...
@@ -183,6 +183,7 @@ var tokenMap = map[string]int{
"CIPHER"
:
cipher
,
"CIPHER"
:
cipher
,
"CLEANUP"
:
cleanup
,
"CLEANUP"
:
cleanup
,
"CLIENT"
:
client
,
"CLIENT"
:
client
,
"CMSKETCH"
:
cmSketch
,
"COALESCE"
:
coalesce
,
"COALESCE"
:
coalesce
,
"COLLATE"
:
collate
,
"COLLATE"
:
collate
,
"COLLATION"
:
collation
,
"COLLATION"
:
collation
,
...
@@ -232,10 +233,12 @@ var tokenMap = map[string]int{
...
@@ -232,10 +233,12 @@ var tokenMap = map[string]int{
"DELAY_KEY_WRITE"
:
delayKeyWrite
,
"DELAY_KEY_WRITE"
:
delayKeyWrite
,
"DELAYED"
:
delayed
,
"DELAYED"
:
delayed
,
"DELETE"
:
deleteKwd
,
"DELETE"
:
deleteKwd
,
"DEPTH"
:
depth
,
"DESC"
:
desc
,
"DESC"
:
desc
,
"DESCRIBE"
:
describe
,
"DESCRIBE"
:
describe
,
"DIRECTORY"
:
directory
,
"DIRECTORY"
:
directory
,
"DISABLE"
:
disable
,
"DISABLE"
:
disable
,
"DISK"
:
disk
,
"DISTINCT"
:
distinct
,
"DISTINCT"
:
distinct
,
"DISTINCTROW"
:
distinct
,
"DISTINCTROW"
:
distinct
,
"DIV"
:
div
,
"DIV"
:
div
,
...
@@ -250,6 +253,7 @@ var tokenMap = map[string]int{
...
@@ -250,6 +253,7 @@ var tokenMap = map[string]int{
"ENABLE"
:
enable
,
"ENABLE"
:
enable
,
"ENCLOSED"
:
enclosed
,
"ENCLOSED"
:
enclosed
,
"END"
:
end
,
"END"
:
end
,
"ENFORCED"
:
enforced
,
"ENGINE"
:
engine
,
"ENGINE"
:
engine
,
"ENGINES"
:
engines
,
"ENGINES"
:
engines
,
"ENUM"
:
enum
,
"ENUM"
:
enum
,
...
@@ -351,6 +355,7 @@ var tokenMap = map[string]int{
...
@@ -351,6 +355,7 @@ var tokenMap = map[string]int{
"LONGTEXT"
:
longtextType
,
"LONGTEXT"
:
longtextType
,
"LOW_PRIORITY"
:
lowPriority
,
"LOW_PRIORITY"
:
lowPriority
,
"MASTER"
:
master
,
"MASTER"
:
master
,
"MATCH"
:
match
,
"MAX"
:
max
,
"MAX"
:
max
,
"MAX_CONNECTIONS_PER_HOUR"
:
maxConnectionsPerHour
,
"MAX_CONNECTIONS_PER_HOUR"
:
maxConnectionsPerHour
,
"MAX_EXECUTION_TIME"
:
maxExecutionTime
,
"MAX_EXECUTION_TIME"
:
maxExecutionTime
,
...
@@ -402,7 +407,9 @@ var tokenMap = map[string]int{
...
@@ -402,7 +407,9 @@ var tokenMap = map[string]int{
"OUTER"
:
outer
,
"OUTER"
:
outer
,
"PACK_KEYS"
:
packKeys
,
"PACK_KEYS"
:
packKeys
,
"PAGE"
:
pageSym
,
"PAGE"
:
pageSym
,
"PARTIAL"
:
partial
,
"PARTITION"
:
partition
,
"PARTITION"
:
partition
,
"PARTITIONING"
:
partitioning
,
"PARTITIONS"
:
partitions
,
"PARTITIONS"
:
partitions
,
"PASSWORD"
:
password
,
"PASSWORD"
:
password
,
"PESSIMISTIC"
:
pessimistic
,
"PESSIMISTIC"
:
pessimistic
,
...
@@ -435,6 +442,7 @@ var tokenMap = map[string]int{
...
@@ -435,6 +442,7 @@ var tokenMap = map[string]int{
"REGEXP"
:
regexpKwd
,
"REGEXP"
:
regexpKwd
,
"REGIONS"
:
regions
,
"REGIONS"
:
regions
,
"RELOAD"
:
reload
,
"RELOAD"
:
reload
,
"REMOVE"
:
remove
,
"RENAME"
:
rename
,
"RENAME"
:
rename
,
"REPEAT"
:
repeat
,
"REPEAT"
:
repeat
,
"REPEATABLE"
:
repeatable
,
"REPEATABLE"
:
repeatable
,
...
@@ -467,6 +475,7 @@ var tokenMap = map[string]int{
...
@@ -467,6 +475,7 @@ var tokenMap = map[string]int{
"SHARED"
:
shared
,
"SHARED"
:
shared
,
"SHOW"
:
show
,
"SHOW"
:
show
,
"SIGNED"
:
signed
,
"SIGNED"
:
signed
,
"SIMPLE"
:
simple
,
"SLAVE"
:
slave
,
"SLAVE"
:
slave
,
"SLOW"
:
slow
,
"SLOW"
:
slow
,
"SMALLINT"
:
smallIntType
,
"SMALLINT"
:
smallIntType
,
...
@@ -490,7 +499,9 @@ var tokenMap = map[string]int{
...
@@ -490,7 +499,9 @@ var tokenMap = map[string]int{
"STATS_HEALTHY"
:
statsHealthy
,
"STATS_HEALTHY"
:
statsHealthy
,
"STATS_META"
:
statsMeta
,
"STATS_META"
:
statsMeta
,
"STATS_PERSISTENT"
:
statsPersistent
,
"STATS_PERSISTENT"
:
statsPersistent
,
"STATS_SAMPLE_PAGES"
:
statsSamplePages
,
"STATUS"
:
status
,
"STATUS"
:
status
,
"STORAGE"
:
storage
,
"SWAPS"
:
swaps
,
"SWAPS"
:
swaps
,
"SWITCHES"
:
switchesSym
,
"SWITCHES"
:
switchesSym
,
"SYSTEM_TIME"
:
systemTime
,
"SYSTEM_TIME"
:
systemTime
,
...
@@ -522,6 +533,8 @@ var tokenMap = map[string]int{
...
@@ -522,6 +533,8 @@ var tokenMap = map[string]int{
"TIDB_HJ"
:
tidbHJ
,
"TIDB_HJ"
:
tidbHJ
,
"TIDB_INLJ"
:
tidbINLJ
,
"TIDB_INLJ"
:
tidbINLJ
,
"TIDB_SMJ"
:
tidbSMJ
,
"TIDB_SMJ"
:
tidbSMJ
,
"TIDB_HASHAGG"
:
tidbHASHAGG
,
"TIDB_STREAMAGG"
:
tidbSTREAMAGG
,
"TIME"
:
timeType
,
"TIME"
:
timeType
,
"TIMESTAMP"
:
timestampType
,
"TIMESTAMP"
:
timestampType
,
"TIMESTAMPADD"
:
timestampAdd
,
"TIMESTAMPADD"
:
timestampAdd
,
...
@@ -539,6 +552,7 @@ var tokenMap = map[string]int{
...
@@ -539,6 +552,7 @@ var tokenMap = map[string]int{
"TOKUDB_UNCOMPRESSED"
:
tokudbUncompressed
,
"TOKUDB_UNCOMPRESSED"
:
tokudbUncompressed
,
"TOKUDB_ZLIB"
:
tokudbZlib
,
"TOKUDB_ZLIB"
:
tokudbZlib
,
"TOP"
:
top
,
"TOP"
:
top
,
"TOPN"
:
topn
,
"TRACE"
:
trace
,
"TRACE"
:
trace
,
"TRADITIONAL"
:
traditional
,
"TRADITIONAL"
:
traditional
,
"TRAILING"
:
trailing
,
"TRAILING"
:
trailing
,
...
@@ -579,6 +593,7 @@ var tokenMap = map[string]int{
...
@@ -579,6 +593,7 @@ var tokenMap = map[string]int{
"WEEK"
:
week
,
"WEEK"
:
week
,
"WHEN"
:
when
,
"WHEN"
:
when
,
"WHERE"
:
where
,
"WHERE"
:
where
,
"WIDTH"
:
width
,
"WITH"
:
with
,
"WITH"
:
with
,
"WRITE"
:
write
,
"WRITE"
:
write
,
"XOR"
:
xor
,
"XOR"
:
xor
,
...
@@ -589,6 +604,7 @@ var tokenMap = map[string]int{
...
@@ -589,6 +604,7 @@ var tokenMap = map[string]int{
"BINDING"
:
binding
,
"BINDING"
:
binding
,
"BINDINGS"
:
bindings
,
"BINDINGS"
:
bindings
,
"EXPR_PUSHDOWN_BLACKLIST"
:
exprPushdownBlacklist
,
"EXPR_PUSHDOWN_BLACKLIST"
:
exprPushdownBlacklist
,
"OPT_RULE_BLACKLIST"
:
optRuleBlacklist
,
}
}
// See https://dev.mysql.com/doc/refman/5.7/en/function-resolution.html for details
// See https://dev.mysql.com/doc/refman/5.7/en/function-resolution.html for details
...
...
vendor/github.com/pingcap/parser/model/flags.go
浏览文件 @
ed7d982a
...
@@ -42,4 +42,6 @@ const (
...
@@ -42,4 +42,6 @@ const (
FlagDividedByZeroAsWarning
=
1
<<
8
FlagDividedByZeroAsWarning
=
1
<<
8
// FlagInUnionStmt indicates if this is a UNION statement.
// FlagInUnionStmt indicates if this is a UNION statement.
FlagInUnionStmt
=
1
<<
9
FlagInUnionStmt
=
1
<<
9
// FlagInLoadDataStmt indicates if this is a LOAD DATA statement.
FlagInLoadDataStmt
=
1
<<
10
)
)
vendor/github.com/pingcap/parser/mysql/const.go
浏览文件 @
ed7d982a
...
@@ -233,6 +233,13 @@ const (
...
@@ -233,6 +233,13 @@ const (
CreateRolePriv
CreateRolePriv
// DropRolePriv is the privilege to drop a role.
// DropRolePriv is the privilege to drop a role.
DropRolePriv
DropRolePriv
CreateTMPTablePriv
LockTablesPriv
CreateRoutinePriv
AlterRoutinePriv
EventPriv
// AllPriv is the privilege for all actions.
// AllPriv is the privilege for all actions.
AllPriv
AllPriv
)
)
...
@@ -276,26 +283,60 @@ const PWDHashLen = 40
...
@@ -276,26 +283,60 @@ const PWDHashLen = 40
// Priv2UserCol is the privilege to mysql.user table column name.
// Priv2UserCol is the privilege to mysql.user table column name.
var
Priv2UserCol
=
map
[
PrivilegeType
]
string
{
var
Priv2UserCol
=
map
[
PrivilegeType
]
string
{
CreatePriv
:
"Create_priv"
,
CreatePriv
:
"Create_priv"
,
SelectPriv
:
"Select_priv"
,
SelectPriv
:
"Select_priv"
,
InsertPriv
:
"Insert_priv"
,
InsertPriv
:
"Insert_priv"
,
UpdatePriv
:
"Update_priv"
,
UpdatePriv
:
"Update_priv"
,
DeletePriv
:
"Delete_priv"
,
DeletePriv
:
"Delete_priv"
,
ShowDBPriv
:
"Show_db_priv"
,
ShowDBPriv
:
"Show_db_priv"
,
SuperPriv
:
"Super_priv"
,
SuperPriv
:
"Super_priv"
,
CreateUserPriv
:
"Create_user_priv"
,
CreateUserPriv
:
"Create_user_priv"
,
TriggerPriv
:
"Trigger_priv"
,
TriggerPriv
:
"Trigger_priv"
,
DropPriv
:
"Drop_priv"
,
DropPriv
:
"Drop_priv"
,
ProcessPriv
:
"Process_priv"
,
ProcessPriv
:
"Process_priv"
,
GrantPriv
:
"Grant_priv"
,
GrantPriv
:
"Grant_priv"
,
ReferencesPriv
:
"References_priv"
,
ReferencesPriv
:
"References_priv"
,
AlterPriv
:
"Alter_priv"
,
AlterPriv
:
"Alter_priv"
,
ExecutePriv
:
"Execute_priv"
,
ExecutePriv
:
"Execute_priv"
,
IndexPriv
:
"Index_priv"
,
IndexPriv
:
"Index_priv"
,
CreateViewPriv
:
"Create_view_priv"
,
CreateViewPriv
:
"Create_view_priv"
,
ShowViewPriv
:
"Show_view_priv"
,
ShowViewPriv
:
"Show_view_priv"
,
CreateRolePriv
:
"Create_role_priv"
,
CreateRolePriv
:
"Create_role_priv"
,
DropRolePriv
:
"Drop_role_priv"
,
DropRolePriv
:
"Drop_role_priv"
,
CreateTMPTablePriv
:
"Create_tmp_table_priv"
,
LockTablesPriv
:
"Lock_tables_priv"
,
CreateRoutinePriv
:
"Create_routine_priv"
,
AlterRoutinePriv
:
"Alter_routine_priv"
,
EventPriv
:
"Event_priv"
,
}
// Col2PrivType is the privilege tables column name to privilege type.
var
Col2PrivType
=
map
[
string
]
PrivilegeType
{
"Create_priv"
:
CreatePriv
,
"Select_priv"
:
SelectPriv
,
"Insert_priv"
:
InsertPriv
,
"Update_priv"
:
UpdatePriv
,
"Delete_priv"
:
DeletePriv
,
"Show_db_priv"
:
ShowDBPriv
,
"Super_priv"
:
SuperPriv
,
"Create_user_priv"
:
CreateUserPriv
,
"Trigger_priv"
:
TriggerPriv
,
"Drop_priv"
:
DropPriv
,
"Process_priv"
:
ProcessPriv
,
"Grant_priv"
:
GrantPriv
,
"References_priv"
:
ReferencesPriv
,
"Alter_priv"
:
AlterPriv
,
"Execute_priv"
:
ExecutePriv
,
"Index_priv"
:
IndexPriv
,
"Create_view_priv"
:
CreateViewPriv
,
"Show_view_priv"
:
ShowViewPriv
,
"Create_role_priv"
:
CreateRolePriv
,
"Drop_role_priv"
:
DropRolePriv
,
"Create_tmp_table_priv"
:
CreateTMPTablePriv
,
"Lock_tables_priv"
:
LockTablesPriv
,
"Create_routine_priv"
:
CreateRoutinePriv
,
"Alter_routine_priv"
:
AlterRoutinePriv
,
"Event_priv"
:
EventPriv
,
}
}
// Command2Str is the command information to command name.
// Command2Str is the command information to command name.
...
@@ -334,55 +375,33 @@ var Command2Str = map[byte]string{
...
@@ -334,55 +375,33 @@ var Command2Str = map[byte]string{
ComResetConnection
:
"Reset connect"
,
ComResetConnection
:
"Reset connect"
,
}
}
// Col2PrivType is the privilege tables column name to privilege type.
var
Col2PrivType
=
map
[
string
]
PrivilegeType
{
"Create_priv"
:
CreatePriv
,
"Select_priv"
:
SelectPriv
,
"Insert_priv"
:
InsertPriv
,
"Update_priv"
:
UpdatePriv
,
"Delete_priv"
:
DeletePriv
,
"Show_db_priv"
:
ShowDBPriv
,
"Super_priv"
:
SuperPriv
,
"Create_user_priv"
:
CreateUserPriv
,
"Trigger_priv"
:
TriggerPriv
,
"Drop_priv"
:
DropPriv
,
"Process_priv"
:
ProcessPriv
,
"Grant_priv"
:
GrantPriv
,
"References_priv"
:
ReferencesPriv
,
"Alter_priv"
:
AlterPriv
,
"Execute_priv"
:
ExecutePriv
,
"Index_priv"
:
IndexPriv
,
"Create_view_priv"
:
CreateViewPriv
,
"Show_view_priv"
:
ShowViewPriv
,
"Create_role_priv"
:
CreateRolePriv
,
"Drop_role_priv"
:
DropRolePriv
,
}
// AllGlobalPrivs is all the privileges in global scope.
var
AllGlobalPrivs
=
[]
PrivilegeType
{
SelectPriv
,
InsertPriv
,
UpdatePriv
,
DeletePriv
,
CreatePriv
,
DropPriv
,
ProcessPriv
,
GrantPriv
,
ReferencesPriv
,
AlterPriv
,
ShowDBPriv
,
SuperPriv
,
ExecutePriv
,
IndexPriv
,
CreateUserPriv
,
TriggerPriv
,
CreateViewPriv
,
ShowViewPriv
,
CreateRolePriv
,
DropRolePriv
}
// Priv2Str is the map for privilege to string.
// Priv2Str is the map for privilege to string.
var
Priv2Str
=
map
[
PrivilegeType
]
string
{
var
Priv2Str
=
map
[
PrivilegeType
]
string
{
CreatePriv
:
"Create"
,
CreatePriv
:
"Create"
,
SelectPriv
:
"Select"
,
SelectPriv
:
"Select"
,
InsertPriv
:
"Insert"
,
InsertPriv
:
"Insert"
,
UpdatePriv
:
"Update"
,
UpdatePriv
:
"Update"
,
DeletePriv
:
"Delete"
,
DeletePriv
:
"Delete"
,
ShowDBPriv
:
"Show Databases"
,
ShowDBPriv
:
"Show Databases"
,
SuperPriv
:
"Super"
,
SuperPriv
:
"Super"
,
CreateUserPriv
:
"Create User"
,
CreateUserPriv
:
"Create User"
,
TriggerPriv
:
"Trigger"
,
TriggerPriv
:
"Trigger"
,
DropPriv
:
"Drop"
,
DropPriv
:
"Drop"
,
ProcessPriv
:
"Process"
,
ProcessPriv
:
"Process"
,
GrantPriv
:
"Grant Option"
,
GrantPriv
:
"Grant Option"
,
ReferencesPriv
:
"References"
,
ReferencesPriv
:
"References"
,
AlterPriv
:
"Alter"
,
AlterPriv
:
"Alter"
,
ExecutePriv
:
"Execute"
,
ExecutePriv
:
"Execute"
,
IndexPriv
:
"Index"
,
IndexPriv
:
"Index"
,
CreateViewPriv
:
"Create View"
,
CreateViewPriv
:
"Create View"
,
ShowViewPriv
:
"Show View"
,
ShowViewPriv
:
"Show View"
,
CreateRolePriv
:
"Create Role"
,
CreateRolePriv
:
"Create Role"
,
DropRolePriv
:
"Drop Role"
,
DropRolePriv
:
"Drop Role"
,
CreateTMPTablePriv
:
"CREATE TEMPORARY TABLES"
,
LockTablesPriv
:
"LOCK TABLES"
,
CreateRoutinePriv
:
"CREATE ROUTINE"
,
AlterRoutinePriv
:
"ALTER ROUTINE"
,
EventPriv
:
"EVENT"
,
}
}
// Priv2SetStr is the map for privilege to string.
// Priv2SetStr is the map for privilege to string.
...
@@ -419,6 +438,9 @@ var SetStr2Priv = map[string]PrivilegeType{
...
@@ -419,6 +438,9 @@ var SetStr2Priv = map[string]PrivilegeType{
"Show View"
:
ShowViewPriv
,
"Show View"
:
ShowViewPriv
,
}
}
// AllGlobalPrivs is all the privileges in global scope.
var
AllGlobalPrivs
=
[]
PrivilegeType
{
SelectPriv
,
InsertPriv
,
UpdatePriv
,
DeletePriv
,
CreatePriv
,
DropPriv
,
ProcessPriv
,
GrantPriv
,
ReferencesPriv
,
AlterPriv
,
ShowDBPriv
,
SuperPriv
,
ExecutePriv
,
IndexPriv
,
CreateUserPriv
,
TriggerPriv
,
CreateViewPriv
,
ShowViewPriv
,
CreateRolePriv
,
DropRolePriv
,
CreateTMPTablePriv
,
LockTablesPriv
,
CreateRoutinePriv
,
AlterRoutinePriv
,
EventPriv
}
// AllDBPrivs is all the privileges in database scope.
// AllDBPrivs is all the privileges in database scope.
var
AllDBPrivs
=
[]
PrivilegeType
{
SelectPriv
,
InsertPriv
,
UpdatePriv
,
DeletePriv
,
CreatePriv
,
DropPriv
,
GrantPriv
,
AlterPriv
,
ExecutePriv
,
IndexPriv
,
CreateViewPriv
,
ShowViewPriv
}
var
AllDBPrivs
=
[]
PrivilegeType
{
SelectPriv
,
InsertPriv
,
UpdatePriv
,
DeletePriv
,
CreatePriv
,
DropPriv
,
GrantPriv
,
AlterPriv
,
ExecutePriv
,
IndexPriv
,
CreateViewPriv
,
ShowViewPriv
}
...
...
vendor/github.com/pingcap/parser/mysql/state.go
浏览文件 @
ed7d982a
...
@@ -255,4 +255,5 @@ var MySQLState = map[uint16]string{
...
@@ -255,4 +255,5 @@ var MySQLState = map[uint16]string{
ErrInvalidJSONData
:
"22032"
,
ErrInvalidJSONData
:
"22032"
,
ErrInvalidJSONPathWildcard
:
"42000"
,
ErrInvalidJSONPathWildcard
:
"42000"
,
ErrJSONUsedAsKey
:
"42000"
,
ErrJSONUsedAsKey
:
"42000"
,
ErrInvalidJSONPathArrayCell
:
"42000"
,
}
}
vendor/github.com/pingcap/parser/mysql/util.go
浏览文件 @
ed7d982a
...
@@ -79,6 +79,7 @@ var defaultLengthAndDecimalForCast = map[byte]lengthAndDecimal{
...
@@ -79,6 +79,7 @@ var defaultLengthAndDecimalForCast = map[byte]lengthAndDecimal{
TypeNewDecimal
:
{
11
,
0
},
TypeNewDecimal
:
{
11
,
0
},
TypeDuration
:
{
10
,
0
},
TypeDuration
:
{
10
,
0
},
TypeLonglong
:
{
22
,
0
},
TypeLonglong
:
{
22
,
0
},
TypeDouble
:
{
22
,
-
1
},
TypeJSON
:
{
4194304
,
0
},
// Flen differs.
TypeJSON
:
{
4194304
,
0
},
// Flen differs.
}
}
...
...
vendor/github.com/pingcap/parser/parser.go
浏览文件 @
ed7d982a
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
vendor/github.com/pingcap/parser/parser.y
浏览文件 @
ed7d982a
...
@@ -175,6 +175,7 @@ import (
...
@@ -175,6 +175,7 @@ import (
longblobType
"LONGBLOB"
longblobType
"LONGBLOB"
longtextType
"LONGTEXT"
longtextType
"LONGTEXT"
lowPriority
"LOW_PRIORITY"
lowPriority
"LOW_PRIORITY"
match
"MATCH"
maxValue
"MAXVALUE"
maxValue
"MAXVALUE"
mediumblobType
"MEDIUMBLOB"
mediumblobType
"MEDIUMBLOB"
mediumIntType
"MEDIUMINT"
mediumIntType
"MEDIUMINT"
...
@@ -318,6 +319,7 @@ import (
...
@@ -318,6 +319,7 @@ import (
delayKeyWrite
"DELAY_KEY_WRITE"
delayKeyWrite
"DELAY_KEY_WRITE"
directory
"DIRECTORY"
directory
"DIRECTORY"
disable
"DISABLE"
disable
"DISABLE"
disk
"DISK"
do
"DO"
do
"DO"
duplicate
"DUPLICATE"
duplicate
"DUPLICATE"
dynamic
"DYNAMIC"
dynamic
"DYNAMIC"
...
@@ -385,6 +387,8 @@ import (
...
@@ -385,6 +387,8 @@ import (
only
"ONLY"
only
"ONLY"
pageSym
"PAGE"
pageSym
"PAGE"
password
"PASSWORD"
password
"PASSWORD"
partial
"PARTIAL"
partitioning
"PARTITIONING"
partitions
"PARTITIONS"
partitions
"PARTITIONS"
pipesAsOr
pipesAsOr
plugins
"PLUGINS"
plugins
"PLUGINS"
...
@@ -402,6 +406,7 @@ import (
...
@@ -402,6 +406,7 @@ import (
recover
"RECOVER"
recover
"RECOVER"
redundant
"REDUNDANT"
redundant
"REDUNDANT"
reload
"RELOAD"
reload
"RELOAD"
remove
"REMOVE"
repeatable
"REPEATABLE"
repeatable
"REPEATABLE"
respect
"RESPECT"
respect
"RESPECT"
replication
"REPLICATION"
replication
"REPLICATION"
...
@@ -419,6 +424,7 @@ import (
...
@@ -419,6 +424,7 @@ import (
share
"SHARE"
share
"SHARE"
shared
"SHARED"
shared
"SHARED"
signed
"SIGNED"
signed
"SIGNED"
simple
"SIMPLE"
slave
"SLAVE"
slave
"SLAVE"
slow
"SLOW"
slow
"SLOW"
snapshot
"SNAPSHOT"
snapshot
"SNAPSHOT"
...
@@ -427,7 +433,9 @@ import (
...
@@ -427,7 +433,9 @@ import (
sqlNoCache
"SQL_NO_CACHE"
sqlNoCache
"SQL_NO_CACHE"
start
"START"
start
"START"
statsPersistent
"STATS_PERSISTENT"
statsPersistent
"STATS_PERSISTENT"
statsSamplePages
"STATS_SAMPLE_PAGES"
status
"STATUS"
status
"STATUS"
storage
"STORAGE"
swaps
"SWAPS"
swaps
"SWAPS"
switchesSym
"SWITCHES"
switchesSym
"SWITCHES"
systemTime
"SYSTEM_TIME"
systemTime
"SYSTEM_TIME"
...
@@ -467,6 +475,7 @@ import (
...
@@ -467,6 +475,7 @@ import (
week
"WEEK"
week
"WEEK"
yearType
"YEAR"
yearType
"YEAR"
x509
"X509"
x509
"X509"
enforced
"ENFORCED"
/*
The
following
tokens
belong
to
NotKeywordToken
.
Notice
:
make
sure
these
tokens
are
contained
in
NotKeywordToken
.
*/
/*
The
following
tokens
belong
to
NotKeywordToken
.
Notice
:
make
sure
these
tokens
are
contained
in
NotKeywordToken
.
*/
addDate
"ADDDATE"
addDate
"ADDDATE"
...
@@ -515,12 +524,15 @@ import (
...
@@ -515,12 +524,15 @@ import (
varPop
"VAR_POP"
varPop
"VAR_POP"
varSamp
"VAR_SAMP"
varSamp
"VAR_SAMP"
exprPushdownBlacklist
"EXPR_PUSHDOWN_BLACKLIST"
exprPushdownBlacklist
"EXPR_PUSHDOWN_BLACKLIST"
optRuleBlacklist
"OPT_RULE_BLACKLIST"
/*
The
following
tokens
belong
to
TiDBKeyword
.
Notice
:
make
sure
these
tokens
are
contained
in
TiDBKeyword
.
*/
/*
The
following
tokens
belong
to
TiDBKeyword
.
Notice
:
make
sure
these
tokens
are
contained
in
TiDBKeyword
.
*/
admin
"ADMIN"
admin
"ADMIN"
buckets
"BUCKETS"
buckets
"BUCKETS"
cancel
"CANCEL"
cancel
"CANCEL"
cmSketch
"CMSKETCH"
ddl
"DDL"
ddl
"DDL"
depth
"DEPTH"
drainer
"DRAINER"
drainer
"DRAINER"
jobs
"JOBS"
jobs
"JOBS"
job
"JOB"
job
"JOB"
...
@@ -538,7 +550,11 @@ import (
...
@@ -538,7 +550,11 @@ import (
tidbHJ
"TIDB_HJ"
tidbHJ
"TIDB_HJ"
tidbSMJ
"TIDB_SMJ"
tidbSMJ
"TIDB_SMJ"
tidbINLJ
"TIDB_INLJ"
tidbINLJ
"TIDB_INLJ"
tidbHASHAGG
"TIDB_HASHAGG"
tidbSTREAMAGG
"TIDB_STREAMAGG"
topn
"TOPN"
split
"SPLIT"
split
"SPLIT"
width
"WIDTH"
regions
"REGIONS"
regions
"REGIONS"
builtinAddDate
builtinAddDate
...
@@ -682,9 +698,13 @@ import (
...
@@ -682,9 +698,13 @@ import (
%
type
<
item
>
%
type
<
item
>
AdminShowSlow
"Admin Show Slow statement"
AdminShowSlow
"Admin Show Slow statement"
AlterAlgorithm
"Alter table algorithm"
AlterAlgorithm
"Alter table algorithm"
AlterTablePartitionOpt
"Alter table partition option"
AlterTableSpec
"Alter table specification"
AlterTableSpec
"Alter table specification"
AlterTableSpecList
"Alter table specification list"
AlterTableSpecList
"Alter table specification list"
AlterTableSpecListOpt
"Alter table specification list optional"
AlterTableSpecListOpt
"Alter table specification list optional"
AnalyzeOption
"Analyze option"
AnalyzeOptionList
"Analyze option list"
AnalyzeOptionListOpt
"Optional analyze option list"
AnyOrAll
"Any or All for subquery"
AnyOrAll
"Any or All for subquery"
Assignment
"assignment"
Assignment
"assignment"
AssignmentList
"assignment list"
AssignmentList
"assignment list"
...
@@ -744,6 +764,7 @@ import (
...
@@ -744,6 +764,7 @@ import (
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"
FieldTerminator
"Field terminator"
FlushOption
"Flush option"
FlushOption
"Flush option"
PluginNameList
"Plugin Name List"
PluginNameList
"Plugin Name List"
TableRefsClause
"Table references clause"
TableRefsClause
"Table references clause"
...
@@ -787,13 +808,13 @@ import (
...
@@ -787,13 +808,13 @@ import (
LoadDataSetItem
"Single load data specification"
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"
NumLiteral
"Num/Int/Float/Decimal Literal"
NumLiteral
"Num/Int/Float/Decimal Literal"
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 or LOAD DATA statement"
DuplicateOpt
"[IGNORE|REPLACE] in CREATE TABLE ... SELECT statement or LOAD DATA statement"
OptFull
"Full or empty"
OptFull
"Full or empty"
OptTemporary
"TEMPORARY or empty"
Order
"ORDER BY clause optional collation specification"
Order
"ORDER BY clause optional collation specification"
OrderBy
"ORDER BY clause"
OrderBy
"ORDER BY clause"
OrReplace
"or replace"
OrReplace
"or replace"
...
@@ -826,8 +847,9 @@ import (
...
@@ -826,8 +847,9 @@ import (
PrivLevel
"Privilege scope"
PrivLevel
"Privilege scope"
PrivType
"Privilege type"
PrivType
"Privilege type"
ReferDef
"Reference definition"
ReferDef
"Reference definition"
OnDeleteOpt
"optional ON DELETE clause"
OnDelete
"ON DELETE clause"
OnUpdateOpt
"optional ON UPDATE clause"
OnUpdate
"ON UPDATE clause"
OnDeleteUpdateOpt
"optional ON DELETE and UPDATE clause"
OptGConcatSeparator
"optional GROUP_CONCAT SEPARATOR"
OptGConcatSeparator
"optional GROUP_CONCAT SEPARATOR"
ReferOpt
"reference option"
ReferOpt
"reference option"
RequireList
"require list"
RequireList
"require list"
...
@@ -986,6 +1008,11 @@ import (
...
@@ -986,6 +1008,11 @@ import (
TableOptimizerHintOpt
"Table level optimizer hint"
TableOptimizerHintOpt
"Table level optimizer hint"
TableOptimizerHints
"Table level optimizer hints"
TableOptimizerHints
"Table level optimizer hints"
TableOptimizerHintList
"Table level optimizer hint list"
TableOptimizerHintList
"Table level optimizer hint list"
EnforcedOrNot
"{ENFORCED|NOT ENFORCED}"
EnforcedOrNotOpt
"Optional {ENFORCED|NOT ENFORCED}"
EnforcedOrNotOrNotNullOpt
"{[ENFORCED|NOT ENFORCED|NOT NULL]}"
Match
"[MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]"
MatchOpt
"optional MATCH clause"
%
type
<
ident
>
%
type
<
ident
>
AsOpt
"AS or EmptyString"
AsOpt
"AS or EmptyString"
...
@@ -1074,6 +1101,7 @@ import (
...
@@ -1074,6 +1101,7 @@ import (
%
left
'*'
'/'
'%'
div
mod
%
left
'*'
'/'
'%'
div
mod
%
left
'^'
%
left
'^'
%
left
'~'
neg
%
left
'~'
neg
%
precedence
lowerThanNot
%
right
not
not2
%
right
not
not2
%
right
collate
%
right
collate
...
@@ -1096,35 +1124,54 @@ Start:
...
@@ -1096,35 +1124,54 @@ Start:
*
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
alter
-
table
.
html
*
See
https
://
dev
.
mysql
.
com
/
doc
/
refman
/
5.7
/
en
/
alter
-
table
.
html
*******************************************************************************************/
*******************************************************************************************/
AlterTableStmt
:
AlterTableStmt
:
"ALTER"
IgnoreOptional
"TABLE"
TableName
AlterTableSpecListOpt
PartitionOpt
"ALTER"
IgnoreOptional
"TABLE"
TableName
AlterTableSpecListOpt
AlterTable
PartitionOpt
{
{
specs
:=
$
5.
([]*
ast
.
AlterTableSpec
)
specs
:=
$
5.
([]*
ast
.
AlterTableSpec
)
if
$
6
!= nil {
if
$
6
!= nil {
specs
=
append
(
specs
,
&
ast
.
AlterTableSpec
{
specs
=
append
(
specs
,
$
6.
(*
ast
.
AlterTableSpec
))
Tp
:
ast
.
AlterTablePartition
,
Partition
:
$
6.
(*
ast
.
PartitionOptions
),
})
}
}
$$
=
&
ast
.
AlterTableStmt
{
$$
=
&
ast
.
AlterTableStmt
{
Table
:
$
4.
(*
ast
.
TableName
),
Table
:
$
4.
(*
ast
.
TableName
),
Specs
:
specs
,
Specs
:
specs
,
}
}
}
}
|
"ALTER"
IgnoreOptional
"TABLE"
TableName
"ANALYZE"
"PARTITION"
PartitionNameList
MaxNumBuckets
|
"ALTER"
IgnoreOptional
"TABLE"
TableName
"ANALYZE"
"PARTITION"
PartitionNameList
AnalyzeOptionListOpt
{
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
PartitionNames
:
$
7.
([]
model
.
CIStr
),
MaxNumBuckets
:
$
8.
(
uint64
),}
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
PartitionNames
:
$
7.
([]
model
.
CIStr
),
AnalyzeOpts
:
$
8.
([]
ast
.
AnalyzeOpt
),}
}
}
|
"ALTER"
IgnoreOptional
"TABLE"
TableName
"ANALYZE"
"PARTITION"
PartitionNameList
"INDEX"
IndexNameList
MaxNumBuckets
|
"ALTER"
IgnoreOptional
"TABLE"
TableName
"ANALYZE"
"PARTITION"
PartitionNameList
"INDEX"
IndexNameList
AnalyzeOptionListOpt
{
{
$$
=
&
ast
.
AnalyzeTableStmt
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
PartitionNames
:
$
7.
([]
model
.
CIStr
),
PartitionNames
:
$
7.
([]
model
.
CIStr
),
IndexNames
:
$
9.
([]
model
.
CIStr
),
IndexNames
:
$
9.
([]
model
.
CIStr
),
IndexFlag
:
true
,
IndexFlag
:
true
,
MaxNumBuckets
:
$
10.
(
uint64
),
AnalyzeOpts
:
$
10.
([]
ast
.
AnalyzeOpt
),
}
}
}
}
AlterTablePartitionOpt
:
PartitionOpt
{
if
$
1
!= nil {
$$
=
&
ast
.
AlterTableSpec
{
Tp
:
ast
.
AlterTablePartition
,
Partition
:
$
1.
(*
ast
.
PartitionOptions
),
}
}
else
{
$$
=
nil
}
}
|
"REMOVE"
"PARTITIONING"
{
$$
=
&
ast
.
AlterTableSpec
{
Tp
:
ast
.
AlterTableRemovePartitioning
,
}
yylex
.
AppendError
(
yylex
.
Errorf
(
"The REMOVE PARTITIONING clause is parsed but ignored by all storage engines."
))
parser
.
lastErrorAsWarn
()
}
AlterTableSpec
:
AlterTableSpec
:
TableOptionList
%
prec
higherThanComma
TableOptionList
%
prec
higherThanComma
{
{
...
@@ -1144,19 +1191,21 @@ AlterTableSpec:
...
@@ -1144,19 +1191,21 @@ AlterTableSpec:
}
}
$$
=
op
$$
=
op
}
}
|
"ADD"
ColumnKeywordOpt
ColumnDef
ColumnPosition
|
"ADD"
ColumnKeywordOpt
IfNotExists
ColumnDef
ColumnPosition
{
{
$$
=
&
ast
.
AlterTableSpec
{
$$
=
&
ast
.
AlterTableSpec
{
IfNotExists
:
$
3.
(
bool
),
Tp
:
ast
.
AlterTableAddColumns
,
Tp
:
ast
.
AlterTableAddColumns
,
NewColumns
:
[]*
ast
.
ColumnDef
{$
3
.
(*
ast
.
ColumnDef
)},
NewColumns
:
[]*
ast
.
ColumnDef
{$
4
.
(*
ast
.
ColumnDef
)},
Position
:
$
4
.
(*
ast
.
ColumnPosition
),
Position
:
$
5
.
(*
ast
.
ColumnPosition
),
}
}
}
}
|
"ADD"
ColumnKeywordOpt
'('
ColumnDefList
')'
|
"ADD"
ColumnKeywordOpt
IfNotExists
'('
ColumnDefList
')'
{
{
$$
=
&
ast
.
AlterTableSpec
{
$$
=
&
ast
.
AlterTableSpec
{
IfNotExists
:
$
3.
(
bool
),
Tp
:
ast
.
AlterTableAddColumns
,
Tp
:
ast
.
AlterTableAddColumns
,
NewColumns
:
$
4
.
([]*
ast
.
ColumnDef
),
NewColumns
:
$
5
.
([]*
ast
.
ColumnDef
),
}
}
}
}
|
"ADD"
Constraint
|
"ADD"
Constraint
...
@@ -1167,13 +1216,14 @@ AlterTableSpec:
...
@@ -1167,13 +1216,14 @@ AlterTableSpec:
Constraint
:
constraint
,
Constraint
:
constraint
,
}
}
}
}
|
"ADD"
"PARTITION"
PartitionDefinitionListOpt
|
"ADD"
"PARTITION"
IfNotExists
PartitionDefinitionListOpt
{
{
var
defs
[]*
ast
.
PartitionDefinition
var
defs
[]*
ast
.
PartitionDefinition
if
$
3
!= nil {
if
$
4
!= nil {
defs
=
$
3
.
([]*
ast
.
PartitionDefinition
)
defs
=
$
4
.
([]*
ast
.
PartitionDefinition
)
}
}
$$
=
&
ast
.
AlterTableSpec
{
$$
=
&
ast
.
AlterTableSpec
{
IfNotExists
:
$
3.
(
bool
),
Tp
:
ast
.
AlterTableAddPartitions
,
Tp
:
ast
.
AlterTableAddPartitions
,
PartDefinitions
:
defs
,
PartDefinitions
:
defs
,
}
}
...
@@ -1192,22 +1242,24 @@ AlterTableSpec:
...
@@ -1192,22 +1242,24 @@ AlterTableSpec:
Num
:
getUint64FromNUM
($
3
),
Num
:
getUint64FromNUM
($
3
),
}
}
}
}
|
"DROP"
ColumnKeywordOpt
ColumnName
RestrictOrCascadeOpt
|
"DROP"
ColumnKeywordOpt
IfExists
ColumnName
RestrictOrCascadeOpt
{
{
$$
=
&
ast
.
AlterTableSpec
{
$$
=
&
ast
.
AlterTableSpec
{
IfExists
:
$
3.
(
bool
),
Tp
:
ast
.
AlterTableDropColumn
,
Tp
:
ast
.
AlterTableDropColumn
,
OldColumnName
:
$
3
.
(*
ast
.
ColumnName
),
OldColumnName
:
$
4
.
(*
ast
.
ColumnName
),
}
}
}
}
|
"DROP"
"PRIMARY"
"KEY"
|
"DROP"
"PRIMARY"
"KEY"
{
{
$$
=
&
ast
.
AlterTableSpec
{
Tp
:
ast
.
AlterTableDropPrimaryKey
}
$$
=
&
ast
.
AlterTableSpec
{
Tp
:
ast
.
AlterTableDropPrimaryKey
}
}
}
|
"DROP"
"PARTITION"
PartitionNameList
%
prec
lowerThanComma
|
"DROP"
"PARTITION"
IfExists
PartitionNameList
%
prec
lowerThanComma
{
{
$$
=
&
ast
.
AlterTableSpec
{
$$
=
&
ast
.
AlterTableSpec
{
IfExists
:
$
3.
(
bool
),
Tp
:
ast
.
AlterTableDropPartition
,
Tp
:
ast
.
AlterTableDropPartition
,
PartitionNames
:
$
3
.
([]
model
.
CIStr
),
PartitionNames
:
$
4
.
([]
model
.
CIStr
),
}
}
}
}
|
"TRUNCATE"
"PARTITION"
PartitionNameList
%
prec
lowerThanComma
|
"TRUNCATE"
"PARTITION"
PartitionNameList
%
prec
lowerThanComma
...
@@ -1217,18 +1269,20 @@ AlterTableSpec:
...
@@ -1217,18 +1269,20 @@ AlterTableSpec:
PartitionNames
:
$
3.
([]
model
.
CIStr
),
PartitionNames
:
$
3.
([]
model
.
CIStr
),
}
}
}
}
|
"DROP"
KeyOrIndex
Identifier
|
"DROP"
KeyOrIndex
I
fExists
I
dentifier
{
{
$$
=
&
ast
.
AlterTableSpec
{
$$
=
&
ast
.
AlterTableSpec
{
IfExists
:
$
3.
(
bool
),
Tp
:
ast
.
AlterTableDropIndex
,
Tp
:
ast
.
AlterTableDropIndex
,
Name
:
$
3
,
Name
:
$
4
,
}
}
}
}
|
"DROP"
"FOREIGN"
"KEY"
Symbol
|
"DROP"
"FOREIGN"
"KEY"
IfExists
Symbol
{
{
$$
=
&
ast
.
AlterTableSpec
{
$$
=
&
ast
.
AlterTableSpec
{
IfExists
:
$
4.
(
bool
),
Tp
:
ast
.
AlterTableDropForeignKey
,
Tp
:
ast
.
AlterTableDropForeignKey
,
Name
:
$
4
.
(
string
),
Name
:
$
5
.
(
string
),
}
}
}
}
|
"DISABLE"
"KEYS"
|
"DISABLE"
"KEYS"
...
@@ -1243,21 +1297,23 @@ AlterTableSpec:
...
@@ -1243,21 +1297,23 @@ AlterTableSpec:
Tp
:
ast
.
AlterTableEnableKeys
,
Tp
:
ast
.
AlterTableEnableKeys
,
}
}
}
}
|
"MODIFY"
ColumnKeywordOpt
ColumnDef
ColumnPosition
|
"MODIFY"
ColumnKeywordOpt
IfExists
ColumnDef
ColumnPosition
{
{
$$
=
&
ast
.
AlterTableSpec
{
$$
=
&
ast
.
AlterTableSpec
{
IfExists
:
$
3.
(
bool
),
Tp
:
ast
.
AlterTableModifyColumn
,
Tp
:
ast
.
AlterTableModifyColumn
,
NewColumns
:
[]*
ast
.
ColumnDef
{$
3
.
(*
ast
.
ColumnDef
)},
NewColumns
:
[]*
ast
.
ColumnDef
{$
4
.
(*
ast
.
ColumnDef
)},
Position
:
$
4
.
(*
ast
.
ColumnPosition
),
Position
:
$
5
.
(*
ast
.
ColumnPosition
),
}
}
}
}
|
"CHANGE"
ColumnKeywordOpt
ColumnName
ColumnDef
ColumnPosition
|
"CHANGE"
ColumnKeywordOpt
IfExists
ColumnName
ColumnDef
ColumnPosition
{
{
$$
=
&
ast
.
AlterTableSpec
{
$$
=
&
ast
.
AlterTableSpec
{
IfExists
:
$
3.
(
bool
),
Tp
:
ast
.
AlterTableChangeColumn
,
Tp
:
ast
.
AlterTableChangeColumn
,
OldColumnName
:
$
3
.
(*
ast
.
ColumnName
),
OldColumnName
:
$
4
.
(*
ast
.
ColumnName
),
NewColumns
:
[]*
ast
.
ColumnDef
{$
4
.
(*
ast
.
ColumnDef
)},
NewColumns
:
[]*
ast
.
ColumnDef
{$
5
.
(*
ast
.
ColumnDef
)},
Position
:
$
5
.
(*
ast
.
ColumnPosition
),
Position
:
$
6
.
(*
ast
.
ColumnPosition
),
}
}
}
}
|
"ALTER"
ColumnKeywordOpt
ColumnName
"SET"
"DEFAULT"
SignedLiteral
|
"ALTER"
ColumnKeywordOpt
ColumnName
"SET"
"DEFAULT"
SignedLiteral
...
@@ -1272,6 +1328,18 @@ AlterTableSpec:
...
@@ -1272,6 +1328,18 @@ AlterTableSpec:
NewColumns
:
[]*
ast
.
ColumnDef
{
colDef
},
NewColumns
:
[]*
ast
.
ColumnDef
{
colDef
},
}
}
}
}
|
"ALTER"
ColumnKeywordOpt
ColumnName
"SET"
"DEFAULT"
'('
Expression
')'
{
option
:=
&
ast
.
ColumnOption
{
Expr
:
$
7
}
colDef
:=
&
ast
.
ColumnDef
{
Name
:
$
3.
(*
ast
.
ColumnName
),
Options
:
[]*
ast
.
ColumnOption
{
option
},
}
$$
=
&
ast
.
AlterTableSpec
{
Tp
:
ast
.
AlterTableAlterColumn
,
NewColumns
:
[]*
ast
.
ColumnDef
{
colDef
},
}
}
|
"ALTER"
ColumnKeywordOpt
ColumnName
"DROP"
"DEFAULT"
|
"ALTER"
ColumnKeywordOpt
ColumnName
"DROP"
"DEFAULT"
{
{
colDef
:=
&
ast
.
ColumnDef
{
colDef
:=
&
ast
.
ColumnDef
{
...
@@ -1352,29 +1420,38 @@ AlterAlgorithm:
...
@@ -1352,29 +1420,38 @@ AlterAlgorithm:
{
{
$$
=
ast
.
AlterAlgorithmInstant
$$
=
ast
.
AlterAlgorithmInstant
}
}
|
identifier
{
yylex
.
AppendError
(
ErrUnknownAlterAlgorithm
.
GenWithStackByArgs
($
1
))
return
1
}
LockClauseOpt
:
LockClauseOpt
:
{}
{}
|
LockClause
{}
|
LockClause
{}
LockClause
:
LockClause
:
"LOCK"
eq
"NONE"
"LOCK"
EqOpt
"NONE"
{
{
$$
=
ast
.
LockTypeNone
$$
=
ast
.
LockTypeNone
}
}
|
"LOCK"
eq
"DEFAULT"
|
"LOCK"
EqOpt
"DEFAULT"
{
{
$$
=
ast
.
LockTypeDefault
$$
=
ast
.
LockTypeDefault
}
}
|
"LOCK"
eq
"SHARED"
|
"LOCK"
EqOpt
"SHARED"
{
{
$$
=
ast
.
LockTypeShared
$$
=
ast
.
LockTypeShared
}
}
|
"LOCK"
eq
"EXCLUSIVE"
|
"LOCK"
EqOpt
"EXCLUSIVE"
{
{
$$
=
ast
.
LockTypeExclusive
$$
=
ast
.
LockTypeExclusive
}
}
|
"LOCK"
EqOpt
identifier
{
yylex
.
AppendError
(
ErrUnknownAlterLock
.
GenWithStackByArgs
($
3
))
return
1
}
KeyOrIndex
:
"KEY"
|
"INDEX"
KeyOrIndex
:
"KEY"
|
"INDEX"
...
@@ -1541,7 +1618,6 @@ SplitRegionStmt:
...
@@ -1541,7 +1618,6 @@ SplitRegionStmt:
}
}
}
}
SplitOption
:
SplitOption
:
"BETWEEN"
RowValue
"AND"
RowValue
"REGIONS"
NUM
"BETWEEN"
RowValue
"AND"
RowValue
"REGIONS"
NUM
{
{
...
@@ -1561,33 +1637,33 @@ SplitOption:
...
@@ -1561,33 +1637,33 @@ SplitOption:
/*******************************************************************************************/
/*******************************************************************************************/
AnalyzeTableStmt
:
AnalyzeTableStmt
:
"ANALYZE"
"TABLE"
TableNameList
MaxNumBuckets
"ANALYZE"
"TABLE"
TableNameList
AnalyzeOptionListOpt
{
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
$
3.
([]*
ast
.
TableName
),
MaxNumBuckets
:
$
4.
(
uint64
)
}
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
$
3.
([]*
ast
.
TableName
),
AnalyzeOpts
:
$
4.
([]
ast
.
AnalyzeOpt
),
}
}
}
|
"ANALYZE"
"TABLE"
TableName
"INDEX"
IndexNameList
MaxNumBuckets
|
"ANALYZE"
"TABLE"
TableName
"INDEX"
IndexNameList
AnalyzeOptionListOpt
{
{
$$
=
&
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
,
AnalyzeOpts
:
$
6.
([]
ast
.
AnalyzeOpt
),
}
}
}
|
"ANALYZE"
"INCREMENTAL"
"TABLE"
TableName
"INDEX"
IndexNameList
MaxNumBuckets
|
"ANALYZE"
"INCREMENTAL"
"TABLE"
TableName
"INDEX"
IndexNameList
AnalyzeOptionListOpt
{
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
IndexNames
:
$
6.
([]
model
.
CIStr
),
IndexFlag
:
true
,
Incremental
:
true
,
MaxNumBuckets
:
$
7.
(
uint64
)
}
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
IndexNames
:
$
6.
([]
model
.
CIStr
),
IndexFlag
:
true
,
Incremental
:
true
,
AnalyzeOpts
:
$
7.
([]
ast
.
AnalyzeOpt
),
}
}
}
|
"ANALYZE"
"TABLE"
TableName
"PARTITION"
PartitionNameList
MaxNumBuckets
|
"ANALYZE"
"TABLE"
TableName
"PARTITION"
PartitionNameList
AnalyzeOptionListOpt
{
{
$$
=
&
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
),
AnalyzeOpts
:
$
6.
([]
ast
.
AnalyzeOpt
),}
}
}
|
"ANALYZE"
"TABLE"
TableName
"PARTITION"
PartitionNameList
"INDEX"
IndexNameList
MaxNumBuckets
|
"ANALYZE"
"TABLE"
TableName
"PARTITION"
PartitionNameList
"INDEX"
IndexNameList
AnalyzeOptionListOpt
{
{
$$
=
&
ast
.
AnalyzeTableStmt
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
3.
(*
ast
.
TableName
)},
TableNames
:
[]*
ast
.
TableName
{$
3.
(*
ast
.
TableName
)},
PartitionNames
:
$
5.
([]
model
.
CIStr
),
PartitionNames
:
$
5.
([]
model
.
CIStr
),
IndexNames
:
$
7.
([]
model
.
CIStr
),
IndexNames
:
$
7.
([]
model
.
CIStr
),
IndexFlag
:
true
,
IndexFlag
:
true
,
MaxNumBuckets
:
$
8.
(
uint64
),
AnalyzeOpts
:
$
8.
([]
ast
.
AnalyzeOpt
),
}
}
}
}
|
"ANALYZE"
"INCREMENTAL"
"TABLE"
TableName
"PARTITION"
PartitionNameList
"INDEX"
IndexNameList
MaxNumBuckets
|
"ANALYZE"
"INCREMENTAL"
"TABLE"
TableName
"PARTITION"
PartitionNameList
"INDEX"
IndexNameList
AnalyzeOptionListOpt
{
{
$$
=
&
ast
.
AnalyzeTableStmt
{
$$
=
&
ast
.
AnalyzeTableStmt
{
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
TableNames
:
[]*
ast
.
TableName
{$
4.
(*
ast
.
TableName
)},
...
@@ -1595,17 +1671,45 @@ AnalyzeTableStmt:
...
@@ -1595,17 +1671,45 @@ AnalyzeTableStmt:
IndexNames
:
$
8.
([]
model
.
CIStr
),
IndexNames
:
$
8.
([]
model
.
CIStr
),
IndexFlag
:
true
,
IndexFlag
:
true
,
Incremental
:
true
,
Incremental
:
true
,
MaxNumBuckets
:
$
9.
(
uint64
),
AnalyzeOpts
:
$
9.
([]
ast
.
AnalyzeOpt
),
}
}
}
}
MaxNumBuckets
:
AnalyzeOptionListOpt
:
{
{
$$
=
uint64
(
0
)
$$
=
[]
ast
.
AnalyzeOpt
{}
}
|
"WITH"
AnalyzeOptionList
{
$$
=
$
2.
([]
ast
.
AnalyzeOpt
)
}
}
|
"WITH"
NUM
"BUCKETS"
AnalyzeOptionList
:
AnalyzeOption
{
$$
=
[]
ast
.
AnalyzeOpt
{$
1.
(
ast
.
AnalyzeOpt
)}
}
|
AnalyzeOptionList
','
AnalyzeOption
{
$$
=
append
($
1.
([]
ast
.
AnalyzeOpt
),
$
3.
(
ast
.
AnalyzeOpt
))
}
AnalyzeOption
:
NUM
"BUCKETS"
{
$$
=
ast
.
AnalyzeOpt
{
Type
:
ast
.
AnalyzeOptNumBuckets
,
Value
:
getUint64FromNUM
($
1
)}
}
|
NUM
"TOPN"
{
$$
=
ast
.
AnalyzeOpt
{
Type
:
ast
.
AnalyzeOptNumTopN
,
Value
:
getUint64FromNUM
($
1
)}
}
|
NUM
"CMSKETCH"
"DEPTH"
{
{
$$
=
getUint64FromNUM
($
2
)
$$
=
ast
.
AnalyzeOpt
{
Type
:
ast
.
AnalyzeOptCMSketchDepth
,
Value
:
getUint64FromNUM
($
1
)}
}
|
NUM
"CMSKETCH"
"WIDTH"
{
$$
=
ast
.
AnalyzeOpt
{
Type
:
ast
.
AnalyzeOptCMSketchWidth
,
Value
:
getUint64FromNUM
($
1
)}
}
}
/*******************************************************************************************/
/*******************************************************************************************/
...
@@ -1769,6 +1873,42 @@ PrimaryOpt:
...
@@ -1769,6 +1873,42 @@ PrimaryOpt:
{}
{}
|
"PRIMARY"
|
"PRIMARY"
EnforcedOrNot
:
"ENFORCED"
{
$$
=
true
}
|
"NOT"
"ENFORCED"
{
$$
=
false
}
EnforcedOrNotOpt
:
{
$$
=
true
}
%
prec
lowerThanNot
|
EnforcedOrNot
{
$$
=
$
1
}
EnforcedOrNotOrNotNullOpt
:
//
This
branch
is
needed
to
workaround
the
need
of
a
lookahead
of
2
for
the
grammar
:
//
//
{
[
NOT
]
NULL
|
CHECK
(...)
[
NOT
]
ENFORCED
}
...
"NOT"
"NULL"
{
$$
=
0
}
|
EnforcedOrNotOpt
{
if
($
1.
(
bool
))
{
$$
=
1
}
else
{
$$
=
2
}
}
ColumnOption
:
ColumnOption
:
"NOT"
"NULL"
"NOT"
"NULL"
{
{
...
@@ -1809,11 +1949,30 @@ ColumnOption:
...
@@ -1809,11 +1949,30 @@ ColumnOption:
{
{
$$
=
&
ast
.
ColumnOption
{
Tp
:
ast
.
ColumnOptionComment
,
Expr
:
ast
.
NewValueExpr
($
2
)}
$$
=
&
ast
.
ColumnOption
{
Tp
:
ast
.
ColumnOptionComment
,
Expr
:
ast
.
NewValueExpr
($
2
)}
}
}
|
"CHECK"
'('
Expression
')'
|
"CHECK"
'('
Expression
')'
EnforcedOrNotOrNotNullOpt
{
{
//
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
//
The
CHECK
clause
is
parsed
but
ignored
by
all
storage
engines
.
//
The
CHECK
clause
is
parsed
but
ignored
by
all
storage
engines
.
$$
=
&
ast
.
ColumnOption
{}
//
See
the
branch
named
`
EnforcedOrNotOrNotNullOpt
`.
optionCheck
:=
&
ast
.
ColumnOption
{
Tp
:
ast
.
ColumnOptionCheck
,
Expr
:
$
3
,
Enforced
:
true
,
}
switch
$
5.
(
int
)
{
case
0
:
$$
=
[]*
ast
.
ColumnOption
{
optionCheck
,
{
Tp
:
ast
.
ColumnOptionNotNull
}}
case
1
:
optionCheck
.
Enforced
=
true
$$
=
optionCheck
case
2
:
optionCheck
.
Enforced
=
false
$$
=
optionCheck
default
:
}
yylex
.
AppendError
(
yylex
.
Errorf
(
"The CHECK clause is parsed but ignored by all storage engines."
))
parser
.
lastErrorAsWarn
()
}
}
|
GeneratedAlways
"AS"
'('
Expression
')'
VirtualOrStored
|
GeneratedAlways
"AS"
'('
Expression
')'
VirtualOrStored
{
{
...
@@ -1858,11 +2017,19 @@ VirtualOrStored:
...
@@ -1858,11 +2017,19 @@ VirtualOrStored:
ColumnOptionList
:
ColumnOptionList
:
ColumnOption
ColumnOption
{
{
$$
=
[]*
ast
.
ColumnOption
{$
1.
(*
ast
.
ColumnOption
)}
if
columnOption
,
ok
:=
$
1.
(*
ast
.
ColumnOption
);
ok
{
$$
=
[]*
ast
.
ColumnOption
{
columnOption
}
}
else
{
$$
=
$
1
}
}
}
|
ColumnOptionList
ColumnOption
|
ColumnOptionList
ColumnOption
{
{
$$
=
append
($
1.
([]*
ast
.
ColumnOption
),
$
2.
(*
ast
.
ColumnOption
))
if
columnOption
,
ok
:=
$
2.
(*
ast
.
ColumnOption
);
ok
{
$$
=
append
($
1.
([]*
ast
.
ColumnOption
),
columnOption
)
}
else
{
$$
=
append
($
1.
([]*
ast
.
ColumnOption
),
$
2.
([]*
ast
.
ColumnOption
)...)
}
}
}
ColumnOptionListOpt
:
ColumnOptionListOpt
:
...
@@ -1904,21 +2071,22 @@ ConstraintElem:
...
@@ -1904,21 +2071,22 @@ ConstraintElem:
}
}
$$
=
c
$$
=
c
}
}
|
KeyOrIndex
IndexName
IndexTypeOpt
'('
IndexColNameList
')'
IndexOptionList
|
KeyOrIndex
I
fNotExists
I
ndexName
IndexTypeOpt
'('
IndexColNameList
')'
IndexOptionList
{
{
c
:=
&
ast
.
Constraint
{
c
:=
&
ast
.
Constraint
{
Tp
:
ast
.
ConstraintIndex
,
IfNotExists
:
$
2.
(
bool
),
Keys
:
$
5.
([]*
ast
.
IndexColName
),
Tp
:
ast
.
ConstraintIndex
,
Name
:
$
2.
(
string
),
Keys
:
$
6.
([]*
ast
.
IndexColName
),
Name
:
$
3.
(
string
),
}
}
if
$
7
!= nil {
if
$
8
!= nil {
c
.
Option
=
$
7
.
(*
ast
.
IndexOption
)
c
.
Option
=
$
8
.
(*
ast
.
IndexOption
)
}
}
if
$
3
!= nil {
if
$
4
!= nil {
if
c
.
Option
==
nil
{
if
c
.
Option
==
nil
{
c
.
Option
=
&
ast
.
IndexOption
{}
c
.
Option
=
&
ast
.
IndexOption
{}
}
}
c
.
Option
.
Tp
=
$
3
.
(
model
.
IndexType
)
c
.
Option
.
Tp
=
$
4
.
(
model
.
IndexType
)
}
}
$$
=
c
$$
=
c
}
}
...
@@ -1940,51 +2108,96 @@ ConstraintElem:
...
@@ -1940,51 +2108,96 @@ ConstraintElem:
}
}
$$
=
c
$$
=
c
}
}
|
"FOREIGN"
"KEY"
IndexName
'('
IndexColNameList
')'
ReferDef
|
"FOREIGN"
"KEY"
I
fNotExists
I
ndexName
'('
IndexColNameList
')'
ReferDef
{
{
$$
=
&
ast
.
Constraint
{
$$
=
&
ast
.
Constraint
{
Tp
:
ast
.
ConstraintForeignKey
,
IfNotExists
:
$
3.
(
bool
),
Keys
:
$
5.
([]*
ast
.
IndexColName
),
Tp
:
ast
.
ConstraintForeignKey
,
Name
:
$
3.
(
string
),
Keys
:
$
6.
([]*
ast
.
IndexColName
),
Refer
:
$
7.
(*
ast
.
ReferenceDef
),
Name
:
$
4.
(
string
),
Refer
:
$
8.
(*
ast
.
ReferenceDef
),
}
}
}
}
|
"CHECK"
'('
Expression
')'
EnforcedOrNotOpt
{
$$
=
&
ast
.
Constraint
{
Tp
:
ast
.
ConstraintCheck
,
Expr
:
$
3.
(
ast
.
ExprNode
),
Enforced
:
$
5.
(
bool
),
}
yylex
.
AppendError
(
yylex
.
Errorf
(
"The CHECK clause is parsed but ignored by all storage engines."
))
parser
.
lastErrorAsWarn
()
}
Match
:
"MATCH"
"FULL"
{
$$
=
ast
.
MatchFull
}
|
"MATCH"
"PARTIAL"
{
$$
=
ast
.
MatchPartial
}
|
"MATCH"
"SIMPLE"
{
$$
=
ast
.
MatchSimple
}
MatchOpt
:
{
$$
=
ast
.
MatchNone
}
|
Match
{
$$
=
$
1
yylex
.
AppendError
(
yylex
.
Errorf
(
"The MATCH clause is parsed but ignored by all storage engines."
))
parser
.
lastErrorAsWarn
()
}
ReferDef
:
ReferDef
:
"REFERENCES"
TableName
'('
IndexColNameList
')'
OnDeleteOpt
On
UpdateOpt
"REFERENCES"
TableName
'('
IndexColNameList
')'
MatchOpt
OnDelete
UpdateOpt
{
{
var
onDeleteOpt
*
ast
.
OnDeleteOpt
onDeleteUpdate
:=
$
7.
([
2
]
interface
{})
if
$
6
!= nil {
onDeleteOpt
=
$
6.
(*
ast
.
OnDeleteOpt
)
}
var
onUpdateOpt
*
ast
.
OnUpdateOpt
if
$
7
!= nil {
onUpdateOpt
=
$
7.
(*
ast
.
OnUpdateOpt
)
}
$$
=
&
ast
.
ReferenceDef
{
$$
=
&
ast
.
ReferenceDef
{
Table
:
$
2.
(*
ast
.
TableName
),
Table
:
$
2.
(*
ast
.
TableName
),
IndexColNames
:
$
4.
([]*
ast
.
IndexColName
),
IndexColNames
:
$
4.
([]*
ast
.
IndexColName
),
OnDelete
:
onDeleteOpt
,
OnDelete
:
onDeleteUpdate
[
0
].(*
ast
.
OnDeleteOpt
),
OnUpdate
:
onUpdateOpt
,
OnUpdate
:
onDeleteUpdate
[
1
].(*
ast
.
OnUpdateOpt
),
Match
:
$
6.
(
ast
.
MatchType
),
}
}
}
}
OnDeleteOpt
:
OnDelete
:
{
"ON"
"DELETE"
ReferOpt
$$
=
&
ast
.
OnDeleteOpt
{}
}
%
prec
lowerThanOn
|
"ON"
"DELETE"
ReferOpt
{
{
$$
=
&
ast
.
OnDeleteOpt
{
ReferOpt
:
$
3.
(
ast
.
ReferOptionType
)}
$$
=
&
ast
.
OnDeleteOpt
{
ReferOpt
:
$
3.
(
ast
.
ReferOptionType
)}
}
}
OnUpdateOpt
:
OnUpdate
:
"ON"
"UPDATE"
ReferOpt
{
$$
=
&
ast
.
OnUpdateOpt
{
ReferOpt
:
$
3.
(
ast
.
ReferOptionType
)}
}
OnDeleteUpdateOpt
:
{
{
$$
=
&
ast
.
OnUpdateOpt
{
}
$$
=
[
2
]
interface
{}{&
ast
.
OnDeleteOpt
{},
&
ast
.
OnUpdateOpt
{}
}
}
%
prec
lowerThanOn
}
%
prec
lowerThanOn
|
"ON"
"UPDATE"
ReferOpt
|
OnDelete
%
prec
lowerThanOn
{
{
$$
=
&
ast
.
OnUpdateOpt
{
ReferOpt
:
$
3.
(
ast
.
ReferOptionType
)}
$$
=
[
2
]
interface
{}{$
1
,
&
ast
.
OnUpdateOpt
{}}
}
|
OnUpdate
%
prec
lowerThanOn
{
$$
=
[
2
]
interface
{}{&
ast
.
OnDeleteOpt
{},
$
1
}
}
|
OnDelete
OnUpdate
{
$$
=
[
2
]
interface
{}{$
1
,
$
2
}
}
|
OnUpdate
OnDelete
{
$$
=
[
2
]
interface
{}{$
2
,
$
1
}
}
}
ReferOpt
:
ReferOpt
:
...
@@ -2004,6 +2217,12 @@ ReferOpt:
...
@@ -2004,6 +2217,12 @@ ReferOpt:
{
{
$$
=
ast
.
ReferOptionNoAction
$$
=
ast
.
ReferOptionNoAction
}
}
|
"SET"
"DEFAULT"
{
$$
=
ast
.
ReferOptionSetDefault
yylex
.
AppendError
(
yylex
.
Errorf
(
"The SET DEFAULT clause is parsed but ignored by all storage engines."
))
parser
.
lastErrorAsWarn
()
}
/*
/*
*
The
DEFAULT
clause
specifies
a
default
value
for
a
column
.
*
The
DEFAULT
clause
specifies
a
default
value
for
a
column
.
...
@@ -2064,27 +2283,28 @@ NumLiteral:
...
@@ -2064,27 +2283,28 @@ NumLiteral:
CreateIndexStmt
:
CreateIndexStmt
:
"CREATE"
CreateIndexStmtUnique
"INDEX"
Identifier
IndexTypeOpt
"ON"
TableName
'('
IndexColNameList
')'
IndexOptionList
LockClauseOpt
"CREATE"
CreateIndexStmtUnique
"INDEX"
I
fNotExists
I
dentifier
IndexTypeOpt
"ON"
TableName
'('
IndexColNameList
')'
IndexOptionList
LockClauseOpt
{
{
var
indexOption
*
ast
.
IndexOption
var
indexOption
*
ast
.
IndexOption
if
$
1
1
!= nil {
if
$
1
2
!= nil {
indexOption
=
$
1
1
.
(*
ast
.
IndexOption
)
indexOption
=
$
1
2
.
(*
ast
.
IndexOption
)
if
indexOption
.
Tp
==
model
.
IndexTypeInvalid
{
if
indexOption
.
Tp
==
model
.
IndexTypeInvalid
{
if
$
5
!= nil {
if
$
6
!= nil {
indexOption
.
Tp
=
$
5
.
(
model
.
IndexType
)
indexOption
.
Tp
=
$
6
.
(
model
.
IndexType
)
}
}
}
}
}
else
{
}
else
{
indexOption
=
&
ast
.
IndexOption
{}
indexOption
=
&
ast
.
IndexOption
{}
if
$
5
!= nil {
if
$
6
!= nil {
indexOption
.
Tp
=
$
5
.
(
model
.
IndexType
)
indexOption
.
Tp
=
$
6
.
(
model
.
IndexType
)
}
}
}
}
$$
=
&
ast
.
CreateIndexStmt
{
$$
=
&
ast
.
CreateIndexStmt
{
Unique
:
$
2.
(
bool
),
Unique
:
$
2.
(
bool
),
IndexName
:
$
4
,
IfNotExists
:
$
4.
(
bool
),
Table
:
$
7.
(*
ast
.
TableName
),
IndexName
:
$
5
,
IndexColNames
:
$
9.
([]*
ast
.
IndexColName
),
Table
:
$
8.
(*
ast
.
TableName
),
IndexColNames
:
$
10.
([]*
ast
.
IndexColName
),
IndexOption
:
indexOption
,
IndexOption
:
indexOption
,
}
}
}
}
...
@@ -2734,26 +2954,26 @@ DoStmt:
...
@@ -2734,26 +2954,26 @@ DoStmt:
*
*
*******************************************************************/
*******************************************************************/
DeleteFromStmt
:
DeleteFromStmt
:
"DELETE"
TableOptimizerHints
PriorityOpt
QuickOptional
IgnoreOptional
"FROM"
TableName
IndexHintListOpt
WhereClauseOptional
OrderByOptional
LimitClause
"DELETE"
TableOptimizerHints
PriorityOpt
QuickOptional
IgnoreOptional
"FROM"
TableName
TableAsNameOpt
IndexHintListOpt
WhereClauseOptional
OrderByOptional
LimitClause
{
{
//
Single
Table
//
Single
Table
tn
:=
$
7.
(*
ast
.
TableName
)
tn
:=
$
7.
(*
ast
.
TableName
)
tn
.
IndexHints
=
$
8
.
([]*
ast
.
IndexHint
)
tn
.
IndexHints
=
$
9
.
([]*
ast
.
IndexHint
)
join
:=
&
ast
.
Join
{
Left
:
&
ast
.
TableSource
{
Source
:
tn
},
Right
:
nil
}
join
:=
&
ast
.
Join
{
Left
:
&
ast
.
TableSource
{
Source
:
tn
,
AsName
:
$
8.
(
model
.
CIStr
)
},
Right
:
nil
}
x
:=
&
ast
.
DeleteStmt
{
x
:=
&
ast
.
DeleteStmt
{
TableRefs
:
&
ast
.
TableRefsClause
{
TableRefs
:
join
},
TableRefs
:
&
ast
.
TableRefsClause
{
TableRefs
:
join
},
Priority
:
$
3.
(
mysql
.
PriorityEnum
),
Priority
:
$
3.
(
mysql
.
PriorityEnum
),
Quick
:
$
4.
(
bool
),
Quick
:
$
4.
(
bool
),
IgnoreErr
:
$
5.
(
bool
),
IgnoreErr
:
$
5.
(
bool
),
}
}
if
$
9
!= nil {
x
.
Where
=
$
9.
(
ast
.
ExprNode
)
}
if
$
10
!= nil {
if
$
10
!= nil {
x
.
Order
=
$
10.
(*
ast
.
OrderByClaus
e
)
x
.
Where
=
$
10.
(
ast
.
ExprNod
e
)
}
}
if
$
11
!= nil {
if
$
11
!= nil {
x
.
Limit
=
$
11.
(*
ast
.
Limit
)
x
.
Order
=
$
11.
(*
ast
.
OrderByClause
)
}
if
$
12
!= nil {
x
.
Limit
=
$
12.
(*
ast
.
Limit
)
}
}
$$
=
x
$$
=
x
...
@@ -2815,15 +3035,16 @@ DropIndexStmt:
...
@@ -2815,15 +3035,16 @@ DropIndexStmt:
}
}
DropTableStmt
:
DropTableStmt
:
"DROP"
TableOrTable
s
TableNameList
RestrictOrCascadeOpt
"DROP"
OptTemporary
TableOrTables
IfExist
s
TableNameList
RestrictOrCascadeOpt
{
{
$$
=
&
ast
.
DropTableStmt
{
Tables
:
$
3.
([]*
ast
.
TableName
),
IsView
:
false
}
$$
=
&
ast
.
DropTableStmt
{
IfExists
:
$
4.
(
bool
),
Tables
:
$
5.
([]*
ast
.
TableName
),
IsView
:
false
,
IsTemporary
:
$
2.
(
bool
)}
}
|
"DROP"
TableOrTables
"IF"
"EXISTS"
TableNameList
RestrictOrCascadeOpt
{
$$
=
&
ast
.
DropTableStmt
{
IfExists
:
true
,
Tables
:
$
5.
([]*
ast
.
TableName
),
IsView
:
false
}
}
}
OptTemporary
:
/*
empty
*/
{
$$=
false
;
}
|
"TEMPORARY"
{
$$=
true
;
}
;
DropViewStmt
:
DropViewStmt
:
"DROP"
"VIEW"
TableNameList
RestrictOrCascadeOpt
"DROP"
"VIEW"
TableNameList
RestrictOrCascadeOpt
{
{
...
@@ -3499,7 +3720,7 @@ identifier | UnReservedKeyword | NotKeywordToken | TiDBKeyword
...
@@ -3499,7 +3720,7 @@ identifier | UnReservedKeyword | NotKeywordToken | TiDBKeyword
UnReservedKeyword
:
UnReservedKeyword
:
"ACTION"
|
"ASCII"
|
"AUTO_INCREMENT"
|
"AFTER"
|
"ALWAYS"
|
"AVG"
|
"BEGIN"
|
"BIT"
|
"BOOL"
|
"BOOLEAN"
|
"BTREE"
|
"BYTE"
|
"CLEANUP"
|
"CHARSET"
%
prec
charsetKwd
"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"
|
"EN
FORCED"
|
"EN
GINE"
|
"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"
|
"OPEN"
|
"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"
...
@@ -3511,19 +3732,19 @@ UnReservedKeyword:
...
@@ -3511,19 +3732,19 @@ UnReservedKeyword:
|
"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"
|
"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"
|
"RECOVER"
|
"CIPHER"
|
"SUBJECT"
|
"ISSUER"
|
"X509"
|
"NEVER"
|
"EXPIRE"
|
"ACCOUNT"
|
"INCREMENTAL"
|
"CPU"
|
"MEMORY"
|
"BLOCK"
|
"IO"
|
"CONTEXT"
|
"SWITCHES"
|
"PAGE"
|
"FAULTS"
|
"IPC"
|
"SWAPS"
|
"SOURCE"
|
"TRADITIONAL"
|
"SQL_BUFFER_RESULT"
|
"DIRECTORY"
|
"HISTORY"
|
"LIST"
|
"NODEGROUP"
|
"SYSTEM_TIME"
|
"TRADITIONAL"
|
"SQL_BUFFER_RESULT"
|
"DIRECTORY"
|
"HISTORY"
|
"LIST"
|
"NODEGROUP"
|
"SYSTEM_TIME"
|
"PARTIAL"
|
"SIMPLE"
|
"REMOVE"
|
"PARTITIONING"
|
"STORAGE"
|
"DISK"
|
"STATS_SAMPLE_PAGES"
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"
|
"
CMSKETCH"
|
"DDL"
|
"DEPTH
"
|
"DRAINER"
|
"JOBS"
|
"JOB"
|
"NODE_ID"
|
"NODE_STATE"
|
"PUMP"
|
"STATS"
|
"STATS_META"
|
"STATS_HISTOGRAMS"
|
"STATS_BUCKETS"
|
"STATS_HEALTHY"
|
"TIDB"
|
"TIDB_HJ"
|
"TIDB_SMJ"
|
"TIDB_INLJ"
|
"
SPLIT"
|
"OPTIMISTIC"
|
"PESSIMISTIC
"
|
"REGIONS"
|
"TIDB_SMJ"
|
"TIDB_INLJ"
|
"
TIDB_HASHAGG"
|
"TIDB_STREAMAGG"
|
"TOPN"
|
"SPLIT"
|
"OPTIMISTIC"
|
"PESSIMISTIC"
|
"WIDTH
"
|
"REGIONS"
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"
|
"INPLACE"
|
"INSTANT"
|
"INTERNAL"
|
"MIN"
|
"MAX"
|
"MAX_EXECUTION_TIME"
|
"NOW"
|
"RECENT"
|
"POSITION"
|
"SUBDATE"
|
"SUBSTRING"
|
"SUM"
|
"INPLACE"
|
"INSTANT"
|
"INTERNAL"
|
"MIN"
|
"MAX"
|
"MAX_EXECUTION_TIME"
|
"NOW"
|
"RECENT"
|
"POSITION"
|
"SUBDATE"
|
"SUBSTRING"
|
"SUM"
|
"STD"
|
"STDDEV"
|
"STDDEV_POP"
|
"STDDEV_SAMP"
|
"VARIANCE"
|
"VAR_POP"
|
"VAR_SAMP"
|
"STD"
|
"STDDEV"
|
"STDDEV_POP"
|
"STDDEV_SAMP"
|
"VARIANCE"
|
"VAR_POP"
|
"VAR_SAMP"
|
"TIMESTAMPADD"
|
"TIMESTAMPDIFF"
|
"TOKUDB_DEFAULT"
|
"TOKUDB_FAST"
|
"TOKUDB_LZMA"
|
"TOKUDB_QUICKLZ"
|
"TOKUDB_SNAPPY"
|
"TOKUDB_SMALL"
|
"TOKUDB_UNCOMPRESSED"
|
"TOKUDB_ZLIB"
|
"TOP"
|
"TRIM"
|
"NEXT_ROW_ID"
|
"TIMESTAMPADD"
|
"TIMESTAMPDIFF"
|
"TOKUDB_DEFAULT"
|
"TOKUDB_FAST"
|
"TOKUDB_LZMA"
|
"TOKUDB_QUICKLZ"
|
"TOKUDB_SNAPPY"
|
"TOKUDB_SMALL"
|
"TOKUDB_UNCOMPRESSED"
|
"TOKUDB_ZLIB"
|
"TOP"
|
"TRIM"
|
"NEXT_ROW_ID"
|
"EXPR_PUSHDOWN_BLACKLIST"
|
"EXPR_PUSHDOWN_BLACKLIST"
|
"OPT_RULE_BLACKLIST"
/************************************************************************************
/************************************************************************************
*
*
...
@@ -4853,6 +5074,15 @@ CastType:
...
@@ -4853,6 +5074,15 @@ CastType:
x
.
Collate
=
mysql
.
DefaultCollationName
x
.
Collate
=
mysql
.
DefaultCollationName
$$
=
x
$$
=
x
}
}
|
"DOUBLE"
{
x
:=
types
.
NewFieldType
(
mysql
.
TypeDouble
)
x
.
Flen
,
x
.
Decimal
=
mysql
.
GetDefaultFieldLengthAndDecimalForCast
(
mysql
.
TypeDouble
)
x
.
Flag
|=
mysql
.
BinaryFlag
x
.
Charset
=
charset
.
CharsetBin
x
.
Collate
=
charset
.
CollationBin
$$
=
x
}
PriorityOpt
:
PriorityOpt
:
{
{
...
@@ -5004,6 +5234,9 @@ SelectStmtBasic:
...
@@ -5004,6 +5234,9 @@ SelectStmtBasic:
Distinct
:
$
2.
(*
ast
.
SelectStmtOpts
).
Distinct
,
Distinct
:
$
2.
(*
ast
.
SelectStmtOpts
).
Distinct
,
Fields
:
$
3.
(*
ast
.
FieldList
),
Fields
:
$
3.
(*
ast
.
FieldList
),
}
}
if
st
.
SelectStmtOpts
.
TableHints
!= nil {
st
.
TableHints
=
st
.
SelectStmtOpts
.
TableHints
}
$$
=
st
$$
=
st
}
}
...
@@ -5027,9 +5260,6 @@ SelectStmtFromTable:
...
@@ -5027,9 +5260,6 @@ SelectStmtFromTable:
{
{
st
:=
$
1.
(*
ast
.
SelectStmt
)
st
:=
$
1.
(*
ast
.
SelectStmt
)
st
.
From
=
$
3.
(*
ast
.
TableRefsClause
)
st
.
From
=
$
3.
(*
ast
.
TableRefsClause
)
if
st
.
SelectStmtOpts
.
TableHints
!= nil {
st
.
TableHints
=
st
.
SelectStmtOpts
.
TableHints
}
lastField
:=
st
.
Fields
.
Fields
[
len
(
st
.
Fields
.
Fields
)-
1
]
lastField
:=
st
.
Fields
.
Fields
[
len
(
st
.
Fields
.
Fields
)-
1
]
if
lastField
.
Expr
!= nil && lastField.AsName.O == "" {
if
lastField
.
Expr
!= nil && lastField.AsName.O == "" {
lastEnd
:=
parser
.
endOffset
(&
yyS
[
yypt
-
5
])
lastEnd
:=
parser
.
endOffset
(&
yyS
[
yypt
-
5
])
...
@@ -5778,6 +6008,14 @@ TableOptimizerHintOpt:
...
@@ -5778,6 +6008,14 @@ TableOptimizerHintOpt:
{
{
$$
=
&
ast
.
TableOptimizerHint
{
HintName
:
model
.
NewCIStr
($
1
),
Tables
:
$
3.
([]
model
.
CIStr
)}
$$
=
&
ast
.
TableOptimizerHint
{
HintName
:
model
.
NewCIStr
($
1
),
Tables
:
$
3.
([]
model
.
CIStr
)}
}
}
|
tidbHASHAGG
'('
')'
{
$$
=
&
ast
.
TableOptimizerHint
{
HintName
:
model
.
NewCIStr
($
1
)}
}
|
tidbSTREAMAGG
'('
')'
{
$$
=
&
ast
.
TableOptimizerHint
{
HintName
:
model
.
NewCIStr
($
1
)}
}
|
maxExecutionTime
'('
NUM
')'
|
maxExecutionTime
'('
NUM
')'
{
{
$$
=
&
ast
.
TableOptimizerHint
{
HintName
:
model
.
NewCIStr
($
1
),
MaxExecutionTime
:
getUint64FromNUM
($
3
)}
$$
=
&
ast
.
TableOptimizerHint
{
HintName
:
model
.
NewCIStr
($
1
),
MaxExecutionTime
:
getUint64FromNUM
($
3
)}
...
@@ -6503,6 +6741,32 @@ AdminStmt:
...
@@ -6503,6 +6741,32 @@ AdminStmt:
Tp
:
ast
.
AdminReloadExprPushdownBlacklist
,
Tp
:
ast
.
AdminReloadExprPushdownBlacklist
,
}
}
}
}
|
"ADMIN"
"RELOAD"
"OPT_RULE_BLACKLIST"
{
$$
=
&
ast
.
AdminStmt
{
Tp
:
ast
.
AdminReloadOptRuleBlacklist
,
}
}
|
"ADMIN"
"PLUGINS"
"ENABLE"
PluginNameList
{
$$
=
&
ast
.
AdminStmt
{
Tp
:
ast
.
AdminPluginEnable
,
Plugins
:
$
4.
([]
string
),
}
}
|
"ADMIN"
"PLUGINS"
"DISABLE"
PluginNameList
{
$$
=
&
ast
.
AdminStmt
{
Tp
:
ast
.
AdminPluginDisable
,
Plugins
:
$
4.
([]
string
),
}
}
|
"ADMIN"
"CLEANUP"
"TABLE"
"LOCK"
TableNameList
{
$$
=
&
ast
.
CleanupTableLockStmt
{
Tables
:
$
5.
([]*
ast
.
TableName
),
}
}
AdminShowSlow
:
AdminShowSlow
:
"RECENT"
NUM
"RECENT"
NUM
...
@@ -6609,6 +6873,21 @@ ShowStmt:
...
@@ -6609,6 +6873,21 @@ ShowStmt:
User
:
$
4.
(*
auth
.
UserIdentity
),
User
:
$
4.
(*
auth
.
UserIdentity
),
}
}
}
}
|
"SHOW"
"TABLE"
TableName
"REGIONS"
{
$$
=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowRegions
,
Table
:
$
3.
(*
ast
.
TableName
),
}
}
|
"SHOW"
"TABLE"
TableName
"INDEX"
Identifier
"REGIONS"
{
$$
=
&
ast
.
ShowStmt
{
Tp
:
ast
.
ShowRegions
,
Table
:
$
3.
(*
ast
.
TableName
),
IndexName
:
model
.
NewCIStr
($
5
),
}
}
|
"SHOW"
"GRANTS"
|
"SHOW"
"GRANTS"
{
{
//
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
...
@@ -7236,11 +7515,6 @@ TableElement:
...
@@ -7236,11 +7515,6 @@ TableElement:
{
{
$$
=
$
1.
(*
ast
.
Constraint
)
$$
=
$
1.
(*
ast
.
Constraint
)
}
}
|
"CHECK"
'('
Expression
')'
{
/*
Nothing
to
do
now
*/
$$
=
nil
}
TableElementList
:
TableElementList
:
TableElement
TableElement
...
@@ -7343,6 +7617,23 @@ TableOption:
...
@@ -7343,6 +7617,23 @@ TableOption:
{
{
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionStatsPersistent
}
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionStatsPersistent
}
}
}
|
"STATS_SAMPLE_PAGES"
EqOpt
LengthNum
{
//
Parse
it
but
will
ignore
it
.
//
In
MySQL
,
STATS_SAMPLE_PAGES
=
N
(
Where
0
<
N
<=
65535
)
or
STAS_SAMPLE_PAGES
=
DEFAULT
.
//
Cause
we
don
't support it, so we don'
t
check
range
of
the
value
.
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionStatsSamplePages
,
UintValue
:
$
3.
(
uint64
)}
yylex
.
AppendError
(
yylex
.
Errorf
(
"The STATS_SAMPLE_PAGES is parsed but ignored by all storage engines."
))
parser
.
lastErrorAsWarn
()
}
|
"STATS_SAMPLE_PAGES"
EqOpt
"DEFAULT"
{
//
Parse
it
but
will
ignore
it
.
//
In
MySQL
,
default
value
of
STATS_SAMPLE_PAGES
is
0.
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionStatsSamplePages
,
UintValue
:
0
}
yylex
.
AppendError
(
yylex
.
Errorf
(
"The STATS_SAMPLE_PAGES is parsed but ignored by all storage engines."
))
parser
.
lastErrorAsWarn
()
}
|
"SHARD_ROW_ID_BITS"
EqOpt
LengthNum
|
"SHARD_ROW_ID_BITS"
EqOpt
LengthNum
{
{
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionShardRowID
,
UintValue
:
$
3.
(
uint64
)}
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionShardRowID
,
UintValue
:
$
3.
(
uint64
)}
...
@@ -7356,6 +7647,20 @@ TableOption:
...
@@ -7356,6 +7647,20 @@ TableOption:
//
Parse
it
but
will
ignore
it
.
//
Parse
it
but
will
ignore
it
.
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionPackKeys
}
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionPackKeys
}
}
}
|
"STORAGE"
"MEMORY"
{
//
Parse
it
but
will
ignore
it
.
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionStorageMedia
,
StrValue
:
"MEMORY"
}
yylex
.
AppendError
(
yylex
.
Errorf
(
"The STORAGE clause is parsed but ignored by all storage engines."
))
parser
.
lastErrorAsWarn
()
}
|
"STORAGE"
"DISK"
{
//
Parse
it
but
will
ignore
it
.
$$
=
&
ast
.
TableOption
{
Tp
:
ast
.
TableOptionStorageMedia
,
StrValue
:
"DISK"
}
yylex
.
AppendError
(
yylex
.
Errorf
(
"The STORAGE clause is parsed but ignored by all storage engines."
))
parser
.
lastErrorAsWarn
()
}
StatsPersistentVal
:
StatsPersistentVal
:
"DEFAULT"
"DEFAULT"
...
@@ -7956,6 +8261,7 @@ OptCharset:
...
@@ -7956,6 +8261,7 @@ OptCharset:
CharsetKw
:
CharsetKw
:
"CHARACTER"
"SET"
"CHARACTER"
"SET"
|
"CHARSET"
|
"CHARSET"
|
"CHAR"
"SET"
OptCollate
:
OptCollate
:
{
{
...
@@ -8604,11 +8910,11 @@ PrivType:
...
@@ -8604,11 +8910,11 @@ PrivType:
}
}
|
"CREATE"
"TEMPORARY"
"TABLES"
|
"CREATE"
"TEMPORARY"
"TABLES"
{
{
$$
=
mysql
.
PrivilegeType
(
0
)
$$
=
mysql
.
CreateTMPTablePriv
}
}
|
"LOCK"
"TABLES"
|
"LOCK"
"TABLES"
{
{
$$
=
mysql
.
PrivilegeType
(
0
)
$$
=
mysql
.
LockTablesPriv
}
}
|
"CREATE"
"VIEW"
|
"CREATE"
"VIEW"
{
{
...
@@ -8628,15 +8934,15 @@ PrivType:
...
@@ -8628,15 +8934,15 @@ PrivType:
}
}
|
"CREATE"
"ROUTINE"
|
"CREATE"
"ROUTINE"
{
{
$$
=
mysql
.
PrivilegeType
(
0
)
$$
=
mysql
.
CreateRoutinePriv
}
}
|
"ALTER"
"ROUTINE"
|
"ALTER"
"ROUTINE"
{
{
$$
=
mysql
.
PrivilegeType
(
0
)
$$
=
mysql
.
AlterRoutinePriv
}
}
|
"EVENT"
|
"EVENT"
{
{
$$
=
mysql
.
PrivilegeType
(
0
)
$$
=
mysql
.
EventPriv
}
}
ObjectType
:
ObjectType
:
...
@@ -8823,16 +9129,16 @@ FieldItemList:
...
@@ -8823,16 +9129,16 @@ FieldItemList:
}
}
FieldItem
:
FieldItem
:
"TERMINATED"
"BY"
stringLit
"TERMINATED"
"BY"
FieldTerminator
{
{
$$
=
&
ast
.
FieldItem
{
$$
=
&
ast
.
FieldItem
{
Type
:
ast
.
Terminated
,
Type
:
ast
.
Terminated
,
Value
:
$
3
,
Value
:
$
3
.
(
string
)
,
}
}
}
}
|
"OPTIONALLY"
"ENCLOSED"
"BY"
stringLit
|
"OPTIONALLY"
"ENCLOSED"
"BY"
FieldTerminator
{
{
str
:=
$
4
str
:=
$
4
.
(
string
)
if
str
!= "\\" && len(str) > 1 {
if
str
!= "\\" && len(str) > 1 {
yylex
.
AppendError
(
ErrWrongFieldTerminators
.
GenWithStackByArgs
())
yylex
.
AppendError
(
ErrWrongFieldTerminators
.
GenWithStackByArgs
())
return
1
return
1
...
@@ -8842,9 +9148,9 @@ FieldItem:
...
@@ -8842,9 +9148,9 @@ FieldItem:
Value
:
str
,
Value
:
str
,
}
}
}
}
|
"ENCLOSED"
"BY"
stringLit
|
"ENCLOSED"
"BY"
FieldTerminator
{
{
str
:=
$
3
str
:=
$
3
.
(
string
)
if
str
!= "\\" && len(str) > 1 {
if
str
!= "\\" && len(str) > 1 {
yylex
.
AppendError
(
ErrWrongFieldTerminators
.
GenWithStackByArgs
())
yylex
.
AppendError
(
ErrWrongFieldTerminators
.
GenWithStackByArgs
())
return
1
return
1
...
@@ -8854,9 +9160,9 @@ FieldItem:
...
@@ -8854,9 +9160,9 @@ FieldItem:
Value
:
str
,
Value
:
str
,
}
}
}
}
|
"ESCAPED"
"BY"
stringLit
|
"ESCAPED"
"BY"
FieldTerminator
{
{
str
:=
$
3
str
:=
$
3
.
(
string
)
if
str
!= "\\" && len(str) > 1 {
if
str
!= "\\" && len(str) > 1 {
yylex
.
AppendError
(
ErrWrongFieldTerminators
.
GenWithStackByArgs
())
yylex
.
AppendError
(
ErrWrongFieldTerminators
.
GenWithStackByArgs
())
return
1
return
1
...
@@ -8867,6 +9173,20 @@ FieldItem:
...
@@ -8867,6 +9173,20 @@ FieldItem:
}
}
}
}
FieldTerminator
:
stringLit
{
$$
=
$
1
}
|
hexLit
{
$$
=
$
1.
(
ast
.
BinaryLiteral
).
ToString
()
}
|
bitLit
{
$$
=
$
1.
(
ast
.
BinaryLiteral
).
ToString
()
}
Lines
:
Lines
:
{
{
$$
=
&
ast
.
LinesClause
{
Terminated
:
"
\n
"
}
$$
=
&
ast
.
LinesClause
{
Terminated
:
"
\n
"
}
...
...
vendor/github.com/pingcap/parser/test.sh
浏览文件 @
ed7d982a
{
{
mv
go.mod1 go.mod
mv
go.mod1 go.mod
mv
go.sum1 go.sum
mv
go.sum1 go.sum
GO111MODULE
=
on go
test
-
race
-covermode
=
atomic
-coverprofile
=
coverage.txt
./...
GO111MODULE
=
on go
test
-
p
1
-race
-covermode
=
atomic
-coverprofile
=
coverage.txt
-coverpkg
=
./...
./...
}
||
{
}
||
{
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
浏览文件 @
ed7d982a
...
@@ -299,6 +299,8 @@ func (ft *FieldType) RestoreAsCastType(ctx *format.RestoreCtx) {
...
@@ -299,6 +299,8 @@ func (ft *FieldType) RestoreAsCastType(ctx *format.RestoreCtx) {
}
}
case
mysql
.
TypeJSON
:
case
mysql
.
TypeJSON
:
ctx
.
WriteKeyWord
(
"JSON"
)
ctx
.
WriteKeyWord
(
"JSON"
)
case
mysql
.
TypeDouble
:
ctx
.
WriteKeyWord
(
"DOUBLE"
)
}
}
}
}
...
...
vendor/github.com/pingcap/parser/yy_parser.go
浏览文件 @
ed7d982a
...
@@ -34,6 +34,8 @@ const (
...
@@ -34,6 +34,8 @@ const (
codeWrongArgument
=
terror
.
ErrCode
(
mysql
.
ErrWrongArguments
)
codeWrongArgument
=
terror
.
ErrCode
(
mysql
.
ErrWrongArguments
)
codeWrongFieldTerminators
=
terror
.
ErrCode
(
mysql
.
ErrWrongFieldTerminators
)
codeWrongFieldTerminators
=
terror
.
ErrCode
(
mysql
.
ErrWrongFieldTerminators
)
codeTooBigDisplayWidth
=
terror
.
ErrCode
(
mysql
.
ErrTooBigDisplaywidth
)
codeTooBigDisplayWidth
=
terror
.
ErrCode
(
mysql
.
ErrTooBigDisplaywidth
)
codeErrUnknownAlterLock
=
terror
.
ErrCode
(
mysql
.
ErrUnknownAlterLock
)
codeErrUnknownAlterAlgorithm
=
terror
.
ErrCode
(
mysql
.
ErrUnknownAlterAlgorithm
)
)
)
var
(
var
(
...
@@ -51,7 +53,10 @@ var (
...
@@ -51,7 +53,10 @@ var (
ErrWrongFieldTerminators
=
terror
.
ClassParser
.
New
(
codeWrongFieldTerminators
,
mysql
.
MySQLErrName
[
mysql
.
ErrWrongFieldTerminators
])
ErrWrongFieldTerminators
=
terror
.
ClassParser
.
New
(
codeWrongFieldTerminators
,
mysql
.
MySQLErrName
[
mysql
.
ErrWrongFieldTerminators
])
// ErrTooBigDisplayWidth returns for data display width exceed limit .
// ErrTooBigDisplayWidth returns for data display width exceed limit .
ErrTooBigDisplayWidth
=
terror
.
ClassParser
.
New
(
codeTooBigDisplayWidth
,
mysql
.
MySQLErrName
[
mysql
.
ErrTooBigDisplaywidth
])
ErrTooBigDisplayWidth
=
terror
.
ClassParser
.
New
(
codeTooBigDisplayWidth
,
mysql
.
MySQLErrName
[
mysql
.
ErrTooBigDisplaywidth
])
// ErrUnknownAlterLock returns for no alter lock type found error.
ErrUnknownAlterLock
=
terror
.
ClassParser
.
New
(
codeErrUnknownAlterLock
,
mysql
.
MySQLErrName
[
mysql
.
ErrUnknownAlterLock
])
// ErrUnknownAlterAlgorithm returns for no alter algorithm found error.
ErrUnknownAlterAlgorithm
=
terror
.
ClassParser
.
New
(
codeErrUnknownAlterAlgorithm
,
mysql
.
MySQLErrName
[
mysql
.
ErrUnknownAlterAlgorithm
])
// 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})?([^*]|\*+[^*/])*\*+\/`
)
...
@@ -68,6 +73,8 @@ func init() {
...
@@ -68,6 +73,8 @@ func init() {
codeWrongArgument
:
mysql
.
ErrWrongArguments
,
codeWrongArgument
:
mysql
.
ErrWrongArguments
,
codeWrongFieldTerminators
:
mysql
.
ErrWrongFieldTerminators
,
codeWrongFieldTerminators
:
mysql
.
ErrWrongFieldTerminators
,
codeTooBigDisplayWidth
:
mysql
.
ErrTooBigDisplaywidth
,
codeTooBigDisplayWidth
:
mysql
.
ErrTooBigDisplaywidth
,
codeErrUnknownAlterLock
:
mysql
.
ErrUnknownAlterLock
,
codeErrUnknownAlterAlgorithm
:
mysql
.
ErrUnknownAlterAlgorithm
,
}
}
terror
.
ErrClassToMySQLCodes
[
terror
.
ClassParser
]
=
parserMySQLErrCodes
terror
.
ErrClassToMySQLCodes
[
terror
.
ClassParser
]
=
parserMySQLErrCodes
}
}
...
...
vendor/github.com/pingcap/tidb/sessionctx/stmtctx/stmtctx.go
浏览文件 @
ed7d982a
...
@@ -21,6 +21,7 @@ import (
...
@@ -21,6 +21,7 @@ import (
"time"
"time"
"github.com/pingcap/parser"
"github.com/pingcap/parser"
"github.com/pingcap/parser/model"
"github.com/pingcap/parser/mysql"
"github.com/pingcap/parser/mysql"
"github.com/pingcap/tidb/util/execdetails"
"github.com/pingcap/tidb/util/execdetails"
"github.com/pingcap/tidb/util/memory"
"github.com/pingcap/tidb/util/memory"
...
@@ -69,6 +70,11 @@ type StatementContext struct {
...
@@ -69,6 +70,11 @@ type StatementContext struct {
BatchCheck
bool
BatchCheck
bool
InNullRejectCheck
bool
InNullRejectCheck
bool
AllowInvalidDate
bool
AllowInvalidDate
bool
// CastStrToIntStrict is used to control the way we cast float format string to int.
// If ConvertStrToIntStrict is false, we convert it to a valid float string first,
// then cast the float string to int string. Otherwise, we cast string to integer
// prefix in a strict way, only extract 0-9 and (+ or - in first bit).
CastStrToIntStrict
bool
// mu struct holds variables that change during execution.
// mu struct holds variables that change during execution.
mu
struct
{
mu
struct
{
...
@@ -119,8 +125,8 @@ type StatementContext struct {
...
@@ -119,8 +125,8 @@ type StatementContext struct {
RuntimeStatsColl
*
execdetails
.
RuntimeStatsColl
RuntimeStatsColl
*
execdetails
.
RuntimeStatsColl
TableIDs
[]
int64
TableIDs
[]
int64
IndexIDs
[]
int64
IndexIDs
[]
int64
NowTs
time
.
Time
nowTs
time
.
Time
// use this variable for now/current_timestamp calculation/cache for one stmt
SysTs
time
.
Time
stmtTimeCached
bool
StmtType
string
StmtType
string
OriginalSQL
string
OriginalSQL
string
digestMemo
struct
{
digestMemo
struct
{
...
@@ -131,6 +137,21 @@ type StatementContext struct {
...
@@ -131,6 +137,21 @@ type StatementContext struct {
Tables
[]
TableEntry
Tables
[]
TableEntry
}
}
// GetNowTsCached getter for nowTs, if not set get now time and cache it
func
(
sc
*
StatementContext
)
GetNowTsCached
()
time
.
Time
{
if
!
sc
.
stmtTimeCached
{
now
:=
time
.
Now
()
sc
.
nowTs
=
now
sc
.
stmtTimeCached
=
true
}
return
sc
.
nowTs
}
// ResetNowTs resetter for nowTs, clear cached time flag
func
(
sc
*
StatementContext
)
ResetNowTs
()
{
sc
.
stmtTimeCached
=
false
}
// SQLDigest gets normalized and digest for provided sql.
// SQLDigest gets normalized and digest for provided sql.
// it will cache result after first calling.
// it will cache result after first calling.
func
(
sc
*
StatementContext
)
SQLDigest
()
(
normalized
,
sqlDigest
string
)
{
func
(
sc
*
StatementContext
)
SQLDigest
()
(
normalized
,
sqlDigest
string
)
{
...
@@ -345,14 +366,6 @@ func (sc *StatementContext) SetHistogramsNotLoad() {
...
@@ -345,14 +366,6 @@ func (sc *StatementContext) SetHistogramsNotLoad() {
sc
.
mu
.
Unlock
()
sc
.
mu
.
Unlock
()
}
}
// HistogramsNotLoad gets histogramsNotLoad.
func
(
sc
*
StatementContext
)
HistogramsNotLoad
()
bool
{
sc
.
mu
.
Lock
()
notLoad
:=
sc
.
mu
.
histogramsNotLoad
sc
.
mu
.
Unlock
()
return
notLoad
}
// HandleTruncate ignores or returns the error based on the StatementContext state.
// HandleTruncate ignores or returns the error based on the StatementContext state.
func
(
sc
*
StatementContext
)
HandleTruncate
(
err
error
)
error
{
func
(
sc
*
StatementContext
)
HandleTruncate
(
err
error
)
error
{
// TODO: At present we have not checked whether the error can be ignored or treated as warning.
// TODO: At present we have not checked whether the error can be ignored or treated as warning.
...
@@ -446,6 +459,39 @@ func (sc *StatementContext) ShouldIgnoreOverflowError() bool {
...
@@ -446,6 +459,39 @@ func (sc *StatementContext) ShouldIgnoreOverflowError() bool {
return
false
return
false
}
}
// PushDownFlags converts StatementContext to tipb.SelectRequest.Flags.
func
(
sc
*
StatementContext
)
PushDownFlags
()
uint64
{
var
flags
uint64
if
sc
.
InInsertStmt
{
flags
|=
model
.
FlagInInsertStmt
}
else
if
sc
.
InUpdateStmt
||
sc
.
InDeleteStmt
{
flags
|=
model
.
FlagInUpdateOrDeleteStmt
}
else
if
sc
.
InSelectStmt
{
flags
|=
model
.
FlagInSelectStmt
}
if
sc
.
IgnoreTruncate
{
flags
|=
model
.
FlagIgnoreTruncate
}
else
if
sc
.
TruncateAsWarning
{
flags
|=
model
.
FlagTruncateAsWarning
}
if
sc
.
OverflowAsWarning
{
flags
|=
model
.
FlagOverflowAsWarning
}
if
sc
.
IgnoreZeroInDate
{
flags
|=
model
.
FlagIgnoreZeroInDate
}
if
sc
.
DividedByZeroAsWarning
{
flags
|=
model
.
FlagDividedByZeroAsWarning
}
if
sc
.
PadCharToFullLength
{
flags
|=
model
.
FlagPadCharToFullLength
}
if
sc
.
InLoadDataStmt
{
flags
|=
model
.
FlagInLoadDataStmt
}
return
flags
}
// CopTasksDetails returns some useful information of cop-tasks during execution.
// CopTasksDetails returns some useful information of cop-tasks during execution.
func
(
sc
*
StatementContext
)
CopTasksDetails
()
*
CopTasksDetails
{
func
(
sc
*
StatementContext
)
CopTasksDetails
()
*
CopTasksDetails
{
sc
.
mu
.
Lock
()
sc
.
mu
.
Lock
()
...
...
vendor/github.com/pingcap/tidb/types/binary_literal.go
浏览文件 @
ed7d982a
...
@@ -183,6 +183,11 @@ func NewBitLiteral(s string) (BitLiteral, error) {
...
@@ -183,6 +183,11 @@ func NewBitLiteral(s string) (BitLiteral, error) {
return
BitLiteral
(
b
),
nil
return
BitLiteral
(
b
),
nil
}
}
// ToString implement ast.BinaryLiteral interface
func
(
b
BitLiteral
)
ToString
()
string
{
return
BinaryLiteral
(
b
)
.
ToString
()
}
// ParseHexStr parses hexadecimal string literal.
// ParseHexStr parses hexadecimal string literal.
// See https://dev.mysql.com/doc/refman/5.7/en/hexadecimal-literals.html
// See https://dev.mysql.com/doc/refman/5.7/en/hexadecimal-literals.html
func
ParseHexStr
(
s
string
)
(
BinaryLiteral
,
error
)
{
func
ParseHexStr
(
s
string
)
(
BinaryLiteral
,
error
)
{
...
@@ -225,3 +230,8 @@ func NewHexLiteral(s string) (HexLiteral, error) {
...
@@ -225,3 +230,8 @@ func NewHexLiteral(s string) (HexLiteral, error) {
}
}
return
HexLiteral
(
h
),
nil
return
HexLiteral
(
h
),
nil
}
}
// ToString implement ast.BinaryLiteral interface
func
(
b
HexLiteral
)
ToString
()
string
{
return
BinaryLiteral
(
b
)
.
ToString
()
}
vendor/github.com/pingcap/tidb/types/convert.go
浏览文件 @
ed7d982a
...
@@ -362,30 +362,63 @@ func NumberToDuration(number int64, fsp int) (Duration, error) {
...
@@ -362,30 +362,63 @@ func NumberToDuration(number int64, fsp int) (Duration, error) {
// getValidIntPrefix gets prefix of the string which can be successfully parsed as int.
// getValidIntPrefix gets prefix of the string which can be successfully parsed as int.
func
getValidIntPrefix
(
sc
*
stmtctx
.
StatementContext
,
str
string
)
(
string
,
error
)
{
func
getValidIntPrefix
(
sc
*
stmtctx
.
StatementContext
,
str
string
)
(
string
,
error
)
{
floatPrefix
,
err
:=
getValidFloatPrefix
(
sc
,
str
)
if
!
sc
.
CastStrToIntStrict
{
if
err
!=
nil
{
floatPrefix
,
err
:=
getValidFloatPrefix
(
sc
,
str
)
return
floatPrefix
,
errors
.
Trace
(
err
)
if
err
!=
nil
{
return
floatPrefix
,
errors
.
Trace
(
err
)
}
return
floatStrToIntStr
(
sc
,
floatPrefix
,
str
)
}
validLen
:=
0
for
i
:=
0
;
i
<
len
(
str
);
i
++
{
c
:=
str
[
i
]
if
(
c
==
'+'
||
c
==
'-'
)
&&
i
==
0
{
continue
}
if
c
>=
'0'
&&
c
<=
'9'
{
validLen
=
i
+
1
continue
}
break
}
}
return
floatStrToIntStr
(
sc
,
floatPrefix
,
str
)
valid
:=
str
[
:
validLen
]
if
valid
==
""
{
valid
=
"0"
}
if
validLen
==
0
||
validLen
!=
len
(
str
)
{
return
valid
,
errors
.
Trace
(
handleTruncateError
(
sc
,
ErrTruncatedWrongVal
.
GenWithStackByArgs
(
"INTEGER"
,
str
)))
}
return
valid
,
nil
}
}
// roundIntStr is to round
int string
base on the number following dot.
// roundIntStr is to round
a **valid int string**
base on the number following dot.
func
roundIntStr
(
numNextDot
byte
,
intStr
string
)
string
{
func
roundIntStr
(
numNextDot
byte
,
intStr
string
)
string
{
if
numNextDot
<
'5'
{
if
numNextDot
<
'5'
{
return
intStr
return
intStr
}
}
retStr
:=
[]
byte
(
intStr
)
retStr
:=
[]
byte
(
intStr
)
for
i
:=
len
(
intStr
)
-
1
;
i
>=
0
;
i
--
{
idx
:=
len
(
intStr
)
-
1
if
retStr
[
i
]
!=
'9'
{
for
;
idx
>=
1
;
idx
--
{
retStr
[
i
]
++
if
retStr
[
idx
]
!=
'9'
{
retStr
[
idx
]
++
break
break
}
}
if
i
==
0
{
retStr
[
idx
]
=
'0'
retStr
[
i
]
=
'1'
}
if
idx
==
0
{
if
intStr
[
0
]
==
'9'
{
retStr
[
0
]
=
'1'
retStr
=
append
(
retStr
,
'0'
)
}
else
if
isDigit
(
intStr
[
0
])
{
retStr
[
0
]
++
}
else
{
retStr
[
1
]
=
'1'
retStr
=
append
(
retStr
,
'0'
)
retStr
=
append
(
retStr
,
'0'
)
break
}
}
retStr
[
i
]
=
'0'
}
}
return
string
(
retStr
)
return
string
(
retStr
)
}
}
...
@@ -394,6 +427,9 @@ func roundIntStr(numNextDot byte, intStr string) string {
...
@@ -394,6 +427,9 @@ func roundIntStr(numNextDot byte, intStr string) string {
// strconv.ParseInt, we can't parse float first then convert it to string because precision will
// strconv.ParseInt, we can't parse float first then convert it to string because precision will
// be lost. For example, the string value "18446744073709551615" which is the max number of unsigned
// be lost. For example, the string value "18446744073709551615" which is the max number of unsigned
// int will cause some precision to lose. intStr[0] may be a positive and negative sign like '+' or '-'.
// int will cause some precision to lose. intStr[0] may be a positive and negative sign like '+' or '-'.
//
// This func will find serious overflow such as the len of intStr > 20 (without prefix `+/-`)
// however, it will not check whether the intStr overflow BIGINT.
func
floatStrToIntStr
(
sc
*
stmtctx
.
StatementContext
,
validFloat
string
,
oriStr
string
)
(
intStr
string
,
_
error
)
{
func
floatStrToIntStr
(
sc
*
stmtctx
.
StatementContext
,
validFloat
string
,
oriStr
string
)
(
intStr
string
,
_
error
)
{
var
dotIdx
=
-
1
var
dotIdx
=
-
1
var
eIdx
=
-
1
var
eIdx
=
-
1
...
@@ -429,6 +465,7 @@ func floatStrToIntStr(sc *stmtctx.StatementContext, validFloat string, oriStr st
...
@@ -429,6 +465,7 @@ func floatStrToIntStr(sc *stmtctx.StatementContext, validFloat string, oriStr st
}
}
return
intStr
,
nil
return
intStr
,
nil
}
}
// intCnt and digits contain the prefix `+/-` if validFloat[0] is `+/-`
var
intCnt
int
var
intCnt
int
digits
:=
make
([]
byte
,
0
,
len
(
validFloat
))
digits
:=
make
([]
byte
,
0
,
len
(
validFloat
))
if
dotIdx
==
-
1
{
if
dotIdx
==
-
1
{
...
@@ -443,15 +480,18 @@ func floatStrToIntStr(sc *stmtctx.StatementContext, validFloat string, oriStr st
...
@@ -443,15 +480,18 @@ func floatStrToIntStr(sc *stmtctx.StatementContext, validFloat string, oriStr st
if
err
!=
nil
{
if
err
!=
nil
{
return
validFloat
,
errors
.
Trace
(
err
)
return
validFloat
,
errors
.
Trace
(
err
)
}
}
if
exp
>
0
&&
int64
(
intCnt
)
>
(
math
.
MaxInt64
-
int64
(
exp
))
{
intCnt
+=
exp
// (exp + incCnt) overflows MaxInt64.
if
exp
>=
0
&&
(
intCnt
>
21
||
intCnt
<
0
)
{
// MaxInt64 has 19 decimal digits.
// MaxUint64 has 20 decimal digits.
// And the intCnt may contain the len of `+/-`,
// so I use 21 here as the early detection.
sc
.
AppendWarning
(
ErrOverflow
.
GenWithStackByArgs
(
"BIGINT"
,
oriStr
))
sc
.
AppendWarning
(
ErrOverflow
.
GenWithStackByArgs
(
"BIGINT"
,
oriStr
))
return
validFloat
[
:
eIdx
],
nil
return
validFloat
[
:
eIdx
],
nil
}
}
intCnt
+=
exp
if
intCnt
<=
0
{
if
intCnt
<=
0
{
intStr
=
"0"
intStr
=
"0"
if
intCnt
==
0
&&
len
(
digits
)
>
0
{
if
intCnt
==
0
&&
len
(
digits
)
>
0
&&
isDigit
(
digits
[
0
])
{
intStr
=
roundIntStr
(
digits
[
0
],
intStr
)
intStr
=
roundIntStr
(
digits
[
0
],
intStr
)
}
}
return
intStr
,
nil
return
intStr
,
nil
...
@@ -474,11 +514,6 @@ func floatStrToIntStr(sc *stmtctx.StatementContext, validFloat string, oriStr st
...
@@ -474,11 +514,6 @@ func floatStrToIntStr(sc *stmtctx.StatementContext, validFloat string, oriStr st
}
else
{
}
else
{
// convert scientific notation decimal number
// convert scientific notation decimal number
extraZeroCount
:=
intCnt
-
len
(
digits
)
extraZeroCount
:=
intCnt
-
len
(
digits
)
if
extraZeroCount
>
20
{
// Append overflow warning and return to avoid allocating too much memory.
sc
.
AppendWarning
(
ErrOverflow
.
GenWithStackByArgs
(
"BIGINT"
,
oriStr
))
return
validFloat
[
:
eIdx
],
nil
}
intStr
=
string
(
digits
)
+
strings
.
Repeat
(
"0"
,
extraZeroCount
)
intStr
=
string
(
digits
)
+
strings
.
Repeat
(
"0"
,
extraZeroCount
)
}
}
return
intStr
,
nil
return
intStr
,
nil
...
@@ -525,10 +560,10 @@ func ConvertJSONToInt(sc *stmtctx.StatementContext, j json.BinaryJSON, unsigned
...
@@ -525,10 +560,10 @@ func ConvertJSONToInt(sc *stmtctx.StatementContext, j json.BinaryJSON, unsigned
if
!
unsigned
{
if
!
unsigned
{
lBound
:=
IntergerSignedLowerBound
(
mysql
.
TypeLonglong
)
lBound
:=
IntergerSignedLowerBound
(
mysql
.
TypeLonglong
)
uBound
:=
IntergerSignedUpperBound
(
mysql
.
TypeLonglong
)
uBound
:=
IntergerSignedUpperBound
(
mysql
.
TypeLonglong
)
return
ConvertFloatToInt
(
f
,
lBound
,
uBound
,
mysql
.
Type
Double
)
return
ConvertFloatToInt
(
f
,
lBound
,
uBound
,
mysql
.
Type
Longlong
)
}
}
bound
:=
IntergerUnsignedUpperBound
(
mysql
.
TypeLonglong
)
bound
:=
IntergerUnsignedUpperBound
(
mysql
.
TypeLonglong
)
u
,
err
:=
ConvertFloatToUint
(
sc
,
f
,
bound
,
mysql
.
Type
Double
)
u
,
err
:=
ConvertFloatToUint
(
sc
,
f
,
bound
,
mysql
.
Type
Longlong
)
return
int64
(
u
),
errors
.
Trace
(
err
)
return
int64
(
u
),
errors
.
Trace
(
err
)
case
json
.
TypeCodeString
:
case
json
.
TypeCodeString
:
str
:=
string
(
hack
.
String
(
j
.
GetString
()))
str
:=
string
(
hack
.
String
(
j
.
GetString
()))
...
@@ -552,8 +587,7 @@ func ConvertJSONToFloat(sc *stmtctx.StatementContext, j json.BinaryJSON) (float6
...
@@ -552,8 +587,7 @@ func ConvertJSONToFloat(sc *stmtctx.StatementContext, j json.BinaryJSON) (float6
case
json
.
TypeCodeInt64
:
case
json
.
TypeCodeInt64
:
return
float64
(
j
.
GetInt64
()),
nil
return
float64
(
j
.
GetInt64
()),
nil
case
json
.
TypeCodeUint64
:
case
json
.
TypeCodeUint64
:
u
,
err
:=
ConvertIntToUint
(
sc
,
j
.
GetInt64
(),
IntergerUnsignedUpperBound
(
mysql
.
TypeLonglong
),
mysql
.
TypeLonglong
)
return
float64
(
j
.
GetUint64
()),
nil
return
float64
(
u
),
errors
.
Trace
(
err
)
case
json
.
TypeCodeFloat64
:
case
json
.
TypeCodeFloat64
:
return
j
.
GetFloat64
(),
nil
return
j
.
GetFloat64
(),
nil
case
json
.
TypeCodeString
:
case
json
.
TypeCodeString
:
...
@@ -580,6 +614,10 @@ func ConvertJSONToDecimal(sc *stmtctx.StatementContext, j json.BinaryJSON) (*MyD
...
@@ -580,6 +614,10 @@ func ConvertJSONToDecimal(sc *stmtctx.StatementContext, j json.BinaryJSON) (*MyD
// getValidFloatPrefix gets prefix of string which can be successfully parsed as float.
// getValidFloatPrefix gets prefix of string which can be successfully parsed as float.
func
getValidFloatPrefix
(
sc
*
stmtctx
.
StatementContext
,
s
string
)
(
valid
string
,
err
error
)
{
func
getValidFloatPrefix
(
sc
*
stmtctx
.
StatementContext
,
s
string
)
(
valid
string
,
err
error
)
{
if
(
sc
.
InDeleteStmt
||
sc
.
InSelectStmt
||
sc
.
InUpdateStmt
)
&&
s
==
""
{
return
"0"
,
nil
}
var
(
var
(
sawDot
bool
sawDot
bool
sawDigit
bool
sawDigit
bool
...
@@ -620,7 +658,7 @@ func getValidFloatPrefix(sc *stmtctx.StatementContext, s string) (valid string,
...
@@ -620,7 +658,7 @@ func getValidFloatPrefix(sc *stmtctx.StatementContext, s string) (valid string,
valid
=
"0"
valid
=
"0"
}
}
if
validLen
==
0
||
validLen
!=
len
(
s
)
{
if
validLen
==
0
||
validLen
!=
len
(
s
)
{
err
=
errors
.
Trace
(
handleTruncateError
(
sc
))
err
=
errors
.
Trace
(
handleTruncateError
(
sc
,
ErrTruncated
))
}
}
return
valid
,
err
return
valid
,
err
}
}
...
...
vendor/github.com/pingcap/tidb/types/datum.go
浏览文件 @
ed7d982a
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
package
types
package
types
import
(
import
(
"context"
"fmt"
"fmt"
"math"
"math"
"sort"
"sort"
...
@@ -1245,7 +1244,7 @@ func (d *Datum) convertToMysqlEnum(sc *stmtctx.StatementContext, target *FieldTy
...
@@ -1245,7 +1244,7 @@ func (d *Datum) convertToMysqlEnum(sc *stmtctx.StatementContext, target *FieldTy
e
,
err
=
ParseEnumValue
(
target
.
Elems
,
uintDatum
.
GetUint64
())
e
,
err
=
ParseEnumValue
(
target
.
Elems
,
uintDatum
.
GetUint64
())
}
}
if
err
!=
nil
{
if
err
!=
nil
{
logutil
.
Logger
(
context
.
Background
()
)
.
Error
(
"convert to MySQL enum failed"
,
zap
.
Error
(
err
))
logutil
.
BgLogger
(
)
.
Error
(
"convert to MySQL enum failed"
,
zap
.
Error
(
err
))
err
=
errors
.
Trace
(
ErrTruncated
)
err
=
errors
.
Trace
(
ErrTruncated
)
}
}
ret
.
SetValue
(
e
)
ret
.
SetValue
(
e
)
...
@@ -1781,14 +1780,14 @@ func (ds *datumsSorter) Swap(i, j int) {
...
@@ -1781,14 +1780,14 @@ func (ds *datumsSorter) Swap(i, j int) {
ds
.
datums
[
i
],
ds
.
datums
[
j
]
=
ds
.
datums
[
j
],
ds
.
datums
[
i
]
ds
.
datums
[
i
],
ds
.
datums
[
j
]
=
ds
.
datums
[
j
],
ds
.
datums
[
i
]
}
}
func
handleTruncateError
(
sc
*
stmtctx
.
StatementContext
)
error
{
func
handleTruncateError
(
sc
*
stmtctx
.
StatementContext
,
err
error
)
error
{
if
sc
.
IgnoreTruncate
{
if
sc
.
IgnoreTruncate
{
return
nil
return
nil
}
}
if
!
sc
.
TruncateAsWarning
{
if
!
sc
.
TruncateAsWarning
{
return
ErrTruncated
return
err
}
}
sc
.
AppendWarning
(
ErrTruncated
)
sc
.
AppendWarning
(
err
)
return
nil
return
nil
}
}
...
...
vendor/github.com/pingcap/tidb/types/fsp.go
浏览文件 @
ed7d982a
...
@@ -86,9 +86,12 @@ func ParseFrac(s string, fsp int) (v int, overflow bool, err error) {
...
@@ -86,9 +86,12 @@ func ParseFrac(s string, fsp int) (v int, overflow bool, err error) {
return
return
}
}
// alignFrac is used to generate alignment frac, like `100` -> `100000`
// alignFrac is used to generate alignment frac, like `100` -> `100000`
,`-100` -> `-100000`
func
alignFrac
(
s
string
,
fsp
int
)
string
{
func
alignFrac
(
s
string
,
fsp
int
)
string
{
sl
:=
len
(
s
)
sl
:=
len
(
s
)
if
sl
>
0
&&
s
[
0
]
==
'-'
{
sl
=
sl
-
1
}
if
sl
<
fsp
{
if
sl
<
fsp
{
return
s
+
strings
.
Repeat
(
"0"
,
fsp
-
sl
)
return
s
+
strings
.
Repeat
(
"0"
,
fsp
-
sl
)
}
}
...
...
vendor/github.com/pingcap/tidb/types/json/binary_functions.go
浏览文件 @
ed7d982a
...
@@ -369,6 +369,49 @@ func (bj BinaryJSON) Modify(pathExprList []PathExpression, values []BinaryJSON,
...
@@ -369,6 +369,49 @@ func (bj BinaryJSON) Modify(pathExprList []PathExpression, values []BinaryJSON,
return
bj
,
nil
return
bj
,
nil
}
}
// ArrayInsert insert a BinaryJSON into the given array cell.
// All path expressions cannot contain * or ** wildcard.
// If any error occurs, the input won't be changed.
func
(
bj
BinaryJSON
)
ArrayInsert
(
pathExpr
PathExpression
,
value
BinaryJSON
)
(
res
BinaryJSON
,
err
error
)
{
// Check the path is a index
if
len
(
pathExpr
.
legs
)
<
1
{
return
bj
,
ErrInvalidJSONPathArrayCell
}
parentPath
,
lastLeg
:=
pathExpr
.
popOneLastLeg
()
if
lastLeg
.
typ
!=
pathLegIndex
{
return
bj
,
ErrInvalidJSONPathArrayCell
}
// Find the target array
obj
,
exists
:=
bj
.
Extract
([]
PathExpression
{
parentPath
})
if
!
exists
||
obj
.
TypeCode
!=
TypeCodeArray
{
return
bj
,
nil
}
idx
:=
lastLeg
.
arrayIndex
count
:=
obj
.
GetElemCount
()
if
idx
>=
count
{
idx
=
count
}
// Insert into the array
newArray
:=
make
([]
BinaryJSON
,
0
,
count
+
1
)
for
i
:=
0
;
i
<
idx
;
i
++
{
elem
:=
obj
.
arrayGetElem
(
i
)
newArray
=
append
(
newArray
,
elem
)
}
newArray
=
append
(
newArray
,
value
)
for
i
:=
idx
;
i
<
count
;
i
++
{
elem
:=
obj
.
arrayGetElem
(
i
)
newArray
=
append
(
newArray
,
elem
)
}
obj
=
buildBinaryArray
(
newArray
)
bj
,
err
=
bj
.
Modify
([]
PathExpression
{
parentPath
},
[]
BinaryJSON
{
obj
},
ModifySet
)
if
err
!=
nil
{
return
bj
,
err
}
return
bj
,
nil
}
// Remove removes the elements indicated by pathExprList from JSON.
// Remove removes the elements indicated by pathExprList from JSON.
func
(
bj
BinaryJSON
)
Remove
(
pathExprList
[]
PathExpression
)
(
BinaryJSON
,
error
)
{
func
(
bj
BinaryJSON
)
Remove
(
pathExprList
[]
PathExpression
)
(
BinaryJSON
,
error
)
{
for
_
,
pathExpr
:=
range
pathExprList
{
for
_
,
pathExpr
:=
range
pathExprList
{
...
...
vendor/github.com/pingcap/tidb/types/json/constants.go
浏览文件 @
ed7d982a
...
@@ -216,6 +216,8 @@ var (
...
@@ -216,6 +216,8 @@ var (
ErrInvalidJSONPathWildcard
=
terror
.
ClassJSON
.
New
(
mysql
.
ErrInvalidJSONPathWildcard
,
mysql
.
MySQLErrName
[
mysql
.
ErrInvalidJSONPathWildcard
])
ErrInvalidJSONPathWildcard
=
terror
.
ClassJSON
.
New
(
mysql
.
ErrInvalidJSONPathWildcard
,
mysql
.
MySQLErrName
[
mysql
.
ErrInvalidJSONPathWildcard
])
// ErrInvalidJSONContainsPathType means invalid JSON contains path type.
// ErrInvalidJSONContainsPathType means invalid JSON contains path type.
ErrInvalidJSONContainsPathType
=
terror
.
ClassJSON
.
New
(
mysql
.
ErrInvalidJSONContainsPathType
,
mysql
.
MySQLErrName
[
mysql
.
ErrInvalidJSONContainsPathType
])
ErrInvalidJSONContainsPathType
=
terror
.
ClassJSON
.
New
(
mysql
.
ErrInvalidJSONContainsPathType
,
mysql
.
MySQLErrName
[
mysql
.
ErrInvalidJSONContainsPathType
])
// ErrInvalidJSONPathArrayCell means invalid JSON path for an array cell.
ErrInvalidJSONPathArrayCell
=
terror
.
ClassJSON
.
New
(
mysql
.
ErrInvalidJSONPathArrayCell
,
mysql
.
MySQLErrName
[
mysql
.
ErrInvalidJSONPathArrayCell
])
)
)
func
init
()
{
func
init
()
{
...
@@ -225,6 +227,7 @@ func init() {
...
@@ -225,6 +227,7 @@ func init() {
mysql
.
ErrInvalidJSONData
:
mysql
.
ErrInvalidJSONData
,
mysql
.
ErrInvalidJSONData
:
mysql
.
ErrInvalidJSONData
,
mysql
.
ErrInvalidJSONPathWildcard
:
mysql
.
ErrInvalidJSONPathWildcard
,
mysql
.
ErrInvalidJSONPathWildcard
:
mysql
.
ErrInvalidJSONPathWildcard
,
mysql
.
ErrInvalidJSONContainsPathType
:
mysql
.
ErrInvalidJSONContainsPathType
,
mysql
.
ErrInvalidJSONContainsPathType
:
mysql
.
ErrInvalidJSONContainsPathType
,
mysql
.
ErrInvalidJSONPathArrayCell
:
mysql
.
ErrInvalidJSONPathArrayCell
,
}
}
}
}
...
...
vendor/github.com/pingcap/tidb/types/mydecimal.go
浏览文件 @
ed7d982a
...
@@ -107,6 +107,14 @@ var (
...
@@ -107,6 +107,14 @@ var (
zeroMyDecimal
=
MyDecimal
{}
zeroMyDecimal
=
MyDecimal
{}
)
)
// get the zero of MyDecimal with the specified result fraction digits
func
zeroMyDecimalWithFrac
(
frac
int8
)
MyDecimal
{
zero
:=
MyDecimal
{}
zero
.
digitsFrac
=
frac
zero
.
resultFrac
=
frac
return
zero
}
// add adds a and b and carry, returns the sum and new carry.
// add adds a and b and carry, returns the sum and new carry.
func
add
(
a
,
b
,
carry
int32
)
(
int32
,
int32
)
{
func
add
(
a
,
b
,
carry
int32
)
(
int32
,
int32
)
{
sum
:=
a
+
b
+
carry
sum
:=
a
+
b
+
carry
...
@@ -1556,7 +1564,7 @@ func doSub(from1, from2, to *MyDecimal) (cmp int, err error) {
...
@@ -1556,7 +1564,7 @@ func doSub(from1, from2, to *MyDecimal) (cmp int, err error) {
if
to
==
nil
{
if
to
==
nil
{
return
0
,
nil
return
0
,
nil
}
}
*
to
=
zeroMyDecimal
*
to
=
zeroMyDecimal
WithFrac
(
to
.
resultFrac
)
return
0
,
nil
return
0
,
nil
}
}
}
}
...
@@ -1911,7 +1919,7 @@ func DecimalMul(from1, from2, to *MyDecimal) error {
...
@@ -1911,7 +1919,7 @@ func DecimalMul(from1, from2, to *MyDecimal) error {
idx
++
idx
++
/* We got decimal zero */
/* We got decimal zero */
if
idx
==
end
{
if
idx
==
end
{
*
to
=
zeroMyDecimal
*
to
=
zeroMyDecimal
WithFrac
(
to
.
resultFrac
)
break
break
}
}
}
}
...
@@ -2010,7 +2018,7 @@ func doDivMod(from1, from2, to, mod *MyDecimal, fracIncr int) error {
...
@@ -2010,7 +2018,7 @@ func doDivMod(from1, from2, to, mod *MyDecimal, fracIncr int) error {
}
}
if
prec1
<=
0
{
if
prec1
<=
0
{
/* short-circuit everything: from1 == 0 */
/* short-circuit everything: from1 == 0 */
*
to
=
zeroMyDecimal
*
to
=
zeroMyDecimal
WithFrac
(
to
.
resultFrac
)
return
nil
return
nil
}
}
prec1
-=
countLeadingZeroes
((
prec1
-
1
)
%
digitsPerWord
,
from1
.
wordBuf
[
idx1
])
prec1
-=
countLeadingZeroes
((
prec1
-
1
)
%
digitsPerWord
,
from1
.
wordBuf
[
idx1
])
...
...
vendor/github.com/pingcap/tidb/types/mytime.go
浏览文件 @
ed7d982a
...
@@ -70,8 +70,9 @@ func (t MysqlTime) Microsecond() int {
...
@@ -70,8 +70,9 @@ func (t MysqlTime) Microsecond() int {
func
(
t
MysqlTime
)
Weekday
()
gotime
.
Weekday
{
func
(
t
MysqlTime
)
Weekday
()
gotime
.
Weekday
{
// TODO: Consider time_zone variable.
// TODO: Consider time_zone variable.
t1
,
err
:=
t
.
GoTime
(
gotime
.
Local
)
t1
,
err
:=
t
.
GoTime
(
gotime
.
Local
)
// allow invalid dates
if
err
!=
nil
{
if
err
!=
nil
{
return
0
return
t1
.
Weekday
()
}
}
return
t1
.
Weekday
()
return
t1
.
Weekday
()
}
}
...
...
vendor/github.com/pingcap/tidb/types/time.go
浏览文件 @
ed7d982a
...
@@ -15,7 +15,6 @@ package types
...
@@ -15,7 +15,6 @@ package types
import
(
import
(
"bytes"
"bytes"
"context"
"fmt"
"fmt"
"math"
"math"
"regexp"
"regexp"
...
@@ -305,7 +304,7 @@ func (t Time) ToNumber() *MyDecimal {
...
@@ -305,7 +304,7 @@ func (t Time) ToNumber() *MyDecimal {
s
,
err
:=
t
.
DateFormat
(
tfStr
)
s
,
err
:=
t
.
DateFormat
(
tfStr
)
if
err
!=
nil
{
if
err
!=
nil
{
logutil
.
Logger
(
context
.
Background
()
)
.
Error
(
"[fatal] never happen because we've control the format!"
)
logutil
.
BgLogger
(
)
.
Error
(
"[fatal] never happen because we've control the format!"
)
}
}
if
t
.
Fsp
>
0
{
if
t
.
Fsp
>
0
{
...
@@ -1470,7 +1469,7 @@ func checkDateRange(t MysqlTime) error {
...
@@ -1470,7 +1469,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
(
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
month
))
return
errors
.
Trace
(
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
fmt
.
Sprintf
(
"%d-%d-%d"
,
year
,
month
,
day
)
))
}
}
maxDay
:=
31
maxDay
:=
31
...
@@ -1484,7 +1483,7 @@ func checkMonthDay(year, month, day int, allowInvalidDate bool) error {
...
@@ -1484,7 +1483,7 @@ func checkMonthDay(year, month, day int, allowInvalidDate bool) error {
}
}
if
day
<
0
||
day
>
maxDay
{
if
day
<
0
||
day
>
maxDay
{
return
errors
.
Trace
(
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
day
))
return
errors
.
Trace
(
ErrIncorrectDatetimeValue
.
GenWithStackByArgs
(
fmt
.
Sprintf
(
"%d-%d-%d"
,
year
,
month
,
day
)
))
}
}
return
nil
return
nil
}
}
...
...
vendor/github.com/pingcap/tidb/util/logutil/log.go
浏览文件 @
ed7d982a
...
@@ -330,6 +330,11 @@ func Logger(ctx context.Context) *zap.Logger {
...
@@ -330,6 +330,11 @@ func Logger(ctx context.Context) *zap.Logger {
return
zaplog
.
L
()
return
zaplog
.
L
()
}
}
// BgLogger is alias of `logutil.BgLogger()`
func
BgLogger
()
*
zap
.
Logger
{
return
zaplog
.
L
()
}
// WithConnID attaches connId to context.
// WithConnID attaches connId to context.
func
WithConnID
(
ctx
context
.
Context
,
connID
uint32
)
context
.
Context
{
func
WithConnID
(
ctx
context
.
Context
,
connID
uint32
)
context
.
Context
{
var
logger
*
zap
.
Logger
var
logger
*
zap
.
Logger
...
...
vendor/github.com/pingcap/tidb/util/memory/action.go
浏览文件 @
ed7d982a
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
package
memory
package
memory
import
(
import
(
"
contex
t"
"
fm
t"
"sync"
"sync"
"github.com/pingcap/parser/mysql"
"github.com/pingcap/parser/mysql"
...
@@ -29,12 +29,22 @@ type ActionOnExceed interface {
...
@@ -29,12 +29,22 @@ type ActionOnExceed interface {
// Action will be called when memory usage exceeds memory quota by the
// Action will be called when memory usage exceeds memory quota by the
// corresponding Tracker.
// corresponding Tracker.
Action
(
t
*
Tracker
)
Action
(
t
*
Tracker
)
// SetLogHook binds a log hook which will be triggered and log an detailed
// message for the out-of-memory sql.
SetLogHook
(
hook
func
(
uint64
))
}
}
// LogOnExceed logs a warning only once when memory usage exceeds memory quota.
// LogOnExceed logs a warning only once when memory usage exceeds memory quota.
type
LogOnExceed
struct
{
type
LogOnExceed
struct
{
mutex
sync
.
Mutex
// For synchronization.
mutex
sync
.
Mutex
// For synchronization.
acted
bool
acted
bool
ConnID
uint64
logHook
func
(
uint64
)
}
// SetLogHook sets a hook for LogOnExceed.
func
(
a
*
LogOnExceed
)
SetLogHook
(
hook
func
(
uint64
))
{
a
.
logHook
=
hook
}
}
// Action logs a warning only once when memory usage exceeds memory quota.
// Action logs a warning only once when memory usage exceeds memory quota.
...
@@ -43,16 +53,26 @@ func (a *LogOnExceed) Action(t *Tracker) {
...
@@ -43,16 +53,26 @@ func (a *LogOnExceed) Action(t *Tracker) {
defer
a
.
mutex
.
Unlock
()
defer
a
.
mutex
.
Unlock
()
if
!
a
.
acted
{
if
!
a
.
acted
{
a
.
acted
=
true
a
.
acted
=
true
logutil
.
Logger
(
context
.
Background
())
.
Warn
(
"memory exceeds quota"
,
if
a
.
logHook
==
nil
{
zap
.
Error
(
errMemExceedThreshold
.
GenWithStackByArgs
(
t
.
label
,
t
.
BytesConsumed
(),
t
.
bytesLimit
,
t
.
String
())))
logutil
.
BgLogger
()
.
Warn
(
"memory exceeds quota"
,
return
zap
.
Error
(
errMemExceedThreshold
.
GenWithStackByArgs
(
t
.
label
,
t
.
BytesConsumed
(),
t
.
bytesLimit
,
t
.
String
())))
return
}
a
.
logHook
(
a
.
ConnID
)
}
}
}
}
// PanicOnExceed panics when memory usage exceeds memory quota.
// PanicOnExceed panics when memory usage exceeds memory quota.
type
PanicOnExceed
struct
{
type
PanicOnExceed
struct
{
mutex
sync
.
Mutex
// For synchronization.
mutex
sync
.
Mutex
// For synchronization.
acted
bool
acted
bool
ConnID
uint64
logHook
func
(
uint64
)
}
// SetLogHook sets a hook for PanicOnExceed.
func
(
a
*
PanicOnExceed
)
SetLogHook
(
hook
func
(
uint64
))
{
a
.
logHook
=
hook
}
}
// Action panics when memory usage exceeds memory quota.
// Action panics when memory usage exceeds memory quota.
...
@@ -64,7 +84,10 @@ func (a *PanicOnExceed) Action(t *Tracker) {
...
@@ -64,7 +84,10 @@ func (a *PanicOnExceed) Action(t *Tracker) {
}
}
a
.
acted
=
true
a
.
acted
=
true
a
.
mutex
.
Unlock
()
a
.
mutex
.
Unlock
()
panic
(
PanicMemoryExceed
+
t
.
String
())
if
a
.
logHook
!=
nil
{
a
.
logHook
(
a
.
ConnID
)
}
panic
(
PanicMemoryExceed
+
fmt
.
Sprintf
(
"[conn_id=%d]"
,
a
.
ConnID
))
}
}
var
(
var
(
...
...
vendor/github.com/pingcap/tidb/util/memory/tracker.go
浏览文件 @
ed7d982a
...
@@ -87,11 +87,6 @@ func (t *Tracker) AttachTo(parent *Tracker) {
...
@@ -87,11 +87,6 @@ func (t *Tracker) AttachTo(parent *Tracker) {
t
.
parent
.
Consume
(
t
.
BytesConsumed
())
t
.
parent
.
Consume
(
t
.
BytesConsumed
())
}
}
// Detach detaches this Tracker from its parent.
func
(
t
*
Tracker
)
Detach
()
{
t
.
parent
.
remove
(
t
)
}
func
(
t
*
Tracker
)
remove
(
oldChild
*
Tracker
)
{
func
(
t
*
Tracker
)
remove
(
oldChild
*
Tracker
)
{
t
.
mu
.
Lock
()
t
.
mu
.
Lock
()
defer
t
.
mu
.
Unlock
()
defer
t
.
mu
.
Unlock
()
...
@@ -144,17 +139,13 @@ func (t *Tracker) Consume(bytes int64) {
...
@@ -144,17 +139,13 @@ func (t *Tracker) Consume(bytes int64) {
rootExceed
=
tracker
rootExceed
=
tracker
}
}
if
tracker
.
parent
==
nil
{
for
{
// since we only need a total memory usage during execution,
maxNow
:=
atomic
.
LoadInt64
(
&
tracker
.
maxConsumed
)
// we only record max consumed bytes in root(statement-level) for performance.
consumed
:=
atomic
.
LoadInt64
(
&
tracker
.
bytesConsumed
)
for
{
if
consumed
>
maxNow
&&
!
atomic
.
CompareAndSwapInt64
(
&
tracker
.
maxConsumed
,
maxNow
,
consumed
)
{
maxNow
:=
atomic
.
LoadInt64
(
&
tracker
.
maxConsumed
)
continue
consumed
:=
atomic
.
LoadInt64
(
&
tracker
.
bytesConsumed
)
if
consumed
>
maxNow
&&
!
atomic
.
CompareAndSwapInt64
(
&
tracker
.
maxConsumed
,
maxNow
,
consumed
)
{
continue
}
break
}
}
break
}
}
}
}
if
rootExceed
!=
nil
{
if
rootExceed
!=
nil
{
...
@@ -172,6 +163,21 @@ func (t *Tracker) MaxConsumed() int64 {
...
@@ -172,6 +163,21 @@ func (t *Tracker) MaxConsumed() int64 {
return
atomic
.
LoadInt64
(
&
t
.
maxConsumed
)
return
atomic
.
LoadInt64
(
&
t
.
maxConsumed
)
}
}
// SearchTracker searches the specific tracker under this tracker.
func
(
t
*
Tracker
)
SearchTracker
(
label
string
)
*
Tracker
{
if
t
.
label
.
String
()
==
label
{
return
t
}
t
.
mu
.
Lock
()
defer
t
.
mu
.
Unlock
()
for
_
,
child
:=
range
t
.
mu
.
children
{
if
result
:=
child
.
SearchTracker
(
label
);
result
!=
nil
{
return
result
}
}
return
nil
}
// 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
浏览文件 @
ed7d982a
...
@@ -117,118 +117,118 @@
...
@@ -117,118 +117,118 @@
"revisionTime"
:
"2019-03-07T07:54:52Z"
"revisionTime"
:
"2019-03-07T07:54:52Z"
},
},
{
{
"checksumSHA1"
:
"
gkdPCV8bVezIdBd/w2RiZf7eXTU
="
,
"checksumSHA1"
:
"
8XbJFHOYoZvqf3Fq+J4l90DiGlM
="
,
"path"
:
"github.com/pingcap/parser"
,
"path"
:
"github.com/pingcap/parser"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"
/HUw+IEQjCkicSG7qSMWqRlmvz0
="
,
"checksumSHA1"
:
"
a+3CnBMiJTPiAKhRzxW5ybMR6IY
="
,
"path"
:
"github.com/pingcap/parser/ast"
,
"path"
:
"github.com/pingcap/parser/ast"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"xiv40YqnvHcbIhaEzJqjh5K7ehM="
,
"checksumSHA1"
:
"xiv40YqnvHcbIhaEzJqjh5K7ehM="
,
"path"
:
"github.com/pingcap/parser/auth"
,
"path"
:
"github.com/pingcap/parser/auth"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"EvDXpplklIXmKqLclzWzaN/uHKQ="
,
"checksumSHA1"
:
"EvDXpplklIXmKqLclzWzaN/uHKQ="
,
"path"
:
"github.com/pingcap/parser/charset"
,
"path"
:
"github.com/pingcap/parser/charset"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"Aao6Mul/qqogOwPwM2arBKZkYZs="
,
"checksumSHA1"
:
"Aao6Mul/qqogOwPwM2arBKZkYZs="
,
"path"
:
"github.com/pingcap/parser/format"
,
"path"
:
"github.com/pingcap/parser/format"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"
CvZtQeDgNfQUrGDi5mrv5osJ5F0
="
,
"checksumSHA1"
:
"
f14oFKfX0pSkUM9w9m94eZG5vEw
="
,
"path"
:
"github.com/pingcap/parser/model"
,
"path"
:
"github.com/pingcap/parser/model"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"
02F5sAuKee53HMwsu6fx+iw5cnM
="
,
"checksumSHA1"
:
"
JcR/7pmocSZK4K6tDK2zO54DJWg
="
,
"path"
:
"github.com/pingcap/parser/mysql"
,
"path"
:
"github.com/pingcap/parser/mysql"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"olapD16WCMBU9vrA5PtlERGFfXw="
,
"checksumSHA1"
:
"olapD16WCMBU9vrA5PtlERGFfXw="
,
"path"
:
"github.com/pingcap/parser/opcode"
,
"path"
:
"github.com/pingcap/parser/opcode"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"L6rzy3sJU1RPf7AkJN+0zcwW/YY="
,
"checksumSHA1"
:
"L6rzy3sJU1RPf7AkJN+0zcwW/YY="
,
"path"
:
"github.com/pingcap/parser/terror"
,
"path"
:
"github.com/pingcap/parser/terror"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"
EWbRvJs3Y1KLBaHnwaCHps3t0+4
="
,
"checksumSHA1"
:
"
nWkzWKjheFi0/Ov/0rhc4CUMZLo
="
,
"path"
:
"github.com/pingcap/parser/types"
,
"path"
:
"github.com/pingcap/parser/types"
,
"revision"
:
"
3b36f86d9b7bba02fef99748e3a98069708a64f3
"
,
"revision"
:
"
5238015a66f827e0d0d01e9a1dc19e4e3338c5bf
"
,
"revisionTime"
:
"2019-0
6-12T05:27:18
Z"
"revisionTime"
:
"2019-0
7-30T09:13:57
Z"
},
},
{
{
"checksumSHA1"
:
"
irgF5OsNQZiD589px9hV3scdp8
U="
,
"checksumSHA1"
:
"
KHvXxhiZAHkE8APuMlaAXDOX6e
U="
,
"path"
:
"github.com/pingcap/tidb/sessionctx/stmtctx"
,
"path"
:
"github.com/pingcap/tidb/sessionctx/stmtctx"
,
"revision"
:
"
7d27fa63d349b9d266682a3fff6e732c156cf1db
"
,
"revision"
:
"
13778fe51b713f005e1de848e7994f0a8031678f
"
,
"revisionTime"
:
"2019-0
6-12T12:43:29
Z"
"revisionTime"
:
"2019-0
7-31T03:50:10
Z"
},
},
{
{
"checksumSHA1"
:
"
1INT6BSMg5WA9x4ftRegJBhDJQ
g="
,
"checksumSHA1"
:
"
6pIJUxO/VoKsIdWibgApSW91MR
g="
,
"path"
:
"github.com/pingcap/tidb/types"
,
"path"
:
"github.com/pingcap/tidb/types"
,
"revision"
:
"
7d27fa63d349b9d266682a3fff6e732c156cf1db
"
,
"revision"
:
"
13778fe51b713f005e1de848e7994f0a8031678f
"
,
"revisionTime"
:
"2019-0
6-12T12:43:29
Z"
"revisionTime"
:
"2019-0
7-31T03:50:10
Z"
},
},
{
{
"checksumSHA1"
:
"
HYVqavXulc59n0RyI/D1jZVKon4
="
,
"checksumSHA1"
:
"
gKBD02jzm/d7gn2kX7pXLi+M2ZY
="
,
"path"
:
"github.com/pingcap/tidb/types/json"
,
"path"
:
"github.com/pingcap/tidb/types/json"
,
"revision"
:
"
7d27fa63d349b9d266682a3fff6e732c156cf1db
"
,
"revision"
:
"
13778fe51b713f005e1de848e7994f0a8031678f
"
,
"revisionTime"
:
"2019-0
6-12T12:43:29
Z"
"revisionTime"
:
"2019-0
7-31T03:50:10
Z"
},
},
{
{
"checksumSHA1"
:
"45zWX5Q6D6aTEWtc4p/lbD9WD4o="
,
"checksumSHA1"
:
"45zWX5Q6D6aTEWtc4p/lbD9WD4o="
,
"path"
:
"github.com/pingcap/tidb/types/parser_driver"
,
"path"
:
"github.com/pingcap/tidb/types/parser_driver"
,
"revision"
:
"
7d27fa63d349b9d266682a3fff6e732c156cf1db
"
,
"revision"
:
"
13778fe51b713f005e1de848e7994f0a8031678f
"
,
"revisionTime"
:
"2019-0
6-12T12:43:29
Z"
"revisionTime"
:
"2019-0
7-31T03:50:10
Z"
},
},
{
{
"checksumSHA1"
:
"dI3bZpUsujM1shEDvORNQj5FCN0="
,
"checksumSHA1"
:
"dI3bZpUsujM1shEDvORNQj5FCN0="
,
"path"
:
"github.com/pingcap/tidb/util/execdetails"
,
"path"
:
"github.com/pingcap/tidb/util/execdetails"
,
"revision"
:
"
7d27fa63d349b9d266682a3fff6e732c156cf1db
"
,
"revision"
:
"
13778fe51b713f005e1de848e7994f0a8031678f
"
,
"revisionTime"
:
"2019-0
6-12T12:43:29
Z"
"revisionTime"
:
"2019-0
7-31T03:50:10
Z"
},
},
{
{
"checksumSHA1"
:
"RdbHgQWMHjRtKjqPcTX81k1V3sw="
,
"checksumSHA1"
:
"RdbHgQWMHjRtKjqPcTX81k1V3sw="
,
"path"
:
"github.com/pingcap/tidb/util/hack"
,
"path"
:
"github.com/pingcap/tidb/util/hack"
,
"revision"
:
"
7d27fa63d349b9d266682a3fff6e732c156cf1db
"
,
"revision"
:
"
13778fe51b713f005e1de848e7994f0a8031678f
"
,
"revisionTime"
:
"2019-0
6-12T12:43:29
Z"
"revisionTime"
:
"2019-0
7-31T03:50:10
Z"
},
},
{
{
"checksumSHA1"
:
"
16Cv4I5dFUSCuz0AufzUilN4IOI
="
,
"checksumSHA1"
:
"
5DVxTRYAXrCkrtmTqi/fZfY/Zfk
="
,
"path"
:
"github.com/pingcap/tidb/util/logutil"
,
"path"
:
"github.com/pingcap/tidb/util/logutil"
,
"revision"
:
"
7d27fa63d349b9d266682a3fff6e732c156cf1db
"
,
"revision"
:
"
13778fe51b713f005e1de848e7994f0a8031678f
"
,
"revisionTime"
:
"2019-0
6-12T12:43:29
Z"
"revisionTime"
:
"2019-0
7-31T03:50:10
Z"
},
},
{
{
"checksumSHA1"
:
"OveQu0ABBJmMEwmmthqSRQC2Ef0="
,
"checksumSHA1"
:
"OveQu0ABBJmMEwmmthqSRQC2Ef0="
,
"path"
:
"github.com/pingcap/tidb/util/math"
,
"path"
:
"github.com/pingcap/tidb/util/math"
,
"revision"
:
"
7d27fa63d349b9d266682a3fff6e732c156cf1db
"
,
"revision"
:
"
13778fe51b713f005e1de848e7994f0a8031678f
"
,
"revisionTime"
:
"2019-0
6-12T12:43:29
Z"
"revisionTime"
:
"2019-0
7-31T03:50:10
Z"
},
},
{
{
"checksumSHA1"
:
"
EoqVTAze03xNtGcKbsZT4eYx9bI
="
,
"checksumSHA1"
:
"
loL2JgZDLapEOgfM/XUJI5f0HVs
="
,
"path"
:
"github.com/pingcap/tidb/util/memory"
,
"path"
:
"github.com/pingcap/tidb/util/memory"
,
"revision"
:
"
7d27fa63d349b9d266682a3fff6e732c156cf1db
"
,
"revision"
:
"
13778fe51b713f005e1de848e7994f0a8031678f
"
,
"revisionTime"
:
"2019-0
6-12T12:43:29
Z"
"revisionTime"
:
"2019-0
7-31T03:50:10
Z"
},
},
{
{
"checksumSHA1"
:
"QPIBwDNUFF5Whrnd41S3mkKa4gQ="
,
"checksumSHA1"
:
"QPIBwDNUFF5Whrnd41S3mkKa4gQ="
,
...
@@ -485,68 +485,68 @@
...
@@ -485,68 +485,68 @@
{
{
"checksumSHA1"
:
"aKn1oKcY74N8TRLm3Ayt7Q4bbI4="
,
"checksumSHA1"
:
"aKn1oKcY74N8TRLm3Ayt7Q4bbI4="
,
"path"
:
"vitess.io/vitess/go/bytes2"
,
"path"
:
"vitess.io/vitess/go/bytes2"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
},
},
{
{
"checksumSHA1"
:
"bhE6CGQgZTIgLPp9lnvlKW/47xc="
,
"checksumSHA1"
:
"bhE6CGQgZTIgLPp9lnvlKW/47xc="
,
"path"
:
"vitess.io/vitess/go/hack"
,
"path"
:
"vitess.io/vitess/go/hack"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
},
},
{
{
"checksumSHA1"
:
"
RERqgxOX48XzRIoe5fQzvWSJV0Y
="
,
"checksumSHA1"
:
"
2m7CYdLr+epKNLqWaGHkinr3k7w
="
,
"path"
:
"vitess.io/vitess/go/sqltypes"
,
"path"
:
"vitess.io/vitess/go/sqltypes"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
},
},
{
{
"checksumSHA1"
:
"vAIRxI6MHsq3x1hLQwIyw5AvqtI="
,
"checksumSHA1"
:
"vAIRxI6MHsq3x1hLQwIyw5AvqtI="
,
"path"
:
"vitess.io/vitess/go/vt/log"
,
"path"
:
"vitess.io/vitess/go/vt/log"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
},
},
{
{
"checksumSHA1"
:
"/0K9CBbInkAhioqKX9ocBrJ6AKE="
,
"checksumSHA1"
:
"/0K9CBbInkAhioqKX9ocBrJ6AKE="
,
"path"
:
"vitess.io/vitess/go/vt/proto/binlogdata"
,
"path"
:
"vitess.io/vitess/go/vt/proto/binlogdata"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
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"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
},
},
{
{
"checksumSHA1"
:
"xpcb9NfXMEeHhEPStbJntIfa5GQ="
,
"checksumSHA1"
:
"xpcb9NfXMEeHhEPStbJntIfa5GQ="
,
"path"
:
"vitess.io/vitess/go/vt/proto/topodata"
,
"path"
:
"vitess.io/vitess/go/vt/proto/topodata"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
},
},
{
{
"checksumSHA1"
:
"
Ie634JZ/Np9603mG+PQ0ZkUsaQI
="
,
"checksumSHA1"
:
"
Bv8lucvoH9AnJSYiWX8MIrJl4zY
="
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtgate"
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtgate"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
},
},
{
{
"checksumSHA1"
:
"qz32abYdmm9NfKTc++K0l1EvXXM="
,
"checksumSHA1"
:
"qz32abYdmm9NfKTc++K0l1EvXXM="
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtrpc"
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtrpc"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
},
},
{
{
"checksumSHA1"
:
"
/V79kL29yMBxAofQBL/XqxJv/GE
="
,
"checksumSHA1"
:
"
9Fy+Gm//g50wu30nICOF7HMq4po
="
,
"path"
:
"vitess.io/vitess/go/vt/sqlparser"
,
"path"
:
"vitess.io/vitess/go/vt/sqlparser"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
},
},
{
{
"checksumSHA1"
:
"z9+F/lA1Xrl5S16LKssUH8VL6hs="
,
"checksumSHA1"
:
"z9+F/lA1Xrl5S16LKssUH8VL6hs="
,
"path"
:
"vitess.io/vitess/go/vt/vterrors"
,
"path"
:
"vitess.io/vitess/go/vt/vterrors"
,
"revision"
:
"
22dbada8b16e2c969dd60c77f4e6a346c70d5952
"
,
"revision"
:
"
f93c96c738d7d5bbbcdc03c828f8bf0a5ba16250
"
,
"revisionTime"
:
"2019-0
6-11T03:26:25
Z"
"revisionTime"
:
"2019-0
7-30T06:18:30
Z"
}
}
],
],
"rootPath"
:
"github.com/XiaoMi/soar"
"rootPath"
:
"github.com/XiaoMi/soar"
...
...
vendor/vitess.io/vitess/go/sqltypes/arithmetic.go
浏览文件 @
ed7d982a
...
@@ -26,6 +26,9 @@ import (
...
@@ -26,6 +26,9 @@ import (
"vitess.io/vitess/go/vt/vterrors"
"vitess.io/vitess/go/vt/vterrors"
)
)
// TODO(sougou): change these functions to be more permissive.
// Most string to number conversions should quietly convert to 0.
// numeric represents a numeric value extracted from
// numeric represents a numeric value extracted from
// a Value, used for arithmetic operations.
// a Value, used for arithmetic operations.
type
numeric
struct
{
type
numeric
struct
{
...
@@ -35,6 +38,8 @@ type numeric struct {
...
@@ -35,6 +38,8 @@ type numeric struct {
fval
float64
fval
float64
}
}
var
zeroBytes
=
[]
byte
(
"0"
)
// NullsafeAdd adds two Values in a null-safe manner. A null value
// NullsafeAdd adds two Values in a null-safe manner. A null value
// is treated as 0. If both values are null, then a null is returned.
// is treated as 0. If both values are null, then a null is returned.
// If both values are not null, a numeric value is built
// If both values are not null, a numeric value is built
...
@@ -48,10 +53,10 @@ type numeric struct {
...
@@ -48,10 +53,10 @@ type numeric struct {
// result is preserved.
// result is preserved.
func
NullsafeAdd
(
v1
,
v2
Value
,
resultType
querypb
.
Type
)
(
Value
,
error
)
{
func
NullsafeAdd
(
v1
,
v2
Value
,
resultType
querypb
.
Type
)
(
Value
,
error
)
{
if
v1
.
IsNull
()
{
if
v1
.
IsNull
()
{
return
v2
,
nil
v1
=
MakeTrusted
(
resultType
,
zeroBytes
)
}
}
if
v2
.
IsNull
()
{
if
v2
.
IsNull
()
{
return
v1
,
nil
v2
=
MakeTrusted
(
resultType
,
zeroBytes
)
}
}
lv1
,
err
:=
newNumeric
(
v1
)
lv1
,
err
:=
newNumeric
(
v1
)
...
...
vendor/vitess.io/vitess/go/vt/proto/vtgate/vtgate.pb.go
浏览文件 @
ed7d982a
...
@@ -54,7 +54,7 @@ func (x TransactionMode) String() string {
...
@@ -54,7 +54,7 @@ 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_
d9799c8e1157b676
,
[]
int
{
0
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
int
{
0
}
}
}
// CommitOrder is used to designate which of the ShardSessions
// CommitOrder is used to designate which of the ShardSessions
...
@@ -89,7 +89,7 @@ func (x CommitOrder) String() string {
...
@@ -89,7 +89,7 @@ func (x CommitOrder) String() string {
return
proto
.
EnumName
(
CommitOrder_name
,
int32
(
x
))
return
proto
.
EnumName
(
CommitOrder_name
,
int32
(
x
))
}
}
func
(
CommitOrder
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
func
(
CommitOrder
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_
d9799c8e1157b676
,
[]
int
{
1
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
int
{
1
}
}
}
// Session objects are exchanged like cookies through various
// Session objects are exchanged like cookies through various
...
@@ -138,7 +138,7 @@ func (m *Session) Reset() { *m = Session{} }
...
@@ -138,7 +138,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_
d9799c8e1157b676
,
[]
int
{
0
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -240,7 +240,7 @@ func (m *Session_ShardSession) Reset() { *m = Session_ShardSession{} }
...
@@ -240,7 +240,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_
d9799c8e1157b676
,
[]
int
{
0
,
0
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -298,7 +298,7 @@ func (m *ExecuteRequest) Reset() { *m = ExecuteRequest{} }
...
@@ -298,7 +298,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_
d9799c8e1157b676
,
[]
int
{
1
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -386,7 +386,7 @@ func (m *ExecuteResponse) Reset() { *m = ExecuteResponse{} }
...
@@ -386,7 +386,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_
d9799c8e1157b676
,
[]
int
{
2
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -456,7 +456,7 @@ func (m *ExecuteShardsRequest) Reset() { *m = ExecuteShardsRequest{} }
...
@@ -456,7 +456,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_
d9799c8e1157b676
,
[]
int
{
3
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -551,7 +551,7 @@ func (m *ExecuteShardsResponse) Reset() { *m = ExecuteShardsResponse{} }
...
@@ -551,7 +551,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_
d9799c8e1157b676
,
[]
int
{
4
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -622,7 +622,7 @@ func (m *ExecuteKeyspaceIdsRequest) Reset() { *m = ExecuteKeyspaceIdsReq
...
@@ -622,7 +622,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_
d9799c8e1157b676
,
[]
int
{
5
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -717,7 +717,7 @@ func (m *ExecuteKeyspaceIdsResponse) Reset() { *m = ExecuteKeyspaceIdsRe
...
@@ -717,7 +717,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_
d9799c8e1157b676
,
[]
int
{
6
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -788,7 +788,7 @@ func (m *ExecuteKeyRangesRequest) Reset() { *m = ExecuteKeyRangesRequest
...
@@ -788,7 +788,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_
d9799c8e1157b676
,
[]
int
{
7
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -883,7 +883,7 @@ func (m *ExecuteKeyRangesResponse) Reset() { *m = ExecuteKeyRangesRespon
...
@@ -883,7 +883,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_
d9799c8e1157b676
,
[]
int
{
8
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -956,7 +956,7 @@ func (m *ExecuteEntityIdsRequest) Reset() { *m = ExecuteEntityIdsRequest
...
@@ -956,7 +956,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_
d9799c8e1157b676
,
[]
int
{
9
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1055,7 +1055,7 @@ func (m *ExecuteEntityIdsRequest_EntityId) Reset() { *m = ExecuteEntityI
...
@@ -1055,7 +1055,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_
d9799c8e1157b676
,
[]
int
{
9
,
0
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1115,7 +1115,7 @@ func (m *ExecuteEntityIdsResponse) Reset() { *m = ExecuteEntityIdsRespon
...
@@ -1115,7 +1115,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_
d9799c8e1157b676
,
[]
int
{
10
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1180,7 +1180,7 @@ func (m *ExecuteBatchRequest) Reset() { *m = ExecuteBatchRequest{} }
...
@@ -1180,7 +1180,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_
d9799c8e1157b676
,
[]
int
{
11
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1268,7 +1268,7 @@ func (m *ExecuteBatchResponse) Reset() { *m = ExecuteBatchResponse{} }
...
@@ -1268,7 +1268,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_
d9799c8e1157b676
,
[]
int
{
12
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1328,7 +1328,7 @@ func (m *BoundShardQuery) Reset() { *m = BoundShardQuery{} }
...
@@ -1328,7 +1328,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_
d9799c8e1157b676
,
[]
int
{
13
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1396,7 +1396,7 @@ func (m *ExecuteBatchShardsRequest) Reset() { *m = ExecuteBatchShardsReq
...
@@ -1396,7 +1396,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_
d9799c8e1157b676
,
[]
int
{
14
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1477,7 +1477,7 @@ func (m *ExecuteBatchShardsResponse) Reset() { *m = ExecuteBatchShardsRe
...
@@ -1477,7 +1477,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_
d9799c8e1157b676
,
[]
int
{
15
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1538,7 +1538,7 @@ func (m *BoundKeyspaceIdQuery) Reset() { *m = BoundKeyspaceIdQuery{} }
...
@@ -1538,7 +1538,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_
d9799c8e1157b676
,
[]
int
{
16
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1605,7 +1605,7 @@ func (m *ExecuteBatchKeyspaceIdsRequest) Reset() { *m = ExecuteBatchKeys
...
@@ -1605,7 +1605,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_
d9799c8e1157b676
,
[]
int
{
17
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1686,7 +1686,7 @@ func (m *ExecuteBatchKeyspaceIdsResponse) Reset() { *m = ExecuteBatchKey
...
@@ -1686,7 +1686,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_
d9799c8e1157b676
,
[]
int
{
18
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1750,7 +1750,7 @@ func (m *StreamExecuteRequest) Reset() { *m = StreamExecuteRequest{} }
...
@@ -1750,7 +1750,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_
d9799c8e1157b676
,
[]
int
{
19
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1829,7 +1829,7 @@ func (m *StreamExecuteResponse) Reset() { *m = StreamExecuteResponse{} }
...
@@ -1829,7 +1829,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_
d9799c8e1157b676
,
[]
int
{
20
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1880,7 +1880,7 @@ func (m *StreamExecuteShardsRequest) Reset() { *m = StreamExecuteShardsR
...
@@ -1880,7 +1880,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_
d9799c8e1157b676
,
[]
int
{
21
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -1957,7 +1957,7 @@ func (m *StreamExecuteShardsResponse) Reset() { *m = StreamExecuteShards
...
@@ -1957,7 +1957,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_
d9799c8e1157b676
,
[]
int
{
22
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2009,7 +2009,7 @@ func (m *StreamExecuteKeyspaceIdsRequest) Reset() { *m = StreamExecuteKe
...
@@ -2009,7 +2009,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_
d9799c8e1157b676
,
[]
int
{
23
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2086,7 +2086,7 @@ func (m *StreamExecuteKeyspaceIdsResponse) Reset() { *m = StreamExecuteK
...
@@ -2086,7 +2086,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_
d9799c8e1157b676
,
[]
int
{
24
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2138,7 +2138,7 @@ func (m *StreamExecuteKeyRangesRequest) Reset() { *m = StreamExecuteKeyR
...
@@ -2138,7 +2138,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_
d9799c8e1157b676
,
[]
int
{
25
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2215,7 +2215,7 @@ func (m *StreamExecuteKeyRangesResponse) Reset() { *m = StreamExecuteKey
...
@@ -2215,7 +2215,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_
d9799c8e1157b676
,
[]
int
{
26
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2261,7 +2261,7 @@ func (m *BeginRequest) Reset() { *m = BeginRequest{} }
...
@@ -2261,7 +2261,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_
d9799c8e1157b676
,
[]
int
{
27
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2308,7 +2308,7 @@ func (m *BeginResponse) Reset() { *m = BeginResponse{} }
...
@@ -2308,7 +2308,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_
d9799c8e1157b676
,
[]
int
{
28
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2356,7 +2356,7 @@ func (m *CommitRequest) Reset() { *m = CommitRequest{} }
...
@@ -2356,7 +2356,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_
d9799c8e1157b676
,
[]
int
{
29
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2408,7 +2408,7 @@ func (m *CommitResponse) Reset() { *m = CommitResponse{} }
...
@@ -2408,7 +2408,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_
d9799c8e1157b676
,
[]
int
{
30
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2444,7 +2444,7 @@ func (m *RollbackRequest) Reset() { *m = RollbackRequest{} }
...
@@ -2444,7 +2444,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_
d9799c8e1157b676
,
[]
int
{
31
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2489,7 +2489,7 @@ func (m *RollbackResponse) Reset() { *m = RollbackResponse{} }
...
@@ -2489,7 +2489,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_
d9799c8e1157b676
,
[]
int
{
32
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2525,7 +2525,7 @@ func (m *ResolveTransactionRequest) Reset() { *m = ResolveTransactionReq
...
@@ -2525,7 +2525,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_
d9799c8e1157b676
,
[]
int
{
33
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2581,7 +2581,7 @@ func (m *MessageStreamRequest) Reset() { *m = MessageStreamRequest{} }
...
@@ -2581,7 +2581,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_
d9799c8e1157b676
,
[]
int
{
34
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2656,7 +2656,7 @@ func (m *MessageAckRequest) Reset() { *m = MessageAckRequest{} }
...
@@ -2656,7 +2656,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_
d9799c8e1157b676
,
[]
int
{
35
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2720,7 +2720,7 @@ func (m *IdKeyspaceId) Reset() { *m = IdKeyspaceId{} }
...
@@ -2720,7 +2720,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_
d9799c8e1157b676
,
[]
int
{
36
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2773,7 +2773,7 @@ func (m *MessageAckKeyspaceIdsRequest) Reset() { *m = MessageAckKeyspace
...
@@ -2773,7 +2773,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_
d9799c8e1157b676
,
[]
int
{
37
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2832,7 +2832,7 @@ func (m *ResolveTransactionResponse) Reset() { *m = ResolveTransactionRe
...
@@ -2832,7 +2832,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_
d9799c8e1157b676
,
[]
int
{
38
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -2880,7 +2880,7 @@ type SplitQueryRequest struct {
...
@@ -2880,7 +2880,7 @@ type SplitQueryRequest struct {
// SELECT <cols> FROM <table> WHERE <filter>.
// SELECT <cols> FROM <table> WHERE <filter>.
// It must not contain subqueries nor any of the keywords
// It must not contain subqueries nor any of the keywords
// JOIN, GROUP BY, ORDER BY, LIMIT, DISTINCT.
// JOIN, GROUP BY, ORDER BY, LIMIT, DISTINCT.
// Furthermore, <table> must be a single
“concrete”
table.
// Furthermore, <table> must be a single
"concrete"
table.
// It cannot be a view.
// It cannot be a view.
Query
*
query
.
BoundQuery
`protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
Query
*
query
.
BoundQuery
`protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
// Each generated query-part will be restricted to rows whose values
// Each generated query-part will be restricted to rows whose values
...
@@ -2950,7 +2950,7 @@ func (m *SplitQueryRequest) Reset() { *m = SplitQueryRequest{} }
...
@@ -2950,7 +2950,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_
d9799c8e1157b676
,
[]
int
{
39
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -3039,7 +3039,7 @@ func (m *SplitQueryResponse) Reset() { *m = SplitQueryResponse{} }
...
@@ -3039,7 +3039,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_
d9799c8e1157b676
,
[]
int
{
40
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -3080,7 +3080,7 @@ func (m *SplitQueryResponse_KeyRangePart) Reset() { *m = SplitQueryRespo
...
@@ -3080,7 +3080,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_
d9799c8e1157b676
,
[]
int
{
40
,
0
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -3128,7 +3128,7 @@ func (m *SplitQueryResponse_ShardPart) Reset() { *m = SplitQueryResponse
...
@@ -3128,7 +3128,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_
d9799c8e1157b676
,
[]
int
{
40
,
1
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -3181,7 +3181,7 @@ func (m *SplitQueryResponse_Part) Reset() { *m = SplitQueryResponse_Part
...
@@ -3181,7 +3181,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_
d9799c8e1157b676
,
[]
int
{
40
,
2
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -3242,7 +3242,7 @@ func (m *GetSrvKeyspaceRequest) Reset() { *m = GetSrvKeyspaceRequest{} }
...
@@ -3242,7 +3242,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_
d9799c8e1157b676
,
[]
int
{
41
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -3282,7 +3282,7 @@ func (m *GetSrvKeyspaceResponse) Reset() { *m = GetSrvKeyspaceResponse{}
...
@@ -3282,7 +3282,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_
d9799c8e1157b676
,
[]
int
{
42
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
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
)
...
@@ -3327,7 +3327,7 @@ func (m *VStreamRequest) Reset() { *m = VStreamRequest{} }
...
@@ -3327,7 +3327,7 @@ func (m *VStreamRequest) Reset() { *m = VStreamRequest{} }
func
(
m
*
VStreamRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
VStreamRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
VStreamRequest
)
ProtoMessage
()
{}
func
(
*
VStreamRequest
)
ProtoMessage
()
{}
func
(
*
VStreamRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
VStreamRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_
d9799c8e1157b676
,
[]
int
{
43
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
int
{
43
}
}
}
func
(
m
*
VStreamRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
VStreamRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_VStreamRequest
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_VStreamRequest
.
Unmarshal
(
m
,
b
)
...
@@ -3387,7 +3387,7 @@ func (m *VStreamResponse) Reset() { *m = VStreamResponse{} }
...
@@ -3387,7 +3387,7 @@ func (m *VStreamResponse) Reset() { *m = VStreamResponse{} }
func
(
m
*
VStreamResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
VStreamResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
VStreamResponse
)
ProtoMessage
()
{}
func
(
*
VStreamResponse
)
ProtoMessage
()
{}
func
(
*
VStreamResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
VStreamResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_vtgate_
d9799c8e1157b676
,
[]
int
{
44
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
int
{
44
}
}
}
func
(
m
*
VStreamResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
VStreamResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_VStreamResponse
.
Unmarshal
(
m
,
b
)
return
xxx_messageInfo_VStreamResponse
.
Unmarshal
(
m
,
b
)
...
@@ -3445,7 +3445,7 @@ func (m *UpdateStreamRequest) Reset() { *m = UpdateStreamRequest{} }
...
@@ -3445,7 +3445,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_
d9799c8e1157b676
,
[]
int
{
45
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
int
{
45
}
}
}
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
)
...
@@ -3533,7 +3533,7 @@ func (m *UpdateStreamResponse) Reset() { *m = UpdateStreamResponse{} }
...
@@ -3533,7 +3533,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_
d9799c8e1157b676
,
[]
int
{
46
}
return
fileDescriptor_vtgate_
339c92b13a08c8a7
,
[]
int
{
46
}
}
}
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
)
...
@@ -3624,9 +3624,9 @@ func init() {
...
@@ -3624,9 +3624,9 @@ func init() {
proto
.
RegisterEnum
(
"vtgate.CommitOrder"
,
CommitOrder_name
,
CommitOrder_value
)
proto
.
RegisterEnum
(
"vtgate.CommitOrder"
,
CommitOrder_name
,
CommitOrder_value
)
}
}
func
init
()
{
proto
.
RegisterFile
(
"vtgate.proto"
,
fileDescriptor_vtgate_
d9799c8e1157b676
)
}
func
init
()
{
proto
.
RegisterFile
(
"vtgate.proto"
,
fileDescriptor_vtgate_
339c92b13a08c8a7
)
}
var
fileDescriptor_vtgate_
d9799c8e1157b676
=
[]
byte
{
var
fileDescriptor_vtgate_
339c92b13a08c8a7
=
[]
byte
{
// 2041 bytes of a gzipped FileDescriptorProto
// 2041 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xd4
,
0x5a
,
0xcd
,
0x8f
,
0x23
,
0x47
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xd4
,
0x5a
,
0xcd
,
0x8f
,
0x23
,
0x47
,
0x15
,
0x4f
,
0x77
,
0xfb
,
0xf3
,
0xf9
,
0x73
,
0x6b
,
0xbc
,
0x1b
,
0xc7
,
0x19
,
0x76
,
0x26
,
0x1d
,
0x46
,
0x15
,
0x4f
,
0x77
,
0xfb
,
0xf3
,
0xf9
,
0x73
,
0x6b
,
0xbc
,
0x1b
,
0xc7
,
0x19
,
0x76
,
0x26
,
0x1d
,
0x46
,
...
...
vendor/vitess.io/vitess/go/vt/sqlparser/sql.go
浏览文件 @
ed7d982a
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
vendor/vitess.io/vitess/go/vt/sqlparser/sql.y
浏览文件 @
ed7d982a
...
@@ -219,9 +219,9 @@ func skipToEnd(yylex interface{}) {
...
@@ -219,9 +219,9 @@ func skipToEnd(yylex interface{}) {
%type <tableExprs> from_opt table_references
%type <tableExprs> from_opt table_references
%type <tableExpr> table_reference table_factor join_table
%type <tableExpr> table_reference table_factor join_table
%type <joinCondition> join_condition join_condition_opt on_expression_opt
%type <joinCondition> join_condition join_condition_opt on_expression_opt
%type <tableNames> table_name_list
%type <tableNames> table_name_list
delete_table_list
%type <str> inner_join outer_join straight_join natural_join
%type <str> inner_join outer_join straight_join natural_join
%type <tableName> table_name into_table_name
%type <tableName> table_name into_table_name
delete_table_name
%type <aliasedTableName> aliased_table_name
%type <aliasedTableName> aliased_table_name
%type <indexHints> index_hint_list
%type <indexHints> index_hint_list
%type <expr> where_expression_opt
%type <expr> where_expression_opt
...
@@ -454,6 +454,10 @@ delete_statement:
...
@@ -454,6 +454,10 @@ delete_statement:
{
{
$$ = &Delete{Comments: Comments($2), Targets: $3, TableExprs: $5, Where: NewWhere(WhereStr, $6)}
$$ = &Delete{Comments: Comments($2), Targets: $3, TableExprs: $5, Where: NewWhere(WhereStr, $6)}
}
}
|DELETE comment_opt delete_table_list from_or_using table_references where_expression_opt
{
$$ = &Delete{Comments: Comments($2), Targets: $3, TableExprs: $5, Where: NewWhere(WhereStr, $6)}
}
from_or_using:
from_or_using:
FROM {}
FROM {}
...
@@ -469,6 +473,16 @@ table_name_list:
...
@@ -469,6 +473,16 @@ table_name_list:
$$ = append($$, $3)
$$ = append($$, $3)
}
}
delete_table_list:
delete_table_name
{
$$ = TableNames{$1}
}
| delete_table_list '
,
' delete_table_name
{
$$ = append($$, $3)
}
opt_partition_clause:
opt_partition_clause:
{
{
$$ = nil
$$ = nil
...
@@ -2062,6 +2076,12 @@ table_name:
...
@@ -2062,6 +2076,12 @@ table_name:
$$
=
TableName
{
Qualifier
:
$
1
,
Name
:
$
3
}
$$
=
TableName
{
Qualifier
:
$
1
,
Name
:
$
3
}
}
}
delete_table_name
:
table_id
'.'
'*'
{
$$
=
TableName
{
Name
:
$
1
}
}
index_hint_list
:
index_hint_list
:
{
{
$$
=
nil
$$
=
nil
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录