Bug #43783 different master/slave table defs cause crash: bigint unsigned null vs not null
Description:
crash and/or valgrind errors are caused when master and slave have different table definition.
Invalid read of size 4
at Field_longlong::unpack (field.h:571)
by unpack_row (rpl_record.cc:242)
by Rows_log_event::write_row (log_event.h:3548)
by Write_rows_log_event::do_exec_row (log_event.cc:8513)
by Rows_log_event::do_apply_event (log_event.cc:7281)
by apply_event_and_update_pos (log_event.h:1056)
by handle_slave_sql (slave.cc:2130)
by start_thread (in /lib/libpthread-2.5.so)
by clone (in /lib/libc-2.5.so)
Address 0x7979141 is 4 bytes after a block of size 5 alloc'd
at malloc (vg_replace_malloc.c:149)
by my_malloc (my_malloc.c:34)
by Rows_log_event::Rows_log_event (log_event.cc:6961)
by Write_rows_log_event::Write_rows_log_event (log_event.cc:8131)
by Log_event::read_log_event (log_event.cc:1183)
by Log_event::read_log_event (log_event.cc:1032)
by handle_slave_sql (slave.cc:3834)
by tart_thread (in /lib/libpthread-2.5.so)
by lone (in /lib/libc-2.5.so)
How to repeat:
1. on master create a table:
create table `t1` (`a` int(11) not null auto_increment,
`col001` bigint unsigned default null, primary key (`a`)
) engine=myisam default charset=latin1;
2. on slave create a table:
create table `t1` ( `a` int(11) not null auto_increment,
`col001` bigint not null, primary key (`a`)
) engine=myisam default charset=latin1;
3. setup replication correctly, using binlog_format=row
4. on master, execute this:
insert ignore into `t1` set `col001`=null;
observe either a crash (perhaps after many inserts, or immediate valgrind errors).
Suggested fix:
do the conversion correctly.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.