未验证 提交 23556dbc 编写于 作者: A a1iive 提交者: GitHub

fix(ob_error): extended OB admin of ob_error (#326)

上级 cb791d88
......@@ -156,7 +156,7 @@ If you want to add the cause and solution info, you can change the define as
DEFINE_ERROR(OB_ERROR, -4000, -1, "HY000", "Common error", "CAUSE", "SOLUTION");
```
And then regenerate the `src/lib/oberror_errno.h``src/oberror_errno.h` and `src/oberror_errno.cpp` by
And then regenerate the `src/lib/ob_errno.h``src/share/ob_errno.h` and `src/share/ob_errno.cpp` by
```shell
cd src/share
......
......@@ -351,7 +351,7 @@ bool add_ob_info(int error_code, ObErrorInfoMgr* mgr)
if (mgr->insert_ob_error(error_name, error_msg, error_cause, error_solution, error_code)) {
bret = true;
}
} else if (-1 == g_mysql_error[error_code][0]) {
} else {
const char* error_usr_msg = ob_errpkt_str_user_error(-error_code, false);
if (nullptr != error_usr_msg) {
const char* error_msg = ob_errpkt_strerror(-error_code, false);
......
......@@ -101,6 +101,12 @@ OceanBase:
Solution: Contact OceanBase Support
$ob_error 5133
OceanBase:
OceanBase Error Code: OB_ERR_NO_GRANT(-5133)
Message: No such grant defined
Cause: Internal Error
Solution: Contact OceanBase Support
MySQL:
MySQL Error Code: 5133 (42000)
Message: No such grant defined
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册