Bug #54307 imagine what will happen if in the mysql migration source and target are same!
Submitted: 7 Jun 2010 19:33 Modified: 16 Jun 2010 9:15
Reporter: ehsanulhaq qureshi Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S1 (Critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[7 Jun 2010 19:33] ehsanulhaq qureshi
Description:
imagine what will happen if in the mysql migration source and target are same!

all tables already in the target(also the source) will be dropped 
all tables will luckily be recreated (because schema was read to be used in create commands before dropping)
but what about data
poor guy was not read or copied or backed up like schema and so there will be no data to write 

this may not be a bug because the users should actually be careful in mentioning the source and target databases
but its more disastrous than any bug can be

i did this mistake because of being used to the web experience where you sometimes need to fill same form again if the page is refreshed by mistake 
just like that i entered the source again in the form for target and lost all my precious data
because i cannot understand any other reason why all data in my tables vanished after i was trying to migrate it from my pc to my webserver

How to repeat:
in mysql migration tool try to migrate a db with same perimeters for source and target

Suggested fix:
either like the schema the data should also be made a copy of
or atleast a warning should be given to the user that by this operation data will be lost 
or this scenario should not be allowed at all to be executed
[8 Jun 2010 6:06] Sveta Smirnova
Thank you for the report.

> in mysql migration tool try to migrate a db with same perimeters for source and target

What is the mysql migration tool? Do you mean MySQL Migration Toolkit? And how bug related to Cluster replication?
[8 Jun 2010 12:03] ehsanulhaq qureshi
What is the mysql migration tool? Do you mean MySQL Migration Toolkit?
And how bug related to Cluster replication?

yes i meant the toolkit
and i know its not related to cluster replication
but there was no related category so i randomly chose one

regards
[8 Jun 2010 13:03] Hartmut Holzgraefe
Category changed to "MySQL Migration Toolkit"
[16 Jun 2010 9:15] Michael G. Zinner
This is a feature, not a bug. One can choose the same source and target but rename the schema, to create a copy.

As this was reported for a tool that is no longer supported, no changes will be made.