[MDEV-31678] Assertion `marked_for_read()' fails on slave upon RBR with binlog_row_image=MINIMAL Created: 2023-07-13  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.4, 10.5, 10.6, 10.9, 10.10, 10.11, 11.0, 11.1
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Important: On some reason, I can't make the test fail if binlog_row_image is set in the test dynamically anywhere: on the master, on the slave, locally, globally – it just doesn't fail. That's why there is a check in the test case, it should be run with --mysqld=--binlog_row_image=MINIMAL. I expect that replication experts will find the right way to set it dynamically instead, then the check should be removed of course.

--source include/have_innodb.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
 
if (`SELECT @@binlog_row_image != 'MINIMAL'`)
{
  --die # Run the test with --mysqld=--binlog_row_image=MINIMAL
}
 
CREATE TABLE t (id INT AUTO_INCREMENT, col_int BIGINT NOT NULL, UNIQUE (col_int), KEY(id)) ENGINE=InnoDB;
INSERT INTO t VALUES (1,1);
UPDATE t SET id = 2;
 
--sync_slave_with_master
 
# Cleanup
--connection master
DROP TABLE t;
--source include/rpl_end.inc

10.4 9856bb42

mysqld: /data/src/10.4/sql/field.cc:4315: virtual longlong Field_long::val_int(): Assertion `marked_for_read()' failed.
230713 15:50:21 [ERROR] mysqld got signal 6 ;
 
#9  0x00007f747ae53df2 in __GI___assert_fail (assertion=0x5595ed2595e0 "marked_for_read()", file=0x5595ed258960 "/data/src/10.4/sql/field.cc", line=4315, function=0x5595ed25bb20 "virtual longlong Field_long::val_int()") at ./assert/assert.c:101
#10 0x00005595eb5af067 in Field_long::val_int (this=0x619000114f00) at /data/src/10.4/sql/field.cc:4315
#11 0x00005595eb5fefed in Field_int::val_uint (this=0x619000114f00) at /data/src/10.4/sql/field.h:2225
#12 0x00005595ebff5252 in calc_row_difference (uvect=0x620000042d58, old_row=0x619000114ec8 "\377\001", new_row=0x619000114eb8 "\377\002", table=0x620000041088, upd_buff=0x60c00004c488 "\200", buff_len=118, prebuilt=0x620000042108, auto_inc=@0x7f7465f29240: 0) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:8650
#13 0x00005595ebff6d49 in ha_innobase::update_row (this=0x61d00015f4a8, old_row=0x619000114ec8 "\377\001", new_row=0x619000114eb8 "\377\002") at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:8903
#14 0x00005595eb66221d in handler::ha_update_row (this=0x61d00015f4a8, old_data=0x619000114ec8 "\377\001", new_data=0x619000114eb8 "\377\002") at /data/src/10.4/sql/handler.cc:6888
#15 0x00005595eb9b155e in Update_rows_log_event::do_exec_row (this=0x613000120c48, rgi=0x61d0002af880) at /data/src/10.4/sql/log_event.cc:14818
#16 0x00005595eb99d033 in Rows_log_event::do_apply_event (this=0x613000120c48, rgi=0x61d0002af880) at /data/src/10.4/sql/log_event.cc:11675
#17 0x00005595eac33808 in Log_event::apply_event (this=0x613000120c48, rgi=0x61d0002af880) at /data/src/10.4/sql/log_event.h:1492
#18 0x00005595eac13b1f in apply_event_and_update_pos_apply (ev=0x613000120c48, thd=0x62b0000fc208, rgi=0x61d0002af880, reason=0) at /data/src/10.4/sql/slave.cc:3809
#19 0x00005595eac1465d in apply_event_and_update_pos (ev=0x613000120c48, thd=0x62b0000fc208, rgi=0x61d0002af880) at /data/src/10.4/sql/slave.cc:3971
#20 0x00005595eac15ff6 in exec_relay_log_event (thd=0x62b0000fc208, rli=0x62a000055ec8, serial_rgi=0x61d0002af880) at /data/src/10.4/sql/slave.cc:4317
#21 0x00005595eac1dce9 in handle_slave_sql (arg=0x62a000054200) at /data/src/10.4/sql/slave.cc:5503
#22 0x00005595ebeeaf28 in pfs_spawn_thread (arg=0x615000041088) at /data/src/10.4/storage/perfschema/pfs.cc:1869
#23 0x00007f747aea7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#24 0x00007f747af285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Reproducible on all existing versions, including earlier minor releases.
No obvious immediate problem on a non-debug build.


Generated at Thu Feb 08 10:25:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.