Bug #22550 Replication of BIT columns failing
Submitted: 21 Sep 2006 14:32 Modified: 6 Oct 2006 15:33
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 bk OS:Any (ALL)
Assigned to: Mats Kindahl CPU Architecture:Any

[21 Sep 2006 14:32] Mats Kindahl
Description:
Replicaton of BIT columns fail

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

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

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

Suggested fix:
In the pack_row() and unpack_row() functions:
Use move_field_offset() to move the field pointer before operating on the field.
This is necessary since part of a BIT field is stored within the null bytes of a record.
[21 Sep 2006 16:05] 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/12355

ChangeSet@1.2326, 2006-09-21 18:05:02+02:00, mats@romeo.(none) +2 -0
  BUG#22550 (Replication of BIT column failing):
  Using move_field_offset() to move field pointer to other record before
  calling pack()/unpack().
[23 Sep 2006 7:42] Lars Thalmann
Fix pushed into 5.1.12
Mats, if test case should be pushed, then please do so.
Otherwise set to documenting state.
[2 Oct 2006 11:38] 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/12937

ChangeSet@1.2346, 2006-10-02 13:38:06+02:00, mats@romeo.(none) +6 -0
  BUG#22550 (Replication of BIT column failing):
  Adding test case.
[3 Oct 2006 20:12] Chad MILLER
Available in 5.1.12-beta.
[6 Oct 2006 15:33] Paul Dubois
Noted in 5.1.12 changelog.

BIT columns were not replicated properly under row-based replication.
[14 Dec 2006 9:48] Graeme Tattersall
It looks like this bug also affects vers 5.0.24a. 

Can someone port commit this patch into the 5.0 branch? 

Reards, 

Graeme
[14 Dec 2006 12:08] Mats Kindahl
I'm sorry, but the failure is specific to row-based replication, and 5.0 do not contain any row-based replication. If there are failures in replicating tables with BIT columns under 5.0, is should be reported as a new bug.