summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/t')
-rw-r--r--mysql-test/suite/rpl/t/rpl_15919-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_15919.test18
-rw-r--r--mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test60
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic.test17
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_lcase_tblnames-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test12
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test12
9 files changed, 123 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_15919-slave.opt b/mysql-test/suite/rpl/t/rpl_15919-slave.opt
new file mode 100644
index 00000000000..62ab6dad1e0
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_15919-slave.opt
@@ -0,0 +1 @@
+--lower_case_table_names=1
diff --git a/mysql-test/suite/rpl/t/rpl_15919.test b/mysql-test/suite/rpl/t/rpl_15919.test
new file mode 100644
index 00000000000..a5b25929ad0
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_15919.test
@@ -0,0 +1,18 @@
+--source include/have_case_sensitive_file_system.inc
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection master
+create table RPL(a int);
+insert into RPL values(1);
+
+--sync_slave_with_master
+select * from rpl;
+insert into RPL values(3);
+insert into rpl values(4);
+select * from rpl;
+
+--connection master
+drop table RPL;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db-slave.opt b/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db-slave.opt
new file mode 100644
index 00000000000..0031a57a693
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db-slave.opt
@@ -0,0 +1 @@
+--lower-case-table-names=1 "--replicate-rewrite-db=b37656->bug37656"
diff --git a/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test b/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test
new file mode 100644
index 00000000000..9c804d8206a
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test
@@ -0,0 +1,60 @@
+# BUG#37656
+#
+# DESCRIPTION
+#
+#
+# This test case is tests whether replication works properly when
+# slave is configured with --lower-case-table-names=1 and replication
+# rewrite rules are in effect.
+#
+# It checks four issues:
+#
+# (i) master contains capitalized table name
+#
+# (ii) slave contains lowered case table name
+#
+# (iii) master and slave tables do not differ
+#
+-- source include/master-slave.inc
+-- source include/not_windows.inc
+
+SET SQL_LOG_BIN=0;
+CREATE DATABASE B37656;
+SET SQL_LOG_BIN=1;
+
+-- connection slave
+CREATE DATABASE BUG37656;
+
+-- echo ### action: show that database on slave is created in lowercase
+SHOW DATABASES LIKE '%37656';
+
+-- connection master
+USE B37656;
+CREATE TABLE T1 (a int);
+INSERT INTO T1 VALUES (1);
+
+-- echo ### assertion: master contains capitalized case table
+SHOW TABLES;
+
+-- sync_slave_with_master
+
+use bug37656;
+
+-- echo ### assertion: slave contains lowered case table
+SHOW TABLES;
+
+-- echo ### assertion: master and slave tables do not differ
+let $diff_tables= master:B37656.T1, slave:bug37656.t1;
+
+-- source include/diff_tables.inc
+
+-- connection master
+SET SQL_LOG_BIN=0;
+DROP DATABASE B37656;
+SET SQL_LOG_BIN=1;
+SHOW DATABASES LIKE '%37656';
+
+-- connection slave
+DROP DATABASE BUG37656;
+SHOW DATABASES LIKE '%37656';
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
index a49d59c4eb4..eef11be1f1b 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
@@ -553,5 +553,22 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads;
--connection server_1
DROP TABLE t1, t2, t3;
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+# Check for left-over rows in table mysql.gtid_slave_pos (MDEV-12147).
+#
+# There was a bug when a transaction got a conflict and was rolled back. It
+# might have also handled deletion of some old rows, and these deletions would
+# then also be rolled back. And since the deletes were never re-tried, old no
+# longer needed rows would accumulate in the table without limit.
+#
+# The earlier part of this test file have plenty of transactions being rolled
+# back. But the last DROP TABLE statement runs on its own and should never
+# conflict, thus at this point the mysql.gtid_slave_pos table should be clean.
+--echo Check that no more than the expected last two GTIDs are in mysql.gtid_slave_pos
+select count(*) from mysql.gtid_slave_pos order by domain_id, sub_id;
+--connection server_1
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames-slave.opt b/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames-slave.opt
new file mode 100644
index 00000000000..7624b013dcd
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames-slave.opt
@@ -0,0 +1 @@
+--replicate-do-db=bug_37656 --replicate-ignore-table=buG_37656.T1 --replicate-do-table=bUg_37656.T2 --replicate-do-table=bUg_37656.T3 --lower-case-table-names=1
diff --git a/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test b/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test
new file mode 100644
index 00000000000..78a66a7df32
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test
@@ -0,0 +1,12 @@
+# BUG#37656
+#
+# For details look into extra/rpl_tests/rpl_lower_case_table_names.test
+#
+
+-- source include/master-slave.inc
+-- source include/have_innodb.inc
+-- source include/not_windows.inc
+-- source include/have_binlog_format_row.inc
+
+-- let $engine=InnoDB
+-- source extra/rpl_tests/rpl_lower_case_table_names.test
diff --git a/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames-slave.opt b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames-slave.opt
new file mode 100644
index 00000000000..8be29bbe976
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames-slave.opt
@@ -0,0 +1 @@
+--replicate-do-db=bug_37656 --replicate-ignore-table=bug_37656.t1 --replicate-do-table=bug_37656.t2 --replicate-do-table=bug_37656.t3 --lower-case-table-names=1
diff --git a/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test
new file mode 100644
index 00000000000..00df8e9d385
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test
@@ -0,0 +1,12 @@
+# BUG#37656
+#
+# For details look into extra/rpl_tests/rpl_lower_case_table_names.test
+#
+
+-- source include/master-slave.inc
+-- source include/have_innodb.inc
+-- source include/not_windows.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
+
+-- let $engine=InnoDB
+-- source extra/rpl_tests/rpl_lower_case_table_names.test