diff --git a/docs/en/14-reference/09-error-code.md b/docs/en/14-reference/09-error-code.md index 86c413da1450..16818f671c6c 100644 --- a/docs/en/14-reference/09-error-code.md +++ b/docs/en/14-reference/09-error-code.md @@ -79,28 +79,28 @@ This document details the server error codes that may be encountered when using ## tsc -| Error Code | Error Description | Possible Error Scenarios or Reasons | Recommended Actions for Users | -| ---------- | --------------------------- | ----------------------------------------------- | ------------------------------------------------------------ | -| 0x80000207 | Invalid user name | Invalid database username | Check if the database username is correct | -| 0x80000208 | Invalid password | Invalid database password | Check if the database password is correct | -| 0x80000209 | Database name too long | Invalid database name | Check if the database name is correct | -| 0x8000020A | Table name too long | Invalid table name | Check if the table name is correct | -| 0x8000020F | Query terminated | Query was terminated | Check if the query was terminated by a user | -| 0x80000213 | Disconnected from server | Connection was interrupted | Check if the connection was interrupted by someone or if the client is exiting | -| 0x80000216 | Syntax error in SQL | SQL syntax error | Check and correct the SQL statement | -| 0x80000219 | SQL statement too long | SQL length exceeds limit | Check and correct the SQL statement | -| 0x8000021A | File is empty | File content is empty | Check the content of the input file | -| 0x8000021F | Invalid column length | Incorrect column length | Preserve the scene and logs, report issue on GitHub | -| 0x80000222 | Invalid JSON data type | Incorrect JSON data type | Check the JSON content input | -| 0x80000224 | Value out of range | Data size exceeds type range | Check the data value input | -| 0x80000229 | Invalid tsc input | API input error | Check the parameters passed when calling the API from the application | -| 0x8000022A | Stmt API usage error | Incorrect usage of STMT API | Check the order of STMT API calls, applicable scenarios, and error handling | -| 0x8000022B | Stmt table name not set | STMT table name not set correctly | Check if the table name setting interface was called | -| 0x8000022D | Query killed | Query was terminated | Check if the query was terminated by a user | -| 0x8000022E | No available execution node | No available query execution node | Check the current query policy configuration, ensure available Qnode if needed | -| 0x8000022F | Table is not a supertable | Table name in the statement is not a supertable | Check if the table name used in the statement is a supertable | -| 0x80000230 | Stmt cache error | STMT internal cache error | Preserve the scene and logs, report issue on GitHub | -| 0x80000231 | Tsc internal error | TSC internal error | Preserve the scene and logs, report issue on GitHub | +| Error Code | Error Description | Possible Error Scenarios or Reasons | Recommended Actions for Users | +| ---------- | --------------------------------- | ----------------------------------------------- | --------------------------------------------------------------------------------- | +| 0x80000207 | Invalid user name | Invalid database username | Check if the database username is correct | +| 0x80000208 | Invalid password | Invalid database password | Check if the database password is correct | +| 0x80000209 | Database name too long | Invalid database name | Check if the database name is correct | +| 0x8000020A | Table name too long | Invalid table name | Check if the table name is correct | +| 0x8000020F | Query terminated | Query was terminated | Check if the query was terminated by a user | +| 0x80000213 | Disconnected from server | Connection was interrupted | Check if the connection was interrupted by someone or if the client is exiting | +| 0x80000216 | Syntax error in SQL | SQL syntax error | Check and correct the SQL statement | +| 0x80000219 | SQL statement too long | SQL length exceeds limit | Check and correct the SQL statement | +| 0x8000021A | File is empty | File content is empty | Check the content of the input file | +| 0x8000021F | Invalid column length | Incorrect column length | Preserve the scene and logs, report issue on GitHub | +| 0x80000222 | Invalid JSON data type | Incorrect JSON data type | Check the JSON content input | +| 0x80000224 | Value out of range | Data size exceeds type range | Check the data value input | +| 0x80000229 | Invalid tsc input | API input error | Check the parameters passed when calling the API from the application | +| 0x8000022A | Stmt API usage error | Incorrect usage of STMT/STMT2 API | Check the order of STMT/STMT2 API calls, applicable scenarios, and error handling | +| 0x8000022B | Stmt table name not set correctly | STMT/STMT2 table name not set correctly | Check if the STMT/STMT2 tbname bind is legal | +| 0x8000022D | Query killed | Query was terminated | Check if the query was terminated by a user | +| 0x8000022E | No available execution node | No available query execution node | Check the current query policy configuration, ensure available Qnode if needed | +| 0x8000022F | Table is not a supertable | Table name in the statement is not a supertable | Check if the table name used in the statement is a supertable | +| 0x80000230 | Stmt cache error | STMT/STMT2 internal cache error | Preserve the scene and logs, report issue on GitHub | +| 0x80000231 | Tsc internal error | TSC internal error | Preserve the scene and logs, report issue on GitHub | ## mnode diff --git a/docs/zh/14-reference/09-error-code.md b/docs/zh/14-reference/09-error-code.md index 52692424fcac..72ae6c708fa6 100644 --- a/docs/zh/14-reference/09-error-code.md +++ b/docs/zh/14-reference/09-error-code.md @@ -85,28 +85,28 @@ description: TDengine 服务端的错误码列表和详细说明 ## tsc -| 错误码 | 错误描述 | 可能的出错场景或者可能的原因 | 建议用户采取的措施 | -| ---------- | --------------------------- | ---------------------------- | -------------------------------------------------------------------------- | -| 0x80000207 | Invalid user name | 数据库用户名不合法 | 检查数据库用户名是否正确 | -| 0x80000208 | Invalid password | 数据库密码不合法 | 检查数据库密码是否正确 | -| 0x80000209 | Database name too long | 数据库名称不合法 | 检查数据库名称是否正确 | -| 0x8000020A | Table name too long | 表名不合法 | 检查表名是否正确 | -| 0x8000020F | Query terminated | 查询被中止 | 检查是否有用户中止了查询 | -| 0x80000213 | Disconnected from server | 连接已中断 | 检查连接是否被人为中断或客户端正在退出 | -| 0x80000216 | Syntax error in SQL | SQL 语法错误 | 检查 SQL 语句并修正错误 | -| 0x80000219 | SQL statement too long | SQL 长度超出限制 | 检查 SQL 语句并修正错误 | -| 0x8000021A | File is empty | 文件内容为空 | 检查输入文件内容 | -| 0x8000021F | Invalid column length | 列长度错误 | 保留现场和日志,github 上报 issue | -| 0x80000222 | Invalid JSON data type | JSON 数据类型错误 | 检查输入 JSON 内容 | -| 0x80000224 | Value out of range | 数据大小超过类型范围 | 检查输入的数据值 | -| 0x80000229 | Invalid tsc input | API 输入错误 | 检查应用调用 API 时传递的参数 | -| 0x8000022A | Stmt API usage error | STMT API 使用错误 | 检查 STMT API 调用的顺序、适用场景、错误处理 | -| 0x8000022B | Stmt table name not set | STMT 未正确设置 table name | 检查是否调用了设置 table name 接口 | -| 0x8000022D | Query killed | 查询被中止 | 检查是否有用户中止了查询 | -| 0x8000022E | No available execution node | 没有可用的查询执行节点 | 检查当前 query policy 配置,如果需要有 Qnode 参与确保系统中存在可用的 Qnode 节点 | -| 0x8000022F | Table is not a super table | 当前语句中的表名不是超级表 | 检查当前语句中所用表名是否是超级表 | -| 0x80000230 | Stmt cache error | STMT 内部缓存出错 | 保留现场和日志,github 上报 issue | -| 0x80000231 | Tsc internal error | TSC 内部错误 | 保留现场和日志,github 上报 issue | +| 错误码 | 错误描述 | 可能的出错场景或者可能的原因 | 建议用户采取的措施 | +| ---------- | --------------------------------- | ---------------------------- | -------------------------------------------------------------------------------- | +| 0x80000207 | Invalid user name | 数据库用户名不合法 | 检查数据库用户名是否正确 | +| 0x80000208 | Invalid password | 数据库密码不合法 | 检查数据库密码是否正确 | +| 0x80000209 | Database name too long | 数据库名称不合法 | 检查数据库名称是否正确 | +| 0x8000020A | Table name too long | 表名不合法 | 检查表名是否正确 | +| 0x8000020F | Query terminated | 查询被中止 | 检查是否有用户中止了查询 | +| 0x80000213 | Disconnected from server | 连接已中断 | 检查连接是否被人为中断或客户端正在退出 | +| 0x80000216 | Syntax error in SQL | SQL 语法错误 | 检查 SQL 语句并修正错误 | +| 0x80000219 | SQL statement too long | SQL 长度超出限制 | 检查 SQL 语句并修正错误 | +| 0x8000021A | File is empty | 文件内容为空 | 检查输入文件内容 | +| 0x8000021F | Invalid column length | 列长度错误 | 保留现场和日志,github 上报 issue | +| 0x80000222 | Invalid JSON data type | JSON 数据类型错误 | 检查输入 JSON 内容 | +| 0x80000224 | Value out of range | 数据大小超过类型范围 | 检查输入的数据值 | +| 0x80000229 | Invalid tsc input | API 输入错误 | 检查应用调用 API 时传递的参数 | +| 0x8000022A | Stmt API usage error | STMT/STMT2 API 使用错误 | 检查 STMT/STMT2 API 调用的顺序、适用场景、错误处理 | +| 0x8000022B | Stmt table name not set correctly | STMT/STMT2 未正确设置表名 | 检查 STMT/STMT2 绑定的表名是否合法 | +| 0x8000022D | Query killed | 查询被中止 | 检查是否有用户中止了查询 | +| 0x8000022E | No available execution node | 没有可用的查询执行节点 | 检查当前 query policy 配置,如果需要有 Qnode 参与确保系统中存在可用的 Qnode 节点 | +| 0x8000022F | Table is not a super table | 当前语句中的表名不是超级表 | 检查当前语句中所用表名是否是超级表 | +| 0x80000230 | Stmt cache error | STMT/STMT2 内部缓存出错 | 保留现场和日志,github 上报 issue | +| 0x80000231 | Tsc internal error | TSC 内部错误 | 保留现场和日志,github 上报 issue | diff --git a/source/client/src/clientStmt2.c b/source/client/src/clientStmt2.c index 68eef0e8449e..71d2a8b4681b 100644 --- a/source/client/src/clientStmt2.c +++ b/source/client/src/clientStmt2.c @@ -257,6 +257,10 @@ static int32_t stmtUpdateBindInfo(TAOS_STMT2* stmt, STableMeta* pTableMeta, void pStmt->bInfo.tbNameFlag = tbNameFlag; tstrncpy(pStmt->bInfo.stbFName, sTableName, sizeof(pStmt->bInfo.stbFName)); + if (pTableMeta->tableType != TSDB_CHILD_TABLE && pTableMeta->tableType != TSDB_SUPER_TABLE) { + pStmt->sql.stbInterlaceMode = false; + } + return TSDB_CODE_SUCCESS; } diff --git a/source/client/test/stmt2Test.cpp b/source/client/test/stmt2Test.cpp index 29f865efee17..f95d0445fe60 100644 --- a/source/client/test/stmt2Test.cpp +++ b/source/client/test/stmt2Test.cpp @@ -1346,7 +1346,7 @@ TEST(stmt2Case, stmt2_insert_non_statndard) { char* tbname = "stmt2_testdb_6.中文表名"; TAOS_STMT2_BINDV bindv = {1, &tbname, NULL, NULL}; code = taos_stmt2_bind_param(stmt, &bindv, -1); - ASSERT_EQ(code, TSDB_CODE_INVALID_PARA); + ASSERT_EQ(code, TSDB_CODE_TSC_STMT_TBNAME_ERROR); taos_stmt2_close(stmt); } diff --git a/source/libs/parser/src/parInsertSml.c b/source/libs/parser/src/parInsertSml.c index 48637038c4e6..7ff0588c0c45 100644 --- a/source/libs/parser/src/parInsertSml.c +++ b/source/libs/parser/src/parInsertSml.c @@ -26,17 +26,17 @@ int32_t qCreateSName(SName* pName, const char* pTableName, int32_t acctId, char* int32_t lino = 0; NEXT_TOKEN(pTableName, sToken); - TSDB_CHECK_CONDITION(sToken.n != 0, code, lino, end, TSDB_CODE_TSC_INVALID_OPERATION); + TSDB_CHECK_CONDITION(sToken.n != 0, code, lino, end, TSDB_CODE_TSC_STMT_TBNAME_ERROR); code = insCreateSName(pName, &sToken, acctId, dbName, &msg); TSDB_CHECK_CODE(code, lino, end); NEXT_TOKEN(pTableName, sToken); - TSDB_CHECK_CONDITION(sToken.n <= 0, code, lino, end, TSDB_CODE_TSC_INVALID_OPERATION); + TSDB_CHECK_CONDITION(sToken.n <= 0, code, lino, end, TSDB_CODE_TSC_STMT_TBNAME_ERROR); end: if (code != 0){ uError("%s failed at %d since %s", __func__, lino, tstrerror(code)); } - return TSDB_CODE_SUCCESS; + return code; } static int32_t smlBoundColumnData(SArray* cols, SBoundColInfo* pBoundInfo, SSchema* pSchema, bool isTag) { diff --git a/source/util/src/terror.c b/source/util/src/terror.c index d27afde8c40e..82ce31dc3100 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -159,7 +159,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TSC_INVALID_JSON_TYPE, "Invalid JSON data typ TAOS_DEFINE_ERROR(TSDB_CODE_TSC_VALUE_OUT_OF_RANGE, "Value out of range") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_INVALID_INPUT, "Invalid tsc input") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_STMT_API_ERROR, "Stmt API usage error") -TAOS_DEFINE_ERROR(TSDB_CODE_TSC_STMT_TBNAME_ERROR, "Stmt table name not set") +TAOS_DEFINE_ERROR(TSDB_CODE_TSC_STMT_TBNAME_ERROR, "Stmt table name not set correctly") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_STMT_CLAUSE_ERROR, "not supported stmt clause") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_QUERY_KILLED, "Query killed") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_NO_EXEC_NODE, "No available execution node in current query policy configuration")