stmt auto create table
This commit is contained in:
parent
f506604d65
commit
9fcc676e3f
|
@ -339,6 +339,7 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
|
||||||
|
|
||||||
STableDataBlocks *pBlockInExec = taosHashGet(pStmt->exec.pBlockHash, pStmt->bInfo.tbFName, strlen(pStmt->bInfo.tbFName));
|
STableDataBlocks *pBlockInExec = taosHashGet(pStmt->exec.pBlockHash, pStmt->bInfo.tbFName, strlen(pStmt->bInfo.tbFName));
|
||||||
if (pBlockInExec) {
|
if (pBlockInExec) {
|
||||||
|
pStmt->bInfo.needParse = false;
|
||||||
pStmt->bInfo.inExecCache = true;
|
pStmt->bInfo.inExecCache = true;
|
||||||
|
|
||||||
if (pStmt->sql.autoCreateTbl) {
|
if (pStmt->sql.autoCreateTbl) {
|
||||||
|
@ -364,6 +365,9 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
|
||||||
SStmtTableCache* pCache = taosHashGet(pStmt->sql.pTableCache, &pStmt->bInfo.tbSuid, sizeof(pStmt->bInfo.tbSuid));
|
SStmtTableCache* pCache = taosHashGet(pStmt->sql.pTableCache, &pStmt->bInfo.tbSuid, sizeof(pStmt->bInfo.tbSuid));
|
||||||
if (pCache) {
|
if (pCache) {
|
||||||
pStmt->bInfo.needParse = false;
|
pStmt->bInfo.needParse = false;
|
||||||
|
pStmt->exec.autoCreateTbl = true;
|
||||||
|
|
||||||
|
pStmt->bInfo.tbUid = 0;
|
||||||
|
|
||||||
STableDataBlocks* pNewBlock = NULL;
|
STableDataBlocks* pNewBlock = NULL;
|
||||||
STMT_ERR_RET(stmtRebuildDataBlock(pStmt, pCache->pDataBlock, &pNewBlock, 0));
|
STMT_ERR_RET(stmtRebuildDataBlock(pStmt, pCache->pDataBlock, &pNewBlock, 0));
|
||||||
|
|
|
@ -1393,7 +1393,6 @@ int32_t qBindStmtColsValue(void* pBlock, TAOS_MULTI_BIND* bind, char* msgBuf, in
|
||||||
tdSRowPrint(row, pSTSchema, __func__);
|
tdSRowPrint(row, pSTSchema, __func__);
|
||||||
taosMemoryFree(pSTSchema);
|
taosMemoryFree(pSTSchema);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pDataBlock->size += extendedRowSize;
|
pDataBlock->size += extendedRowSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1480,6 +1479,7 @@ int32_t qBindStmtSingleColValue(void* pBlock, TAOS_MULTI_BIND* bind, char* msgBu
|
||||||
taosMemoryFree(pSTSchema);
|
taosMemoryFree(pSTSchema);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rowEnd) {
|
if (rowEnd) {
|
||||||
|
|
|
@ -233,9 +233,9 @@ CaseCtrl gCaseCtrl = {
|
||||||
.printRes = false,
|
.printRes = false,
|
||||||
.runTimes = 0,
|
.runTimes = 0,
|
||||||
.caseIdx = -1,
|
.caseIdx = -1,
|
||||||
.caseNum = -1,
|
.caseNum = 1,
|
||||||
.caseRunIdx = -1,
|
.caseRunIdx = 20,
|
||||||
.caseRunNum = -1,
|
.caseRunNum = 1,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2988,7 +2988,7 @@ void prepareCheckResultImpl(TAOS * taos, char *tname, bool printr, int expec
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printf("!!!expect rows %d mis-match rows %d fetched from %s\n", expected, rows, tname);
|
printf("!!!expect rows %d mis-match rows %d fetched from %s\n", expected, rows, tname);
|
||||||
//exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3465,11 +3465,13 @@ void* runCaseList(TAOS *taos) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void runAll(TAOS *taos) {
|
void runAll(TAOS *taos) {
|
||||||
|
#if 0
|
||||||
strcpy(gCaseCtrl.caseCatalog, "Normal Test");
|
strcpy(gCaseCtrl.caseCatalog, "Normal Test");
|
||||||
printf("%s Begin\n", gCaseCtrl.caseCatalog);
|
printf("%s Begin\n", gCaseCtrl.caseCatalog);
|
||||||
runCaseList(taos);
|
runCaseList(taos);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
strcpy(gCaseCtrl.caseCatalog, "Auto Create Table Test");
|
strcpy(gCaseCtrl.caseCatalog, "Auto Create Table Test");
|
||||||
gCaseCtrl.autoCreateTbl = true;
|
gCaseCtrl.autoCreateTbl = true;
|
||||||
printf("%s Begin\n", gCaseCtrl.caseCatalog);
|
printf("%s Begin\n", gCaseCtrl.caseCatalog);
|
||||||
|
|
Loading…
Reference in New Issue