commit
e7baca3651
|
@ -952,6 +952,9 @@ int doParserInsertSql(SSqlObj *pSql, char *str) {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASSERT(((NULL == pSql->asyncTblPos) && (NULL == pSql->pTableHashList))
|
||||||
|
|| ((NULL != pSql->asyncTblPos) && (NULL != pSql->pTableHashList)));
|
||||||
|
|
||||||
if ((NULL == pSql->asyncTblPos) && (NULL == pSql->pTableHashList)) {
|
if ((NULL == pSql->asyncTblPos) && (NULL == pSql->pTableHashList)) {
|
||||||
pSql->pTableHashList = taosInitIntHash(128, POINTER_BYTES, taosHashInt);
|
pSql->pTableHashList = taosInitIntHash(128, POINTER_BYTES, taosHashInt);
|
||||||
pSql->cmd.pDataBlocks = tscCreateBlockArrayList();
|
pSql->cmd.pDataBlocks = tscCreateBlockArrayList();
|
||||||
|
@ -960,6 +963,7 @@ int doParserInsertSql(SSqlObj *pSql, char *str) {
|
||||||
goto _error_clean;
|
goto _error_clean;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
ASSERT((NULL != pSql->asyncTblPos) && (NULL != pSql->pTableHashList));
|
||||||
str = pSql->asyncTblPos;
|
str = pSql->asyncTblPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -997,8 +1001,13 @@ int doParserInsertSql(SSqlObj *pSql, char *str) {
|
||||||
void *fp = pSql->fp;
|
void *fp = pSql->fp;
|
||||||
if ((code = tscParseSqlForCreateTableOnDemand(&str, pSql)) != TSDB_CODE_SUCCESS) {
|
if ((code = tscParseSqlForCreateTableOnDemand(&str, pSql)) != TSDB_CODE_SUCCESS) {
|
||||||
if (fp != NULL) {
|
if (fp != NULL) {
|
||||||
//goto _clean;
|
if (TSDB_CODE_ACTION_IN_PROGRESS == code) {
|
||||||
|
tscTrace("async insert and waiting to get meter meta, then continue parse sql: %s", pSql->asyncTblPos);
|
||||||
return code;
|
return code;
|
||||||
|
}
|
||||||
|
tscTrace("async insert parse error, code:%d, %s", code, tsError[code]);
|
||||||
|
pSql->asyncTblPos = NULL;
|
||||||
|
goto _error_clean; // TODO: should _clean or _error_clean to async flow ????
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* for async insert, the free data block operations, which is tscDestroyBlockArrayList,
|
* for async insert, the free data block operations, which is tscDestroyBlockArrayList,
|
||||||
|
@ -1239,10 +1248,12 @@ int tsParseSql(SSqlObj *pSql, char *acct, char *db, bool multiVnodeInsertion) {
|
||||||
tscRemoveAllMeterMetaInfo(&pSql->cmd, false);
|
tscRemoveAllMeterMetaInfo(&pSql->cmd, false);
|
||||||
|
|
||||||
if (NULL == pSql->asyncTblPos) {
|
if (NULL == pSql->asyncTblPos) {
|
||||||
tscTrace("continue parse sql: %s", pSql->asyncTblPos);
|
|
||||||
tscCleanSqlCmd(&pSql->cmd);
|
tscCleanSqlCmd(&pSql->cmd);
|
||||||
|
} else {
|
||||||
|
tscTrace("continue parse sql: %s", pSql->asyncTblPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (tscIsInsertOrImportData(pSql->sqlstr)) {
|
if (tscIsInsertOrImportData(pSql->sqlstr)) {
|
||||||
/*
|
/*
|
||||||
* only for async multi-vnode insertion
|
* only for async multi-vnode insertion
|
||||||
|
|
Loading…
Reference in New Issue