mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-17 08:57:24 +00:00
Add forked Maatkit tools in bin/ and their tests in t/.
This commit is contained in:
20
t/pt-fk-error-logger/samples/fke.sql
Normal file
20
t/pt-fk-error-logger/samples/fke.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
-- This will cause a foreign key error.
|
||||
|
||||
DROP TABLE IF EXISTS child;
|
||||
DROP TABLE IF EXISTS parent;
|
||||
|
||||
CREATE TABLE parent (
|
||||
id INT NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=INNODB;
|
||||
|
||||
|
||||
CREATE TABLE child (
|
||||
id INT,
|
||||
parent_id INT,
|
||||
INDEX par_ind (parent_id),
|
||||
FOREIGN KEY (parent_id) REFERENCES parent(id)
|
||||
) ENGINE=INNODB;
|
||||
|
||||
INSERT INTO parent VALUES (1), (2), (3);
|
||||
INSERT INTO child VALUES (1, 9); -- Error!
|
Reference in New Issue
Block a user