summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorunknown <murthy.narkedimilli@oracle.com>2014-09-23 08:51:23 +0200
committerMurthy Narkedimilli <murthy.narkedimilli@oracle.com>2014-09-23 08:51:23 +0200
commit0e5fe8e4126a8692553bc316d426f9ab9273a477 (patch)
tree7b1877d189a324af5caac7fe33f26865d254b528 /mysql-test/suite
parentb8c9d93bf3ebf69243e38ce77fd9fdc256913af6 (diff)
parent3139aa87b4f215418740939cc8d156150c355823 (diff)
downloadmariadb-git-0e5fe8e4126a8692553bc316d426f9ab9273a477.tar.gz
Merge from mysql-5.5.40-release
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/innodb/r/foreign-keys.result.moved16
-rw-r--r--mysql-test/suite/innodb/t/foreign-keys.test.moved26
2 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/foreign-keys.result.moved b/mysql-test/suite/innodb/r/foreign-keys.result.moved
new file mode 100644
index 00000000000..be8d27b152c
--- /dev/null
+++ b/mysql-test/suite/innodb/r/foreign-keys.result.moved
@@ -0,0 +1,16 @@
+#
+# Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE
+# ADD FOREIGN KEY
+#
+CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT,
+PRIMARY KEY (`department_id`)) engine=innodb;
+CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT,
+`title_reporter_fk` INT, PRIMARY KEY (`title_id`));
+CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`));
+ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES
+`people` (`people_id`);
+ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people`
+(`people_id`);
+ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people`
+(`people_id`);
+drop table title, department, people;
diff --git a/mysql-test/suite/innodb/t/foreign-keys.test.moved b/mysql-test/suite/innodb/t/foreign-keys.test.moved
new file mode 100644
index 00000000000..45642cf28a7
--- /dev/null
+++ b/mysql-test/suite/innodb/t/foreign-keys.test.moved
@@ -0,0 +1,26 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+--echo #
+--echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE
+--echo # ADD FOREIGN KEY
+--echo #
+
+CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT,
+PRIMARY KEY (`department_id`)) engine=innodb;
+
+CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT,
+`title_reporter_fk` INT, PRIMARY KEY (`title_id`));
+
+CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`));
+
+ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES
+`people` (`people_id`);
+
+ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people`
+(`people_id`);
+
+ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people`
+(`people_id`);
+
+drop table title, department, people;