mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
WL#3023 (RBR: Use locks in a statement-like manner):
Adaptions to make it work with NDB. mysql-test/extra/binlog_tests/binlog.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/blackhole.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/ctype_cp932.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/ctype_cp932_binlog.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/drop_temp_table.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/insert_select-binlog.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_flsh_tbls.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_log.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_multi_query.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_row_charset.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_stm_charset.test: Using replace_regex to remove table id. mysql-test/include/rpl_row_basic.inc: Removing sync with master on cleanup since there are engines that does not work in a "syncronized" fashion on dropping tables. mysql-test/r/binlog_row_binlog.result: Result change mysql-test/r/binlog_row_blackhole.result: Result change mysql-test/r/binlog_row_ctype_cp932.result: Result change mysql-test/r/binlog_row_ctype_ucs.result: Result change mysql-test/r/binlog_row_insert_select.result: Result change mysql-test/r/binlog_row_mix_innodb_myisam.result: Result change mysql-test/r/ctype_cp932_binlog_row.result: Result change mysql-test/r/rpl_row_basic_11bugs.result: Result change mysql-test/r/rpl_row_basic_2myisam.result: Result change mysql-test/r/rpl_row_basic_3innodb.result: Result change mysql-test/r/rpl_row_charset.result: Result change mysql-test/r/rpl_row_create_table.result: Result change mysql-test/r/rpl_row_delayed_ins.result: Result change mysql-test/r/rpl_row_log.result: Result change mysql-test/r/rpl_row_log_innodb.result: Result change mysql-test/r/rpl_row_max_relay_size.result: Result change mysql-test/r/rpl_row_sp008.result: Result change mysql-test/t/binlog_stm_binlog.test: Using replace_regex to remove table id. mysql-test/t/ndb_binlog_ddl_multi.test: Using replace_regex to remove table id. mysql-test/t/ndb_binlog_ignore_db.test: Using replace_regex to remove table id. mysql-test/t/rpl_heap.test: Using replace_regex to remove table id. mysql-test/t/rpl_loaddata_s.test: Using replace_regex to remove table id. mysql-test/t/rpl_ndb_blob.test: Using replace_regex to remove table id. mysql-test/t/rpl_ndb_disk.test: Using replace_regex to remove table id. mysql-test/t/rpl_row_basic_11bugs.test: Using replace_regex to remove table id. mysql-test/t/rpl_row_create_table.test: Using replace_regex to remove table id. mysql-test/t/rpl_row_drop.test: Using replace_regex to remove table id. mysql-test/t/rpl_row_sp008.test: Using replace_regex to remove table id. mysql-test/t/rpl_sp.test: Using replace_regex to remove table id. mysql-test/t/sp.test: Using replace_regex to remove table id. mysql-test/t/sp_notembedded.test: Using replace_regex to remove table id. mysql-test/t/user_var-binlog.test: Using replace_regex to remove table id. sql/ha_ndbcluster_binlog.cc: Assign_new_table_id() now takes table share. Removed gratuitous friend declaration of ndb_add_binlog_index(). Turning of binlogging during execution of ndb_add_binlog_index(). sql/handler.h: Removed gratuitous friend declaration of ndb_add_binlog_index(). sql/log.cc: Adding debug printout. sql/log_event.cc: Closing thread tables on dummy event. sql/rpl_injector.cc: Added support for new locking scheme. sql/rpl_injector.h: Added support for new locking scheme.
This commit is contained in:
@ -174,22 +174,16 @@ SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
|
||||
connection master;
|
||||
eval CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = $type ;
|
||||
sync_slave_with_master;
|
||||
--disable_query_log
|
||||
SELECT "--- on slave: original values ---" AS "";
|
||||
--enable_query_log
|
||||
--echo --- on slave: original values ---
|
||||
INSERT INTO t7 VALUES (1,3), (2,6), (3,9);
|
||||
SELECT * FROM t7 ORDER BY C1;
|
||||
|
||||
connection master;
|
||||
--disable_query_log
|
||||
SELECT "--- on master: new values inserted ---" AS "";
|
||||
--enable_query_log
|
||||
--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;
|
||||
--disable_query_log
|
||||
SELECT "--- on slave: old values should be overwritten by replicated values ---" AS "";
|
||||
--enable_query_log
|
||||
--echo --- on slave: old values should be overwritten by replicated values ---
|
||||
SELECT * FROM t7 ORDER BY C1;
|
||||
|
||||
#
|
||||
@ -197,42 +191,33 @@ SELECT * FROM t7 ORDER BY C1;
|
||||
# causing a conflict for a key that is not "last".
|
||||
#
|
||||
connection master;
|
||||
--disable_query_log
|
||||
SELECT "--- on master ---" AS "";
|
||||
--enable_query_log
|
||||
DROP TABLE t7;
|
||||
eval CREATE TABLE t7 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = $type ;
|
||||
--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 t7 VALUES (99,99,99);
|
||||
INSERT INTO t8 VALUES (99,99,99);
|
||||
--error 1062
|
||||
INSERT INTO t7 VALUES (99,22,33);
|
||||
INSERT INTO t8 VALUES (99,22,33);
|
||||
--error 1062
|
||||
INSERT INTO t7 VALUES (11,99,33);
|
||||
INSERT INTO t8 VALUES (11,99,33);
|
||||
--error 1062
|
||||
INSERT INTO t7 VALUES (11,22,99);
|
||||
SELECT * FROM t7 ORDER BY a;
|
||||
INSERT INTO t8 VALUES (11,22,99);
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
|
||||
sync_slave_with_master;
|
||||
--disable_query_log
|
||||
SELECT "--- on slave ---" AS "";
|
||||
--enable_query_log
|
||||
SELECT * FROM t7 ORDER BY a;
|
||||
INSERT INTO t7 VALUES (1,2,3), (2,4,6), (3,6,9);
|
||||
SELECT * FROM t7 ORDER BY a;
|
||||
--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;
|
||||
|
||||
connection master;
|
||||
--disable_query_log
|
||||
SELECT "--- on master ---" AS "";
|
||||
--enable_query_log
|
||||
--echo --- on master ---
|
||||
# We insert a row that will cause conflict on the primary key but not
|
||||
# on the other keys.
|
||||
INSERT INTO t7 VALUES (2,4,8);
|
||||
INSERT INTO t8 VALUES (2,4,8);
|
||||
sync_slave_with_master;
|
||||
--disable_query_log
|
||||
SELECT "--- on slave ---" AS "";
|
||||
--enable_query_log
|
||||
SELECT * FROM t7 ORDER BY a;
|
||||
--echo --- on slave ---
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
|
||||
#
|
||||
# Test conflicting operations when changing in a table referenced by a
|
||||
@ -245,5 +230,4 @@ SELECT * FROM t7 ORDER BY a;
|
||||
#
|
||||
|
||||
connection master;
|
||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
|
||||
sync_slave_with_master;
|
||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
|
||||
|
Reference in New Issue
Block a user