Skip to content

Commit

Permalink
Merge branch 'main' into merge/to3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Jun 28, 2024
2 parents 00cb835 + 6d74823 commit 79327c8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/benchData.c
Original file line number Diff line number Diff line change
Expand Up @@ -1991,6 +1991,20 @@ uint32_t bindParamBatch(threadInfo *pThreadInfo,
}
}

/*
1. The last batch size may be smaller than the previous batch size.
2. When inserting another table, the batch size reset again(bigger than lastBatchSize)
*/
int lastBatchSize = ((TAOS_MULTI_BIND *) pThreadInfo->bindParams)->num;
if (batch != lastBatchSize) {
for (int c = 0; c < columnCount + 1; c++) {
TAOS_MULTI_BIND *param =
(TAOS_MULTI_BIND *) (pThreadInfo->bindParams +
sizeof(TAOS_MULTI_BIND) * c);
param->num = batch;
}
}

int64_t start = toolsGetTimestampUs();
if (taos_stmt_bind_param_batch(
stmt, (TAOS_MULTI_BIND *)pThreadInfo->bindParams)) {
Expand Down

0 comments on commit 79327c8

Please sign in to comment.