fix row clear problem
This commit is contained in:
parent
0992136ef5
commit
2279e931b8
|
@ -131,7 +131,6 @@ int32_t tValueCompare(const SValue *tv1, const SValue *tv2);
|
|||
int32_t tRowBuild(SArray *aColVal, const STSchema *pTSchema, SRow **ppRow);
|
||||
int32_t tRowGet(SRow *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal);
|
||||
void tRowDestroy(SRow *pRow);
|
||||
void tRowDataClear(SRow *pColData);
|
||||
int32_t tRowSort(SArray *aRowP);
|
||||
int32_t tRowMerge(SArray *aRowP, STSchema *pTSchema, int8_t flag);
|
||||
int32_t tRowUpsertColData(SRow *pRow, STSchema *pTSchema, SColData *aColData, int32_t nColData, int32_t flag);
|
||||
|
|
|
@ -1430,7 +1430,7 @@ int stmtBindBatch2(TAOS_STMT2* stmt, TAOS_STMT2_BIND* bind, int32_t colIdx) {
|
|||
pStmt->taos->optionInfo.charsetCxt);
|
||||
} else {
|
||||
taosArrayDestroy(pCols);
|
||||
(*pDataBlock)->pData->aCol = taosArrayInit(bind->num, POINTER_BYTES);
|
||||
(*pDataBlock)->pData->aCol = taosArrayInit(20, POINTER_BYTES);
|
||||
code =
|
||||
qBindStmtColsValue2(*pDataBlock, (*pDataBlock)->pData->aRowP, bind, pStmt->exec.pRequest->msgBuf, pStmt->exec.pRequest->msgBufLen,
|
||||
&pStmt->sql.siInfo.pTSchema, pStmt->sql.pBindInfo, pStmt->taos->optionInfo.charsetCxt);
|
||||
|
|
|
@ -669,15 +669,6 @@ void tRowDestroy(SRow *pRow) {
|
|||
if (pRow) taosMemoryFree(pRow);
|
||||
}
|
||||
|
||||
void tRowDataClear(SRow *pColData) {
|
||||
pColData->ts = 0;
|
||||
pColData->len = 0;
|
||||
pColData->sver = 0;
|
||||
pColData->flag = 0;
|
||||
pColData->numOfPKs = 0;
|
||||
}
|
||||
|
||||
|
||||
static int32_t tRowPCmprFn(const void *p1, const void *p2) {
|
||||
SRowKey key1, key2;
|
||||
tRowGetKey(*(SRow **)p1, &key1);
|
||||
|
|
|
@ -58,8 +58,7 @@ int32_t qCloneCurrentTbData(STableDataCxt* pDataBlock, SSubmitTbData** pData) {
|
|||
SColData* pCol = (SColData*)taosArrayGet(pNew->aCol, i);
|
||||
tColDataDeepClear(pCol);
|
||||
} else {
|
||||
SRow* pRowp = (SRow*)taosArrayGet(pNew->aCol, i);
|
||||
tRowDataClear(pRowp);
|
||||
pNew->aCol = taosArrayInit(20, POINTER_BYTES);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1174,12 +1173,7 @@ int32_t qResetStmtDataBlock(STableDataCxt* block, bool deepClear) {
|
|||
tColDataClear(pCol);
|
||||
}
|
||||
} else {
|
||||
SRow* aRowP = (SRow*)taosArrayGet(pBlock->pData->aRowP, i);
|
||||
if (aRowP == NULL) {
|
||||
qError("qResetStmtDataBlock row pointer is NULL");
|
||||
return terrno;
|
||||
}
|
||||
tRowDataClear(aRowP);
|
||||
pBlock->pData->aRowP = taosArrayInit(20, POINTER_BYTES);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue