Bug #48908 Error 1535: wrong explanation for BIT columns with different size
Submitted: 19 Nov 2009 14:27 Modified: 7 Nov 2015 8:18
Reporter: Serge Kozlov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:5.1-rep+3 OS:Any
Assigned to: Andrei Elkin CPU Architecture:Any
Tags: bit, error 1535, size

[19 Nov 2009 14:27] Serge Kozlov
Description:
Master and slave have same table with BIT column, but size of that column on slave is less than on master. When slave receives data for that table SQL thread stops with error 1535 but the sizes of columns on error message are incorrect.

How to repeat:
MASTER: 
CREATE TABLE t1 (a BIT(20));

SLAVE: 
ALTER TABLE t1 CHANGE a a BIT(19);

MASTER: 
INSERT INTO t1 VALUES(0);

SLAVE: 
SHOW SLAVE STATUS;
...
Slave_IO_Running        Yes
Slave_SQL_Running       No
...
Last_Errno      1535
Last_Error      Table definition on master and slave does not match: Column 0 size mismatch - master has size 3, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
... 

The error message points to size 3 for master/slave tables but really we use 20 and 19
[29 Nov 2009 19:57] 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/92012

364 Serge Kozlov	2009-11-29
      1. Test cases for bugs: bug#48815, bug#48819, bug#48845, bug#48903, bug#48908
      2. Added sorting test cases by their file names.
      3. Added test template Replication.pm
      added:
        lib/My/Nuts/Library/Tests/Replication.pm
        suites/bugs/
        suites/bugs/bug48815.pm
        suites/bugs/bug48819.pm
        suites/bugs/bug48845.pm
        suites/bugs/bug48903.pm
        suites/bugs/bug48908.pm
      modified:
        bin/Driver.pm
[28 Dec 2009 21:07] 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/95765

365 Serge Kozlov	2009-12-29
      1. Test cases for bugs: bug#48815, bug#48819, bug#48845, bug#48903, bug#48908
      2. Added sorting test cases by their file names.
      3. Added test template Replication.pm
      added:
        lib/My/Nuts/Library/Tests/Replication.pm
        suites/bugs/
        suites/bugs/bug48815.pm
        suites/bugs/bug48819.pm
        suites/bugs/bug48845.pm
        suites/bugs/bug48903.pm
        suites/bugs/bug48908.pm
      modified:
        bin/Driver.pm
[7 Nov 2015 8:18] MySQL Verification Team
5.6.27 slave says:
[ERROR] Slave SQL: Column 0 of table 'test.t1' cannot be converted from type 'bit(20)' to type 'bit(19)', Error_code: 1677
2015-11-07 10:17:30 14368 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'i7-bin.000001' position 221