Debian Codegraph @

mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test

raw
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_windows.inc
19 -- source include/master-slave.inc
20
21 SET SQL_LOG_BIN=0;
22 CREATE DATABASE B37656;
23 SET SQL_LOG_BIN=1;
24
25 -- connection slave
26 CREATE DATABASE BUG37656;
27
28 -- echo ### action: show that database on slave is created in lowercase
29 SHOW DATABASES LIKE '%37656';
30
31 -- connection master
32 USE B37656;
33 CREATE TABLE T1 (a int);
34 INSERT INTO T1 VALUES (1);
35
36 -- echo ### assertion: master contains capitalized case table
37 SHOW TABLES;
38
39 -- sync_slave_with_master
40
41 use bug37656;
42
43 -- echo ### assertion: slave contains lowered case table
44 SHOW TABLES;
45
46 -- echo ### assertion: master and slave tables do not differ
47 let $diff_tables= master:B37656.T1, slave:bug37656.t1;
48
49 -- source include/diff_tables.inc
50
51 -- connection master
52 SET SQL_LOG_BIN=0;
53 DROP DATABASE B37656;
54 SET SQL_LOG_BIN=1;
55 SHOW DATABASES LIKE '%37656';
56
57 -- connection slave
58 DROP DATABASE BUG37656;
59 SHOW DATABASES LIKE '%37656';
60 --source include/rpl_end.inc