[td-225]fix bug found by the regression test.
This commit is contained in:
parent
5ac04f14ef
commit
aa60eb5722
|
@ -346,7 +346,7 @@ void tscTableMetaCallBack(void *param, TAOS_RES *res, int code) {
|
||||||
if (pSql->pStream == NULL) {
|
if (pSql->pStream == NULL) {
|
||||||
SQueryInfo *pQueryInfo = tscGetQueryInfo(pCmd);
|
SQueryInfo *pQueryInfo = tscGetQueryInfo(pCmd);
|
||||||
|
|
||||||
if (TSDB_QUERY_HAS_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_INSERT)) {
|
if (pQueryInfo != NULL && TSDB_QUERY_HAS_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_INSERT)) {
|
||||||
tscDebug("0x%" PRIx64 " continue parse sql after get table-meta", pSql->self);
|
tscDebug("0x%" PRIx64 " continue parse sql after get table-meta", pSql->self);
|
||||||
|
|
||||||
code = tsParseSql(pSql, false);
|
code = tsParseSql(pSql, false);
|
||||||
|
@ -376,7 +376,6 @@ void tscTableMetaCallBack(void *param, TAOS_RES *res, int code) {
|
||||||
} else {
|
} else {
|
||||||
if (pSql->retryReason != TSDB_CODE_SUCCESS) {
|
if (pSql->retryReason != TSDB_CODE_SUCCESS) {
|
||||||
tscDebug("0x%" PRIx64 " update cached table-meta, re-validate sql statement and send query again", pSql->self);
|
tscDebug("0x%" PRIx64 " update cached table-meta, re-validate sql statement and send query again", pSql->self);
|
||||||
tscResetSqlCmd(pCmd, false);
|
|
||||||
pSql->retryReason = TSDB_CODE_SUCCESS;
|
pSql->retryReason = TSDB_CODE_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
tscDebug("0x%" PRIx64 " cached table-meta, continue validate sql statement and send query", pSql->self);
|
tscDebug("0x%" PRIx64 " cached table-meta, continue validate sql statement and send query", pSql->self);
|
||||||
|
|
|
@ -2241,6 +2241,10 @@ int tscProcessMultiTableMetaRsp(SSqlObj *pSql) {
|
||||||
pMsg = buf;
|
pMsg = buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pParentCmd->pTableMetaMap == NULL) {
|
||||||
|
pParentCmd->pTableMetaMap = taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK);
|
||||||
|
}
|
||||||
|
|
||||||
for (int32_t i = 0; i < pMultiMeta->numOfTables; i++) {
|
for (int32_t i = 0; i < pMultiMeta->numOfTables; i++) {
|
||||||
STableMetaMsg *pMetaMsg = (STableMetaMsg *)pMsg;
|
STableMetaMsg *pMetaMsg = (STableMetaMsg *)pMsg;
|
||||||
int32_t code = tableMetaMsgConvert(pMetaMsg);
|
int32_t code = tableMetaMsgConvert(pMetaMsg);
|
||||||
|
|
Loading…
Reference in New Issue