mirror of
https://github.com/MariaDB/server.git
synced 2025-05-10 02:01:19 +03:00
Some of the test cases reference to binlog position and these position numbers are written into result explicitly. It is difficult to maintain if log event format changes. There are a couple of cases explicit position number appears, we handle them in different ways A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options Use --replace_result to mask them. B. 'SHOW BINLOG EVENT ...' Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. show_binlog_events.inc file's function is enhanced by given $binlog_file and $binlog_limit. C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc' For the test cases just care a few items in the result of 'SHOW SLAVE STATUS', only the items related to each test case are showed. 'show_slave_status.inc' is rebuild, only the given items in $status_items will be showed. 'check_slave_is_running.inc' and 'check_slave_no_error.inc' and 'check_slave_param.inc' are auxiliary files helping to show running status and error information easily. mysql-test/extra/binlog_tests/binlog.test: It only cares whether current binlog file index is changed, so it is ok with 'show_master_status.inc' instead of 'show mater status'. mysql-test/extra/binlog_tests/blackhole.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/extra/rpl_tests/rpl_deadlock.test: Use 'check_slave_is_running.inc' instead of 'show_slave_status2.inc'. mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test: Use 'wait_for_slave_sql_error.inc' and 'ait_for_slave_sql_error_and_skip.inc' instead of 'show slave status'. mysql-test/extra/rpl_tests/rpl_flsh_tbls.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test: It is need now to give a error number, so use 'wait_for_slave_io_to_stop.inc' instead of 'wait_for_slave_io_error.inc'. mysql-test/extra/rpl_tests/rpl_insert_delayed.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/extra/rpl_tests/rpl_log.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. se 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/extra/rpl_tests/rpl_max_relay_size.test: se 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/extra/rpl_tests/rpl_reset_slave.test: Use 'show_slave_status.inc' instead of 'show_slave_status2.inc' statement. Use 'check_slave_no_error.inc' to simplify the check that there is no error. mysql-test/extra/rpl_tests/rpl_row_basic.test: Use 'check_slave_is_running.inc' to verify that Slave threads are running well. Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. mysql-test/extra/rpl_tests/rpl_row_tabledefs.test: Use 'show_slave_error_status_and_skip.inc' instead of 'show slave status'. mysql-test/include/check_slave_is_running.inc: To make sure both sql and io thread are running well. If not, the test will be aborted. mysql-test/include/check_slave_no_error.inc: To make sure both sql and io thread have no error. If not, the test will be aborted. mysql-test/include/get_relay_log_pos.inc: According to the position of a log event in master binlog file, find the peer position of a log event in relay log file. mysql-test/include/rpl_stmt_seq.inc: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/include/show_binlog_events.inc: Add two options $binlog_file and $binlog_limit for showing binlog events from different binlog files or/and given different limits on position or row number. mysql-test/include/show_rpl_debug_info.inc: Add 'SELECT NOW()' in the debug information. mysql-test/include/show_slave_status.inc: It's more clean and tidy Only the given columns of slave status are printed. mysql-test/include/test_fieldsize.inc: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/include/wait_for_binlog_event.inc: Use show_rpl_debug_info.inc instead of 'SHOW BINLOG EVENTS'. mysql-test/include/wait_for_slave_io_error.inc: Add $slave_io_errno and $show_slave_io_error, it waits only a given error. mysql-test/include/wait_for_slave_param.inc: Use die instead of exit. mysql-test/include/wait_for_slave_sql_error.inc: Add $slave_sql_errno and $show_slave_sql_error, it waits only a given error. mysql-test/include/wait_for_status_var.inc: Use die instead of exit. mysql-test/r/flush_block_commit_notembedded.result: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/r/multi_update.result: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/suite/binlog/r/binlog_innodb.result: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/suite/binlog/r/binlog_row_binlog.result: Position in the result of 'show master status' is replaced by '#'. mysql-test/suite/binlog/r/binlog_stm_binlog.result: Position in the result of 'show master status' is replaced by '#'. mysql-test/suite/binlog/t/binlog_innodb.test: It checks whether somethings are binlogged, so we use 'show_binlog_event.inc' instead of 'show master status'. mysql-test/suite/binlog/t/binlog_stm_binlog.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/bugs/r/rpl_bug36391.result: Position in the result of 'show master status' is replaced by '#'. mysql-test/suite/bugs/t/rpl_bug12691.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/bugs/t/rpl_bug36391.test: 'show master status' is replaced by 'show_master_status.inc'. Position in the result of 'show master status' is replaced by '#'. mysql-test/suite/engines/funcs/r/rpl_000015.result: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/suite/engines/funcs/t/rpl_000015.test: Use 'check_slave_is_running.inc' to verify that Slave threads are running well. mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test: Use 'query_vertical SHOW SLAVE STATUS' instead of 'show slave status'. There is no status columns in the result file, for no slave exists on master's server. mysql-test/suite/engines/funcs/t/rpl_change_master.test: This test just care whether Read_Master_Log_Pos is equal to Exec_Master_Log_Pos after 'CHANGE MASTER ..'. So 'show slave status' is removed and just check the value of Read_Master_Log_Pos and Exec_Master_Log_Pos. mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test: We doesn't really need the statement. mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test: Just show Relay_Log_File, running status and error informations. Use 'check_slave_is_running.inc' to verify that Slave threads are running well. mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/engines/funcs/t/rpl_log_pos.test: Mask the explicit positions in the result file. Use 'check_slave_no_error.inc' to simplify the check that there is no error. Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/engines/funcs/t/rpl_row_drop.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/engines/funcs/t/rpl_row_until.test: Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements. Mask the explicit binary log positions in the result file. mysql-test/suite/engines/funcs/t/rpl_server_id1.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. Use 'check_slave_no_error.inc' to simplify the check that there is no error. mysql-test/suite/engines/funcs/t/rpl_server_id2.test: It doesn't really need in this test. mysql-test/suite/engines/funcs/t/rpl_slave_status.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/manual/t/rpl_replication_delay.test: Use 'show_slave_status.inc' instead of 'show slave status'. mysql-test/suite/parts/t/rpl_partition.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl/include/rpl_mixed_ddl.inc: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/include/rpl_mixed_dml.inc: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_000015.test: Use 'show_slave_status.inc' instead of 'show_slave_status2.inc'. mysql-test/suite/rpl/t/rpl_binlog_grant.test: Use 'wait_for_binlog_event.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_bug33931.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/rpl/t/rpl_change_master.test: This test just care whether Read_Master_Log_Pos is equal to Exec_Master_Log_Pos after 'CHANGE MASTER ..'. So 'show slave status' is removed and just check the value of Read_Master_Log_Pos and Exec_Master_Log_Pos. mysql-test/suite/rpl/t/rpl_critical_errors.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/rpl/t/rpl_dual_pos_advance.test: Mask the explicit position numbers in result file. It is restricted running on SBR, for it want to binlog 'set @a=1' statement. mysql-test/suite/rpl/t/rpl_empty_master_crash.test: It doesn't need in this test. mysql-test/suite/rpl/t/rpl_flushlog_loop.test: UUse 'check_slave_is_running.inc' and 'show_slave_status.inc' instead of 'show slave status' statement. mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test: Use 'wait_for_slave_io_error.inc' to wait the given io thread error happening. mysql-test/suite/rpl/t/rpl_grant.test: It doesn't need in this test. mysql-test/suite/rpl/t/rpl_incident.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl/t/rpl_known_bugs_detection.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/rpl/t/rpl_loaddata_fatal.test: Use 'wait_for_slave_sql_error_and_skip.inc' to wait the given sql thread error happening and then skip the event. There is no need to print the result of 'show slave stutus'. mysql-test/suite/rpl/t/rpl_log_pos.test: Use 'wait_for_slave_io_error.inc' to wait the given io thread error happening. There is no need to print the result of 'show slave status'. mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_replicate_do.test: Use 'show_slave_status.inc' instead of 'show slave status'. mysql-test/suite/rpl/t/rpl_rotate_logs.test: Use 'show_slave_status.inc' instead of 'show_slave_status2.inc'. mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_row_create_table.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_row_drop.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_row_until.test: Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements. mysql-test/suite/rpl/t/rpl_skip_error.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave status'. mysql-test/suite/rpl/t/rpl_slave_skip.test: Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and mask the explicit position number in the 'CHANGE MASTER' statements. mysql-test/suite/rpl/t/rpl_sp.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_ssl.test: Use 'show_slave_status.inc' instead of 'show slave status'. mysql-test/suite/rpl/t/rpl_ssl1.test: Use 'show_slave_status.inc' instead of 'show slave status'. mysql-test/suite/rpl/t/rpl_stm_until.test: Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements. mysql-test/suite/rpl/t/rpl_temporary_errors.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave status'. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test: Mask master_log_pos and master_log_file mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/t/alter_table-big.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/t/create-big.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/t/ctype_cp932_binlog_stm.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/t/flush_block_commit_notembedded.test: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/t/multi_update.test: It checks whether somethings are binlogged, so we using 'wait_binlog_event.inc' instead of 'show master status'. mysql-test/t/sp_trans_log.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
649 lines
21 KiB
Plaintext
649 lines
21 KiB
Plaintext
#
|
|
# Basic tests of row-level logging
|
|
#
|
|
|
|
#
|
|
# First we test tables with only an index.
|
|
#
|
|
|
|
eval CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)$extra_index_t1) ENGINE = $type ;
|
|
SELECT * FROM t1;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t1;
|
|
|
|
# Testing insert
|
|
connection master;
|
|
INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X');
|
|
INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A');
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
|
|
# Testing delete
|
|
# Observe that are several rows having the value for the index but only one
|
|
# should be deleted.
|
|
connection master;
|
|
DELETE FROM t1 WHERE C1 = C2;
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
|
|
#
|
|
# Testing update.
|
|
# Note that we have a condition on a column that is not part of the index for
|
|
# the table. The right row should be updated nevertheless.
|
|
#
|
|
connection master;
|
|
UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
|
|
# Testing update with a condition that does not match any rows, but
|
|
# which has a match for the index.
|
|
connection master;
|
|
UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N';
|
|
SELECT * FROM t1 ORDER BY c1,c2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t1 ORDER BY c1,c2;
|
|
|
|
#
|
|
# Testing table with primary key
|
|
#
|
|
connection master;
|
|
eval CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = $type ;
|
|
INSERT INTO t2
|
|
VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25),
|
|
(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81);
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
|
|
|
connection master;
|
|
UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1;
|
|
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
|
|
|
# Testing update with a condition that does not match any rows, but
|
|
# which has a match for the primary key.
|
|
connection master;
|
|
UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999;
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
|
|
connection master;
|
|
DELETE FROM t2 WHERE c1 % 4 = 0;
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
|
|
connection master;
|
|
UPDATE t2 SET c12='X';
|
|
|
|
#
|
|
# Testing table with a multi-column primary key.
|
|
#
|
|
connection master;
|
|
eval CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = $type ;
|
|
|
|
INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1);
|
|
INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2);
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
|
|
connection master;
|
|
DELETE FROM t3 WHERE C1 = C2;
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
|
|
connection master;
|
|
UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
|
|
#
|
|
# Testing table without index or primary key
|
|
#
|
|
connection master;
|
|
eval CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT$extra_index_t6) ENGINE = $type;
|
|
|
|
# Testing insert
|
|
INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3);
|
|
INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6);
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
|
|
# Testing delete
|
|
# Observe that are several rows having the value for the index but only one
|
|
# should be deleted.
|
|
connection master;
|
|
DELETE FROM t6 WHERE C1 = C2;
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
|
|
#
|
|
# Testing update.
|
|
# Note that we have a condition on a column that is not part of the index for
|
|
# the table. The right row should be updated nevertheless.
|
|
#
|
|
connection master;
|
|
UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
|
|
# now mixing the 3 tables without begin/commit
|
|
connection master;
|
|
eval CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = $type ;
|
|
INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3);
|
|
INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6);
|
|
|
|
UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1;
|
|
SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2;
|
|
|
|
#
|
|
# Testing special column types
|
|
#
|
|
|
|
connection master;
|
|
eval CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = $type ;
|
|
|
|
INSERT INTO t4 SET C1 = 1;
|
|
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
|
|
sync_slave_with_master;
|
|
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
|
|
|
|
#
|
|
# Testing conflicting operations
|
|
#
|
|
connection master;
|
|
eval CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = $type ;
|
|
sync_slave_with_master;
|
|
--echo --- on slave: original values ---
|
|
INSERT INTO t7 VALUES (1,3), (2,6), (3,9);
|
|
SELECT * FROM t7 ORDER BY C1;
|
|
|
|
# since bug#31552/31609 idempotency is not default any longer. In order
|
|
# the preceeding test INSERT INTO t7 to pass the mode is switched
|
|
# temprorarily
|
|
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
|
|
|
connection master;
|
|
--echo --- on master: new values inserted ---
|
|
INSERT INTO t7 VALUES (1,2), (2,4), (3,6);
|
|
SELECT * FROM t7 ORDER BY C1;
|
|
sync_slave_with_master;
|
|
|
|
set @@global.slave_exec_mode= default;
|
|
--echo --- on slave: old values should be overwritten by replicated values ---
|
|
SELECT * FROM t7 ORDER BY C1;
|
|
|
|
#
|
|
# A more complicated test where the table has several keys and we are
|
|
# causing a conflict for a key that is not "last".
|
|
#
|
|
connection master;
|
|
--echo --- on master ---
|
|
eval CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = $type ;
|
|
|
|
# First we make sure that the constraints are correctly set.
|
|
INSERT INTO t8 VALUES (99,99,99);
|
|
--error ER_DUP_ENTRY
|
|
INSERT INTO t8 VALUES (99,22,33);
|
|
--error ER_DUP_ENTRY
|
|
INSERT INTO t8 VALUES (11,99,33);
|
|
--error ER_DUP_ENTRY
|
|
INSERT INTO t8 VALUES (11,22,99);
|
|
SELECT * FROM t8 ORDER BY a;
|
|
|
|
sync_slave_with_master;
|
|
--echo --- on slave ---
|
|
SELECT * FROM t8 ORDER BY a;
|
|
INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9);
|
|
SELECT * FROM t8 ORDER BY a;
|
|
|
|
# since bug#31552/31609 idempotency is not default any longer. In order
|
|
# the preceeding test INSERT INTO t8 to pass the mode is switched
|
|
# temprorarily
|
|
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
|
|
|
connection master;
|
|
--echo --- on master ---
|
|
# We insert a row that will cause conflict on the primary key but not
|
|
# on the other keys.
|
|
INSERT INTO t8 VALUES (2,4,8);
|
|
sync_slave_with_master;
|
|
set @@global.slave_exec_mode= default;
|
|
|
|
--echo --- on slave ---
|
|
SELECT * FROM t8 ORDER BY a;
|
|
|
|
# BUG#31552: Replication breaks when deleting rows from out-of-sync
|
|
# table without PK
|
|
|
|
--echo **** Test for BUG#31552 ****
|
|
|
|
--echo **** On Master ****
|
|
# Clean up t1 so that we can use it.
|
|
connection master;
|
|
DELETE FROM t1;
|
|
sync_slave_with_master;
|
|
|
|
# Just to get a clean binary log
|
|
source include/reset_master_and_slave.inc;
|
|
|
|
--echo **** On Master ****
|
|
connection master;
|
|
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
|
|
--echo **** On Master ****
|
|
sync_slave_with_master;
|
|
# since bug#31552/31609 idempotency is not default any longer. In order
|
|
# the following test DELETE FROM t1 to pass the mode is switched
|
|
# temprorarily
|
|
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
|
DELETE FROM t1 WHERE C1 = 'L';
|
|
|
|
connection master;
|
|
DELETE FROM t1;
|
|
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
|
sync_slave_with_master;
|
|
set @@global.slave_exec_mode= default;
|
|
source include/check_slave_is_running.inc;
|
|
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
|
|
|
# BUG#37076: TIMESTAMP/DATETIME values are not replicated correctly
|
|
# between machines with mixed endiannes
|
|
# (regression test)
|
|
|
|
--echo **** Test for BUG#37076 ****
|
|
--echo **** On Master ****
|
|
connection master;
|
|
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE);
|
|
INSERT INTO t1 VALUES(
|
|
'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14');
|
|
|
|
--echo **** On Slave ****
|
|
sync_slave_with_master slave;
|
|
SELECT * FROM t1;
|
|
|
|
#
|
|
# cleanup
|
|
#
|
|
|
|
connection master;
|
|
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
|
|
sync_slave_with_master;
|
|
|
|
#
|
|
# BUG#37426: RBR breaks for CHAR() UTF8 fields > 85 chars
|
|
#
|
|
|
|
# We have 4 combinations to test with respect to the field length
|
|
# (i.e., the number of bytes) of the CHAR fields:
|
|
#
|
|
# 1. Replicating from CHAR<256 to CHAR<256
|
|
# 2. Replicating from CHAR<256 to CHAR>255
|
|
# 3. Replicating from CHAR>255 to CHAR<256
|
|
# 4. Replicating from CHAR>255 to CHAR>255
|
|
|
|
# We also make a special case of using the max size of a field on the
|
|
# master, i.e. CHAR(255) in UTF-8, giving another three cases.
|
|
#
|
|
# 5. Replicating UTF-8 CHAR(255) to CHAR(<256)
|
|
# 6. Replicating UTF-8 CHAR(255) to CHAR(>255)
|
|
# 7. Replicating UTF-8 CHAR(255) to CHAR(255) UTF-8
|
|
|
|
connection master;
|
|
eval CREATE TABLE t1 (i INT NOT NULL,
|
|
c CHAR(16) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = $type ;
|
|
|
|
eval CREATE TABLE t2 (i INT NOT NULL,
|
|
c CHAR(16) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = $type ;
|
|
|
|
sync_slave_with_master;
|
|
ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
|
|
|
|
connection master;
|
|
eval CREATE TABLE t3 (i INT NOT NULL,
|
|
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = $type ;
|
|
sync_slave_with_master;
|
|
ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
|
|
|
|
connection master;
|
|
eval CREATE TABLE t4 (i INT NOT NULL,
|
|
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = $type ;
|
|
|
|
eval CREATE TABLE t5 (i INT NOT NULL,
|
|
c CHAR(255) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = $type ;
|
|
sync_slave_with_master;
|
|
ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
|
|
|
|
connection master;
|
|
eval CREATE TABLE t6 (i INT NOT NULL,
|
|
c CHAR(255) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = $type ;
|
|
sync_slave_with_master;
|
|
ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
|
|
|
|
connection master;
|
|
eval CREATE TABLE t7 (i INT NOT NULL,
|
|
c CHAR(255) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = $type ;
|
|
|
|
--echo [expecting slave to replicate correctly]
|
|
connection master;
|
|
INSERT INTO t1 VALUES (1, "", 1);
|
|
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
|
|
sync_slave_with_master;
|
|
|
|
let $diff_table_1=master:test.t1;
|
|
let $diff_table_2=slave:test.t1;
|
|
source include/diff_tables.inc;
|
|
|
|
--echo [expecting slave to replicate correctly]
|
|
connection master;
|
|
INSERT INTO t2 VALUES (1, "", 1);
|
|
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
|
|
sync_slave_with_master;
|
|
|
|
let $diff_table_1=master:test.t2;
|
|
let $diff_table_2=slave:test.t2;
|
|
source include/diff_tables.inc;
|
|
|
|
--echo [expecting slave to stop]
|
|
connection master;
|
|
INSERT INTO t3 VALUES (1, "", 1);
|
|
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
|
|
|
|
connection slave;
|
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
|
--let $slave_sql_errno= 1535
|
|
--let $show_slave_sql_error= 1
|
|
--source include/wait_for_slave_sql_error.inc
|
|
connection master;
|
|
RESET MASTER;
|
|
connection slave;
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
START SLAVE;
|
|
source include/wait_for_slave_to_start.inc;
|
|
|
|
--echo [expecting slave to replicate correctly]
|
|
connection master;
|
|
INSERT INTO t4 VALUES (1, "", 1);
|
|
INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
|
|
sync_slave_with_master;
|
|
|
|
let $diff_table_1=master:test.t4;
|
|
let $diff_table_2=slave:test.t4;
|
|
source include/diff_tables.inc;
|
|
|
|
--echo [expecting slave to stop]
|
|
connection master;
|
|
INSERT INTO t5 VALUES (1, "", 1);
|
|
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
|
|
|
connection slave;
|
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
|
--let $slave_sql_errno= 1535
|
|
--let $show_slave_sql_error= 1
|
|
--source include/wait_for_slave_sql_error.inc
|
|
connection master;
|
|
RESET MASTER;
|
|
connection slave;
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
START SLAVE;
|
|
source include/wait_for_slave_to_start.inc;
|
|
|
|
--echo [expecting slave to stop]
|
|
connection master;
|
|
INSERT INTO t6 VALUES (1, "", 1);
|
|
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
|
|
|
connection slave;
|
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
|
--let $slave_sql_errno= 1535
|
|
--let $show_slave_sql_error= 1
|
|
--source include/wait_for_slave_sql_error.inc
|
|
connection master;
|
|
RESET MASTER;
|
|
connection slave;
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
START SLAVE;
|
|
source include/wait_for_slave_to_start.inc;
|
|
|
|
--echo [expecting slave to replicate correctly]
|
|
connection master;
|
|
INSERT INTO t7 VALUES (1, "", 1);
|
|
INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
|
|
sync_slave_with_master;
|
|
|
|
let $diff_table_1=master:test.t7;
|
|
let $diff_table_2=slave:test.t7;
|
|
source include/diff_tables.inc;
|
|
|
|
connection master;
|
|
drop table t1, t2, t3, t4, t5, t6, t7;
|
|
sync_slave_with_master;
|
|
|
|
#
|
|
# BUG#32709: Assertion failed: trx_data->empty(), file .\log.cc, line 1293
|
|
#
|
|
|
|
connection master;
|
|
eval CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=$type;
|
|
|
|
INSERT INTO t1 VALUES (1), (2), (3);
|
|
--error ER_DUP_ENTRY
|
|
UPDATE t1 SET a = 10;
|
|
INSERT INTO t1 VALUES (4);
|
|
sync_slave_with_master;
|
|
|
|
let $diff_table_1=master:test.t1;
|
|
let $diff_table_2=slave:test.t1;
|
|
source include/diff_tables.inc;
|
|
|
|
connection master;
|
|
drop table t1;
|
|
sync_slave_with_master;
|
|
|
|
#
|
|
# Bug #38230 Differences between master and slave after
|
|
# UPDATE or DELETE with LIMIT with pk
|
|
#
|
|
# the regression test verifies consistency via selecting
|
|
|
|
--disable_abort_on_error
|
|
|
|
--connection master
|
|
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1, t2;
|
|
--enable_warnings
|
|
|
|
eval CREATE TABLE t1 (
|
|
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
|
`int_nokey` int(11) NOT NULL,
|
|
`int_key` int(11) NOT NULL,
|
|
`date_key` date NOT NULL,
|
|
`date_nokey` date NOT NULL,
|
|
`time_key` time NOT NULL,
|
|
`time_nokey` time NOT NULL,
|
|
`datetime_key` datetime NOT NULL,
|
|
`datetime_nokey` datetime NOT NULL,
|
|
`varchar_key` varchar(1) NOT NULL,
|
|
`varchar_nokey` varchar(1) NOT NULL,
|
|
PRIMARY KEY (`pk`),
|
|
KEY `int_key` (`int_key`),
|
|
KEY `date_key` (`date_key`),
|
|
KEY `time_key` (`time_key`),
|
|
KEY `datetime_key` (`datetime_key`),
|
|
KEY `varchar_key` (`varchar_key`)
|
|
) ENGINE=$type;
|
|
|
|
INSERT INTO t1 VALUES (1,8,5,'0000-00-00','0000-00-00','10:37:38','10:37:38','0000-00-00 00:00:00','0000-00-00 00:00:00','p','p'),(2,0,9,'0000-00-00','0000-00-00','00:00:00','00:00:00','2007-10-14 00:00:00','2007-10-14 00:00:00','d','d');
|
|
|
|
eval CREATE TABLE t2 (
|
|
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
|
`int_nokey` int(11) NOT NULL,
|
|
`int_key` int(11) NOT NULL,
|
|
`date_key` date NOT NULL,
|
|
`date_nokey` date NOT NULL,
|
|
`time_key` time NOT NULL,
|
|
`time_nokey` time NOT NULL,
|
|
`datetime_key` datetime NOT NULL,
|
|
`datetime_nokey` datetime NOT NULL,
|
|
`varchar_key` varchar(1) NOT NULL,
|
|
`varchar_nokey` varchar(1) NOT NULL,
|
|
PRIMARY KEY (`pk`),
|
|
KEY `int_key` (`int_key`),
|
|
KEY `date_key` (`date_key`),
|
|
KEY `time_key` (`time_key`),
|
|
KEY `datetime_key` (`datetime_key`),
|
|
KEY `varchar_key` (`varchar_key`)
|
|
) ENGINE=$type;
|
|
|
|
INSERT INTO t2 VALUES (1,1,6,'2005-12-23','2005-12-23','02:24:28','02:24:28','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),(2,0,3,'2009-09-14','2009-09-14','00:00:00','00:00:00','2000-01-30 16:39:40','2000-01-30 16:39:40','q','q'),(3,0,3,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','c','c'),(4,1,6,'2007-03-29','2007-03-29','15:49:00','15:49:00','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(5,4,0,'2002-12-04','2002-12-04','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','o','o'),(6,9,0,'2005-01-28','2005-01-28','00:00:00','00:00:00','2001-05-18 00:00:00','2001-05-18 00:00:00','w','w'),(7,6,0,'0000-00-00','0000-00-00','06:57:25','06:57:25','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(8,0,0,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','z','z'),(9,4,6,'2006-08-15','2006-08-15','00:00:00','00:00:00','2002-04-12 14:44:25','2002-04-12 14:44:25','j','j'),(10,0,5,'2006-12-20','2006-12-20','10:13:53','10:13:53','2008-07-22 00:00:00','2008-07-22 00:00:00','y','y'),(11,9,7,'0000-00-00','0000-00-00','00:00:00','00:00:00','2004-07-05 00:00:00','2004-07-05 00:00:00','{','{'),(12,4,3,'2007-01-26','2007-01-26','23:00:51','23:00:51','2001-05-16 00:00:00','2001-05-16 00:00:00','f','f'),(13,7,0,'2004-03-27','2004-03-27','00:00:00','00:00:00','2005-01-24 03:30:37','2005-01-24 03:30:37','',''),(14,6,0,'2006-07-26','2006-07-26','18:43:57','18:43:57','0000-00-00 00:00:00','0000-00-00 00:00:00','{','{'),(15,0,6,'2000-01-14','2000-01-14','00:00:00','00:00:00','2000-09-21 00:00:00','2000-09-21 00:00:00','o','o'),(16,9,8,'0000-00-00','0000-00-00','21:15:08','21:15:08','0000-00-00 00:00:00','0000-00-00 00:00:00','a','a'),(17,2,0,'2004-10-27','2004-10-27','00:00:00','00:00:00','2004-03-24 22:13:43','2004-03-24 22:13:43','',''),(18,7,4,'0000-00-00','0000-00-00','08:38:27','08:38:27','2002-03-18 19:51:44','2002-03-18 19:51:44','t','t'),(19,5,3,'2008-03-07','2008-03-07','03:29:07','03:29:07','2007-12-01 18:44:44','2007-12-01 18:44:44','t','t'),(20,0,0,'2002-04-09','2002-04-09','16:06:03','16:06:03','2009-04-22 00:00:00','2009-04-22 00:00:00','n','n');
|
|
|
|
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
|
|
UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4;
|
|
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
|
|
DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
|
|
UPDATE t1 SET `int_key` = 6 ORDER BY `pk` LIMIT 3;
|
|
DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
|
|
UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6;
|
|
DELETE FROM t2 WHERE `pk` < 7 LIMIT 1;
|
|
UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6;
|
|
|
|
--sync_slave_with_master
|
|
--echo *** results: t2 must be consistent ****
|
|
|
|
let $diff_table_1=master:test.t2;
|
|
let $diff_table_2=master:test.t2;
|
|
source include/diff_tables.inc;
|
|
|
|
--connection master
|
|
DROP TABLE t1, t2;
|
|
|
|
--enable_abort_on_error
|
|
|
|
--echo EOF OF TESTS
|
|
|
|
#
|
|
# BUG#40004: Replication failure with no PK + no indexes
|
|
#
|
|
|
|
# The test cases are taken from the bug report. It is difficult to
|
|
# produce a test case that generates a HA_ERR_RECORD_DELETED, so we go
|
|
# with the test cases we have.
|
|
|
|
connection master;
|
|
|
|
eval CREATE TABLE t1 (a int) ENGINE=$type;
|
|
|
|
INSERT IGNORE INTO t1 VALUES (NULL);
|
|
INSERT INTO t1 ( a ) VALUES ( 0 );
|
|
INSERT INTO t1 ( a ) VALUES ( 9 );
|
|
INSERT INTO t1 ( a ) VALUES ( 2 );
|
|
INSERT INTO t1 ( a ) VALUES ( 9 );
|
|
INSERT INTO t1 ( a ) VALUES ( 5 );
|
|
|
|
UPDATE t1 SET a = 5 WHERE a = 9;
|
|
DELETE FROM t1 WHERE a < 6;
|
|
UPDATE t1 SET a = 9 WHERE a < 3;
|
|
INSERT INTO t1 ( a ) VALUES ( 3 );
|
|
UPDATE t1 SET a = 0 WHERE a < 4;
|
|
UPDATE t1 SET a = 8 WHERE a < 5;
|
|
|
|
sync_slave_with_master;
|
|
|
|
let $diff_table_1=master:test.t1;
|
|
let $diff_table_2=slave:test.t1;
|
|
source include/diff_tables.inc;
|
|
|
|
connection master;
|
|
drop table t1;
|
|
sync_slave_with_master;
|
|
|
|
#
|
|
# Bug #39752: Replication failure on RBR + MyISAM + no PK
|
|
#
|
|
|
|
# The test cases are taken from the bug report. It is difficult to
|
|
# produce a test case that generates a HA_ERR_RECORD_DELETED, so we go
|
|
# with the test cases we have.
|
|
|
|
connection master;
|
|
|
|
--disable_warnings
|
|
eval CREATE TABLE t1 (a bit) ENGINE=$type;
|
|
INSERT IGNORE INTO t1 VALUES (NULL);
|
|
INSERT INTO t1 ( a ) VALUES ( 0 );
|
|
UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3;
|
|
INSERT INTO t1 ( a ) VALUES ( 5 );
|
|
DELETE FROM t1 WHERE a < 2 LIMIT 4;
|
|
DELETE FROM t1 WHERE a < 9 LIMIT 4;
|
|
INSERT INTO t1 ( a ) VALUES ( 9 );
|
|
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
|
|
INSERT INTO t1 ( a ) VALUES ( 8 );
|
|
UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0;
|
|
INSERT INTO t1 ( a ) VALUES ( 4 );
|
|
INSERT INTO t1 ( a ) VALUES ( 3 );
|
|
UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6;
|
|
DELETE FROM t1 WHERE a = 4 LIMIT 7;
|
|
UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9;
|
|
UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2;
|
|
DELETE FROM t1 WHERE a < 0 LIMIT 5;
|
|
INSERT INTO t1 ( a ) VALUES ( 5 );
|
|
UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4;
|
|
INSERT INTO t1 ( a ) VALUES ( 5 );
|
|
UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8;
|
|
DELETE FROM t1 WHERE a < 8 LIMIT 8;
|
|
INSERT INTO t1 ( a ) VALUES ( 6 );
|
|
DELETE FROM t1 WHERE a < 6 LIMIT 7;
|
|
UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7;
|
|
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
|
|
INSERT INTO t1 ( a ) VALUES ( 7 );
|
|
DELETE FROM t1 WHERE a < 9 LIMIT 4;
|
|
INSERT INTO t1 ( a ) VALUES ( 7 );
|
|
INSERT INTO t1 ( a ) VALUES ( 6 );
|
|
UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4;
|
|
DELETE FROM t1 WHERE a = 2 LIMIT 9;
|
|
DELETE FROM t1 WHERE a = 1 LIMIT 4;
|
|
UPDATE t1 SET a = 4 WHERE a = 2 LIMIT 7;
|
|
INSERT INTO t1 ( a ) VALUES ( 0 );
|
|
DELETE FROM t1 WHERE a < 3 LIMIT 0;
|
|
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
|
|
INSERT INTO t1 ( a ) VALUES ( 1 );
|
|
UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
|
|
--enable_warnings
|
|
|
|
sync_slave_with_master;
|
|
|
|
let $diff_table_1=master:test.t1;
|
|
let $diff_table_2=slave:test.t1;
|
|
source include/diff_tables.inc;
|
|
|
|
connection master;
|
|
drop table t1;
|
|
sync_slave_with_master;
|