Subject: | mysqldiff failing on trigger definition |
Date: | Tue, 18 Mar 2014 13:46:56 -0700 |
To: | bug-MySQL-Diff [...] rt.cpan.org |
From: | Garima Bajaj <gbajaj7 [...] gmail.com> |
Error -
table 'Packages_Recommendation' had trailing garbage:
DELIMITER ;;
AFTER INSERT ON Packages_Recommendation FOR EACH ROW BEGIN IF
@Packages_Recommendation_Action IS NULL THEN SET
@Packages_Recommendation_Action='A'; END IF; INSERT INTO
Packages_Recommendation_History (ID, PackageID, Location, NSID,
Active, Test, ChangedBy, Notes, IncidentID, Action) VALUES (NEW.ID,
NEW.PackageID, NEW.Location, NEW.NSID, NEW.Active, NEW.Test,
@Packages_Recommendation_ChangedBy, @Packages_Recommendation_Notes,
@Packages_Recommendation_IncidentID, @Packages_Recommendation_Action); END
*/;;
DELIMITER ;
DELIMITER ;;
AFTER UPDATE ON Packages_Recommendation FOR EACH ROW BEGIN IF
@Packages_Recommendation_Action IS NULL THEN SET
@Packages_Recommendation_Action='U'; END IF; INSERT INTO
Packages_Recommendation_History (ID, PackageID, Location, NSID,
Active, Test, ChangedBy, Notes, IncidentID, Action) VALUES (NEW.ID,
NEW.PackageID, NEW.Location, NEW.NSID, NEW.Active, NEW.Test,
@Packages_Recommendation_ChangedBy, @Packages_Recommendation_Notes,
@Packages_Recommendation_IncidentID, @Packages_Recommendation_Action); END
*/;;
DELIMITER ;
DELIMITER ;;
AFTER DELETE ON Packages_Recommendation FOR EACH ROW BEGIN IF
@Packages_Recommendation_Action IS NULL THEN SET
@Packages_Recommendation_Action='D'; END IF; INSERT INTO
Packages_Recommendation_History (ID, PackageID, Location, NSID,
Active, Test, ChangedBy, Notes, IncidentID, Action) VALUES (OLD.ID,
OLD.PackageID, OLD.Location, OLD.NSID, OLD.Active, OLD.Test,
@Packages_Recommendation_ChangedBy, @Packages_Recommendation_Notes,
@Packages_Recommendation_IncidentID, @Packages_Recommendation_Action); END
*/;;
DELIMITER ;
table 'Packages_Recommendation_Items' had trailing garbage:
DELIMITER ;;
..........
AFTER UPDATE ON Intelius.Promotion FOR EACH ROW BEGIN IF
@Promotion_Action IS NULL THEN SET @Promotion_Action='U'; END
IF; INSERT INTO Promotion_History (PromotionID, PromotionCode,
Active, DiscountType, DiscountValue, UserID, Referrer, PackageID, URL,
ReportTypeID, IncidentID, Notes, Headline, SubHeadline, Title, NSID, Test,
ChangedBy, Action) VALUES (NEW.PromotionID, NEW.PromotionCode,
NEW.Active, NEW.DiscountType, NEW.DiscountValue, NEW.UserID, NEW.Referrer,
NEW.PackageID, NEW.URL, NEW.ReportTypeID, NEW.IncidentID, NEW.Notes,
NEW.Headline, NEW.SubHeadline, NEW.Title, NEW.NSID, NEW.Test,
@Promotion_ChangedBy, @Promotion_Action); SET @Promotion_Action =
NULL; END */;;
DELIMITER ;
DELIMITER ;;
AFTER DELETE ON Intelius.Promotion FOR EACH ROW BEGIN IF
@Promotion_Action IS NULL THEN SET @Promotion_Action='D'; END
IF; INSERT INTO Promotion_History (PromotionID, PromotionCode,
Active, DiscountType, DiscountValue, UserID, Referrer, PackageID, URL,
ReportTypeID, IncidentID, Notes, Headline, SubHeadline, Title, NSID, Test,
ChangedBy, Action) VALUES (OLD.PromotionID, OLD.PromotionCode,
OLD.Active, OLD.DiscountType, OLD.DiscountValue, OLD.UserID, OLD.Referrer,
OLD.PackageID, OLD.URL, OLD.ReportTypeID, OLD.IncidentID, OLD.Notes,
OLD.Headline, OLD.SubHeadline, OLD.Title, OLD.NSID, OLD.Test,
@Promotion_ChangedBy, @Promotion_Action); SET @Promotion_Action =
NULL; END */;;
DELIMITER ;
Use of uninitialized value $name in concatenation (.) or string at
/usr/share/perl5/MySQL/Diff/Table.pm line 212.
definition for field 'PARTITION' duplicated in table ''
at /usr/share/perl5/MySQL/Diff/Database.pm line 269
Table schema looks like this -
CREATE TABLE `Packages_Recommendation` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`PackageID` int(11) NOT NULL,
`Location` int(11) NOT NULL,
`NSID` int(11) NOT NULL,
`Active` int(11) NOT NULL,
`Test` int(11) NOT NULL,
PRIMARY KEY (`ID`),
KEY `Grouped` (`Active`,`Test`,`Location`,`NSID`,`PackageID`)
) ENGINE=InnoDB AUTO_INCREMENT=115 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`dbadmin`@`localhost`*/ /*!50003 TRIGGER
Intelius.AI_UpdatePackages_Recommendation_History
AFTER INSERT ON Packages_Recommendation FOR EACH ROW BEGIN IF
@Packages_Recommendation_Action IS NULL THEN SET
@Packages_Recommendation_Action='A'; END IF; INSERT INTO
Packages_Recommendation_History (ID, PackageID, Location, NSID,
Active, Test, ChangedBy, Notes, IncidentID, Action) VALUES (NEW.ID,
NEW.PackageID, NEW.Location, NEW.NSID, NEW.Active, NEW.Test,
@Packages_Recommendation_ChangedBy, @Packages_Recommendation_Notes,
@Packages_Recommendation_IncidentID, @Packages_Recommendation_Action); END
*/;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`dbadmin`@`localhost`*/ /*!50003 TRIGGER
Intelius.AU_UpdatePackages_Recommendation_History
AFTER UPDATE ON Packages_Recommendation FOR EACH ROW BEGIN IF
@Packages_Recommendation_Action IS NULL THEN SET
@Packages_Recommendation_Action='U'; END IF; INSERT INTO
Packages_Recommendation_History (ID, PackageID, Location, NSID,
Active, Test, ChangedBy, Notes, IncidentID, Action) VALUES (NEW.ID,
NEW.PackageID, NEW.Location, NEW.NSID, NEW.Active, NEW.Test,
@Packages_Recommendation_ChangedBy, @Packages_Recommendation_Notes,
@Packages_Recommendation_IncidentID, @Packages_Recommendation_Action); END
*/;;
DELIMITER ;
I am running it against mysql 5.5 database.
Let me know if you need anything else.
Thanks,
Garima