Merge pull request #848 from pingcap/qiuyesuifeng/update-error-code
*: update error code.
This commit is contained in:
@ -60,11 +60,11 @@ var (
|
||||
|
||||
// Error codes.
|
||||
const (
|
||||
CodeUnknownPlan terror.ErrCode = iota
|
||||
CodePrepareMulti
|
||||
CodeStmtNotFound
|
||||
CodeSchemaChanged
|
||||
CodeWrongParamCount
|
||||
CodeUnknownPlan terror.ErrCode = 1
|
||||
CodePrepareMulti terror.ErrCode = 2
|
||||
CodeStmtNotFound terror.ErrCode = 3
|
||||
CodeSchemaChanged terror.ErrCode = 4
|
||||
CodeWrongParamCount terror.ErrCode = 5
|
||||
)
|
||||
|
||||
// Row represents a record row.
|
||||
|
||||
@ -25,8 +25,8 @@ import (
|
||||
// KV error codes.
|
||||
const (
|
||||
CodeIncompatibleDBFormat terror.ErrCode = 1
|
||||
CodeNoDataForHandle = 2
|
||||
CodeKeyExists = 3
|
||||
CodeNoDataForHandle terror.ErrCode = 2
|
||||
CodeKeyExists terror.ErrCode = 3
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -39,7 +39,7 @@ var (
|
||||
|
||||
// Error codes.
|
||||
const (
|
||||
CodeInvalidOperation terror.ErrCode = iota
|
||||
CodeInvalidOperation terror.ErrCode = 1
|
||||
)
|
||||
|
||||
// Eval evaluates an expression to a value.
|
||||
|
||||
@ -34,7 +34,7 @@ var (
|
||||
|
||||
// Error codes.
|
||||
const (
|
||||
CodeUnsupportedType = iota
|
||||
CodeUnsupportedType terror.ErrCode = 1
|
||||
)
|
||||
|
||||
// BuildPlan builds a plan from a node.
|
||||
|
||||
@ -27,7 +27,7 @@ var (
|
||||
|
||||
// Error codes.
|
||||
const (
|
||||
CodeSyntaxErr terror.ErrCode = iota + 1
|
||||
CodeSyntaxErr terror.ErrCode = 1
|
||||
)
|
||||
|
||||
// Parse parses a query string to raw ast.StmtNode.
|
||||
|
||||
@ -57,7 +57,7 @@ func GetSysVar(name string) *SysVar {
|
||||
// Variable error codes.
|
||||
const (
|
||||
CodeUnknownStatusVar terror.ErrCode = 1
|
||||
CodeUnknownSystemVar = 1193
|
||||
CodeUnknownSystemVar terror.ErrCode = 1193
|
||||
)
|
||||
|
||||
// Variable errors
|
||||
|
||||
Reference in New Issue
Block a user