mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 07:30:02 +00:00
PT-2119 - pt-osc aborts in 8.0.15 even if no FK exists
- Moved check after we identified child tables - Added test case
This commit is contained in:
26
t/pt-online-schema-change/samples/pt-2119.sql
Normal file
26
t/pt-online-schema-change/samples/pt-2119.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
DROP DATABASE IF EXISTS pt_osc;
|
||||
CREATE DATABASE pt_osc;
|
||||
USE pt_osc;
|
||||
|
||||
CREATE TABLE t(
|
||||
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
f1 INT
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `person` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(20) NOT NULL,
|
||||
`testId` bigint(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `test_table` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`refId` bigint(20) DEFAULT NULL,
|
||||
`person` bigint(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `fk_person` (`person`),
|
||||
KEY `fk_refId` (`refId`),
|
||||
CONSTRAINT `fk_person` FOREIGN KEY (`person`) REFERENCES `person`(`id`),
|
||||
CONSTRAINT `fk_refId` FOREIGN KEY (`refId`) REFERENCES `test_table`(`id`)
|
||||
) ENGINE=InnoDB;
|
Reference in New Issue
Block a user