Merge pull request #20606 from taosdata/szhou/fix-td23288

fix: query ins_table with table_name = '' results in db error
This commit is contained in:
dapan1121 2023-03-25 08:56:24 +08:00 committed by GitHub
commit 7c7e121632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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