Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

bk commit into 5.1 tree (cbell:1.2548) BUG#22086

From: <cbell(at)mysql.com>
Date: Tue Jul 31 2007 - 15:22:44 EDT


Below is the list of changes that have just been committed into a local 5.1 repository of cbell. When cbell does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository.
For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@1.2548, 2007-07-31 15:22:15-04:00, cbell@mysql_cab_desk. +7 -0   BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash   

  This patch adds functionality to row-based replication to ensure the   slave's column sizes are >= to that of the master.

  mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test@1.4, 2007-07-31 15:21:38-04:00, cbell@mysql_cab_desk. +41 -32     BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash     

    Removed commented out portion of test referenced in bug report. This     test supports the original request of the bug report.

  mysql-test/include/test_fieldsize.inc@1.1, 2007-07-31 15:21:41-04:00, cbell@mysql_cab_desk. +48 -0     BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash     

    Sub unit file to test each variable type that relies on field     metadata from the master.

  mysql-test/include/test_fieldsize.inc@1.0, 2007-07-31 15:21:41-04:00, cbell@mysql_cab_desk. +0 -0

Do you need help?X

  mysql-test/suite/rpl/r/rpl_extraCol_innodb.result@1.9, 2007-07-31 15:21:39-04:00, cbell@mysql_cab_desk. +67 -0     BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash     

    New result file for additional test.

  mysql-test/suite/rpl/r/rpl_extraCol_myisam.result@1.9, 2007-07-31 15:21:39-04:00, cbell@mysql_cab_desk. +67 -0     BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash     

    New result file for additional test.

  mysql-test/suite/rpl/r/rpl_row_colSize.result@1.1, 2007-07-31 15:21:40-04:00, cbell@mysql_cab_desk. +726 -0     BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash     

    New result file for additional test.

  mysql-test/suite/rpl/r/rpl_row_colSize.result@1.0, 2007-07-31 15:21:40-04:00, cbell@mysql_cab_desk. +0 -0

  mysql-test/suite/rpl/t/rpl_row_colSize.test@1.1, 2007-07-31 15:21:41-04:00, cbell@mysql_cab_desk. +150 -0     BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash     

Do you need more help?X

    Added a test file to test each variable type that relies on field     metadata from the master.

  mysql-test/suite/rpl/t/rpl_row_colSize.test@1.0, 2007-07-31 15:21:41-04:00, cbell@mysql_cab_desk. +0 -0

  sql/rpl_utility.cc@1.12, 2007-07-31 15:21:40-04:00, cbell@mysql_cab_desk. +102 -0     BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash     

    This patch adds a method to check the size of the field on the master     using the field metadata from WL#3228. Each column is checked to ensure     the slave's column is >= to the master's column in size.

diff -Nrup a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test

--- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test	2007-06-12 23:50:32 -04:00
+++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test	2007-07-31 15:21:38 -04:00
@@ -71,38 +71,47 @@ sync_slave_with_master;
 ############################################
 
 ## BUG22086

-#--echo *** Create t2 on slave ***
-#STOP SLAVE;
-#RESET SLAVE;
-#eval CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
-# d FLOAT DEFAULT '2.00',
-# e CHAR(5) DEFAULT 'TEST2')
-# ENGINE=$engine_type;
-#
-#--echo *** Create t2 on Master ***
-#connection master;
-#eval CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10)
-# ) ENGINE=$engine_type;
-#RESET MASTER;
-#
-#--echo *** Start Slave ***
-#connection slave;
-#START SLAVE;
-#
-#--echo *** Master Data Insert ***
-#connection master;
-#
-#INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING');
-#SELECT * FROM t2 ORDER BY a;
-

-#--echo *** Select from slave ***
-#sync_slave_with_master;
-#SELECT * FROM t2 ORDER BY a;
-

-#--echo *** Drop t2 ***
-#connection master;
-#DROP TABLE t2;
-#sync_slave_with_master;
+--echo *** Create t2 on slave  ***
+STOP SLAVE;
+RESET SLAVE;
+eval CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
+                      d FLOAT DEFAULT '2.00',
+                      e CHAR(5) DEFAULT 'TEST2')
+                      ENGINE=$engine_type;
+
+--echo *** Create t2 on Master ***
+connection master;
+eval CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10)
+                       ) ENGINE=$engine_type;
+RESET MASTER;
+
+--echo *** Master Data Insert ***
+connection master;
+
+INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING');
+SELECT * FROM t2 ORDER BY a;
+
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+wait_for_slave_to_stop;
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
+--query_vertical SHOW SLAVE STATUS
+STOP SLAVE;
+RESET SLAVE;
+SELECT * FROM t2 ORDER BY a;
+
+connection master;
+RESET MASTER;
+
+connection slave;
+START SLAVE;
+
+--echo *** Drop t2  ***
+connection master;
+DROP TABLE t2;
+sync_slave_with_master;
 
 ####################################

 ### Try to replicate BLOB to INT ###
