Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

MySQL-Diff drops existing tables?

by jbrugger (Parson)
on Nov 10, 2005 at 05:33 UTC ( [id://507294]=perlquestion: print w/replies, xml ) Need Help??

jbrugger has asked for the wisdom of the Perl Monks concerning the following question:

Hi great ones.
Yet another question from me:
I use MySQL 4.0.24 as a databse server,
and MySQL-Diff 0.30 from Adam Spiers. (the perl MySQL::Diff module, that's why i ask it here)

*update* ps: just installed version 0.33 from cpan, and still have the same problem

When i try to compare 2 databases, i get the weird output like this:
mysqldiff --host 192.168.1.10 --user=dbuser --password=dbpass db1 db2 + > diff.sql DROP TABLE IF EXISTS `reports`; CREATE TABLE `reports` ( `ID` int(6) unsigned NOT NULL auto_increment, `name` varchar(128) NOT NULL default '', PRIMARY KEY (`ID`) ) TYPE=MyISAM; DROP TABLE IF EXISTS `yetAnotherTable` table ``yetAnotherTable`' had trailing garbage: /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
The thing is, both tables (reports and yetAnotherTable) exist with the same structure in both databases and both contain data.
I don't know when the diff started to create these drop-table queries, but they are unwanted and the parameter --keep-old-tables is unwanted (and not working in this case.
I tried more than one machine, and can't figure out what's wrong, when i compare db2 to db1 (the other way round), it goes like expected (but i need to compare the other way).
Any ideas what might be wrong and are there others that experience the same problem?
Thanks.

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://507294]
Approved by !1
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-19 16:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found