chore: var def optimization
This commit is contained in:
parent
828af14b52
commit
d90c8e834a
|
@ -457,7 +457,7 @@ typedef struct {
|
|||
void* pIter;
|
||||
SMnode* pMnode;
|
||||
STableMetaRsp* pMeta;
|
||||
bool resume;
|
||||
bool restore;
|
||||
bool sysDbRsp;
|
||||
char db[TSDB_DB_FNAME_LEN];
|
||||
char filterTb[TSDB_TABLE_NAME_LEN];
|
||||
|
|
|
@ -3113,8 +3113,8 @@ static int32_t mndRetrieveStbCol(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
|||
|
||||
char typeName[TSDB_TABLE_FNAME_LEN + VARSTR_HEADER_SIZE] = {0};
|
||||
STR_TO_VARSTR(typeName, "SUPER_TABLE");
|
||||
bool fetch = pShow->resume ? false : true;
|
||||
pShow->resume = false;
|
||||
bool fetch = pShow->restore ? false : true;
|
||||
pShow->restore = false;
|
||||
while (numOfRows < rows) {
|
||||
if (fetch) {
|
||||
pShow->pIter = sdbFetch(pSdb, SDB_STB, pShow->pIter, (void **)&pStb);
|
||||
|
@ -3139,7 +3139,7 @@ static int32_t mndRetrieveStbCol(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
|||
}
|
||||
|
||||
if ((numOfRows + pStb->numOfColumns) > rows) {
|
||||
pShow->resume = true;
|
||||
pShow->restore = true;
|
||||
if (numOfRows == 0) {
|
||||
mError("mndRetrieveStbCol failed to get stable cols since buf:%d less than result:%d, stable name:%s, db:%s",
|
||||
rows, pStb->numOfColumns, pStb->name, pStb->db);
|
||||
|
|
|
@ -57,7 +57,7 @@ typedef struct SSysTableScanInfo {
|
|||
const char* pUser;
|
||||
bool sysInfo;
|
||||
bool showRewrite;
|
||||
bool resume;
|
||||
bool restore;
|
||||
SNode* pCondition; // db_name filter condition, to discard data that are not in current database
|
||||
SMTbCursor* pCur; // cursor for iterate the local table meta store.
|
||||
SSysTableIndex* pIdx; // idx for local table meta
|
||||
|
@ -529,10 +529,10 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int32_t resume = pInfo->resume;
|
||||
pInfo->resume = false;
|
||||
while (resume || ((ret = metaTbCursorNext(pInfo->pCur, TSDB_TABLE_MAX)) == 0)) {
|
||||
if (resume) resume = false;
|
||||
int32_t restore = pInfo->restore;
|
||||
pInfo->restore = false;
|
||||
while (restore || ((ret = metaTbCursorNext(pInfo->pCur, TSDB_TABLE_MAX)) == 0)) {
|
||||
if (restore) restore = false;
|
||||
char typeName[TSDB_TABLE_FNAME_LEN + VARSTR_HEADER_SIZE] = {0};
|
||||
char tableName[TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE] = {0};
|
||||
|
||||
|
@ -584,7 +584,7 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) {
|
|||
if ((numOfRows + schemaRow->nCols) > pOperator->resultInfo.capacity) {
|
||||
relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock, pOperator->exprSupp.pFilterInfo);
|
||||
numOfRows = 0;
|
||||
pInfo->resume = true;
|
||||
pInfo->restore = true;
|
||||
|
||||
if (pInfo->pRes->info.rows > 0) {
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue