blob: 24421dcb0f744307f1faba249c9cc7f11e79c114 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#
# BUG#22094601 CREATE TABLE WITH FULLTEXT AND CONSTRAINT FAILS WHEN FOREIGN_KEY_CHECKS IS 0
#
--source include/have_innodb.inc
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (
id INT NOT NULL,
title TEXT,
PRIMARY KEY (id),
FULLTEXT KEY (title),
FOREIGN KEY (id) REFERENCES t2 (id)
) ENGINE=InnoDB;
CREATE TABLE t1 (
id INT NOT NULL,
title TEXT,
PRIMARY KEY (id)
) ENGINE=InnoDB;
--error ER_CANT_CREATE_TABLE
ALTER TABLE t1 ADD FULLTEXT KEY (title), ADD FOREIGN KEY (id) REFERENCES t2 (id);
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE t1 ADD FULLTEXT KEY (title), ADD FOREIGN KEY (id) REFERENCES t2 (id);
DROP TABLE t1;
CREATE TABLE t1 (
id INT NOT NULL,
title TEXT,
PRIMARY KEY (id),
FULLTEXT KEY (title),
FOREIGN KEY (id) REFERENCES t2 (id)
) ENGINE=InnoDB;
DROP TABLE t1;
SET FOREIGN_KEY_CHECKS = 1;
|