@@ -92,6 +92,7 @@ bool UpdateExecutor::PerformUpdatePrimaryKey(
92
92
return false ;
93
93
}
94
94
transaction_manager.PerformDelete (current_txn, old_location, new_location);
95
+ statement_write_set_.insert (new_location);
95
96
96
97
// //////////////////////////////////////////
97
98
// Insert tuple rather than install version
@@ -191,9 +192,6 @@ bool UpdateExecutor::DExecute() {
191
192
oid_t physical_tuple_id = pos_lists[0 ][visible_tuple_id];
192
193
193
194
ItemPointer old_location (tile_group->GetTileGroupId (), physical_tuple_id);
194
- if (IsInStatementWriteSet (old_location)) {
195
- continue ;
196
- }
197
195
198
196
LOG_TRACE (" Visible Tuple id : %u, Physical Tuple id : %u " ,
199
197
visible_tuple_id, physical_tuple_id);
@@ -221,6 +219,11 @@ bool UpdateExecutor::DExecute() {
221
219
}
222
220
// /////////////////////////////////////////////////////////
223
221
222
+
223
+ if (IsInStatementWriteSet (old_location)) {
224
+ continue ;
225
+ }
226
+
224
227
if (trigger_list != nullptr ) {
225
228
LOG_TRACE (" size of trigger list in target table: %d" ,
226
229
trigger_list->GetTriggerListSize ());
@@ -268,7 +271,8 @@ bool UpdateExecutor::DExecute() {
268
271
executor_context_);
269
272
270
273
transaction_manager.PerformUpdate (current_txn, old_location);
271
- statement_write_set_.insert (old_location);
274
+ // we do not need to add any item pointer to statement-level write set
275
+ // here, because we do not generate any new version
272
276
}
273
277
}
274
278
// if we have already obtained the ownership
0 commit comments