stmt2/interlace: separate interlace batch adding into exec2
This commit is contained in:
parent
bc0d958f58
commit
bcfd74e697
|
@ -1200,22 +1200,6 @@ static int stmtAddBatch2(TAOS_STMT2* stmt) {
|
||||||
|
|
||||||
STMT_ERR_RET(stmtSwitchStatus(pStmt, STMT_ADD_BATCH));
|
STMT_ERR_RET(stmtSwitchStatus(pStmt, STMT_ADD_BATCH));
|
||||||
|
|
||||||
if (pStmt->sql.stbInterlaceMode) {
|
|
||||||
int64_t startUs2 = taosGetTimestampUs();
|
|
||||||
pStmt->stat.addBatchUs += startUs2 - startUs;
|
|
||||||
|
|
||||||
pStmt->sql.siInfo.tableColsReady = false;
|
|
||||||
|
|
||||||
SStmtQNode* param = NULL;
|
|
||||||
STMT_ERR_RET(stmtAllocQNodeFromBuf(&pStmt->sql.siInfo.tbBuf, (void**)¶m));
|
|
||||||
param->restoreTbCols = true;
|
|
||||||
param->next = NULL;
|
|
||||||
|
|
||||||
stmtEnqueue(pStmt, param);
|
|
||||||
|
|
||||||
return TSDB_CODE_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
STMT_ERR_RET(stmtCacheBlock(pStmt));
|
STMT_ERR_RET(stmtCacheBlock(pStmt));
|
||||||
|
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
|
@ -1627,6 +1611,22 @@ int stmtExec2(TAOS_STMT2* stmt, int* affected_rows) {
|
||||||
|
|
||||||
STMT_ERR_RET(stmtSwitchStatus(pStmt, STMT_EXECUTE));
|
STMT_ERR_RET(stmtSwitchStatus(pStmt, STMT_EXECUTE));
|
||||||
|
|
||||||
|
if (pStmt->sql.stbInterlaceMode) {
|
||||||
|
int64_t startUs2 = taosGetTimestampUs();
|
||||||
|
pStmt->stat.addBatchUs += startUs2 - startUs;
|
||||||
|
|
||||||
|
pStmt->sql.siInfo.tableColsReady = false;
|
||||||
|
|
||||||
|
SStmtQNode* param = NULL;
|
||||||
|
STMT_ERR_RET(stmtAllocQNodeFromBuf(&pStmt->sql.siInfo.tbBuf, (void**)¶m));
|
||||||
|
param->restoreTbCols = true;
|
||||||
|
param->next = NULL;
|
||||||
|
|
||||||
|
stmtEnqueue(pStmt, param);
|
||||||
|
|
||||||
|
return TSDB_CODE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if (STMT_TYPE_QUERY != pStmt->sql.type) {
|
if (STMT_TYPE_QUERY != pStmt->sql.type) {
|
||||||
if (pStmt->sql.stbInterlaceMode) {
|
if (pStmt->sql.stbInterlaceMode) {
|
||||||
int64_t startTs = taosGetTimestampUs();
|
int64_t startTs = taosGetTimestampUs();
|
||||||
|
|
Loading…
Reference in New Issue