MyDump Backup Trigger code is incorrect.
Posted: Tue 21 Jul 2009 17:03
In the restore process consists of a situation such as the following error
As you'll see the trigger has not been established yet passed a table name
trigger code should be the end of the backup file
Table 'table_two' was not locked with LOCK TABLES
backup file examples :
CREATE TABLE `table_one` (
`FIS_ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`FIS_LEVEL` int(11) unsigned NOT NULL,
PRIMARY KEY (`FIS_ID`),
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=latin5;
CREATE TRIGGER table_one_after_ins_tr AFTER INSERT ON table_one FOR EACH ROW
BEGIN
UPDATE table_two SET BAKIYE = 10;
END $$
DROP TABLE IF EXISTS table_two;
CREATE TABLE `table_two` (
`REF_BANKA` int(11) NOT NULL,
`BAKIYE` double(15,2) DEFAULT NULL,
PRIMARY KEY (`REF_BANKA`)
) ENGINE=InnoDB DEFAULT CHARSET=latin5;
As you'll see the trigger has not been established yet passed a table name
trigger code should be the end of the backup file
Table 'table_two' was not locked with LOCK TABLES
backup file examples :
CREATE TABLE `table_one` (
`FIS_ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`FIS_LEVEL` int(11) unsigned NOT NULL,
PRIMARY KEY (`FIS_ID`),
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=latin5;
CREATE TRIGGER table_one_after_ins_tr AFTER INSERT ON table_one FOR EACH ROW
BEGIN
UPDATE table_two SET BAKIYE = 10;
END $$
DROP TABLE IF EXISTS table_two;
CREATE TABLE `table_two` (
`REF_BANKA` int(11) NOT NULL,
`BAKIYE` double(15,2) DEFAULT NULL,
PRIMARY KEY (`REF_BANKA`)
) ENGINE=InnoDB DEFAULT CHARSET=latin5;