Browse Source

MDEV-37268 assert upon UPDATE or partitioned table with unique hash under READ-COMMITTED

followup for 9703c90712 (MDEV-37199 UNIQUE KEY USING HASH accepting duplicate records)

maintain the invariant, that handler::ha_update_row()
is always invoked as handler::ha_update_row(record[0], record[1])
bb-10.6-MDEV-26115
Sergei Golubchik 3 months ago
parent
commit
2b11a0e991
  1. 4
      sql/handler.cc

4
sql/handler.cc

@ -7863,9 +7863,13 @@ int handler::ha_update_row(const uchar *old_data, const uchar *new_data)
return HA_ERR_UNSUPPORTED;
}
}
table->move_fields(table->field, table->record[1], table->record[0]);
std::swap(table->record[0], table->record[1]);
increment_statistics(&SSV::ha_update_count);
TABLE_IO_WAIT(tracker, PSI_TABLE_UPDATE_ROW, MAX_KEY, e,
{ e= update_row(new_data, old_data);})
table->move_fields(table->field, table->record[1], table->record[0]);
std::swap(table->record[0], table->record[1]);
}
return e ? e : error;
}

Loading…
Cancel
Save