~drizzle-trunk/drizzle/development

1 by brian
clean slate
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_ln/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_ln/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
save_master_pos;
32
connection slave;
33
sync_with_master;
34
35
SHOW DATABASES;
36
37
USE test;
38
SHOW TABLES;
39
40
USE mysqltest;
41
SHOW TABLES;
42
SELECT COUNT(*) FROM mysqltest.t1;
43
44
#show binlog events;
45
46
# Cleanup
47
connection master;
48
DROP DATABASE mysqltest;
49
DROP TABLE test.t1;
50
sync_slave_with_master;
51
52
# End of test