fix: select ins_columns for stb with 4096 columns
This commit is contained in:
parent
acd57f03e6
commit
ba5c3fb2ab
|
@ -3114,6 +3114,7 @@ static int32_t mndRetrieveStbCol(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
char typeName[TSDB_TABLE_FNAME_LEN + VARSTR_HEADER_SIZE] = {0};
|
char typeName[TSDB_TABLE_FNAME_LEN + VARSTR_HEADER_SIZE] = {0};
|
||||||
STR_TO_VARSTR(typeName, "SUPER_TABLE");
|
STR_TO_VARSTR(typeName, "SUPER_TABLE");
|
||||||
while (numOfRows < rows) {
|
while (numOfRows < rows) {
|
||||||
|
void *prevIter = pShow->pIter;
|
||||||
pShow->pIter = sdbFetch(pSdb, SDB_STB, pShow->pIter, (void **)&pStb);
|
pShow->pIter = sdbFetch(pSdb, SDB_STB, pShow->pIter, (void **)&pStb);
|
||||||
if (pShow->pIter == NULL) break;
|
if (pShow->pIter == NULL) break;
|
||||||
|
|
||||||
|
@ -3122,6 +3123,12 @@ static int32_t mndRetrieveStbCol(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((numOfRows + pStb->numOfColumns) > rows) {
|
||||||
|
pShow->pIter = prevIter;
|
||||||
|
sdbRelease(pSdb, pStb);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
SName name = {0};
|
SName name = {0};
|
||||||
char stbName[TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE] = {0};
|
char stbName[TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE] = {0};
|
||||||
mndExtractTbNameFromStbFullName(pStb->name, &stbName[VARSTR_HEADER_SIZE], TSDB_TABLE_NAME_LEN);
|
mndExtractTbNameFromStbFullName(pStb->name, &stbName[VARSTR_HEADER_SIZE], TSDB_TABLE_NAME_LEN);
|
||||||
|
|
|
@ -436,7 +436,7 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) {
|
||||||
int32_t numOfRows = 0;
|
int32_t numOfRows = 0;
|
||||||
|
|
||||||
SSDataBlock* dataBlock = buildInfoSchemaTableMetaBlock(TSDB_INS_TABLE_COLS);
|
SSDataBlock* dataBlock = buildInfoSchemaTableMetaBlock(TSDB_INS_TABLE_COLS);
|
||||||
blockDataEnsureCapacity(dataBlock, pOperator->resultInfo.capacity + TSDB_MAX_COLUMNS);
|
blockDataEnsureCapacity(dataBlock, pOperator->resultInfo.capacity);
|
||||||
|
|
||||||
const char* db = NULL;
|
const char* db = NULL;
|
||||||
int32_t vgId = 0;
|
int32_t vgId = 0;
|
||||||
|
|
Loading…
Reference in New Issue