2014-09-08 11:33:55 +02:00
|
|
|
--source include/have_innodb.inc
|
|
|
|
--source include/have_debug.inc
|
|
|
|
|
2014-10-07 10:53:06 +02:00
|
|
|
if (`select plugin_auth_version <= "5.5.39-MariaDB-36.0" from information_schema.plugins where plugin_name='innodb'`)
|
|
|
|
{
|
|
|
|
--skip Not fixed in XtraDB as of 5.5.39-MariaDB-36.0 or earlier
|
|
|
|
}
|
|
|
|
|
2014-09-08 11:33:55 +02:00
|
|
|
--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,
|
2014-10-07 10:53:06 +02:00
|
|
|
`title_reporter_fk` INT, PRIMARY KEY (`title_id`)) engine=innodb;
|
2014-09-08 11:33:55 +02:00
|
|
|
|
2014-10-07 10:53:06 +02:00
|
|
|
CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)) engine=innodb;
|
2014-09-08 11:33:55 +02:00
|
|
|
|
|
|
|
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;
|