| 1 |
# BUG#37656 |
| 2 |
# |
| 3 |
# DESCRIPTION |
| 4 |
# |
| 5 |
# |
| 6 |
# This test case is tests whether replication works properly when |
| 7 |
# slave is configured with --lower-case-table-names=1 and replication |
| 8 |
# rewrite rules are in effect. |
| 9 |
# |
| 10 |
# It checks four issues: |
| 11 |
# |
| 12 |
# (i) master contains capitalized table name |
| 13 |
# |
| 14 |
# (ii) slave contains lowered case table name |
| 15 |
# |
| 16 |
# (iii) master and slave tables do not differ |
| 17 |
# |
| 18 |
--source include/not_group_replication_plugin.inc |
| 19 |
-- source include/not_windows.inc |
| 20 |
-- source include/not_lowercase1.inc |
| 21 |
-- source include/master-slave.inc |
| 22 |
|
| 23 |
SET SQL_LOG_BIN=0; |
| 24 |
CREATE DATABASE B37656; |
| 25 |
SET SQL_LOG_BIN=1; |
| 26 |
|
| 27 |
-- connection slave |
| 28 |
CREATE DATABASE BUG37656; |
| 29 |
|
| 30 |
-- echo ### action: show that database on slave is created in lowercase |
| 31 |
SHOW DATABASES LIKE '%37656'; |
| 32 |
|
| 33 |
-- connection master |
| 34 |
USE B37656; |
| 35 |
CREATE TABLE T1 (a int); |
| 36 |
INSERT INTO T1 VALUES (1); |
| 37 |
|
| 38 |
-- echo ### assertion: master contains capitalized case table |
| 39 |
# this fixes result mismatches for MacOSX |
| 40 |
--replace_result Tables_in_b37656 Tables_in_B37656 |
| 41 |
SHOW TABLES; |
| 42 |
|
| 43 |
--source include/sync_slave_sql_with_master.inc |
| 44 |
|
| 45 |
use bug37656; |
| 46 |
|
| 47 |
-- echo ### assertion: slave contains lowered case table |
| 48 |
SHOW TABLES; |
| 49 |
|
| 50 |
-- echo ### assertion: master and slave tables do not differ |
| 51 |
-- let $diff_tables= master:B37656.T1, slave:bug37656.t1 |
| 52 |
-- source include/diff_tables.inc |
| 53 |
|
| 54 |
-- connection master |
| 55 |
SET SQL_LOG_BIN=0; |
| 56 |
DROP DATABASE B37656; |
| 57 |
SET SQL_LOG_BIN=1; |
| 58 |
SHOW DATABASES LIKE '%37656'; |
| 59 |
|
| 60 |
-- connection slave |
| 61 |
CALL mtr.add_suppression("The source\'s UUID has changed.*"); |
| 62 |
DROP DATABASE BUG37656; |
| 63 |
SHOW DATABASES LIKE '%37656'; |
| 64 |
|
| 65 |
--source include/rpl_end.inc |