Bug #50760 rbr+myisam+npk+update to/from NULL -> Slave stops with HA_ERR_END_OF_FILE
Submitted: 30 Jan 2010 19:17 Modified: 5 Feb 2010 17:37
Reporter: Matthias Leich Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:5.5.2-m2,5.5.99-m3,6.0.14-alpha OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[30 Jan 2010 19:17] Matthias Leich
Description:
My script:
----------
--disable_abort_on_error
--source include/master-slave.inc

SET SESSION BINLOG_FORMAT = ROW;
--disable_warnings
DROP SCHEMA IF EXISTS test1;
--enable_warnings
CREATE SCHEMA test1;
CREATE TABLE test1.t0 ( f1 INT, f2 CHAR(30), PRIMARY KEY (f1));
CREATE TABLE test1.t1 AS SELECT f2,f1 FROM test1.t0;

RENAME TABLE test1.t1 TO test1.t2;

INSERT INTO test1.t2 SET f1  = 1, f2  = 7;
UPDATE test1.t2 SET f2 = NULL;
UPDATE test1.t2 SET f2 = 7;
connection master;
--sync_slave_with_master

# Cleanup
connection master;
DROP SCHEMA test1;

Result on mysql-5.1-rep+3 revno: 3134 2010-01-20:
-------------------------------------------------
Last_Error  Could not execute Update_rows event on table test1.t2; Can't find record in 't2', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000001, end_log_pos 1394

I will add more information soon.
./mysql-test-run  --mem --mysqld=--binlog-format=row rpl_ml51

How to repeat:
See above
[1 Feb 2010 17:14] Matthias Leich
Releases showing this bug:
--------------------------
- 5.5.99-m3
  mysql-next-mr revno: 2966 2010-01-27
- 6.0.14-alpha
  mysql-6.0-codebase-bugfixing revno: 3859 2010-01-31
- 5.1.43  (+extra replication features for Celosia)
  mysql-5.1-rep+3 revno: 3134 2010-01-20

This bug does not occur on:
---------------------------
- 5.1.43
  mysql-5.1-bugteam revno: 3345 2010-02-01

This means that this bug does not affect customers
in the moment but it must be fixed before we give
Celosia to customers.

My environment:
---------------
- MySQL compiled from source
  ./BUILD/compile-pentium64-debug-max
- Linux OpenSuSE 11.0 (64 Bit)
- Intel Core2Duo
[2 Feb 2010 17:55] Matthias Leich
The bug is also in
5.5.2-m2
mysql-trunk revno: 2929 2010-01-15
[5 Feb 2010 17:37] Andrei Elkin
Analysis shows that the issue is the same as of  BUG#49481 which was fixed
by  luis.soares@sun.com-20100121172024-0lii1rp5mqqcrjo6 patch pushed to bt trees.
Notice, that RENAME in the regression test does not really matter.
What matters indeed is that the myisam table does not have any unique attribute and an update sets a field to/from NULL.
[5 Feb 2010 18:14] Andrei Elkin
The description time test was run to confirm next-mr is immune.