dev/reference: update the error code#2213
Conversation
Signed-off-by: Shuaipeng Yu <jackysp@gmail.com>
| | 8103 | 插件名称错误 | | ||
| | 8104 | 插件版本错误 | |
There was a problem hiding this comment.
Perhaps s/错误/不匹配 will be more informative
| | 8102 | 无法读取插件定义信息 | | ||
| | 8103 | 插件名称错误 | | ||
| | 8104 | 插件版本错误 | | ||
| | 8105 | 插件被重复载入错误 | |
| | 8104 | 插件版本错误 | | ||
| | 8105 | 插件被重复载入错误 | | ||
| | 8106 | 插件定义的系统变量名称没有以插件名作为开头 | | ||
| | 8107 | 载入的插件版本太低 | |
There was a problem hiding this comment.
It seems that if the plugin doesn't have version number will also cause this error
// plugin.go:122
for component, reqVer := range p.RequireVersion {
if ver, ok := tiPlugins.versions[component]; !ok || ver < reqVer {
return errRequireVersionCheckFail.GenWithStackByArgs(p.Name, component, reqVer, ver)
}
}So 载入的插件未指定版本或指定的版本过低 would be more clear
| | 8114 | 未知的执行计划类型 | | ||
| | 8115 | 不支持 prepare 多行语句 | | ||
| | 8116 | 不支持 prepare DDL 语句 | | ||
| | 8117 | 内部 SQL 没有读到指定的系统变量 | |
There was a problem hiding this comment.
I doubt this error is caused by system variable, it seems it is because of empty result set, see
// getExecRet executes restricted sql and the result is one column.
// It returns a string value.
func (s *session) getExecRet(ctx sessionctx.Context, sql string) (string, error) {
rows, fields, err := s.ExecRestrictedSQL(sql)
if err != nil {
return "", err
}
if len(rows) == 0 {
return "", executor.ErrResultIsEmpty
}
d := rows[0].GetDatum(0, &fields[0].Column.FieldType)
value, err := d.ToString()
if err != nil {
return "", err
}
return value, nil
}
There was a problem hiding this comment.
I'll remove it, it will be replaced by ErrUnknownSystemVar in GetGlobalSysVar.
| | 8115 | 不支持 prepare 多行语句 | | ||
| | 8116 | 不支持 prepare DDL 语句 | | ||
| | 8117 | 内部 SQL 没有读到指定的系统变量 | | ||
| | 8118 | 构建执行算子失败 | |
|
Also |
The docs of batch insert have already deleted in #2194. So we should not expose its error code. |
| | 8204 | 非法的 DDL job | | ||
| | 8205 | 非法的 DDL job 标志 | | ||
| | 8206 | DDL 的 Reorg 阶段执行超时 | | ||
| | 8207 | 非法的存储节点 | |
There was a problem hiding this comment.
Why 8208 and 8209 is not listed? Is there any reason? I think we can simply list them all here.
There was a problem hiding this comment.
They are not used anywhere.
Co-Authored-By: bb7133 <bb7133@gmail.com>
Co-Authored-By: Lilian Lee <lilin@pingcap.com>
Signed-off-by: Shuaipeng Yu jackysp@gmail.com
What is changed, added or deleted?
Update the error code of dev/reference
What is the related PR or file link(s)?
Which TiDB version(s) does your changes apply to?
Note: If your changes apply to multiple TiDB versions, make sure you update the documents in the corresponding version folders such as "dev", "v3.0", "v2.1" and "v3.1" in this PR.