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 --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?

"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.