fix: unknow db error when query ins_tables with table_name=""

This commit is contained in:
slzhou 2023-03-23 13:49:08 +08:00
parent cfcb6fe635
commit 40a78bde50
2 changed files with 6 additions and 1 deletions

View File

@ -444,7 +444,7 @@ static int32_t getInsTagsTableTargetNameFromOp(int32_t acctId, SOperatorNode* pO
} else if (QUERY_NODE_VALUE == nodeType(pOper->pRight)) {
pVal = (SValueNode*)pOper->pRight;
}
if (NULL == pCol || NULL == pVal) {
if (NULL == pCol || NULL == pVal || NULL == pVal->literal || 0 == strcmp(pVal->literal, "")) {
return TSDB_CODE_SUCCESS;
}

View File

@ -51,6 +51,11 @@ if $data00 != @ins_stables@ then
return -1
endi
sql select * from information_schema.ins_tables where table_name='';
if $rows != 0 then
return -1
endi
sql select tbname from information_schema.ins_tables;
print $rows $data00
if $rows != 33 then