!1070 FIx bug of cstore table with unique index is updated.

Merge pull request !1070 from Yuejia/optimize
This commit is contained in:
opengauss-bot 2021-07-05 08:10:27 +00:00 committed by Gitee
commit 0236725f3f
1 changed files with 2 additions and 1 deletions

View File

@ -312,8 +312,9 @@ void CStoreUpdate::BatchDeleteAndInsert(VectorBatch *batch, int oriBatchCols, in
if (needInsert) {
{
AutoContextSwitch updateContext(updateCnxt);
m_insert->BatchInsertCommon(bufferedBatchRows, options);
m_delete->PartialDelete();
}
m_insert->BatchInsertCommon(bufferedBatchRows, options);
bufferedBatchRows->reset(true);
lastStartIdx = startIdx;
} else {