summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormurthy.narkedimilli@oracle.com <>2014-09-23 08:51:23 +0200
committerMurthy Narkedimilli <murthy.narkedimilli@oracle.com>2014-09-23 08:51:23 +0200
commitabb994596565278103a5ea722be403d0dfd4e25e (patch)
tree7b1877d189a324af5caac7fe33f26865d254b528
parentdb78f29b31566e24f7cdf00f2e93897590149892 (diff)
parenta2375bdbe00511ee36fc9fc6feb5a2a47259f716 (diff)
downloadmariadb-git-abb994596565278103a5ea722be403d0dfd4e25e.tar.gz
Merge from mysql-5.5.40-release
-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;