diff -Nrup a/mysql-test/include/test_fieldsize.inc b/mysql-test/include/test_fieldsize.inc
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/include/test_fieldsize.inc	2007-07-31 15:21:41 -04:00
@@ -0,0 +1,48 @@
+#
+# include/test_fieldsize.inc 
+# 
+# This include file is designed to create a table with one column
+# whose size on the master is greater than that on the slave. The
+# test should fail with an error on the slave.
+#
+
+--echo Test_fieldsize BEGIN
+connection master;
+--echo Dropping table t1
+DROP TABLE IF EXISTS t1;
+
+sync_slave_with_master;
+STOP SLAVE;
Can we help you?X
+RESET SLAVE; +--echo Creating table on slave +eval $test_table_slave; + +connection master; +--echo Creating table on master +eval $test_table_master; +RESET MASTER; + +--echo Inserting a row on master +eval $test_insert; + +connection slave; +--echo Restarting slave. Should see error 1532 here. +START SLAVE; +wait_for_slave_to_stop; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS + +# The following should be 0 +--echo Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +STOP SLAVE; +RESET SLAVE; + +connection master; +RESET MASTER; + +connection slave; +START SLAVE; +--echo Test_fieldsize END + diff -Nrup a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result --- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result 2007-07-09 04:54:16 -04:00 +++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result 2007-07-31 15:21:39 -04:00 @@ -33,6 +33,73 @@ a b c d e 3 4 QA 2 TEST
  • Drop t1 *** DROP TABLE t1; +*** Create t2 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t2 on Master *** +CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='InnoDB'; +RESET MASTER; +*** Master Data Insert *** +INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING'); +SELECT * FROM t2 ORDER BY a; +a b c +1 2 Kyle, TEX +2 1 JOE AUSTIN +3 4 QA TESTING +*** Start Slave *** +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +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 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +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 +STOP SLAVE; +RESET SLAVE; +SELECT * FROM t2 ORDER BY a; +a b c d e +RESET MASTER; +START SLAVE; +*** Drop t2 *** +DROP TABLE t2;
  • Create t3 on slave *** STOP SLAVE; RESET SLAVE; diff -Nrup a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result 2007-07-09 04:54:16 -04:00 +++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result 2007-07-31 15:21:39 -04:00 @@ -33,6 +33,73 @@ a b c d e 3 4 QA 2 TEST
  • Drop t1 *** DROP TABLE t1; +*** Create t2 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t2 on Master *** +CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='MyISAM'; +RESET MASTER; +*** Master Data Insert *** +INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING'); +SELECT * FROM t2 ORDER BY a; +a b c +1 2 Kyle, TEX +2 1 JOE AUSTIN +3 4 QA TESTING +*** Start Slave *** +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +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 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +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 +STOP SLAVE; +RESET SLAVE; +SELECT * FROM t2 ORDER BY a; +a b c d e +RESET MASTER; +START SLAVE; +*** Drop t2 *** +DROP TABLE t2;
  • Create t3 on slave *** STOP SLAVE; RESET SLAVE; diff -Nrup a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result 2007-07-31 15:21:40 -04:00 @@ -0,0 +1,726 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS t1; +**** Testing WL#3228 changes. **** +*** Create "wider" table on slave *** +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a DECIMAL(5,2)); +Creating table on master +CREATE TABLE t1 (a DECIMAL(20, 10)); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES (901251.90125); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a NUMERIC(5,2)); +Creating table on master +CREATE TABLE t1 (a NUMERIC(20, 10)); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES (901251.90125); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a FLOAT(20)); +Creating table on master +CREATE TABLE t1 (a FLOAT(47)); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES (901251.90125); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a BIT(5)); +Creating table on master +CREATE TABLE t1 (a BIT(64)); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES (B'10101'); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a SET('4')); +Creating table on master +CREATE TABLE t1 (a SET('1','2','3','4','5','6','7','8','9')); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES ('4'); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a CHAR(10)); +Creating table on master +CREATE TABLE t1 (a CHAR(20)); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES ('This is a test.'); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a ENUM('44','54')); +Creating table on master +CREATE TABLE t1 (a ENUM( +'01','02','03','04','05','06','07','08','09', +'11','12','13','14','15','16','17','18','19', +'21','22','23','24','25','26','27','28','29', +'31','32','33','34','35','36','37','38','39', +'41','42','43','44','45','46','47','48','49', +'51','52','53','54','55','56','57','58','59', +'61','62','63','64','65','66','67','68','69', +'71','72','73','74','75','76','77','78','79', +'81','82','83','84','85','86','87','88','89', +'91','92','93','94','95','96','97','98','99', +'101','102','103','104','105','106','107','108','109', +'111','112','113','114','115','116','117','118','119', +'121','122','123','124','125','126','127','128','129', +'131','132','133','134','135','136','137','138','139', +'141','142','143','144','145','146','147','148','149', +'151','152','153','154','155','156','157','158','159', +'161','162','163','164','165','166','167','168','169', +'171','172','173','174','175','176','177','178','179', +'181','182','183','184','185','186','187','188','189', +'191','192','193','194','195','196','197','198','199', +'201','202','203','204','205','206','207','208','209', +'211','212','213','214','215','216','217','218','219', +'221','222','223','224','225','226','227','228','229', +'231','232','233','234','235','236','237','238','239', +'241','242','243','244','245','246','247','248','249', +'251','252','253','254','255','256','257','258','259', +'261','262','263','264','265','266','267','268','269', +'271','272','273','274','275','276','277','278','279', +'281','282','283','284','285','286','287','288','289', +'291','292','293','294','295','296','297','298','299' + )); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES ('44'); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a VARCHAR(100)); +Creating table on master +CREATE TABLE t1 (a VARCHAR(2000)); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES ('This is a test.'); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a VARCHAR(10)); +Creating table on master +CREATE TABLE t1 (a VARCHAR(200)); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES ('This is a test.'); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a VARCHAR(1000)); +Creating table on master +CREATE TABLE t1 (a VARCHAR(2000)); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES ('This is a test.'); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +Test_fieldsize BEGIN +Dropping table t1 +DROP TABLE IF EXISTS t1; +STOP SLAVE; +RESET SLAVE; +Creating table on slave +CREATE TABLE t1 (a TINYBLOB); +Creating table on master +CREATE TABLE t1 (a LONGBLOB); +RESET MASTER; +Inserting a row on master +INSERT INTO t1 VALUES ('This is a test.'); +Restarting slave. Should see error 1532 here. +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1532 +Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 1532 +Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1 +Checking row count on slave. Should be 0. +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +Test_fieldsize END +*** Cleanup *** +DROP TABLE IF EXISTS t1; diff -Nrup a/mysql-test/suite/rpl/t/rpl_row_colSize.test b/mysql-test/suite/rpl/t/rpl_row_colSize.test --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/mysql-test/suite/rpl/t/rpl_row_colSize.test 2007-07-31 15:21:41 -04:00 @@ -0,0 +1,150 @@ +################################################################## +# rpl_colSize # +# # +# This test is designed to test the changes included in WL#3228. # +# The changes include the ability to replicate with the master # +# having columns that are smaller (shorter) than the slave. # +################################################################## + +-- source include/master-slave.inc +-- source include/have_binlog_format_row.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + + +--echo **** Testing WL#3228 changes. **** +--echo *** Create "wider" table on slave *** +sync_slave_with_master; + +# +# Check each column type to verify error 1532 fires (BUG#22086) +# This check covers only those fields that require additional +# metadata from the master to be replicated to the slave. These +# field types are: +# MYSQL_TYPE_NEWDECIMAL: +# MYSQL_TYPE_FLOAT: +# MYSQL_TYPE_BIT: +# MYSQL_TYPE_SET: +# MYSQL_TYPE_STRING: +# MYSQL_TYPE_ENUM: +# MYSQL_TYPE_VARCHAR: +# MYSQL_TYPE_BLOB: + +# +# Test: Checking MYSQL_TYPE_NEWDECIMAL fields +# +let $test_table_master = CREATE TABLE t1 (a DECIMAL(20, 10)); +let $test_table_slave = CREATE TABLE t1 (a DECIMAL(5,2)); +let $test_insert = INSERT INTO t1 VALUES (901251.90125); +--source include/test_fieldsize.inc + +let $test_table_master = CREATE TABLE t1 (a NUMERIC(20, 10)); +let $test_table_slave = CREATE TABLE t1 (a NUMERIC(5,2)); +let $test_insert = INSERT INTO t1 VALUES (901251.90125); +--source include/test_fieldsize.inc + +# +# Test: Checking MYSQL_TYPE_FLOAT fields +# +let $test_table_master = CREATE TABLE t1 (a FLOAT(47)); +let $test_table_slave = CREATE TABLE t1 (a FLOAT(20)); +let $test_insert = INSERT INTO t1 VALUES (901251.90125); +--source include/test_fieldsize.inc + +# +# Test: Checking MYSQL_TYPE_BIT fields +# +let $test_table_master = CREATE TABLE t1 (a BIT(64)); +let $test_table_slave = CREATE TABLE t1 (a BIT(5)); +let $test_insert = INSERT INTO t1 VALUES (B'10101'); +--source include/test_fieldsize.inc + +# +# Test: Checking MYSQL_TYPE_SET fields +# +let $test_table_master = CREATE TABLE t1 (a SET('1','2','3','4','5','6','7','8','9')); +let $test_table_slave = CREATE TABLE t1 (a SET('4')); +let $test_insert = INSERT INTO t1 VALUES ('4'); +--source include/test_fieldsize.inc + +# +# Test: Checking MYSQL_TYPE_STRING fields +# +let $test_table_master = CREATE TABLE t1 (a CHAR(20)); +let $test_table_slave = CREATE TABLE t1 (a CHAR(10)); +let $test_insert = INSERT INTO t1 VALUES ('This is a test.'); +--source include/test_fieldsize.inc + +# +# Test: Checking MYSQL_TYPE_ENUM fields +# +let $test_table_master = CREATE TABLE t1 (a ENUM( + '01','02','03','04','05','06','07','08','09', + '11','12','13','14','15','16','17','18','19', + '21','22','23','24','25','26','27','28','29', + '31','32','33','34','35','36','37','38','39', + '41','42','43','44','45','46','47','48','49', + '51','52','53','54','55','56','57','58','59', + '61','62','63','64','65','66','67','68','69', + '71','72','73','74','75','76','77','78','79', + '81','82','83','84','85','86','87','88','89', + '91','92','93','94','95','96','97','98','99', + '101','102','103','104','105','106','107','108','109', + '111','112','113','114','115','116','117','118','119', + '121','122','123','124','125','126','127','128','129', + '131','132','133','134','135','136','137','138','139', + '141','142','143','144','145','146','147','148','149', + '151','152','153','154','155','156','157','158','159', + '161','162','163','164','165','166','167','168','169', + '171','172','173','174','175','176','177','178','179', + '181','182','183','184','185','186','187','188','189', + '191','192','193','194','195','196','197','198','199', + '201','202','203','204','205','206','207','208','209', + '211','212','213','214','215','216','217','218','219', + '221','222','223','224','225','226','227','228','229', + '231','232','233','234','235','236','237','238','239', + '241','242','243','244','245','246','247','248','249', + '251','252','253','254','255','256','257','258','259', + '261','262','263','264','265','266','267','268','269', + '271','272','273','274','275','276','277','278','279', + '281','282','283','284','285','286','287','288','289', + '291','292','293','294','295','296','297','298','299' + )); +let $test_table_slave = CREATE TABLE t1 (a ENUM('44','54')); +let $test_insert = INSERT INTO t1 VALUES ('44'); +--source include/test_fieldsize.inc + +# +# Test: Checking MYSQL_TYPE_VARCHAR fields +# +let $test_table_master = CREATE TABLE t1 (a VARCHAR(2000)); +let $test_table_slave = CREATE TABLE t1 (a VARCHAR(100)); +let $test_insert = INSERT INTO t1 VALUES ('This is a test.'); +--source include/test_fieldsize.inc + +let $test_table_master = CREATE TABLE t1 (a VARCHAR(200)); +let $test_table_slave = CREATE TABLE t1 (a VARCHAR(10)); +let $test_insert = INSERT INTO t1 VALUES ('This is a test.'); +--source include/test_fieldsize.inc + +let $test_table_master = CREATE TABLE t1 (a VARCHAR(2000)); +let $test_table_slave = CREATE TABLE t1 (a VARCHAR(1000)); +let $test_insert = INSERT INTO t1 VALUES ('This is a test.'); +--source include/test_fieldsize.inc + +# +# Test: Checking MYSQL_TYPE_BLOB fields +# +let $test_table_master = CREATE TABLE t1 (a LONGBLOB); +let $test_table_slave = CREATE TABLE t1 (a TINYBLOB); +let $test_insert = INSERT INTO t1 VALUES ('This is a test.'); +--source include/test_fieldsize.inc + +--echo *** Cleanup *** +connection master; +DROP TABLE IF EXISTS t1; +sync_slave_with_master; +# END 5.1 Test Case + diff -Nrup a/sql/rpl_utility.cc b/sql/rpl_utility.cc --- a/sql/rpl_utility.cc 2007-07-30 17:39:49 -04:00 +++ b/sql/rpl_utility.cc 2007-07-31 15:21:40 -04:00 @@ -124,6 +124,102 @@ uint32 table_def::calc_field_size(uint c return length; }
