SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
d FLOAT DEFAULT '2.00',
e CHAR(4) DEFAULT 'TEST')
e CHAR(4) DEFAULT 'TEST')
...
@@ -32,6 +34,7 @@ a b c d e
...
@@ -32,6 +34,7 @@ a b c d e
1 2 TEXAS NULL NULL
1 2 TEXAS NULL NULL
2 1 AUSTIN NULL NULL
2 1 AUSTIN NULL NULL
3 4 QA NULL NULL
3 4 QA NULL NULL
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
*** Drop t1 ***
*** Drop t1 ***
DROP TABLE t1;
DROP TABLE t1;
*** Create t2 on slave ***
*** Create t2 on slave ***
...
@@ -73,8 +76,8 @@ Replicate_Do_Table
...
@@ -73,8 +76,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1641
Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
Last_Error Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos #
Exec_Master_Log_Pos #
Relay_Log_Space #
Relay_Log_Space #
...
@@ -91,8 +94,8 @@ Seconds_Behind_Master #
...
@@ -91,8 +94,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Errno #
Last_IO_Error #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Errno 1641
Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
Last_SQL_Error Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'
Replicate_Ignore_Server_Ids
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_Server_Id 1
STOP SLAVE;
STOP SLAVE;
...
@@ -142,8 +145,8 @@ Replicate_Do_Table
...
@@ -142,8 +145,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1641
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Last_Error Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos #
Exec_Master_Log_Pos #
Relay_Log_Space #
Relay_Log_Space #
...
@@ -160,8 +163,8 @@ Seconds_Behind_Master #
...
@@ -160,8 +163,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Errno #
Last_IO_Error #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Errno 1641
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Last_SQL_Error Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'
Replicate_Ignore_Server_Ids
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
...
@@ -206,8 +209,8 @@ Replicate_Do_Table
...
@@ -206,8 +209,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1641
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Last_Error Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos #
Exec_Master_Log_Pos #
Relay_Log_Space #
Relay_Log_Space #
...
@@ -224,8 +227,8 @@ Seconds_Behind_Master #
...
@@ -224,8 +227,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Errno #
Last_IO_Error #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Errno 1641
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Last_SQL_Error Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'
Replicate_Ignore_Server_Ids
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
...
@@ -270,8 +273,8 @@ Replicate_Do_Table
...
@@ -270,8 +273,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1641
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Last_Error Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos #
Exec_Master_Log_Pos #
Relay_Log_Space #
Relay_Log_Space #
...
@@ -288,8 +291,8 @@ Seconds_Behind_Master #
...
@@ -288,8 +291,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Errno #
Last_IO_Error #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Errno 1641
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Last_SQL_Error Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'
Replicate_Ignore_Server_Ids
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
...
@@ -333,8 +336,8 @@ Replicate_Do_Table
...
@@ -333,8 +336,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1641
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Last_Error Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos #
Exec_Master_Log_Pos #
Relay_Log_Space #
Relay_Log_Space #
...
@@ -351,8 +354,8 @@ Seconds_Behind_Master #
...
@@ -351,8 +354,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Errno #
Last_IO_Error #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Errno 1641
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Last_SQL_Error Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'
Replicate_Ignore_Server_Ids
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
...
@@ -447,8 +450,8 @@ Replicate_Do_Table
...
@@ -447,8 +450,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1641
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Last_Error Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos #
Exec_Master_Log_Pos #
Relay_Log_Space #
Relay_Log_Space #
...
@@ -465,8 +468,8 @@ Seconds_Behind_Master #
...
@@ -465,8 +468,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Errno #
Last_IO_Error #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Errno 1641
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'
Replicate_Ignore_Server_Ids
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
...
@@ -476,7 +479,7 @@ DROP TABLE t10;
...
@@ -476,7 +479,7 @@ DROP TABLE t10;
*** Create t11 on slave ***
*** Create t11 on slave ***
STOP SLAVE;
STOP SLAVE;
RESET SLAVE;
RESET SLAVE;
CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB';
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB';
*** Create t11 on Master ***
*** Create t11 on Master ***
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
...
@@ -510,8 +513,8 @@ Replicate_Do_Table
...
@@ -510,8 +513,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1641
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Last_Error Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos #
Exec_Master_Log_Pos #
Relay_Log_Space #
Relay_Log_Space #
...
@@ -528,8 +531,8 @@ Seconds_Behind_Master #
...
@@ -528,8 +531,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Errno #
Last_IO_Error #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Errno 1641
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'
Replicate_Ignore_Server_Ids
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
...
@@ -904,8 +907,8 @@ Replicate_Do_Table
...
@@ -904,8 +907,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1641
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Last_Error Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos #
Exec_Master_Log_Pos #
Relay_Log_Space #
Relay_Log_Space #
...
@@ -922,10 +925,8 @@ Seconds_Behind_Master #
...
@@ -922,10 +925,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Errno #
Last_IO_Error #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Errno 1641
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Last_SQL_Error Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'
@@ -476,6 +476,8 @@ ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
...
@@ -476,6 +476,8 @@ ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t7 (i INT NOT NULL,
CREATE TABLE t7 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'NDB' ;
j INT NOT NULL) ENGINE = 'NDB' ;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
[expecting slave to replicate correctly]
[expecting slave to replicate correctly]
INSERT INTO t1 VALUES (1, "", 1);
INSERT INTO t1 VALUES (1, "", 1);
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
...
@@ -484,11 +486,7 @@ Comparing tables master:test.t1 and slave:test.t1
...
@@ -484,11 +486,7 @@ Comparing tables master:test.t1 and slave:test.t1
INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
Comparing tables master:test.t2 and slave:test.t2
Comparing tables master:test.t2 and slave:test.t2
[expecting slave to stop]
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
RESET MASTER;
RESET MASTER;
STOP SLAVE;
STOP SLAVE;
RESET SLAVE;
RESET SLAVE;
...
@@ -501,7 +499,7 @@ Comparing tables master:test.t4 and slave:test.t4
...
@@ -501,7 +499,7 @@ Comparing tables master:test.t4 and slave:test.t4
INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)'
RESET MASTER;
RESET MASTER;
STOP SLAVE;
STOP SLAVE;
RESET SLAVE;
RESET SLAVE;
...
@@ -510,7 +508,7 @@ START SLAVE;
...
@@ -510,7 +508,7 @@ START SLAVE;
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)'