enh: improve error reporting information
This commit is contained in:
parent
fddf3f16cf
commit
e15e40abdf
|
@ -1492,6 +1492,7 @@ static void resetEnvPreTable(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStm
|
|||
pStmt->pBoundCols = NULL;
|
||||
pStmt->usingTableProcessing = false;
|
||||
pStmt->fileProcessing = false;
|
||||
pStmt->usingTableName.type = 0;
|
||||
}
|
||||
|
||||
// input pStmt->pSql: [(field1_name, ...)] [ USING ... ] VALUES ... | FILE ...
|
||||
|
@ -1539,6 +1540,10 @@ static int32_t checkTableClauseFirstToken(SInsertParseContext* pCxt, SVnodeModif
|
|||
}
|
||||
}
|
||||
|
||||
if (TK_NK_ID != pTbName->type && TK_NK_STRING != pTbName->type) {
|
||||
return buildSyntaxErrMsg(&pCxt->msg, "table_name is expected", pTbName->z);
|
||||
}
|
||||
|
||||
*pHasData = true;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue