1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
Thirunarayanan Balathandayuthapani b9fe70325e MDEV-41666 Corruption on statement rollback when ON UPDATE SET NULL affects the base column
Problem:
=======
  - When a foreign key column is the base column of a
virtual column that is indexed together with other virtual
columns, a cascaded update (ON UPDATE/DELETE SET NULL)
computed the old value of only the dependent virtual column.
The other virtual key parts of the index stayed NULL in
update->old_vrow. If the statement was rolled back,
row_upd_store_v_row() used those NULLs, so
row_upd_sec_index_entry() searched the secondary
index for a record  that did not exist and hit
the "Record in index was not found on update" assertion.

Solution:
=========
dict_mem_fill_vcol_set_for_base_col():  Add every virtual key part
of each index that contains the dependent virtual column to
dict_foreign_t::v_cols, as dict_mem_fill_vcol_from_v_indexes()
already does. row_ins_foreign_fill_virtual() then computes the
old values of all of them.

Based on mysql/mysql-server@c48fa1e57a
2026-10-21 20:54:35 +05:30
..
2026-08-19 08:13:54 +02:00
2026-08-19 08:13:54 +02:00
2026-03-11 09:06:05 +02:00
2026-07-23 11:12:27 +02:00
2024-11-29 12:37:46 +02:00