Bug #12421 rpl_replicate_do.test causes slave to core when using rbr
Submitted: 7 Aug 2005 15:13 Modified: 18 Nov 2005 14:04
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S1 (Critical)
Version:5.0-wl1012 OS:Linux (Linux)
Assigned to: Lars Thalmann CPU Architecture:Any

[7 Aug 2005 15:13] Jonathan Miller
Description:
Running the rpl_replicate_do.test will cause the slave to core. This core file look to be different code location then the other bug reports that I have open.

#0  0x40250da1 in kill () from /lib/libc.so.6
#1  0x40181f4a in pthread_kill () from /lib/libpthread.so.0
#2  0x0828eaad in write_core (sig=11) at stacktrace.c:220
#3  0x0818abad in handle_segfault (sig=11) at mysqld.cc:2026
#4  0x401855cd in __pthread_sighandler () from /lib/libpthread.so.0
#5  <signal handler called>
#6  0x40297662 in _int_malloc () from /lib/libc.so.6
#7  0x402968a0 in malloc () from /lib/libc.so.6
#8  0x084b70e4 in my_malloc (size=128, my_flags=24) at my_malloc.c:35
#9  0x0818265a in prepare_pending<Update_rows_log_event> (thd=0x8774a30, table=0x877de10,
    server_id=1, cols=0xbedff7fc, colcnt=0, needed=10, is_transactional=false)
        at log_event.h:614
#10 0x08180765 in THD::binlog_update_row(st_table*, bool, st_bitmap const*, unsigned, char const*, char const*) (this=0x8774a30, table=0x877de10, is_trans=false, cols=0xbedff7fc, colcnt=0,before_record=0x872c770 " \20", after_record=0x872c778 " \24") at sql_class.cc:2195
#11 0x08235edc in binlog_log_row<Update_rows_log_event> (table=0x877de10, before_record=0x40189bdc "\n\001",  after_record=0x40189bdc "\n\001")at log_event.h:1982
#12 0x082358c7 in handler::ha_update_row(char const*, char*) (this=0xbedff701, old_data=0x872c770 "\20", new_data=0xbedff7fc"  \001")at handler.cc:2566 
#13 0x0820ba37 in Update_rows_log_event::do_exec_row(st_table*, st_relay_log_info*) (
    this=0x40189bdc, table=0x8774a30, rli=0x873b7d4) at log_event.cc:6032
#14 0x0820a677 in Rows_log_event::exec_event(st_relay_log_info*) (this=0x8744210, rli=0x873b7d4)
at log_event.cc:5096
#15 0x08284b0f in exec_relay_log_event (thd=0x8774a30, rli=0x873b7d4) at slave.cc:2959
#16 0x08282868 in handle_slave_sql (arg=0x87355f0) at slave.cc:3507
#17 0x4017f6de in pthread_start_thread () from /lib/libpthread.so.0

How to repeat:
Remove the statement base inc and run rpl_replicate_do using row based replication
[11 Sep 2005 22:04] Lars Thalmann
./mysql-test-run --mysqld="--binlog-format=row" --skip-ndb --do-test=rpl_replicate_do

no longer crashes slave, but it does produce wrong result:

*** r/rpl_replicate_do.result   Sun Sep 11 16:16:28 2005
--- r/rpl_replicate_do.reject   Mon Sep 12 01:02:26 2005
***************
*** 39,42 ****
  set one_shot time_zone='met';
  select * from t1;
  ts
! 2005-08-12 00:00:00
--- 39,42 ----
  set one_shot time_zone='met';
  select * from t1;
  ts
! 2005-09-12 00:02:26
[18 Nov 2005 14:04] Lars Thalmann
Fixed by Guilhem patch.