Bug #7484 LOAD DATA FROM MASTER deletes all tables
Submitted: 22 Dec 2004 15:11 Modified: 23 Dec 2004 13:54
Reporter: Peter Dunham Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:4.0.18 and higher OS:Linux (redhat 9.0)
Assigned to: CPU Architecture:Any

[22 Dec 2004 15:11] Peter Dunham
Description:
LOAD DATA FROM MASTER deletes all tables on the slave, even if they don't exist on the master. This is no good for distributed database setups. There should be an option to disable this.

How to repeat:
1. create a master with tables a,b,c
2. create slave with table d

issue LOAD DATA FROM MASTER statement on slave
table d on slave has now disappeared

Suggested fix:
Add an option to disable this and/or add a check that tables to be dropped exist on master.
[23 Dec 2004 13:54] MySQL Verification Team
Hello,

Thank you for the report, but I can't repeat it with 4.0.24-debug.
It works fine for me:

mysql> create table f(id int);
Query OK, 0 rows affected (1.18 sec)

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| f              |
+----------------+
1 row in set (0.00 sec)

mysql> load data from master;
Query OK, 0 rows affected (0.99 sec)

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| a              |
| b              |
| c              |
| f              |
+----------------+
4 rows in set (0.00 sec)
[24 Dec 2004 13:03] Peter Dunham
Upgrading to 4.1.8 did the trick. Thanks.