Current Path : /usr/opt/mysql57/mysql-test/suite/binlog/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/mysql57/mysql-test/suite/binlog/t/binlog_transaction_dependency_tracking_sensitive.test |
# ==== Purpose ==== # # Test timestamps generated by binlog-transaction-dependency-tracking # mode WRITESET when inserting/deleting/updating a single row but using # case and accent insensitive collations. # # As all transactions are touching a single row, the timestamps are # expected to always increase (every transaction should depend on the # previous one). # # ==== References ==== # # BUG#26277771: BAD WRITE SET TRACKING WITH UNIQUE KEY ON A DELETE FOLLOWED BY AN INSERT. # --source include/have_binlog_format_row.inc # # Initialization # SET @save_binlog_transaction_dependency_tracking = @@GLOBAL.binlog_transaction_dependency_tracking; SET @save_transaction_write_set_extraction = @@GLOBAL.transaction_write_set_extraction; SET @@GLOBAL.transaction_write_set_extraction = XXHASH64; SET @@SESSION.transaction_write_set_extraction = XXHASH64; SET @@GLOBAL.binlog_transaction_dependency_tracking = WRITESET; # # Test # # Workload SET NAMES 'utf8' COLLATE 'utf8_general_ci'; RESET MASTER; CREATE TABLE t1 ( id INT NOT NULL AUTO_INCREMENT, u_id INT NOT NULL, u_str VARCHAR(32) NOT NULL, PRIMARY KEY (id), UNIQUE KEY (u_id, u_str) ) ENGINE=InnoDB; INSERT INTO t1 (u_id, u_str) VALUES (1, 'a'); # Sanity check --error ER_DUP_ENTRY INSERT INTO t1 (u_id, u_str) VALUES (1, 'A'); --error ER_DUP_ENTRY INSERT INTO t1 (u_id, u_str) VALUES (1, 'ã'); --error ER_DUP_ENTRY INSERT INTO t1 (u_id, u_str) VALUES (1, 'Ã'); --error ER_DUP_ENTRY INSERT INTO t1 (u_id, u_str) VALUES (1, 'á'); # Test DELETE FROM t1 WHERE u_id = 1 AND u_str = 'A'; INSERT INTO t1 (u_id, u_str) VALUES (1, 'ã'); DELETE FROM t1 WHERE u_id = 1 AND u_str = 'Ã'; INSERT INTO t1 (u_id, u_str) VALUES (1, 'á'); DROP TABLE t1; --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) --echo Processing binlog $binlog_file FLUSH LOGS; --let $source_file= $server_1_datadir/$binlog_file --let $logical_timestamps=0 1;1 2;2 3;3 4;4 5;5 6;6 7 --source include/assert_logical_timestamps.inc # # Cleanup # SET @@GLOBAL.binlog_transaction_dependency_tracking = COMMIT_ORDER; SET @@GLOBAL.transaction_write_set_extraction= @save_transaction_write_set_extraction; SET @@GLOBAL.binlog_transaction_dependency_tracking= @save_binlog_transaction_dependency_tracking;