diff options
author | Sunny Bains <Sunny.Bains@Oracle.Com> | 2010-11-30 21:44:06 +1100 |
---|---|---|
committer | Sunny Bains <Sunny.Bains@Oracle.Com> | 2010-11-30 21:44:06 +1100 |
commit | cb0f8ca4514de6aebbb6a481487dec014fcfcdc9 (patch) | |
tree | f9f316a24c8a202c1ec8be5a02be72d588b46325 /mysql-test/suite/innodb/t/innodb-autoinc-56228.test | |
parent | 6613db82f65516e3630428edf7408f86ecdf9e69 (diff) | |
parent | a699e4fce85a055e3ee55db12e9891e3b26ef720 (diff) | |
download | mariadb-git-cb0f8ca4514de6aebbb6a481487dec014fcfcdc9.tar.gz |
Merge from mysql-5.1-security to mysql-5.5-security.
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb-autoinc-56228.test')
-rw-r--r-- | mysql-test/suite/innodb/t/innodb-autoinc-56228.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-56228.test b/mysql-test/suite/innodb/t/innodb-autoinc-56228.test new file mode 100644 index 00000000000..626efcf9897 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-autoinc-56228.test @@ -0,0 +1,33 @@ +-- source include/have_innodb.inc + +## +# Bug #56228: dropping tables from within an active statement crashes server +# +DROP TABLE IF EXISTS t1_56228; +DROP TABLE IF EXISTS t2_56228; +DROP FUNCTION IF EXISTS bug56228; + +CREATE TEMPORARY TABLE t1_56228( + c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; +CREATE TEMPORARY TABLE t2_56228( + c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; + +DELIMITER //; + +CREATE FUNCTION bug56228() RETURNS INT DETERMINISTIC +BEGIN + INSERT INTO t1_56228 VALUES(NULL); + INSERT INTO t2_56228 VALUES(NULL); + INSERT INTO t1_56228 VALUES(NULL); + INSERT INTO t2_56228 VALUES(NULL); + DROP TEMPORARY TABLE t1_56228; + RETURN 42; +END // + +DELIMITER ;// + +SELECT bug56228(); + +DROP FUNCTION bug56228; +DROP TEMPORARY TABLE t2_56228; +DROP TEMPORARY TABLE IF EXISTS t1_56228; |