mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
5c41d52904
some of the tables are created in InnoDB and some tables are created in MyISAM. We need to create all tables on InnoDB. Fix is to add engine=innodb to the CREATE TABLE statements. approved in IM by Marko and Vasil.
16 lines
736 B
Text
16 lines
736 B
Text
#
|
|
# 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`)) engine=innodb;
|
|
CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)) engine=innodb;
|
|
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;
|