Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.11.17
-
Can result in unexpected behaviour
-
Q3/2026 Replic. Maintenance
Description
--source include/have_binlog_format_row.inc
|
--source include/master-slave.inc
|
CREATE TABLE t (a TEXT, v TEXT AS (RIGHT(a, 1)) VIRTUAL) |
WITH SYSTEM VERSIONING AS SELECT 'before' AS a; |
|
|
UPDATE t SET a='after'; |
--sync_slave_with_master
|
SELECT * FROM t; |
--connection master
|
|
|
DROP TABLE t; |
--source include/rpl_end.inc |
The slave SQL thread errors with ER_KEY_NOT_FOUND, "Could not execute Update_rows_v1 event on table test.t; Can't find record in 't', ..."
mariadb-binlog -v on the master binary log or slave relay log reveals that the UPDATE part of the System-Versioned UPDATE has a before-image of v='r',a='before',… which should be v='e',a='before',….
The after-image is correct (v='r',a='after',…), and so is the step that INSERTs the previous version (v='e',a='before',…).
Also affects BLOB, but (apparently) not numeric data types.
MDEV-24646 shows that mixing TEXT and BLOB leads to use-after-free, which is a crash risk.
Unversioned tables are not affected.
PERSISTENT generated columns are also not affected (besides MDEV-30441).
Attachments
Issue Links
- causes
-
MDEV-24646 ASAN heap-use-after-free in Field_blob::pack / THD::binlog_update_row upon DML on table with virtual column
-
- Confirmed
-
- split from
-
MDEV-24646 ASAN heap-use-after-free in Field_blob::pack / THD::binlog_update_row upon DML on table with virtual column
-
- Confirmed
-