| 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/not_group_replication_plugin.inc |
| 11 |
-- source include/master-slave.inc |
| 12 |
|
| 13 |
--disable_warnings |
| 14 |
drop database if exists mysqltest; |
| 15 |
--enable_warnings |
| 16 |
|
| 17 |
connection master; |
| 18 |
# 'test' database should be ignored by the slave |
| 19 |
USE test; |
| 20 |
CREATE TABLE t1(a INT, b INT, UNIQUE(b)); |
| 21 |
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE test.t1; |
| 22 |
SELECT COUNT(*) FROM test.t1; |
| 23 |
|
| 24 |
# 'mysqltest' database should NOT be ignored by the slave |
| 25 |
CREATE DATABASE mysqltest; |
| 26 |
USE mysqltest; |
| 27 |
CREATE TABLE t1(a INT, b INT, UNIQUE(b)); |
| 28 |
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE mysqltest.t1; |
| 29 |
SELECT COUNT(*) FROM mysqltest.t1; |
| 30 |
|
| 31 |
# Now lets check the slave to see what we have :-) |
| 32 |
--source include/sync_slave_sql_with_master.inc |
| 33 |
|
| 34 |
SHOW DATABASES; |
| 35 |
|
| 36 |
USE test; |
| 37 |
SHOW TABLES; |
| 38 |
|
| 39 |
USE mysqltest; |
| 40 |
SHOW TABLES; |
| 41 |
SELECT COUNT(*) FROM mysqltest.t1; |
| 42 |
|
| 43 |
#show binlog events; |
| 44 |
|
| 45 |
# Cleanup |
| 46 |
connection master; |
| 47 |
DROP DATABASE mysqltest; |
| 48 |
DROP TABLE IF EXISTS test.t1; |
| 49 |
--source include/sync_slave_sql_with_master.inc |
| 50 |
|
| 51 |
# End of test |
| 52 |
--source include/rpl_end.inc |