fix: fix show queries crash and error msg
This commit is contained in:
parent
b4d6cc79f6
commit
156567b9bc
|
@ -555,6 +555,7 @@ int32_t* taosGetErrno();
|
|||
#define TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE TAOS_DEF_ERROR_CODE(0, 0x265F)
|
||||
#define TSDB_CODE_PAR_INVALID_SMA_INDEX TAOS_DEF_ERROR_CODE(0, 0x2660)
|
||||
#define TSDB_CODE_PAR_INVALID_SELECTED_EXPR TAOS_DEF_ERROR_CODE(0, 0x2661)
|
||||
#define TSDB_CODE_PAR_GET_META_ERROR TAOS_DEF_ERROR_CODE(0, 0x2662)
|
||||
#define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF)
|
||||
|
||||
//planner
|
||||
|
|
|
@ -353,6 +353,7 @@ int32_t hbBuildQueryDesc(SQueryHbReqBasic *hbBasic, STscObj *pObj) {
|
|||
desc.subDesc = NULL;
|
||||
desc.subPlanNum = 0;
|
||||
}
|
||||
ASSERT(desc.subPlanNum == taosArrayGetSize(desc.subDesc));
|
||||
} else {
|
||||
desc.subDesc = NULL;
|
||||
}
|
||||
|
|
|
@ -305,6 +305,8 @@ static int32_t tDeserializeSClientHbReq(SDecoder *pDecoder, SClientHbReq *pReq)
|
|||
taosArrayPush(desc.subDesc, &sDesc);
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(desc.subPlanNum == taosArrayGetSize(desc.subDesc));
|
||||
|
||||
taosArrayPush(pReq->query->queryDesc, &desc);
|
||||
}
|
||||
|
|
|
@ -1857,7 +1857,7 @@ static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) {
|
|||
pCxt, toName(pCxt->pParseCxt->acctId, pRealTable->table.dbName, pRealTable->table.tableName, &name),
|
||||
&(pRealTable->pMeta));
|
||||
if (TSDB_CODE_SUCCESS != code) {
|
||||
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_TABLE_NOT_EXIST, pRealTable->table.tableName);
|
||||
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_GET_META_ERROR, tstrerror(code));
|
||||
}
|
||||
code = setTableVgroupList(pCxt, &name, pRealTable);
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
|
|
|
@ -31,6 +31,8 @@ static char* getSyntaxErrFormat(int32_t errCode) {
|
|||
return "Invalid column name: %s";
|
||||
case TSDB_CODE_PAR_TABLE_NOT_EXIST:
|
||||
return "Table does not exist: %s";
|
||||
case TSDB_CODE_PAR_GET_META_ERROR:
|
||||
return "Fail to get table info, error: %s";
|
||||
case TSDB_CODE_PAR_AMBIGUOUS_COLUMN:
|
||||
return "Column ambiguously defined: %s";
|
||||
case TSDB_CODE_PAR_WRONG_VALUE_TYPE:
|
||||
|
|
|
@ -916,7 +916,7 @@ int32_t schProcessOnOpBegin(SSchJob* pJob, SCH_OP_TYPE type, SSchedulerReq* pReq
|
|||
qDebug("job not initialized or not executable job, refId:0x%" PRIx64, pJob->refId);
|
||||
SCH_ERR_RET(TSDB_CODE_SCH_STATUS_ERROR);
|
||||
}
|
||||
break;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
default:
|
||||
SCH_JOB_ELOG("unknown operation type %d", type);
|
||||
SCH_ERR_RET(TSDB_CODE_TSC_APP_ERROR);
|
||||
|
|
|
@ -559,6 +559,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_NO_VALID_FUNC_IN_WIN, "Not valid function
|
|||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE, "Only support single table")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SMA_INDEX, "Invalid sma index")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SELECTED_EXPR, "Invalid SELECTed expression")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_GET_META_ERROR, "Fail to get table info")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INTERNAL_ERROR, "Parser internal error")
|
||||
|
||||
//planner
|
||||
|
|
Loading…
Reference in New Issue