“7944a57e1fc89d6b26e27a58cd73aadecfd8f6a5”上不存在“vendor/github.com/pingcap/tidb/errno/errcode.go”
提交 3fd8c8a0 编写于 作者: martianzhang's avatar martianzhang

vendor daily update

上级 b76eaf45
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
package ast package ast
import ( import (
"github.com/pingcap/parser/auth"
"github.com/pingcap/parser/model" "github.com/pingcap/parser/model"
"github.com/pingcap/parser/types" "github.com/pingcap/parser/types"
) )
...@@ -552,16 +553,34 @@ func (n *TableToTable) Accept(v Visitor) (Node, bool) { ...@@ -552,16 +553,34 @@ func (n *TableToTable) Accept(v Visitor) (Node, bool) {
type CreateViewStmt struct { type CreateViewStmt struct {
ddlNode ddlNode
OrReplace bool OrReplace bool
ViewName *TableName ViewName *TableName
Cols []model.CIStr Cols []model.CIStr
Select StmtNode Select StmtNode
Algorithm model.ViewAlgorithm
Definer *auth.UserIdentity
Security model.ViewSecurity
CheckOption model.ViewCheckOption
} }
// Accept implements Node Accept interface. // Accept implements Node Accept interface.
func (n *CreateViewStmt) Accept(v Visitor) (Node, bool) { func (n *CreateViewStmt) Accept(v Visitor) (Node, bool) {
// TODO: implement the details. newNode, skipChildren := v.Enter(n)
return n, true if skipChildren {
return v.Leave(newNode)
}
n = newNode.(*CreateViewStmt)
node, ok := n.ViewName.Accept(v)
if !ok {
return n, false
}
n.ViewName = node.(*TableName)
selnode, ok := n.Select.Accept(v)
if !ok {
return n, false
}
n.Select = selnode.(*SelectStmt)
return v.Leave(n)
} }
// CreateIndexStmt is a statement to create an index. // CreateIndexStmt is a statement to create an index.
......
...@@ -484,6 +484,10 @@ const ( ...@@ -484,6 +484,10 @@ const (
AggFuncBitXor = "bit_xor" AggFuncBitXor = "bit_xor"
// AggFuncBitAnd is the name of bit_and function. // AggFuncBitAnd is the name of bit_and function.
AggFuncBitAnd = "bit_and" AggFuncBitAnd = "bit_and"
// AggFuncVarPop is the name of var_pop function
AggFuncVarPop = "var_pop"
// AggFuncVarSamp is the name of var_samp function
AggFuncVarSamp = "var_samp"
// AggFuncStddevPop is the name of stddev_pop function // AggFuncStddevPop is the name of stddev_pop function
AggFuncStddevPop = "stddev_pop" AggFuncStddevPop = "stddev_pop"
// AggFuncStddevSamp is the name of stddev_samp function // AggFuncStddevSamp is the name of stddev_samp function
......
#!/bin/bash
# This script is used to checkout a Parser PR branch in a forked repo.
if test -z $1; then
echo -e "Usage:\n"
echo -e "\tcheckout-pr-branch.sh [github-username]:[pr-branch]\n"
echo -e "The argument can be copied directly from github PR page."
echo -e "The local branch name would be [github-username]/[pr-branch]."
exit 0;
fi
username=$(echo $1 | cut -d':' -f1)
branch=$(echo $1 | cut -d':' -f2)
local_branch=$username/$branch
fork="https://github.com/$username/parser"
exists=`git show-ref refs/heads/$local_branch`
if [ -n "$exists" ]; then
git checkout $local_branch
git pull $fork $branch:$local_branch
else
git fetch $fork $branch:$local_branch
git checkout $local_branch
fi
...@@ -516,6 +516,9 @@ var tokenMap = map[string]int{ ...@@ -516,6 +516,9 @@ var tokenMap = map[string]int{
"VARBINARY": varbinaryType, "VARBINARY": varbinaryType,
"VARCHAR": varcharType, "VARCHAR": varcharType,
"VARIABLES": variables, "VARIABLES": variables,
"VARIANCE": varPop,
"VAR_POP": varPop,
"VAR_SAMP": varSamp,
"VIEW": view, "VIEW": view,
"VIRTUAL": virtual, "VIRTUAL": virtual,
"WARNINGS": warnings, "WARNINGS": warnings,
......
...@@ -50,6 +50,7 @@ const ( ...@@ -50,6 +50,7 @@ const (
ActionRenameIndex ActionType = 18 ActionRenameIndex ActionType = 18
ActionAddTablePartition ActionType = 19 ActionAddTablePartition ActionType = 19
ActionDropTablePartition ActionType = 20 ActionDropTablePartition ActionType = 20
ActionCreateView ActionType = 21
) )
// AddIndexStr is a string related to the operation of "add index". // AddIndexStr is a string related to the operation of "add index".
...@@ -76,6 +77,7 @@ var actionMap = map[ActionType]string{ ...@@ -76,6 +77,7 @@ var actionMap = map[ActionType]string{
ActionRenameIndex: "rename index", ActionRenameIndex: "rename index",
ActionAddTablePartition: "add partition", ActionAddTablePartition: "add partition",
ActionDropTablePartition: "drop table partition", ActionDropTablePartition: "drop table partition",
ActionCreateView: "create view",
} }
// String return current ddl action in string // String return current ddl action in string
......
...@@ -19,6 +19,7 @@ import ( ...@@ -19,6 +19,7 @@ import (
"time" "time"
"github.com/pingcap/errors" "github.com/pingcap/errors"
"github.com/pingcap/parser/auth"
"github.com/pingcap/parser/mysql" "github.com/pingcap/parser/mysql"
"github.com/pingcap/parser/types" "github.com/pingcap/parser/types"
"github.com/pingcap/tipb/go-tipb" "github.com/pingcap/tipb/go-tipb"
...@@ -169,6 +170,8 @@ type TableInfo struct { ...@@ -169,6 +170,8 @@ type TableInfo struct {
Partition *PartitionInfo `json:"partition"` Partition *PartitionInfo `json:"partition"`
Compression string `json:"compression"` Compression string `json:"compression"`
View *ViewInfo `json:"view"`
} }
// GetPartitionInfo returns the partition information. // GetPartitionInfo returns the partition information.
...@@ -287,6 +290,84 @@ func (t *TableInfo) ColumnIsInIndex(c *ColumnInfo) bool { ...@@ -287,6 +290,84 @@ func (t *TableInfo) ColumnIsInIndex(c *ColumnInfo) bool {
return false return false
} }
// IsView checks if tableinfo is a view
func (t *TableInfo) IsView() bool {
return t.View != nil
}
// ViewAlgorithm is VIEW's SQL AlGORITHM characteristic.
// See https://dev.mysql.com/doc/refman/5.7/en/view-algorithms.html
type ViewAlgorithm int
const (
AlgorithmUndefined ViewAlgorithm = iota
AlgorithmMerge
AlgorithmTemptable
)
func (v *ViewAlgorithm) String() string {
switch *v {
case AlgorithmMerge:
return "MERGE"
case AlgorithmTemptable:
return "TEMPTABLE"
case AlgorithmUndefined:
return "UNDEFINED"
default:
return "UNDEFINED"
}
}
// ViewSecurity is VIEW's SQL SECURITY characteristic.
// See https://dev.mysql.com/doc/refman/5.7/en/create-view.html
type ViewSecurity int
const (
SecurityDefiner ViewSecurity = iota
SecurityInvoker
)
func (v *ViewSecurity) String() string {
switch *v {
case SecurityInvoker:
return "INVOKER"
case SecurityDefiner:
return "DEFINER"
default:
return "DEFINER"
}
}
// ViewCheckOption is VIEW's WITH CHECK OPTION clause part.
// See https://dev.mysql.com/doc/refman/5.7/en/view-check-option.html
type ViewCheckOption int
const (
CheckOptionLocal ViewCheckOption = iota
CheckOptionCascaded
)
func (v *ViewCheckOption) String() string {
switch *v {
case CheckOptionLocal:
return "LOCAL"
case CheckOptionCascaded:
return "CASCADED"
default:
return "CASCADED"
}
}
// ViewInfo provides meta data describing a DB view.
type ViewInfo struct {
Algorithm ViewAlgorithm `json:"view_algorithm"`
Definer *auth.UserIdentity `json:"view_definer"`
Security ViewSecurity `json:"view_security"`
SelectStmt string `json:"view_select"`
CheckOption ViewCheckOption `json:"view_checkoption"`
Cols []CIStr `json:"view_cols"`
}
// PartitionType is the type for PartitionInfo // PartitionType is the type for PartitionInfo
type PartitionType int type PartitionType int
......
...@@ -462,6 +462,9 @@ import ( ...@@ -462,6 +462,9 @@ import (
timestampDiff "TIMESTAMPDIFF" timestampDiff "TIMESTAMPDIFF"
top "TOP" top "TOP"
trim "TRIM" trim "TRIM"
variance "VARIANCE"
varPop "VAR_POP"
varSamp "VAR_SAMP"
/* The following tokens belong to TiDBKeyword. */ /* The following tokens belong to TiDBKeyword. */
admin "ADMIN" admin "ADMIN"
...@@ -2132,15 +2135,25 @@ CreateViewStmt: ...@@ -2132,15 +2135,25 @@ CreateViewStmt:
{ {
startOffset := parser.startOffset(&yyS[yypt-1]) startOffset := parser.startOffset(&yyS[yypt-1])
selStmt := $10.(*ast.SelectStmt) selStmt := $10.(*ast.SelectStmt)
selStmt.SetText(string(parser.src[startOffset:])) selStmt.SetText(strings.TrimSpace(parser.src[startOffset:]))
x := &ast.CreateViewStmt { x := &ast.CreateViewStmt {
OrReplace: $2.(bool), OrReplace: $2.(bool),
ViewName: $7.(*ast.TableName), ViewName: $7.(*ast.TableName),
Select: selStmt, Select: selStmt,
Algorithm: $3.(model.ViewAlgorithm),
Definer: $4.(*auth.UserIdentity),
Security: $5.(model.ViewSecurity),
} }
if $8 != nil{ if $8 != nil{
x.Cols = $8.([]model.CIStr) x.Cols = $8.([]model.CIStr)
} }
if $11 !=nil {
x.CheckOption = $11.(model.ViewCheckOption)
endOffset := parser.startOffset(&yyS[yypt])
selStmt.SetText(strings.TrimSpace(parser.src[startOffset:endOffset]))
} else {
x.CheckOption = model.CheckOptionCascaded
}
$$ = x $$ = x
} }
...@@ -2156,25 +2169,25 @@ OrReplace: ...@@ -2156,25 +2169,25 @@ OrReplace:
ViewAlgorithm: ViewAlgorithm:
/* EMPTY */ /* EMPTY */
{ {
$$ = "UNDEFINED" $$ = model.AlgorithmUndefined
} }
| "ALGORITHM" "=" "UNDEFINED" | "ALGORITHM" "=" "UNDEFINED"
{ {
$$ = strings.ToUpper($3) $$ = model.AlgorithmUndefined
} }
| "ALGORITHM" "=" "MERGE" | "ALGORITHM" "=" "MERGE"
{ {
$$ = strings.ToUpper($3) $$ = model.AlgorithmMerge
} }
| "ALGORITHM" "=" "TEMPTABLE" | "ALGORITHM" "=" "TEMPTABLE"
{ {
$$ = strings.ToUpper($3) $$ = model.AlgorithmTemptable
} }
ViewDefiner: ViewDefiner:
/* EMPTY */ /* EMPTY */
{ {
$$ = nil $$ = &auth.UserIdentity{CurrentUser: true}
} }
| "DEFINER" "=" Username | "DEFINER" "=" Username
{ {
...@@ -2184,15 +2197,15 @@ ViewDefiner: ...@@ -2184,15 +2197,15 @@ ViewDefiner:
ViewSQLSecurity: ViewSQLSecurity:
/* EMPTY */ /* EMPTY */
{ {
$$ = "DEFINER" $$ = model.SecurityDefiner
} }
| "SQL" "SECURITY" "DEFINER" | "SQL" "SECURITY" "DEFINER"
{ {
$$ = $3 $$ = model.SecurityDefiner
} }
| "SQL" "SECURITY" "INVOKER" | "SQL" "SECURITY" "INVOKER"
{ {
$$ = $3 $$ = model.SecurityInvoker
} }
ViewName: ViewName:
...@@ -2228,11 +2241,11 @@ ViewCheckOption: ...@@ -2228,11 +2241,11 @@ ViewCheckOption:
} }
| "WITH" "CASCADED" "CHECK" "OPTION" | "WITH" "CASCADED" "CHECK" "OPTION"
{ {
$$ = $2 $$ = model.CheckOptionCascaded
} }
| "WITH" "LOCAL" "CHECK" "OPTION" | "WITH" "LOCAL" "CHECK" "OPTION"
{ {
$$ = $2 $$ = model.CheckOptionLocal
} }
/****************************************************************** /******************************************************************
...@@ -2973,7 +2986,8 @@ TiDBKeyword: ...@@ -2973,7 +2986,8 @@ TiDBKeyword:
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" | "INTERNAL" |"MIN" | "MAX" | "MAX_EXECUTION_TIME" | "NOW" | "RECENT" | "POSITION" | "SUBDATE" | "SUBSTRING" | "SUM" | "STD" | "STDDEV" | "STDDEV_POP" | "STDDEV_SAMP" | "INPLACE" | "INTERNAL" |"MIN" | "MAX" | "MAX_EXECUTION_TIME" | "NOW" | "RECENT" | "POSITION" | "SUBDATE" | "SUBSTRING" | "SUM"
| "STD" | "STDDEV" | "STDDEV_POP" | "STDDEV_SAMP" | "VARIANCE" | "VAR_POP" | "VAR_SAMP"
| "TIMESTAMPADD" | "TIMESTAMPDIFF" | "TOP" | "TRIM" | "NEXT_ROW_ID" | "TIMESTAMPADD" | "TIMESTAMPDIFF" | "TOP" | "TRIM" | "NEXT_ROW_ID"
/************************************************************************************ /************************************************************************************
...@@ -4010,6 +4024,14 @@ SumExpr: ...@@ -4010,6 +4024,14 @@ SumExpr:
$$ = &ast.AggregateFuncExpr{F: $1, Args: []ast.ExprNode{$4}, Distinct: $3.(bool)} $$ = &ast.AggregateFuncExpr{F: $1, Args: []ast.ExprNode{$4}, Distinct: $3.(bool)}
} }
} }
| builtinVarPop '(' BuggyDefaultFalseDistinctOpt Expression ')' OptWindowingClause
{
$$ = &ast.AggregateFuncExpr{F: ast.AggFuncVarPop, Args: []ast.ExprNode{$4}, Distinct: $3.(bool)}
}
| builtinVarSamp '(' BuggyDefaultFalseDistinctOpt Expression ')' OptWindowingClause
{
$$ = &ast.AggregateFuncExpr{F: $1, Args: []ast.ExprNode{$4}, Distinct: $3.(bool)}
}
OptGConcatSeparator: OptGConcatSeparator:
{ {
......
...@@ -17,7 +17,9 @@ import ( ...@@ -17,7 +17,9 @@ import (
"fmt" "fmt"
"io" "io"
"strconv" "strconv"
"strings"
"github.com/pingcap/errors"
"github.com/pingcap/parser/ast" "github.com/pingcap/parser/ast"
"github.com/pingcap/parser/mysql" "github.com/pingcap/parser/mysql"
"github.com/pingcap/tidb/types" "github.com/pingcap/tidb/types"
...@@ -67,13 +69,22 @@ type ValueExpr struct { ...@@ -67,13 +69,22 @@ type ValueExpr struct {
projectionOffset int projectionOffset int
} }
// Restore implements Recoverable interface.
func (n *ValueExpr) Restore(sb *strings.Builder) error {
err := n.format(sb)
if err != nil {
return errors.Trace(err)
}
return nil
}
// GetDatumString implements the ast.ValueExpr interface. // GetDatumString implements the ast.ValueExpr interface.
func (n *ValueExpr) GetDatumString() string { func (n *ValueExpr) GetDatumString() string {
return n.GetString() return n.GetString()
} }
// Format the ExprNode into a Writer. // Format the ExprNode into a Writer.
func (n *ValueExpr) Format(w io.Writer) { func (n *ValueExpr) format(w io.Writer) error {
var s string var s string
switch n.Kind() { switch n.Kind() {
case types.KindNull: case types.KindNull:
...@@ -105,9 +116,18 @@ func (n *ValueExpr) Format(w io.Writer) { ...@@ -105,9 +116,18 @@ func (n *ValueExpr) Format(w io.Writer) {
s = n.GetBinaryLiteral().ToBitLiteralString(true) s = n.GetBinaryLiteral().ToBitLiteralString(true)
} }
default: default:
panic("Can't format to string") return errors.New("can't format to string")
} }
fmt.Fprint(w, s) fmt.Fprint(w, s)
return nil
}
// Format the ExprNode into a Writer.
func (n *ValueExpr) Format(w io.Writer) {
err := n.format(w)
if err != nil {
panic("Can't format to string")
}
} }
// newValueExpr creates a ValueExpr with value, and sets default field type. // newValueExpr creates a ValueExpr with value, and sets default field type.
...@@ -150,6 +170,12 @@ type ParamMarkerExpr struct { ...@@ -150,6 +170,12 @@ type ParamMarkerExpr struct {
Order int Order int
} }
// Restore implements Recoverable interface.
func (n *ParamMarkerExpr) Restore(sb *strings.Builder) error {
sb.WriteString("?")
return nil
}
func newParamMarkerExpr(offset int) ast.ParamMarkerExpr { func newParamMarkerExpr(offset int) ast.ParamMarkerExpr {
return &ParamMarkerExpr{ return &ParamMarkerExpr{
Offset: offset, Offset: offset,
......
...@@ -105,106 +105,106 @@ ...@@ -105,106 +105,106 @@
"revisionTime": "2018-10-24T15:10:47Z" "revisionTime": "2018-10-24T15:10:47Z"
}, },
{ {
"checksumSHA1": "oFNBj222ad7LvyQ9TMUPienQZOI=", "checksumSHA1": "jBf42FXXePd8z/qP4g5n1K0H2vQ=",
"path": "github.com/pingcap/parser", "path": "github.com/pingcap/parser",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "s7hZrsoenMYJ2An3wl4EbvJSZJY=", "checksumSHA1": "xuDucshl6h8s/D6FVXIiWcgdu9I=",
"path": "github.com/pingcap/parser/ast", "path": "github.com/pingcap/parser/ast",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "skWGV4FNvD3vr+5olepaPPnylUw=", "checksumSHA1": "skWGV4FNvD3vr+5olepaPPnylUw=",
"path": "github.com/pingcap/parser/auth", "path": "github.com/pingcap/parser/auth",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "grkBf/zf8cTJRtI64P1jV6B+p/4=", "checksumSHA1": "grkBf/zf8cTJRtI64P1jV6B+p/4=",
"path": "github.com/pingcap/parser/charset", "path": "github.com/pingcap/parser/charset",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "SInoXbsRe0tnBwmatmtZYfSFbdk=", "checksumSHA1": "SInoXbsRe0tnBwmatmtZYfSFbdk=",
"path": "github.com/pingcap/parser/format", "path": "github.com/pingcap/parser/format",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "2bdcxM8NQIArMyIIf4Q8tsNzyuw=", "checksumSHA1": "+rJd1MX+3A1gwbrFZHFWbC8l8ao=",
"path": "github.com/pingcap/parser/model", "path": "github.com/pingcap/parser/model",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "QBa9yiMDQNl2cLLwqlRoNTpCPNg=", "checksumSHA1": "QBa9yiMDQNl2cLLwqlRoNTpCPNg=",
"path": "github.com/pingcap/parser/mysql", "path": "github.com/pingcap/parser/mysql",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "oNBCSwJRykKuzIKgPCttatB9hAo=", "checksumSHA1": "oNBCSwJRykKuzIKgPCttatB9hAo=",
"path": "github.com/pingcap/parser/opcode", "path": "github.com/pingcap/parser/opcode",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "XvnUllvwMYd6HrMvMiKnn4cGN2M=", "checksumSHA1": "XvnUllvwMYd6HrMvMiKnn4cGN2M=",
"path": "github.com/pingcap/parser/terror", "path": "github.com/pingcap/parser/terror",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "s96v2EoeGKcWHO3mpMOQk/z2iaI=", "checksumSHA1": "s96v2EoeGKcWHO3mpMOQk/z2iaI=",
"path": "github.com/pingcap/parser/types", "path": "github.com/pingcap/parser/types",
"revision": "a38036a60de70cf02a30eb0b5496537bffffb6d0", "revision": "83f31aa7980adf30ef67a744d599804c4ca67faa",
"revisionTime": "2018-11-26T11:16:51Z" "revisionTime": "2018-12-04T02:04:44Z"
}, },
{ {
"checksumSHA1": "kO63T5plq+V7HWnkzB9WlOnp9Iw=", "checksumSHA1": "kO63T5plq+V7HWnkzB9WlOnp9Iw=",
"path": "github.com/pingcap/tidb/sessionctx/stmtctx", "path": "github.com/pingcap/tidb/sessionctx/stmtctx",
"revision": "36bcf5db4ab610aff7287081da04e2893760a45a", "revision": "8ddeeea939747e2d4634beb792d9d3281c49129d",
"revisionTime": "2018-11-30T06:30:31Z" "revisionTime": "2018-12-03T15:37:39Z"
}, },
{ {
"checksumSHA1": "U/Wz15G+PgX5yjPBvxRpTywvvCw=", "checksumSHA1": "U/Wz15G+PgX5yjPBvxRpTywvvCw=",
"path": "github.com/pingcap/tidb/types", "path": "github.com/pingcap/tidb/types",
"revision": "36bcf5db4ab610aff7287081da04e2893760a45a", "revision": "8ddeeea939747e2d4634beb792d9d3281c49129d",
"revisionTime": "2018-11-30T06:30:31Z" "revisionTime": "2018-12-03T15:37:39Z"
}, },
{ {
"checksumSHA1": "DWVD7+ygtT66IQ+cqXmMJ5OVqUk=", "checksumSHA1": "DWVD7+ygtT66IQ+cqXmMJ5OVqUk=",
"path": "github.com/pingcap/tidb/types/json", "path": "github.com/pingcap/tidb/types/json",
"revision": "36bcf5db4ab610aff7287081da04e2893760a45a", "revision": "8ddeeea939747e2d4634beb792d9d3281c49129d",
"revisionTime": "2018-11-30T06:30:31Z" "revisionTime": "2018-12-03T15:37:39Z"
}, },
{ {
"checksumSHA1": "78GI/0/9CTFg5FMZc1WcB9EcIp4=", "checksumSHA1": "Zp5ME8OXNTmHnYTwJJUZlydN4/U=",
"path": "github.com/pingcap/tidb/types/parser_driver", "path": "github.com/pingcap/tidb/types/parser_driver",
"revision": "36bcf5db4ab610aff7287081da04e2893760a45a", "revision": "8ddeeea939747e2d4634beb792d9d3281c49129d",
"revisionTime": "2018-11-30T06:30:31Z" "revisionTime": "2018-12-03T15:37:39Z"
}, },
{ {
"checksumSHA1": "s709bhSrG2Ec35406mGtrySid4s=", "checksumSHA1": "s709bhSrG2Ec35406mGtrySid4s=",
"path": "github.com/pingcap/tidb/util/execdetails", "path": "github.com/pingcap/tidb/util/execdetails",
"revision": "36bcf5db4ab610aff7287081da04e2893760a45a", "revision": "8ddeeea939747e2d4634beb792d9d3281c49129d",
"revisionTime": "2018-11-30T06:30:31Z" "revisionTime": "2018-12-03T15:37:39Z"
}, },
{ {
"checksumSHA1": "nUC7zVoAMNR2a+z2iGqHoN2AkFE=", "checksumSHA1": "nUC7zVoAMNR2a+z2iGqHoN2AkFE=",
"path": "github.com/pingcap/tidb/util/hack", "path": "github.com/pingcap/tidb/util/hack",
"revision": "36bcf5db4ab610aff7287081da04e2893760a45a", "revision": "8ddeeea939747e2d4634beb792d9d3281c49129d",
"revisionTime": "2018-11-30T06:30:31Z" "revisionTime": "2018-12-03T15:37:39Z"
}, },
{ {
"checksumSHA1": "xSyepiuqsoaaeDch7cXeumvVHKM=", "checksumSHA1": "xSyepiuqsoaaeDch7cXeumvVHKM=",
"path": "github.com/pingcap/tidb/util/memory", "path": "github.com/pingcap/tidb/util/memory",
"revision": "36bcf5db4ab610aff7287081da04e2893760a45a", "revision": "8ddeeea939747e2d4634beb792d9d3281c49129d",
"revisionTime": "2018-11-30T06:30:31Z" "revisionTime": "2018-12-03T15:37:39Z"
}, },
{ {
"checksumSHA1": "SmYeIK/fIYXNu8IKxD6HOVQVTuU=", "checksumSHA1": "SmYeIK/fIYXNu8IKxD6HOVQVTuU=",
...@@ -401,62 +401,62 @@ ...@@ -401,62 +401,62 @@
{ {
"checksumSHA1": "aKn1oKcY74N8TRLm3Ayt7Q4bbI4=", "checksumSHA1": "aKn1oKcY74N8TRLm3Ayt7Q4bbI4=",
"path": "vitess.io/vitess/go/bytes2", "path": "vitess.io/vitess/go/bytes2",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
}, },
{ {
"checksumSHA1": "JVCEN4UGRmg3TofIBdzZMZ3G0Ww=", "checksumSHA1": "JVCEN4UGRmg3TofIBdzZMZ3G0Ww=",
"path": "vitess.io/vitess/go/hack", "path": "vitess.io/vitess/go/hack",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
}, },
{ {
"checksumSHA1": "e1WJ7vCnVrlQQQlc6n/FewCDMso=", "checksumSHA1": "e1WJ7vCnVrlQQQlc6n/FewCDMso=",
"path": "vitess.io/vitess/go/sqltypes", "path": "vitess.io/vitess/go/sqltypes",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
}, },
{ {
"checksumSHA1": "ntFIQYkBS51G6y+FEkjFW40+HOU=", "checksumSHA1": "ntFIQYkBS51G6y+FEkjFW40+HOU=",
"path": "vitess.io/vitess/go/vt/log", "path": "vitess.io/vitess/go/vt/log",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
}, },
{ {
"checksumSHA1": "XozR8bmeSR5KTe/nlUJkpJY2HKI=", "checksumSHA1": "tPQFPwbMdjuX0qjNl4Zl8zc37JQ=",
"path": "vitess.io/vitess/go/vt/proto/query", "path": "vitess.io/vitess/go/vt/proto/query",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
}, },
{ {
"checksumSHA1": "OnWsUHLDKcO3spwH0jD55SvKD24=", "checksumSHA1": "o0tR/c7lgr0pLkxk7CdvjiNDAKU=",
"path": "vitess.io/vitess/go/vt/proto/topodata", "path": "vitess.io/vitess/go/vt/proto/topodata",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
}, },
{ {
"checksumSHA1": "sBAuZ/itMR8U8qbK4yLHxkP6Cpc=", "checksumSHA1": "77UojBqi0yyeQvR70j7C3kcKclQ=",
"path": "vitess.io/vitess/go/vt/proto/vtgate", "path": "vitess.io/vitess/go/vt/proto/vtgate",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
}, },
{ {
"checksumSHA1": "pLWM+SPGZs3k+IhjktE/cGUlpM0=", "checksumSHA1": "QpWGhoVDwM+8+sgYLI/YU+95iGU=",
"path": "vitess.io/vitess/go/vt/proto/vtrpc", "path": "vitess.io/vitess/go/vt/proto/vtrpc",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
}, },
{ {
"checksumSHA1": "2ZBC/pPjs13cocUf8PoMSvAO5u4=", "checksumSHA1": "CZ0WbR7TBTgF9HoY+aRxzOzVlSs=",
"path": "vitess.io/vitess/go/vt/sqlparser", "path": "vitess.io/vitess/go/vt/sqlparser",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
}, },
{ {
"checksumSHA1": "oF4XzuOzwvj1iduX/lYqNSyY/HM=", "checksumSHA1": "oF4XzuOzwvj1iduX/lYqNSyY/HM=",
"path": "vitess.io/vitess/go/vt/vterrors", "path": "vitess.io/vitess/go/vt/vterrors",
"revision": "2e2214a2660f9e52e6a1366470fc80849a9ef9ec", "revision": "63d2180c9442f64cec8f5cc6e5eb43947034e8ef",
"revisionTime": "2018-11-30T04:16:32Z" "revisionTime": "2018-12-03T23:57:47Z"
} }
], ],
"rootPath": "github.com/XiaoMi/soar" "rootPath": "github.com/XiaoMi/soar"
......
...@@ -171,10 +171,10 @@ func (m *KeyRange) GetEnd() []byte { ...@@ -171,10 +171,10 @@ func (m *KeyRange) GetEnd() []byte {
// TabletAlias is a globally unique tablet identifier. // TabletAlias is a globally unique tablet identifier.
type TabletAlias struct { type TabletAlias struct {
// cell is the cell (or datacenter) the tablet is in // cell is the cell (or datacenter) the tablet is in
Cell string `protobuf:"bytes,1,opt,name=cell" json:"cell,omitempty"` Cell string `protobuf:"bytes,1,opt,name=cell,proto3" json:"cell,omitempty"`
// uid is a unique id for this tablet within the shard // uid is a unique id for this tablet within the shard
// (this is the MySQL server id as well). // (this is the MySQL server id as well).
Uid uint32 `protobuf:"varint,2,opt,name=uid" json:"uid,omitempty"` Uid uint32 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -221,36 +221,36 @@ func (m *TabletAlias) GetUid() uint32 { ...@@ -221,36 +221,36 @@ func (m *TabletAlias) GetUid() uint32 {
// Tablet represents information about a running instance of vttablet. // Tablet represents information about a running instance of vttablet.
type Tablet struct { type Tablet struct {
// alias is the unique name of the tablet. // alias is the unique name of the tablet.
Alias *TabletAlias `protobuf:"bytes,1,opt,name=alias" json:"alias,omitempty"` Alias *TabletAlias `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
// Fully qualified domain name of the host. // Fully qualified domain name of the host.
Hostname string `protobuf:"bytes,2,opt,name=hostname" json:"hostname,omitempty"` Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
// Map of named ports. Normally this should include vt and grpc. // Map of named ports. Normally this should include vt and grpc.
// Going forward, the mysql port will be stored in mysql_port // Going forward, the mysql port will be stored in mysql_port
// instead of here. // instead of here.
// For accessing mysql port, use topoproto.MysqlPort to fetch, and // For accessing mysql port, use topoproto.MysqlPort to fetch, and
// topoproto.SetMysqlPort to set. These wrappers will ensure // topoproto.SetMysqlPort to set. These wrappers will ensure
// legacy behavior is supported. // legacy behavior is supported.
PortMap map[string]int32 `protobuf:"bytes,4,rep,name=port_map,json=portMap" json:"port_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` PortMap map[string]int32 `protobuf:"bytes,4,rep,name=port_map,json=portMap,proto3" json:"port_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// Keyspace name. // Keyspace name.
Keyspace string `protobuf:"bytes,5,opt,name=keyspace" json:"keyspace,omitempty"` Keyspace string `protobuf:"bytes,5,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
// Shard name. If range based sharding is used, it should match // Shard name. If range based sharding is used, it should match
// key_range. // key_range.
Shard string `protobuf:"bytes,6,opt,name=shard" json:"shard,omitempty"` Shard string `protobuf:"bytes,6,opt,name=shard,proto3" json:"shard,omitempty"`
// If range based sharding is used, range for the tablet's shard. // If range based sharding is used, range for the tablet's shard.
KeyRange *KeyRange `protobuf:"bytes,7,opt,name=key_range,json=keyRange" json:"key_range,omitempty"` KeyRange *KeyRange `protobuf:"bytes,7,opt,name=key_range,json=keyRange,proto3" json:"key_range,omitempty"`
// type is the current type of the tablet. // type is the current type of the tablet.
Type TabletType `protobuf:"varint,8,opt,name=type,enum=topodata.TabletType" json:"type,omitempty"` Type TabletType `protobuf:"varint,8,opt,name=type,proto3,enum=topodata.TabletType" json:"type,omitempty"`
// It this is set, it is used as the database name instead of the // It this is set, it is used as the database name instead of the
// normal "vt_" + keyspace. // normal "vt_" + keyspace.
DbNameOverride string `protobuf:"bytes,9,opt,name=db_name_override,json=dbNameOverride" json:"db_name_override,omitempty"` DbNameOverride string `protobuf:"bytes,9,opt,name=db_name_override,json=dbNameOverride,proto3" json:"db_name_override,omitempty"`
// tablet tags // tablet tags
Tags map[string]string `protobuf:"bytes,10,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` Tags map[string]string `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// MySQL hostname. // MySQL hostname.
MysqlHostname string `protobuf:"bytes,12,opt,name=mysql_hostname,json=mysqlHostname" json:"mysql_hostname,omitempty"` MysqlHostname string `protobuf:"bytes,12,opt,name=mysql_hostname,json=mysqlHostname,proto3" json:"mysql_hostname,omitempty"`
// MySQL port. Use topoproto.MysqlPort and topoproto.SetMysqlPort // MySQL port. Use topoproto.MysqlPort and topoproto.SetMysqlPort
// to access this variable. The functions provide support // to access this variable. The functions provide support
// for legacy behavior. // for legacy behavior.
MysqlPort int32 `protobuf:"varint,13,opt,name=mysql_port,json=mysqlPort" json:"mysql_port,omitempty"` MysqlPort int32 `protobuf:"varint,13,opt,name=mysql_port,json=mysqlPort,proto3" json:"mysql_port,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -364,27 +364,27 @@ type Shard struct { ...@@ -364,27 +364,27 @@ type Shard struct {
// shard for reparenting operations (InitShardMaster, // shard for reparenting operations (InitShardMaster,
// PlannedReparentShard,EmergencyReparentShard), to guarantee // PlannedReparentShard,EmergencyReparentShard), to guarantee
// exclusive operation. // exclusive operation.
MasterAlias *TabletAlias `protobuf:"bytes,1,opt,name=master_alias,json=masterAlias" json:"master_alias,omitempty"` MasterAlias *TabletAlias `protobuf:"bytes,1,opt,name=master_alias,json=masterAlias,proto3" json:"master_alias,omitempty"`
// key_range is the KeyRange for this shard. It can be unset if: // key_range is the KeyRange for this shard. It can be unset if:
// - we are not using range-based sharding in this shard. // - we are not using range-based sharding in this shard.
// - the shard covers the entire keyrange. // - the shard covers the entire keyrange.
// This must match the shard name based on our other conventions, but // This must match the shard name based on our other conventions, but
// helpful to have it decomposed here. // helpful to have it decomposed here.
// Once set at creation time, it is never changed. // Once set at creation time, it is never changed.
KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range,json=keyRange" json:"key_range,omitempty"` KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range,json=keyRange,proto3" json:"key_range,omitempty"`
// served_types has at most one entry per TabletType // served_types has at most one entry per TabletType
// The keyspace lock is always taken when changing this. // The keyspace lock is always taken when changing this.
ServedTypes []*Shard_ServedType `protobuf:"bytes,3,rep,name=served_types,json=servedTypes" json:"served_types,omitempty"` ServedTypes []*Shard_ServedType `protobuf:"bytes,3,rep,name=served_types,json=servedTypes,proto3" json:"served_types,omitempty"`
// SourceShards is the list of shards we're replicating from, // SourceShards is the list of shards we're replicating from,
// using filtered replication. // using filtered replication.
// The keyspace lock is always taken when changing this. // The keyspace lock is always taken when changing this.
SourceShards []*Shard_SourceShard `protobuf:"bytes,4,rep,name=source_shards,json=sourceShards" json:"source_shards,omitempty"` SourceShards []*Shard_SourceShard `protobuf:"bytes,4,rep,name=source_shards,json=sourceShards,proto3" json:"source_shards,omitempty"`
// Cells is the list of cells that contain tablets for this shard. // Cells is the list of cells that contain tablets for this shard.
// No lock is necessary to update this field. // No lock is necessary to update this field.
Cells []string `protobuf:"bytes,5,rep,name=cells" json:"cells,omitempty"` Cells []string `protobuf:"bytes,5,rep,name=cells,proto3" json:"cells,omitempty"`
// tablet_controls has at most one entry per TabletType. // tablet_controls has at most one entry per TabletType.
// The keyspace lock is always taken when changing this. // The keyspace lock is always taken when changing this.
TabletControls []*Shard_TabletControl `protobuf:"bytes,6,rep,name=tablet_controls,json=tabletControls" json:"tablet_controls,omitempty"` TabletControls []*Shard_TabletControl `protobuf:"bytes,6,rep,name=tablet_controls,json=tabletControls,proto3" json:"tablet_controls,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -458,8 +458,8 @@ func (m *Shard) GetTabletControls() []*Shard_TabletControl { ...@@ -458,8 +458,8 @@ func (m *Shard) GetTabletControls() []*Shard_TabletControl {
// ServedType is an entry in the served_types // ServedType is an entry in the served_types
type Shard_ServedType struct { type Shard_ServedType struct {
TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,enum=topodata.TabletType" json:"tablet_type,omitempty"` TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
Cells []string `protobuf:"bytes,2,rep,name=cells" json:"cells,omitempty"` Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -508,15 +508,15 @@ func (m *Shard_ServedType) GetCells() []string { ...@@ -508,15 +508,15 @@ func (m *Shard_ServedType) GetCells() []string {
// of that shard will run filtered replication. // of that shard will run filtered replication.
type Shard_SourceShard struct { type Shard_SourceShard struct {
// Uid is the unique ID for this SourceShard object. // Uid is the unique ID for this SourceShard object.
Uid uint32 `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"` Uid uint32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
// the source keyspace // the source keyspace
Keyspace string `protobuf:"bytes,2,opt,name=keyspace" json:"keyspace,omitempty"` Keyspace string `protobuf:"bytes,2,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
// the source shard // the source shard
Shard string `protobuf:"bytes,3,opt,name=shard" json:"shard,omitempty"` Shard string `protobuf:"bytes,3,opt,name=shard,proto3" json:"shard,omitempty"`
// the source shard keyrange // the source shard keyrange
KeyRange *KeyRange `protobuf:"bytes,4,opt,name=key_range,json=keyRange" json:"key_range,omitempty"` KeyRange *KeyRange `protobuf:"bytes,4,opt,name=key_range,json=keyRange,proto3" json:"key_range,omitempty"`
// the source table list to replicate // the source table list to replicate
Tables []string `protobuf:"bytes,5,rep,name=tables" json:"tables,omitempty"` Tables []string `protobuf:"bytes,5,rep,name=tables,proto3" json:"tables,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -584,14 +584,14 @@ func (m *Shard_SourceShard) GetTables() []string { ...@@ -584,14 +584,14 @@ func (m *Shard_SourceShard) GetTables() []string {
// TabletControl controls tablet's behavior // TabletControl controls tablet's behavior
type Shard_TabletControl struct { type Shard_TabletControl struct {
// which tablet type is affected // which tablet type is affected
TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,enum=topodata.TabletType" json:"tablet_type,omitempty"` TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
Cells []string `protobuf:"bytes,2,rep,name=cells" json:"cells,omitempty"` Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
// what to do // what to do
DisableQueryService bool `protobuf:"varint,3,opt,name=disable_query_service,json=disableQueryService" json:"disable_query_service,omitempty"` DisableQueryService bool `protobuf:"varint,3,opt,name=disable_query_service,json=disableQueryService,proto3" json:"disable_query_service,omitempty"`
BlacklistedTables []string `protobuf:"bytes,4,rep,name=blacklisted_tables,json=blacklistedTables" json:"blacklisted_tables,omitempty"` BlacklistedTables []string `protobuf:"bytes,4,rep,name=blacklisted_tables,json=blacklistedTables,proto3" json:"blacklisted_tables,omitempty"`
// frozen is set if we've started failing over traffic for // frozen is set if we've started failing over traffic for
// the master. If set, this record should not be removed. // the master. If set, this record should not be removed.
Frozen bool `protobuf:"varint,5,opt,name=frozen" json:"frozen,omitempty"` Frozen bool `protobuf:"varint,5,opt,name=frozen,proto3" json:"frozen,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -660,13 +660,13 @@ func (m *Shard_TabletControl) GetFrozen() bool { ...@@ -660,13 +660,13 @@ func (m *Shard_TabletControl) GetFrozen() bool {
type Keyspace struct { type Keyspace struct {
// name of the column used for sharding // name of the column used for sharding
// empty if the keyspace is not sharded // empty if the keyspace is not sharded
ShardingColumnName string `protobuf:"bytes,1,opt,name=sharding_column_name,json=shardingColumnName" json:"sharding_column_name,omitempty"` ShardingColumnName string `protobuf:"bytes,1,opt,name=sharding_column_name,json=shardingColumnName,proto3" json:"sharding_column_name,omitempty"`
// type of the column used for sharding // type of the column used for sharding
// UNSET if the keyspace is not sharded // UNSET if the keyspace is not sharded
ShardingColumnType KeyspaceIdType `protobuf:"varint,2,opt,name=sharding_column_type,json=shardingColumnType,enum=topodata.KeyspaceIdType" json:"sharding_column_type,omitempty"` ShardingColumnType KeyspaceIdType `protobuf:"varint,2,opt,name=sharding_column_type,json=shardingColumnType,proto3,enum=topodata.KeyspaceIdType" json:"sharding_column_type,omitempty"`
// ServedFrom will redirect the appropriate traffic to // ServedFrom will redirect the appropriate traffic to
// another keyspace. // another keyspace.
ServedFroms []*Keyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_froms,json=servedFroms" json:"served_froms,omitempty"` ServedFroms []*Keyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_froms,json=servedFroms,proto3" json:"served_froms,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -721,11 +721,11 @@ func (m *Keyspace) GetServedFroms() []*Keyspace_ServedFrom { ...@@ -721,11 +721,11 @@ func (m *Keyspace) GetServedFroms() []*Keyspace_ServedFrom {
// keyspace name that's serving it. // keyspace name that's serving it.
type Keyspace_ServedFrom struct { type Keyspace_ServedFrom struct {
// the tablet type (key for the map) // the tablet type (key for the map)
TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,enum=topodata.TabletType" json:"tablet_type,omitempty"` TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
// the cells to limit this to // the cells to limit this to
Cells []string `protobuf:"bytes,2,rep,name=cells" json:"cells,omitempty"` Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
// the keyspace name that's serving it // the keyspace name that's serving it
Keyspace string `protobuf:"bytes,3,opt,name=keyspace" json:"keyspace,omitempty"` Keyspace string `protobuf:"bytes,3,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -781,7 +781,7 @@ func (m *Keyspace_ServedFrom) GetKeyspace() string { ...@@ -781,7 +781,7 @@ func (m *Keyspace_ServedFrom) GetKeyspace() string {
type ShardReplication struct { type ShardReplication struct {
// Note there can be only one Node in this array // Note there can be only one Node in this array
// for a given tablet. // for a given tablet.
Nodes []*ShardReplication_Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"` Nodes []*ShardReplication_Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -820,7 +820,7 @@ func (m *ShardReplication) GetNodes() []*ShardReplication_Node { ...@@ -820,7 +820,7 @@ func (m *ShardReplication) GetNodes() []*ShardReplication_Node {
// Node describes a tablet instance within the cell // Node describes a tablet instance within the cell
type ShardReplication_Node struct { type ShardReplication_Node struct {
TabletAlias *TabletAlias `protobuf:"bytes,1,opt,name=tablet_alias,json=tabletAlias" json:"tablet_alias,omitempty"` TabletAlias *TabletAlias `protobuf:"bytes,1,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -860,8 +860,8 @@ func (m *ShardReplication_Node) GetTabletAlias() *TabletAlias { ...@@ -860,8 +860,8 @@ func (m *ShardReplication_Node) GetTabletAlias() *TabletAlias {
// ShardReference is used as a pointer from a SrvKeyspace to a Shard // ShardReference is used as a pointer from a SrvKeyspace to a Shard
type ShardReference struct { type ShardReference struct {
// Copied from Shard. // Copied from Shard.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range,json=keyRange" json:"key_range,omitempty"` KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range,json=keyRange,proto3" json:"key_range,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -908,11 +908,11 @@ func (m *ShardReference) GetKeyRange() *KeyRange { ...@@ -908,11 +908,11 @@ func (m *ShardReference) GetKeyRange() *KeyRange {
// SrvKeyspace is a rollup node for the keyspace itself. // SrvKeyspace is a rollup node for the keyspace itself.
type SrvKeyspace struct { type SrvKeyspace struct {
// The partitions this keyspace is serving, per tablet type. // The partitions this keyspace is serving, per tablet type.
Partitions []*SrvKeyspace_KeyspacePartition `protobuf:"bytes,1,rep,name=partitions" json:"partitions,omitempty"` Partitions []*SrvKeyspace_KeyspacePartition `protobuf:"bytes,1,rep,name=partitions,proto3" json:"partitions,omitempty"`
// copied from Keyspace // copied from Keyspace
ShardingColumnName string `protobuf:"bytes,2,opt,name=sharding_column_name,json=shardingColumnName" json:"sharding_column_name,omitempty"` ShardingColumnName string `protobuf:"bytes,2,opt,name=sharding_column_name,json=shardingColumnName,proto3" json:"sharding_column_name,omitempty"`
ShardingColumnType KeyspaceIdType `protobuf:"varint,3,opt,name=sharding_column_type,json=shardingColumnType,enum=topodata.KeyspaceIdType" json:"sharding_column_type,omitempty"` ShardingColumnType KeyspaceIdType `protobuf:"varint,3,opt,name=sharding_column_type,json=shardingColumnType,proto3,enum=topodata.KeyspaceIdType" json:"sharding_column_type,omitempty"`
ServedFrom []*SrvKeyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_from,json=servedFrom" json:"served_from,omitempty"` ServedFrom []*SrvKeyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_from,json=servedFrom,proto3" json:"served_from,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -972,9 +972,9 @@ func (m *SrvKeyspace) GetServedFrom() []*SrvKeyspace_ServedFrom { ...@@ -972,9 +972,9 @@ func (m *SrvKeyspace) GetServedFrom() []*SrvKeyspace_ServedFrom {
type SrvKeyspace_KeyspacePartition struct { type SrvKeyspace_KeyspacePartition struct {
// The type this partition applies to. // The type this partition applies to.
ServedType TabletType `protobuf:"varint,1,opt,name=served_type,json=servedType,enum=topodata.TabletType" json:"served_type,omitempty"` ServedType TabletType `protobuf:"varint,1,opt,name=served_type,json=servedType,proto3,enum=topodata.TabletType" json:"served_type,omitempty"`
// List of non-overlapping continuous shards sorted by range. // List of non-overlapping continuous shards sorted by range.
ShardReferences []*ShardReference `protobuf:"bytes,2,rep,name=shard_references,json=shardReferences" json:"shard_references,omitempty"` ShardReferences []*ShardReference `protobuf:"bytes,2,rep,name=shard_references,json=shardReferences,proto3" json:"shard_references,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -1022,9 +1022,9 @@ func (m *SrvKeyspace_KeyspacePartition) GetShardReferences() []*ShardReference { ...@@ -1022,9 +1022,9 @@ func (m *SrvKeyspace_KeyspacePartition) GetShardReferences() []*ShardReference {
// keyspace name that's serving it. // keyspace name that's serving it.
type SrvKeyspace_ServedFrom struct { type SrvKeyspace_ServedFrom struct {
// the tablet type // the tablet type
TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,enum=topodata.TabletType" json:"tablet_type,omitempty"` TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
// the keyspace name that's serving it // the keyspace name that's serving it
Keyspace string `protobuf:"bytes,2,opt,name=keyspace" json:"keyspace,omitempty"` Keyspace string `protobuf:"bytes,2,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -1076,13 +1076,13 @@ type CellInfo struct { ...@@ -1076,13 +1076,13 @@ type CellInfo struct {
// The syntax of this field is topology implementation specific. // The syntax of this field is topology implementation specific.
// For instance, for Zookeeper, it is a comma-separated list of // For instance, for Zookeeper, it is a comma-separated list of
// server addresses. // server addresses.
ServerAddress string `protobuf:"bytes,1,opt,name=server_address,json=serverAddress" json:"server_address,omitempty"` ServerAddress string `protobuf:"bytes,1,opt,name=server_address,json=serverAddress,proto3" json:"server_address,omitempty"`
// Root is the path to store data in. It is only used when talking // Root is the path to store data in. It is only used when talking
// to server_address. // to server_address.
Root string `protobuf:"bytes,2,opt,name=root" json:"root,omitempty"` Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
// Region is a group this cell belongs to. Used by vtgate to route traffic to // Region is a group this cell belongs to. Used by vtgate to route traffic to
// other cells (in same region) when there is no available tablet in the current cell. // other cells (in same region) when there is no available tablet in the current cell.
Region string `protobuf:"bytes,3,opt,name=region" json:"region,omitempty"` Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
......
...@@ -293,15 +293,15 @@ type CallerID struct { ...@@ -293,15 +293,15 @@ type CallerID struct {
// came from an automated job or another system component. // came from an automated job or another system component.
// If the request comes directly from the Internet, or if the Vitess client // If the request comes directly from the Internet, or if the Vitess client
// takes action on its own accord, it is okay for this field to be absent. // takes action on its own accord, it is okay for this field to be absent.
Principal string `protobuf:"bytes,1,opt,name=principal" json:"principal,omitempty"` Principal string `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"`
// component describes the running process of the effective caller. // component describes the running process of the effective caller.
// It can for instance be the hostname:port of the servlet initiating the // It can for instance be the hostname:port of the servlet initiating the
// database call, or the container engine ID used by the servlet. // database call, or the container engine ID used by the servlet.
Component string `protobuf:"bytes,2,opt,name=component" json:"component,omitempty"` Component string `protobuf:"bytes,2,opt,name=component,proto3" json:"component,omitempty"`
// subcomponent describes a component inisde the immediate caller which // subcomponent describes a component inisde the immediate caller which
// is responsible for generating is request. Suggested values are a // is responsible for generating is request. Suggested values are a
// servlet name or an API endpoint name. // servlet name or an API endpoint name.
Subcomponent string `protobuf:"bytes,3,opt,name=subcomponent" json:"subcomponent,omitempty"` Subcomponent string `protobuf:"bytes,3,opt,name=subcomponent,proto3" json:"subcomponent,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -357,9 +357,9 @@ func (m *CallerID) GetSubcomponent() string { ...@@ -357,9 +357,9 @@ func (m *CallerID) GetSubcomponent() string {
// We use this so the clients don't have to parse the error messages, // We use this so the clients don't have to parse the error messages,
// but instead can depend on the value of the code. // but instead can depend on the value of the code.
type RPCError struct { type RPCError struct {
LegacyCode LegacyErrorCode `protobuf:"varint,1,opt,name=legacy_code,json=legacyCode,enum=vtrpc.LegacyErrorCode" json:"legacy_code,omitempty"` LegacyCode LegacyErrorCode `protobuf:"varint,1,opt,name=legacy_code,json=legacyCode,proto3,enum=vtrpc.LegacyErrorCode" json:"legacy_code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
Code Code `protobuf:"varint,3,opt,name=code,enum=vtrpc.Code" json:"code,omitempty"` Code Code `protobuf:"varint,3,opt,name=code,proto3,enum=vtrpc.Code" json:"code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
......
...@@ -6,6 +6,7 @@ package sqlparser ...@@ -6,6 +6,7 @@ package sqlparser
import __yyfmt__ "fmt" import __yyfmt__ "fmt"
//line sql.y:18 //line sql.y:18
func setParseTree(yylex interface{}, stmt Statement) { func setParseTree(yylex interface{}, stmt Statement) {
yylex.(*Tokenizer).ParseTree = stmt yylex.(*Tokenizer).ParseTree = stmt
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册