mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
BUG #12597 This is a complete patch (2nd) containing fixes per Serg's review
This commit is contained in:
@@ -761,3 +761,38 @@ show tables;
|
||||
--replace_column 6 #
|
||||
show triggers;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
# Test of fix to BUG 12597
|
||||
DROP TABLE IF EXISTS `test1`;
|
||||
CREATE TABLE `test1` (
|
||||
`a1` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
DROP TABLE IF EXISTS `test2`;
|
||||
CREATE TABLE `test2` (
|
||||
`a2` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
DELIMITER //;
|
||||
CREATE TRIGGER `testref` BEFORE INSERT ON `test1` FOR EACH ROW BEGIN
|
||||
INSERT INTO test2 SET a2 = NEW.a1; END //
|
||||
DELIMITER ;//
|
||||
|
||||
INSERT INTO `test1` VALUES (1);
|
||||
SELECT * FROM `test2`;
|
||||
|
||||
# dump
|
||||
--exec $MYSQL_DUMP --skip-comments --databases test > var/tmp/mysqldump.sql
|
||||
|
||||
#DROP TRIGGER testref;
|
||||
#DROP TABLE test1;
|
||||
#DROP TABLE test2;
|
||||
# restore
|
||||
--exec $MYSQL test < var/tmp/mysqldump.sql
|
||||
SHOW TRIGGERS;
|
||||
SELECT * FROM `test1`;
|
||||
SELECT * FROM `test2`;
|
||||
|
||||
DROP TRIGGER testref;
|
||||
DROP TABLE test1;
|
||||
DROP TABLE test2;
|
||||
|
||||
Reference in New Issue
Block a user