diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 965e85efbd..37af50dbce 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1465,7 +1465,6 @@ static int32_t setExprInfoForFunctions(SQueryInfo* pQueryInfo, SSchema* pSchema, int32_t addExprAndResultField(SQueryInfo* pQueryInfo, int32_t colIndex, tSQLExprItem* pItem, bool finalResult) { STableMetaInfo* pTableMetaInfo = NULL; - int32_t optr = pItem->pNode->nSQLOptr; const char* msg1 = "not support column types"; diff --git a/tests/tsim/src/simExe.c b/tests/tsim/src/simExe.c index ed193fd182..f5b09a4840 100644 --- a/tests/tsim/src/simExe.c +++ b/tests/tsim/src/simExe.c @@ -640,7 +640,7 @@ bool simExecuteNativeSqlCommand(SScript *script, char *rest, bool isSlow) { for (int attempt = 0; attempt < 3; ++attempt) { simLogSql(rest); pSql = taos_query(script->taos, rest); - ret = terrno; + ret = taos_errno(pSql); if (ret == TSDB_CODE_TABLE_ALREADY_EXIST || ret == TSDB_CODE_DB_ALREADY_EXIST) { @@ -922,8 +922,7 @@ bool simExecuteSqlErrorCmd(SScript *script, char *rest) { } else { pSql = taos_query(script->taos, rest); - ret = terrno; - + ret = taos_errno(pSql); taos_free_result(pSql); }