Bug #22583 RBR between MyISAM and non-MyISAM tables containing a BIT field does not work
Submitted: 22 Sep 2006 8:20 Modified: 17 Apr 2007 19:44
Reporter: Mats Kindahl Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:5.1 OS:Any (ALL)
Assigned to: Mats Kindahl CPU Architecture:Any

[22 Sep 2006 8:20] Mats Kindahl
Description:
Using row-based replication to replicate from a MyISAM table to a non-MyISAM table (or vice versa) does not work.

How to repeat:
master> create table t1 (a bit(1), b int) engine=myisam;

slave>  alter table t1 engine=innodb;

master> insert into t1 values(1,2);
master> select hex(a),b from t1;

slave>  select hex(a),b from t1;

master> update t1 set a=0 where b=2;
master> select hex(a),b from t1;

slave>  select hex(a),b from t1;
[14 Dec 2006 4:23] 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/16924

ChangeSet@1.2308, 2006-12-14 05:23:31+01:00, mats@romeo.(none) +6 -0
  BUG#22583 (RBR between MyISAM and non-MyISAM tables containing BIT field
  does not work): Changing packed row format to only include null bits
  for those columns that are present in the row as well as writing BIT
  columns in a storage engine-independent format.
  
  The change in row format is incompatible with the previous format and a
  slave will not be able to read the new events.
[12 Feb 2007 15:46] 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/19699

ChangeSet@1.2308, 2007-02-12 16:46:42+01:00, mats@romeo.(none) +38 -0
  BUG#22583 (RBR between MyISAM and non-MyISAM tables containing BIT field
  does not work): Changing packed row format to only include null bits
  for those columns that are present in the row as well as writing BIT
  columns in a storage engine-independent format.
  
  The change in row format is incompatible with the previous format and a
  slave will not be able to read the new events.
[14 Feb 2007 17:46] 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/19910

ChangeSet@1.2409, 2007-02-14 19:45:48+02:00, aelkin@dsl-kpogw6-fe8ddc00-181.dhcp.inet.fi +3 -0
  wl3557 conflict detection
  
  auxilary cset consisting of merging  bug#22583 fixes (Feb 12th) with my local tree.
  To be removed after the bug's patch will be merged with 5.1-rpl.
[19 Feb 2007 17:51] 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/20087

ChangeSet@1.2410, 2007-02-19 14:24:49+02:00, aelkin@dsl-kpogw6-fe8ddc00-181.dhcp.inet.fi +8 -0
  WL#3557 Conflict detection
  
  This one is an intermediate commit reflecting the piece of work without ndb's
  specific to pack only changed fields into rows-event.
  Additionally, Write_rows event does not hold info which of REPLACE
  of INSERT is the parent. This make the event useless to find out
  DUP_KEY conflict on slave because if the parent is REPLACE slave has
  to accept the event.
  The class needs extending with that bit of info in order to be able to catch DUP_KEY
  conflict.
  
  At the moment not-merged (perhaps not latest) patch for bug#22583 is used so that
  I will need to "subtract" these changes  after the patch will be finally pushed and remerge
  with the final one.
[2 Mar 2007 10:41] 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/20995

ChangeSet@1.2410, 2007-03-02 12:18:04+02:00, aelkin@dsl-kpogw6-fe8ddc00-181.dhcp.inet.fi +8 -0
  WL#3557 Conflict detection
  
  This one is an intermediate commit reflecting the piece of work without ndb's
  specific to pack only changed fields into rows-event.
  
  Activation of conflict detection is done with --slave-conflict-detection or
  namesake global system variable.
  Slave server stops when there is the conflict unless the user specifies 
  --slave-skip-errors=ER_REPLICATION_CONFLICT. In the latter case, the accident
  will be error-logged.
  
  The patch engages HA_ERR_RECORD_CHANGED to be reported from do_exec_row 
  about mismatch of OR and BI even though the actual code returned from lookup
  routines may vary.
  
  At the moment not-merged (perhaps not latest) patch for bug#22583 is used so that
  I will need to "subtract" these changes  after the patch will be finally pushed and remerge
  with the final one.
[7 Mar 2007 11:41] 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/21356

ChangeSet@1.2414, 2007-03-07 11:54:32+01:00, mats@romeo.(none) +16 -0
  BUG#22583 (RBR between MyISAM and non-MyISAM tables does not work):
  Post-merge fixes.
[8 Mar 2007 8:03] 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/21461

ChangeSet@1.2473, 2007-03-08 09:02:44+01:00, mats@romeo.(none) +1 -0
  BUG#22583:
    RBR between MyISAM and non-MyISAM tables containing a BIT
    field does not work
  Fix to prevent MyISAM from reading data from NULL BLOB.
[20 Mar 2007 7:52] 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/22324

ChangeSet@1.2473, 2007-03-20 08:52:01+01:00, mats@romeo.(none) +37 -0
  BUG#22583: RBR between MyISAM and non-MyISAM tables containing a BIT
             field does not work
  
  Fix to prevent MyISAM from reading data from NULL BLOB.
  Fix to make record comparison independent of values of unused bits in
  record.
  Updating binlog positions in tests.
[27 Mar 2007 15:22] 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/23027

ChangeSet@1.2482, 2007-03-27 17:21:47+02:00, mats@romeo.(none) +1 -0
  BUG#22583 (RBR between MyISAM and non-MyISAM tables containing a BIT
  field does not work):
  
  Enabling previously disabled test.
[27 Mar 2007 15:29] Mats Kindahl
This patch introduces a change of binary log format that is incompatible with
the format preceeding this patch. It should be documented that the binary log format is incompatible and that using old binary logs with new slaves will cause slave to stop.
[31 Mar 2007 23:55] Bugs System
Pushed into 5.1.18-beta
[16 Apr 2007 11:04] Mats Kindahl
Never mind the wordings of the conflict detection WL#3557: this was a too eager tool that decided that a patch for WL#3557 was actually for BUG#22583.

With the introduction of the patch for BUG#27779, we now have backward compatibility. However, from what I can tell, the patch for BUG#27779 goes into 5.1.19 and the patch for BUG#22583 goes into 5.1.18. It means that 5.1.18 cannot read binary logs generated by a server that is before 5.1.18, but that 5.1.19 can.
[17 Apr 2007 19:44] Paul Dubois
Noted in 5.1.18 changelog.

Row-based replication of MyISAM to non-MyISAM tables did not work
correctly for BIT columns. This has been corrected, but the fix
introduces an incompatibility into the binary log format. We 
recommend that users affected by this problem wait for MySQL 5.1.19,
which addresses the incompatibility.
[20 Apr 2007 17:16] Bugs System
Pushed into 5.1.18-beta
[24 Apr 2007 17:26] Paul Dubois
The fix for the incompatibility made it into 5.1.18,
so I have removed the sentence from the changelog
entry about waiting for 5.1.19. See Bug#27779.