mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
Merged from mysql-5.1-security
This commit is contained in:
commit
45c425f031
3 changed files with 45 additions and 2 deletions
|
@ -111,4 +111,23 @@ DROP FUNCTION db1.f1;
|
|||
DROP TABLE db1.t1;
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
#
|
||||
# Bug#13105873:valgrind warning:possible crash in foreign
|
||||
# key handling on subsequent create table if not exists
|
||||
#
|
||||
DROP DATABASE IF EXISTS testdb;
|
||||
CREATE DATABASE testdb;
|
||||
USE testdb;
|
||||
CREATE TABLE t1 (id1 INT PRIMARY KEY);
|
||||
CREATE PROCEDURE `p1`()
|
||||
BEGIN
|
||||
CREATE TABLE IF NOT EXISTS t2(id INT PRIMARY KEY,
|
||||
CONSTRAINT FK FOREIGN KEY (id) REFERENCES t1( id1 ));
|
||||
END$
|
||||
CALL p1();
|
||||
# below stmt should not return valgrind warnings
|
||||
CALL p1();
|
||||
Warnings:
|
||||
Note 1050 Table 't2' already exists
|
||||
DROP DATABASE testdb;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -138,4 +138,28 @@ DROP FUNCTION db1.f1;
|
|||
DROP TABLE db1.t1;
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#13105873:valgrind warning:possible crash in foreign
|
||||
--echo # key handling on subsequent create table if not exists
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS testdb;
|
||||
--enable_warnings
|
||||
CREATE DATABASE testdb;
|
||||
USE testdb;
|
||||
CREATE TABLE t1 (id1 INT PRIMARY KEY);
|
||||
DELIMITER $;
|
||||
CREATE PROCEDURE `p1`()
|
||||
BEGIN
|
||||
CREATE TABLE IF NOT EXISTS t2(id INT PRIMARY KEY,
|
||||
CONSTRAINT FK FOREIGN KEY (id) REFERENCES t1( id1 ));
|
||||
END$
|
||||
DELIMITER ;$
|
||||
CALL p1();
|
||||
--echo # below stmt should not return valgrind warnings
|
||||
CALL p1();
|
||||
DROP DATABASE testdb;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -138,9 +138,9 @@ Key::Key(const Key &rhs, MEM_ROOT *mem_root)
|
|||
*/
|
||||
|
||||
Foreign_key::Foreign_key(const Foreign_key &rhs, MEM_ROOT *mem_root)
|
||||
:Key(rhs),
|
||||
:Key(rhs,mem_root),
|
||||
ref_table(rhs.ref_table),
|
||||
ref_columns(rhs.ref_columns),
|
||||
ref_columns(rhs.ref_columns,mem_root),
|
||||
delete_opt(rhs.delete_opt),
|
||||
update_opt(rhs.update_opt),
|
||||
match_opt(rhs.match_opt)
|
||||
|
|
Loading…
Add table
Reference in a new issue