How can we help you today? How can we help you today?
skolbunov

Activity overview

Latest activity by skolbunov

Finally I've found some time to investigate the problem. I knew it is something in my schema that preventing deploying. I found out that this is inter-database foreign keys which I use extensively. Seems that these foreign keys are treated by the tool the same way as broken foreign keys to non-existing table, while a foreign key to a table in other database is a valid key. Specifically, only such foreign keys at the target database are the problem, source database may have them. What complicates the situation is that the MySQL Data Compare does not give a relevant response of what causes the abort message. I've sent my detailed logs to the provided email and bug report was created at your side, but it was not resolved. Now I'm attaching the script to recreate the problem. It will create four databases: db_source, db_ref_source,db_target, and db_ref_target. table_1 in db_source has foreign key to table_ref in db_ref_source and table_1 in db_target has foreign key to table_ref in db_ref_target. Now try to deploy changes from db_source to db_target and get "Aborting" message right away. Dropping inter-database foreign key at db_target solves the problem. I may use that as walk-around for now, but it would be much better to don't have this restriction. Also, MySQL Data Compare should give better explanation of why deployment is aborted. CREATE DATABASE IF NOT EXISTS `db_ref_source`; USE `db_ref_source`; DROP TABLE IF EXISTS `table_ref`; CREATE TABLE `table_ref` ( `idtable_ref` int(11) NOT NULL, `table_refcol` varchar(45) DEFAULT NULL, PRIMARY KEY (`idtable_ref`), UNIQUE KEY `table_refcol_UNIQUE` (`table_refcol`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `table_ref` VALUES (11,'eleven'),(12,'twelve'); CREATE DATABASE IF NOT EXISTS `db_source`; USE `db_source`; DROP TABLE IF EXISTS `table_1`; CREATE TABLE `table_1` ( `idtable_1` int(11) NOT NULL, `idtable_ref` int(11) DEFAULT NULL, PRIMARY KEY (`idtable_1`), KEY `table_ref_fk_idx` (`idtable_ref`), CONSTRAINT `table_ref_fk` FOREIGN KEY (`idtable_ref`) REFERENCES `db_ref_source`.`table_ref` (`idtable_ref`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `table_1` VALUES (1,11),(3,11),(2,12); CREATE DATABASE IF NOT EXISTS `db_ref_target`; USE `db_ref_target`; DROP TABLE IF EXISTS `table_ref`; CREATE TABLE `table_ref` ( `idtable_ref` int(11) NOT NULL, `table_refcol` varchar(45) DEFAULT NULL, PRIMARY KEY (`idtable_ref`), UNIQUE KEY `table_refcol_UNIQUE` (`table_refcol`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `table_ref` VALUES (11,'eleven'),(12,'twelve'); CREATE DATABASE IF NOT EXISTS `db_target`; USE `db_target`; DROP TABLE IF EXISTS `table_1`; CREATE TABLE `table_1` ( `idtable_1` int(11) NOT NULL, `idtable_ref` int(11) DEFAULT NULL, PRIMARY KEY (`idtable_1`), KEY `table_ref_fk_idx` (`idtable_ref`), CONSTRAINT `table_ref_fk` FOREIGN KEY (`idtable_ref`) REFERENCES `db_ref_target`.`table_ref` (`idtable_ref`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `table_1` VALUES (1,11),(2,12); / comments
Finally I've found some time to investigate the problem. I knew it is something in my schema that preventing deploying. I found out that this is inter-database foreign keys which I use extensively....
0 votes
Deployment Wizard doesn't work for my schema
I keep getting "MySQL Data Compare - Aborting" message for all my attempts to deploy changes either using MySQL Data Compare or by creating a deployment script. The error message is: Bug report gen...
2 followers 4 comments 0 votes