提交 3fdc9782 编写于 作者: H Haojun Liao

[TD-225]fix bugs in regression test.

上级 acfe7d34
...@@ -917,12 +917,15 @@ int32_t tscSetTableFullName(STableMetaInfo* pTableMetaInfo, SStrToken* pTableNam ...@@ -917,12 +917,15 @@ int32_t tscSetTableFullName(STableMetaInfo* pTableMetaInfo, SStrToken* pTableNam
} }
} else { // get current DB name first, and then set it into path } else { // get current DB name first, and then set it into path
char* t = getCurrentDBName(pSql); char* t = getCurrentDBName(pSql);
assert(strlen(t) > 0); if (strlen(t) == 0) {
return TSDB_CODE_TSC_DB_NOT_SELECTED;
}
code = tNameFromString(&pTableMetaInfo->name, t, T_NAME_ACCT|T_NAME_DB); code = tNameFromString(&pTableMetaInfo->name, t, T_NAME_ACCT | T_NAME_DB);
if (code != 0) { if (code != 0) {
code = TSDB_CODE_TSC_DB_NOT_SELECTED; return TSDB_CODE_TSC_DB_NOT_SELECTED;
} else { }
char name[TSDB_TABLE_FNAME_LEN] = {0}; char name[TSDB_TABLE_FNAME_LEN] = {0};
strncpy(name, pTableName->z, pTableName->n); strncpy(name, pTableName->z, pTableName->n);
...@@ -931,7 +934,6 @@ int32_t tscSetTableFullName(STableMetaInfo* pTableMetaInfo, SStrToken* pTableNam ...@@ -931,7 +934,6 @@ int32_t tscSetTableFullName(STableMetaInfo* pTableMetaInfo, SStrToken* pTableNam
code = invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1); code = invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1);
} }
} }
}
return code; return code;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册