Commit graph

2 commits

Author SHA1 Message Date
Nikita Malyavin
5f206259e5 MDEV-30985 Replica stops with error on ALTER ONLINE with Geometry Types
The bug is inherent for row-based replication as well.
To reproduce, a virtual (not stored) field of a blob type computed from
another field of a different blob type is required.

The following happens during an update or delete row event:
1. A row is unpacked.
2. Virtual fields are updated. Field b1 stores the pointer in
   Field_blob::value and references it in table->record[0].
3. record[0] is stored to record[1] in Rows_log_event::find_row.
4. A new record is fetched from handler. (e.g. ha_rnd_next)
5. Virtual columns are updated (only non-stored).
6. Field b1 receives new value. Old value is deallocated
   (Field_blob::val_str).
7. record_compare is called. record[0] and record[1] are compared.
8. record[1] contains a reference to a freed value.

record_compare is used in replication to find a matching record for update
or delete. Virtual columns that are not stored should be definitely skipped
both for correctness, and for this bug fix.

STORED virtual columns, on the other hand, may be required and shouldn't be
skipped. Stored columns are not affected, since they are not updated after
handler's fetch.
2023-08-15 10:16:13 +02:00
Michael Widenius
39018f2a5a Move mysql-test-run/extra/rpl_tests to suite/rpl/include
Renamed suite/rpl/include/rpl_sync.inc to rpl_sync_test.inc to
remove clash with include/rpl_sync.inc
2018-03-29 13:59:44 +03:00
Renamed from mysql-test/extra/rpl_tests/rpl_row_blob.test (Browse further)