Loading include/my_base.h +3 −1 Original line number Diff line number Diff line Loading @@ -411,7 +411,9 @@ enum ha_base_keytype { statement */ #define HA_ERR_CORRUPT_EVENT 171 /* The event was corrupt, leading to illegal data being read */ #define HA_ERR_LAST 171 /*Copy last error nr.*/ #define HA_ERR_ROWS_EVENT_APPLY 172 /* The event could not be processed no other hanlder error happened */ #define HA_ERR_LAST 172 /*Copy last error nr.*/ /* Add error numbers before HA_ERR_LAST and change it accordingly. */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) Loading mysql-test/extra/rpl_tests/rpl_row_tabledefs.test +3 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ ALTER TABLE t1_bit ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; # ... and add one non-nullable INT column last in table 't1_text' # with no default, ALTER TABLE t1_nodef ADD x INT NOT NULL; ALTER TABLE t1_nodef ADD x INT NOT NULL, ADD y INT NOT NULL, ADD z INT NOT NULL; # ... and remove the last column in t2 ALTER TABLE t2 DROP b; # ... change the type of the single column in table 't4' Loading Loading @@ -222,8 +222,8 @@ sync_slave_with_master; --echo **** On Slave **** connection slave; INSERT INTO t1_nodef VALUES (1,2,3); INSERT INTO t1_nodef VALUES (2,4,6); INSERT INTO t1_nodef VALUES (1,2,3,4,5); INSERT INTO t1_nodef VALUES (2,4,6,8,10); --echo **** On Master **** connection master; Loading mysql-test/suite/bugs/data/rpl_bug12691.dat 0 → 100644 +3 −0 Original line number Diff line number Diff line a b c mysql-test/suite/bugs/r/rpl_bug12691.result 0 → 100644 +34 −0 Original line number Diff line number Diff line 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; **** On Master **** CREATE TABLE t1 (b CHAR(10)); **** On Slave **** STOP SLAVE; **** On Master **** LOAD DATA INFILE FILENAME SELECT COUNT(*) FROM t1; COUNT(*) 3 SHOW BINLOG EVENTS; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: # master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (b CHAR(10)) master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=# master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE FILENAME ;file_id=# **** On Slave **** SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; SELECT COUNT(*) FROM t1; COUNT(*) 0 **** On Master **** DROP TABLE t1; mysql-test/suite/bugs/t/rpl_bug12691.test 0 → 100644 +53 −0 Original line number Diff line number Diff line # Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER # Date: 01/31/2008 # Added: Serge Kozlov <skozlov@mysql.com> --source include/master-slave.inc --connection master --source include/have_binlog_format_mixed_or_statement.inc --echo --echo **** On Master **** CREATE TABLE t1 (b CHAR(10)); --echo --echo **** On Slave **** --sync_slave_with_master STOP SLAVE; --source include/wait_for_slave_to_stop.inc --connection master --echo --echo **** On Master **** --exec cp $MYSQL_TEST_DIR/suite/bugs/data/rpl_bug12691.dat $MYSQLTEST_VARDIR/tmp/ --echo LOAD DATA INFILE FILENAME --disable_query_log --eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' --enable_query_log --remove_file $MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat SELECT COUNT(*) FROM t1; --replace_column 2 # 5 # --replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /'.+'/FILENAME/ SHOW BINLOG EVENTS; --save_master_pos --connection slave --echo --echo **** On Slave **** SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; --source include/wait_for_slave_to_start.inc --sync_with_master SELECT COUNT(*) FROM t1; # Clean up --connection master --echo --echo **** On Master **** DROP TABLE t1; --sync_slave_with_master Loading
include/my_base.h +3 −1 Original line number Diff line number Diff line Loading @@ -411,7 +411,9 @@ enum ha_base_keytype { statement */ #define HA_ERR_CORRUPT_EVENT 171 /* The event was corrupt, leading to illegal data being read */ #define HA_ERR_LAST 171 /*Copy last error nr.*/ #define HA_ERR_ROWS_EVENT_APPLY 172 /* The event could not be processed no other hanlder error happened */ #define HA_ERR_LAST 172 /*Copy last error nr.*/ /* Add error numbers before HA_ERR_LAST and change it accordingly. */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) Loading
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test +3 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ ALTER TABLE t1_bit ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; # ... and add one non-nullable INT column last in table 't1_text' # with no default, ALTER TABLE t1_nodef ADD x INT NOT NULL; ALTER TABLE t1_nodef ADD x INT NOT NULL, ADD y INT NOT NULL, ADD z INT NOT NULL; # ... and remove the last column in t2 ALTER TABLE t2 DROP b; # ... change the type of the single column in table 't4' Loading Loading @@ -222,8 +222,8 @@ sync_slave_with_master; --echo **** On Slave **** connection slave; INSERT INTO t1_nodef VALUES (1,2,3); INSERT INTO t1_nodef VALUES (2,4,6); INSERT INTO t1_nodef VALUES (1,2,3,4,5); INSERT INTO t1_nodef VALUES (2,4,6,8,10); --echo **** On Master **** connection master; Loading
mysql-test/suite/bugs/data/rpl_bug12691.dat 0 → 100644 +3 −0 Original line number Diff line number Diff line a b c
mysql-test/suite/bugs/r/rpl_bug12691.result 0 → 100644 +34 −0 Original line number Diff line number Diff line 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; **** On Master **** CREATE TABLE t1 (b CHAR(10)); **** On Slave **** STOP SLAVE; **** On Master **** LOAD DATA INFILE FILENAME SELECT COUNT(*) FROM t1; COUNT(*) 3 SHOW BINLOG EVENTS; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: # master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (b CHAR(10)) master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=# master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE FILENAME ;file_id=# **** On Slave **** SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; SELECT COUNT(*) FROM t1; COUNT(*) 0 **** On Master **** DROP TABLE t1;
mysql-test/suite/bugs/t/rpl_bug12691.test 0 → 100644 +53 −0 Original line number Diff line number Diff line # Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER # Date: 01/31/2008 # Added: Serge Kozlov <skozlov@mysql.com> --source include/master-slave.inc --connection master --source include/have_binlog_format_mixed_or_statement.inc --echo --echo **** On Master **** CREATE TABLE t1 (b CHAR(10)); --echo --echo **** On Slave **** --sync_slave_with_master STOP SLAVE; --source include/wait_for_slave_to_stop.inc --connection master --echo --echo **** On Master **** --exec cp $MYSQL_TEST_DIR/suite/bugs/data/rpl_bug12691.dat $MYSQLTEST_VARDIR/tmp/ --echo LOAD DATA INFILE FILENAME --disable_query_log --eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' --enable_query_log --remove_file $MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat SELECT COUNT(*) FROM t1; --replace_column 2 # 5 # --replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /'.+'/FILENAME/ SHOW BINLOG EVENTS; --save_master_pos --connection slave --echo --echo **** On Slave **** SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; --source include/wait_for_slave_to_start.inc --sync_with_master SELECT COUNT(*) FROM t1; # Clean up --connection master --echo --echo **** On Master **** DROP TABLE t1; --sync_slave_with_master