Bug #31583 5.1-telco-6.1 -> 5.1.22. Slave returns Error in unknown event
Submitted: 13 Oct 2007 16:31 Modified: 6 Feb 2008 10:59
Reporter: Serge Kozlov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S2 (Serious)
Version:5.1.22 OS:Any
Assigned to: Mats Kindahl CPU Architecture:Any
Tags: replication, telco, upgrade, version

[13 Oct 2007 16:31] Serge Kozlov
Description:
There are master 5.1-telco-6.1 and slave 5.1.22 with row-based
replication. Slave coldn't read properly event form master which conatins updating of integer column and show following message in slave.err:

071013 19:22:05 [Note] Slave I/O thread: connected to master 'root@127.0.0.1:930
6',replication started in log 'FIRST' at position 4
071013 19:22:05 [ERROR] Slave SQL: Error in Unknown event: row application faile
d. , Error_code: 0
071013 19:22:05 [ERROR] Slave SQL: Error in Unknown event: error during transact
ion execution on table test.t1. , Error_code: 0
071013 19:22:05 [ERROR] Error running query, slave SQL thread aborted. Fix the p
roblem, and restart the slave SQL thread with "SLAVE START". We stopped at log '
master-bin.000001' position 263

How to repeat:
1. Install mysql 5.1.22 
2. Install mysql 5.1-telco-6.1
3. Copy m4r.pl (patched mtr) into 5.1.22/mysql-test 
4. Copy attached test case into 5.1.22/mysql-test/suite/bugs/t/
5. Set current dir 5.1.22/mysql-test 
6. Try to create result file for test case:
./m4r.pl --master-basedir=/path/to/5.1-telco-6.1 --suite=bugs
--record
--mysqld=--binlog-format=row <test case>
[13 Oct 2007 16:32] Serge Kozlov
testcase

Attachment: bug31583.tgz (application/x-compressed, text), 35.00 KiB.

[5 Dec 2007 19:00] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/39333

ChangeSet@1.2651, 2007-12-05 20:00:14+01:00, mats@kindahl-laptop.dnsalias.net +5 -0
  BUG#31583 (5.1-telco-6.1 -> 5.1.22. Slave returns Error in unknown event):
  
  In the patch for BUG#21842, the code for handling old rows events were
  refactored.  There were a bug in the refactored code (possibly introduced
  after the patch for BUG#21842) that caused caused the refactored old events
  to read a columns bitmap after image even though there is no such bitmap
  for old events. As a result, the reading got out of sync, and started reading
  invalid data.
  
  This patch removes all trace of the after image column bitmap from the refactored
  old events and removes functions that are no longer needed because they are empty.
[7 Dec 2007 15:27] Sven Sandberg
Note: in the latest version, insert the following row at the top of m4r.pl:
use lib 'lib';
[5 Feb 2008 13:03] Bugs System
Pushed into 5.1.24-rc
[5 Feb 2008 13:07] Bugs System
Pushed into 6.0.5-alpha
[6 Feb 2008 10:59] Jon Stephens
Documented in the 5.1.24 and 6.0.5 changelogs as follows:

        When using row-based replication from a master running MySQL
        5.1.21 or earlier to a slave running 5.1.22 or later, updates of
        integer columns failed on the slave with Error in
        Unknown event: row application failed.
[6 Mar 2008 9:54] Jon Stephens
Also documented for 5.1.23-ndb-6.2.14.
[30 Mar 2008 20:23] Jon Stephens
Also noted fix in 5.1.23-ndb-6.3.11 changelog.