提交 a704abe9 编写于 作者: D dapan1121

fix: bind single column memory issue

上级 af9aba51
......@@ -764,7 +764,7 @@ int stmtAddBatch(TAOS_STMT* stmt) {
STMT_ERR_RET(stmtSwitchStatus(pStmt, STMT_ADD_BATCH));
STMT_ERR_RET(stmtCacheBlock(pStmt));
//STMT_ERR_RET(stmtCacheBlock(pStmt));
return TSDB_CODE_SUCCESS;
}
......
......@@ -178,6 +178,8 @@ int32_t qBindStmtColsValue(void* pBlock, TAOS_MULTI_BIND* bind, char* msgBuf, in
tColDataAddValueByBind(pCol, bind + c);
}
qDebug("stmt all %d columns bind %d rows data", boundInfo->numOfBound, rowNum);
return TSDB_CODE_SUCCESS;
}
......@@ -190,16 +192,18 @@ int32_t qBindStmtSingleColValue(void* pBlock, TAOS_MULTI_BIND* bind, char* msgBu
SSchema* pColSchema = &pSchema[boundInfo->pColIndex[colIdx]];
SColData* pCol = taosArrayGet(pDataBlock->pData->aCol, colIdx);
if (bind[colIdx].num != rowNum) {
if (bind->num != rowNum) {
return buildInvalidOperationMsg(&pBuf, "row number in each bind param should be the same");
}
if (bind[colIdx].buffer_type != pColSchema->type) {
if (bind->buffer_type != pColSchema->type) {
return buildInvalidOperationMsg(&pBuf, "column type mis-match with buffer type");
}
tColDataAddValueByBind(pCol, bind);
qDebug("stmt col %d bind %d rows data", colIdx, rowNum);
return TSDB_CODE_SUCCESS;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册