Debian Codegraph @

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

raw
1 # See if the master logs LOAD DATA INFILE correctly when binlog_*_db rules
2 # exist.
3 # This is for BUG#1100 (LOAD DATA INFILE was half-logged).
4 ######################################################
5 # Change Author: JBM
6 # Change Date: 2005-12-22
7 # Change: Test rewritten to remove show binlog events
8 # and to test the option better + Cleanup
9 ######################################################
10 -- source include/master-slave.inc
11
12 --disable_warnings
13 drop database if exists mysqltest;
14 --enable_warnings
15
16 connection master;
17 # 'test' database should be ignored by the slave
18 USE test;
19 CREATE TABLE t1(a INT, b INT, UNIQUE(b));
20 LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE test.t1;
21 SELECT COUNT(*) FROM test.t1;
22
23 # 'mysqltest' database should NOT be ignored by the slave
24 CREATE DATABASE mysqltest;
25 USE mysqltest;
26 CREATE TABLE t1(a INT, b INT, UNIQUE(b));
27 LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE mysqltest.t1;
28 SELECT COUNT(*) FROM mysqltest.t1;
29
30 # Now lets check the slave to see what we have :-)
31 sync_slave_with_master;
32
33 SHOW DATABASES;
34
35 USE test;
36 SHOW TABLES;
37
38 USE mysqltest;
39 SHOW TABLES;
40 SELECT COUNT(*) FROM mysqltest.t1;
41
42 #show binlog events;
43
44 # Cleanup
45 connection master;
46 DROP DATABASE mysqltest;
47 DROP TABLE IF EXISTS test.t1;
48 sync_slave_with_master;
49
50 # End of test
51 --source include/rpl_end.inc