[td-225]upate the log.
This commit is contained in:
parent
86f935d4b0
commit
565cc797d2
|
@ -1156,27 +1156,6 @@ static void insertBatchClean(STscStmt* pStmt) {
|
||||||
|
|
||||||
tfree(pCmd->insertParam.pTableNameList);
|
tfree(pCmd->insertParam.pTableNameList);
|
||||||
|
|
||||||
/*
|
|
||||||
STableDataBlocks** p = taosHashIterate(pCmd->insertParam.pTableBlockHashList, NULL);
|
|
||||||
|
|
||||||
STableDataBlocks* pOneTableBlock = *p;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
SSubmitBlk* pBlocks = (SSubmitBlk*) pOneTableBlock->pData;
|
|
||||||
|
|
||||||
pOneTableBlock->size = sizeof(SSubmitBlk);
|
|
||||||
|
|
||||||
pBlocks->numOfRows = 0;
|
|
||||||
|
|
||||||
p = taosHashIterate(pCmd->insertParam.pTableBlockHashList, p);
|
|
||||||
if (p == NULL) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
pOneTableBlock = *p;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
pCmd->insertParam.pDataBlocks = tscDestroyBlockArrayList(pCmd->insertParam.pDataBlocks);
|
pCmd->insertParam.pDataBlocks = tscDestroyBlockArrayList(pCmd->insertParam.pDataBlocks);
|
||||||
pCmd->insertParam.numOfTables = 0;
|
pCmd->insertParam.numOfTables = 0;
|
||||||
|
|
||||||
|
@ -1499,7 +1478,7 @@ int taos_stmt_prepare(TAOS_STMT* stmt, const char* sql, unsigned long length) {
|
||||||
pRes->numOfRows = 1;
|
pRes->numOfRows = 1;
|
||||||
|
|
||||||
strtolower(pSql->sqlstr, sql);
|
strtolower(pSql->sqlstr, sql);
|
||||||
tscDebugL("%p SQL: %s", pSql, pSql->sqlstr);
|
tscDebugL("0x%"PRIx64" SQL: %s", pSql->self, pSql->sqlstr);
|
||||||
|
|
||||||
if (tscIsInsertData(pSql->sqlstr)) {
|
if (tscIsInsertData(pSql->sqlstr)) {
|
||||||
pStmt->isInsert = true;
|
pStmt->isInsert = true;
|
||||||
|
@ -1604,7 +1583,7 @@ int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_BIND* tags
|
||||||
if (taosHashGetSize(pCmd->insertParam.pTableBlockHashList) > 0) {
|
if (taosHashGetSize(pCmd->insertParam.pTableBlockHashList) > 0) {
|
||||||
SHashObj* hashList = pCmd->insertParam.pTableBlockHashList;
|
SHashObj* hashList = pCmd->insertParam.pTableBlockHashList;
|
||||||
pCmd->insertParam.pTableBlockHashList = NULL;
|
pCmd->insertParam.pTableBlockHashList = NULL;
|
||||||
tscResetSqlCmd(pCmd, true);
|
tscResetSqlCmd(pCmd, false);
|
||||||
pCmd->insertParam.pTableBlockHashList = hashList;
|
pCmd->insertParam.pTableBlockHashList = hashList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1663,7 +1642,7 @@ int taos_stmt_close(TAOS_STMT* stmt) {
|
||||||
} else {
|
} else {
|
||||||
if (pStmt->multiTbInsert) {
|
if (pStmt->multiTbInsert) {
|
||||||
taosHashCleanup(pStmt->mtb.pTableHash);
|
taosHashCleanup(pStmt->mtb.pTableHash);
|
||||||
pStmt->mtb.pTableBlockHashList = tscDestroyBlockHashTable(pStmt->mtb.pTableBlockHashList, true);
|
pStmt->mtb.pTableBlockHashList = tscDestroyBlockHashTable(pStmt->mtb.pTableBlockHashList, false);
|
||||||
taosHashCleanup(pStmt->pSql->cmd.insertParam.pTableBlockHashList);
|
taosHashCleanup(pStmt->pSql->cmd.insertParam.pTableBlockHashList);
|
||||||
pStmt->pSql->cmd.insertParam.pTableBlockHashList = NULL;
|
pStmt->pSql->cmd.insertParam.pTableBlockHashList = NULL;
|
||||||
taosArrayDestroy(pStmt->mtb.tags);
|
taosArrayDestroy(pStmt->mtb.tags);
|
||||||
|
|
|
@ -1332,7 +1332,7 @@ void tscFreeSubobj(SSqlObj* pSql) {
|
||||||
tscDebug("0x%"PRIx64" start to free sub SqlObj, numOfSub:%d", pSql->self, pSql->subState.numOfSub);
|
tscDebug("0x%"PRIx64" start to free sub SqlObj, numOfSub:%d", pSql->self, pSql->subState.numOfSub);
|
||||||
|
|
||||||
for(int32_t i = 0; i < pSql->subState.numOfSub; ++i) {
|
for(int32_t i = 0; i < pSql->subState.numOfSub; ++i) {
|
||||||
tscDebug("0x%"PRIx64" free sub SqlObj:%p, index:%d", pSql->self, pSql->pSubs[i], i);
|
tscDebug("0x%"PRIx64" free sub SqlObj:0x%"PRIx64", index:%d", pSql->self, pSql->pSubs[i]->self, i);
|
||||||
taos_free_result(pSql->pSubs[i]);
|
taos_free_result(pSql->pSubs[i]);
|
||||||
pSql->pSubs[i] = NULL;
|
pSql->pSubs[i] = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1784,7 +1784,7 @@ int32_t tscMergeTableDataBlocks(SInsertStatementParam *pInsertParam, bool freeBl
|
||||||
tscSortRemoveDataBlockDupRows(pOneTableBlock);
|
tscSortRemoveDataBlockDupRows(pOneTableBlock);
|
||||||
char* ekey = (char*)pBlocks->data + pOneTableBlock->rowSize*(pBlocks->numOfRows-1);
|
char* ekey = (char*)pBlocks->data + pOneTableBlock->rowSize*(pBlocks->numOfRows-1);
|
||||||
|
|
||||||
tscDebug("0x%"PRIx64" name:%s, name:%d rows:%d sversion:%d skey:%" PRId64 ", ekey:%" PRId64, pInsertParam->objectId, tNameGetTableName(&pOneTableBlock->tableName),
|
tscDebug("0x%"PRIx64" name:%s, tid:%d rows:%d sversion:%d skey:%" PRId64 ", ekey:%" PRId64, pInsertParam->objectId, tNameGetTableName(&pOneTableBlock->tableName),
|
||||||
pBlocks->tid, pBlocks->numOfRows, pBlocks->sversion, GET_INT64_VAL(pBlocks->data), GET_INT64_VAL(ekey));
|
pBlocks->tid, pBlocks->numOfRows, pBlocks->sversion, GET_INT64_VAL(pBlocks->data), GET_INT64_VAL(ekey));
|
||||||
|
|
||||||
int32_t len = pBlocks->numOfRows * (pOneTableBlock->rowSize + expandSize) + sizeof(STColumn) * tscGetNumOfColumns(pOneTableBlock->pTableMeta);
|
int32_t len = pBlocks->numOfRows * (pOneTableBlock->rowSize + expandSize) + sizeof(STColumn) * tscGetNumOfColumns(pOneTableBlock->pTableMeta);
|
||||||
|
|
Loading…
Reference in New Issue