提交 9fcc676e 编写于 作者: D dapan1121

stmt auto create table

上级 f506604d
......@@ -339,6 +339,7 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
STableDataBlocks *pBlockInExec = taosHashGet(pStmt->exec.pBlockHash, pStmt->bInfo.tbFName, strlen(pStmt->bInfo.tbFName));
if (pBlockInExec) {
pStmt->bInfo.needParse = false;
pStmt->bInfo.inExecCache = true;
if (pStmt->sql.autoCreateTbl) {
......@@ -364,7 +365,10 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
SStmtTableCache* pCache = taosHashGet(pStmt->sql.pTableCache, &pStmt->bInfo.tbSuid, sizeof(pStmt->bInfo.tbSuid));
if (pCache) {
pStmt->bInfo.needParse = false;
pStmt->exec.autoCreateTbl = true;
pStmt->bInfo.tbUid = 0;
STableDataBlocks* pNewBlock = NULL;
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__);
taosMemoryFree(pSTSchema);
#endif
pDataBlock->size += extendedRowSize;
}
......@@ -1480,6 +1479,7 @@ int32_t qBindStmtSingleColValue(void* pBlock, TAOS_MULTI_BIND* bind, char* msgBu
taosMemoryFree(pSTSchema);
}
#endif
}
if (rowEnd) {
......
......@@ -233,9 +233,9 @@ CaseCtrl gCaseCtrl = {
.printRes = false,
.runTimes = 0,
.caseIdx = -1,
.caseNum = -1,
.caseRunIdx = -1,
.caseRunNum = -1,
.caseNum = 1,
.caseRunIdx = 20,
.caseRunNum = 1,
};
#endif
......@@ -2988,7 +2988,7 @@ void prepareCheckResultImpl(TAOS * taos, char *tname, bool printr, int expec
}
} else {
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) {
#if 0
strcpy(gCaseCtrl.caseCatalog, "Normal Test");
printf("%s Begin\n", gCaseCtrl.caseCatalog);
runCaseList(taos);
#endif
#if 0
#if 1
strcpy(gCaseCtrl.caseCatalog, "Auto Create Table Test");
gCaseCtrl.autoCreateTbl = true;
printf("%s Begin\n", gCaseCtrl.caseCatalog);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册