+/**
+  Compare slave field size to that of the master. Error if slave < master.
+
+  This method gets the field metadata as pertaining to how the field
+  is stored in the raw data from the master. This can be used to determine
+  if the sizes are compatible in either max size (length) or if the
+  packed size is compatible.
+
+  @param  type         Field type of the master
+  @param  col          The field number (column) being checked
+  @param  table        The TABLE variable
+  @param  master_size  The value from the field metadata in the table map
+  @param  tsh          The table share (used for reporting)
+  @param  rli          Relay log information (used for reporting)
+
+  @retval  0  No error: Slave col size >= master col size
+  @retval  1  Error: Slave col size < master col size
Can't find what you're looking for?X
+*/ +int check_slave_field_size(uint32 type, int col, TABLE *table, + uint master_size, TABLE_SHARE const *tsh, + RELAY_LOG_INFO const *rli) +{ + uint slave_value= 0; + uint master_value= master_size; + int error= 0; + + /* + Return 0 if there is no metadata from the master. + */ + if (!master_size) + return error; + + switch (type) { + case MYSQL_TYPE_NEWDECIMAL: + { + uint master_precision= (master_size >> 8U) & 0x00ff; + uint master_decimal= master_size & 0x00ff; + slave_value= table->field[col]->pack_length(); + master_value= my_decimal_get_binary_size(master_precision, master_decimal); + break; + } + case MYSQL_TYPE_DOUBLE: + case MYSQL_TYPE_FLOAT: + slave_value= table->field[col]->pack_length(); + break; + case MYSQL_TYPE_BIT: + { + slave_value= ((Field_bit *)table->field[col])->bytes_in_rec + + ((((Field_bit *)table->field[col])->bit_len > 0) ? 1 : 0); + uint from_len= (master_size >> 8U) & 0x00ff; + uint from_bit_len= master_size & 0x00ff; + master_value= from_len + ((from_bit_len > 0) ? 1 : 0); + break; + } + case MYSQL_TYPE_SET: + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_ENUM: + { + if (((master_size & 0xff00) == (MYSQL_TYPE_SET << 8)) || + ((master_size & 0xff00) == (MYSQL_TYPE_ENUM << 8))) + master_value= master_size & 0x00ff; + else + master_value= master_size & 0x00ff; + if ((table->field[col]->real_type() == MYSQL_TYPE_SET) || + (table->field[col]->real_type() == MYSQL_TYPE_ENUM)) + slave_value= table->field[col]->pack_length(); + else + slave_value= table->field[col]->field_length + 1; + break; + } + case MYSQL_TYPE_VARCHAR:
Don't know where to look next?X
+ slave_value= table->field[col]->field_length; + break; + case MYSQL_TYPE_TINY_BLOB: + case MYSQL_TYPE_MEDIUM_BLOB: + case MYSQL_TYPE_LONG_BLOB: + case MYSQL_TYPE_BLOB: + slave_value= ((Field_blob *)table->field[col])->pack_length_no_ptr(); + break; + default: + slave_value= master_value; + } + if (slave_value < master_value) + { + error= 1; + char buf[256]; + my_snprintf(buf, sizeof(buf), "Column %d size mismatch - " + "master has size %d, %s.%s on slave has size %d", + col, master_value, tsh->db.str, + tsh->table_name.str, slave_value); + rli->report(ERROR_LEVEL, ER_BINLOG_ROW_WRONG_TABLE_DEF, + ER(ER_BINLOG_ROW_WRONG_TABLE_DEF), buf); + } + return (error); +} +

 /*
   Is the definition compatible with a table?  

@@ -156,6 +252,12 @@ table_def::compatible_with(RELAY_LOG_INF

       rli->report(ERROR_LEVEL, ER_BINLOG_ROW_WRONG_TABLE_DEF,
                   ER(ER_BINLOG_ROW_WRONG_TABLE_DEF), buf);
     }
+    /*
+      Check the slave's field size against that of the master.
+    */
+    if (!error)
+      error= check_slave_field_size(table->field[col]->type(), col, table, 
+                                    m_field_metadata[col], tsh, rli);

   }  

   return error;

-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Tue Jul 31 15:22:57 2007
Confused? Frustrated?X

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:20:11 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library