diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index 07449081671ebf7fc96de41fb79420105d6cb08d..f114c58a0b18600a683ab8ab2e49cee84e8b735f 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -547,21 +547,21 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) { if (schema != NULL) { schemaRow = *(SSchemaWrapper**)schema; } else { - SMetaReader metaReader = {0}; - metaReaderInit(&metaReader, pInfo->readHandle.meta, 0); - int code = metaGetTableEntryByUid(&metaReader, suid); + SMetaReader smrSuperTable = {0}; + metaReaderInit(&smrSuperTable, pInfo->readHandle.meta, 0); + int code = metaGetTableEntryByUid(&smrSuperTable, suid); if (code != TSDB_CODE_SUCCESS) { // terrno has been set by metaGetTableEntryByName, therefore, return directly qError("sysTableScanUserCols get meta by suid:%" PRId64 " error, code:%d", suid, code); - metaReaderClear(&metaReader); + metaReaderClear(&smrSuperTable); blockDataDestroy(dataBlock); pInfo->loadInfo.totalRows = 0; return NULL; } - SSchemaWrapper* schemaWrapper = tCloneSSchemaWrapper(&metaReader.me.stbEntry.schemaRow); + SSchemaWrapper* schemaWrapper = tCloneSSchemaWrapper(&smrSuperTable.me.stbEntry.schemaRow); taosHashPut(pInfo->pSchema, &suid, sizeof(int64_t), &schemaWrapper, POINTER_BYTES); schemaRow = schemaWrapper; - metaReaderClear(&metaReader); + metaReaderClear(&smrSuperTable); } } else if (pInfo->pCur->mr.me.type == TSDB_NORMAL_TABLE) { qDebug("sysTableScanUserCols cursor get normal table"); diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index e0c48e96082892ffc865c8a757c5100e159e144e..f4c07eec6458ad96d5c08d50e7f77ff47babaccb 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -107,7 +107,6 @@ class TDTestCase: for i in range (5): self.stb4096 = 'create table db2.stb%d (ts timestamp' % (i) for j in range (4094 - i): - # for j in range (499): self.stb4096 += ', c%d int' % (j) self.stb4096 += ') tags (t1 int)' tdSql.execute(self.stb4096) @@ -125,7 +124,7 @@ class TDTestCase: self.ntb4096 += ')' tdSql.execute(self.ntb4096) tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="NORMAL_TABLE"') - tdSql.checkEqual(204700,len(tdSql.queryResult)) + tdSql.checkEqual(20470,len(tdSql.queryResult)) def run(self): self.prepare_data()