|
When doing s SHOW TABLE on a tables with CHECK constraints, any names in the CHECK constraint appears unquoted, in difference to other names and constraints and also to the actual CHECK constraint name, this issue is only about the actual content of the check constraint:
DROP TABLE IF EXISTS foo2;
|
DROP TABLE IF EXISTS foo1;
|
|
CREATE TABLE foo1(bar INT NOT NULL PRIMARY KEY);
|
CREATE TABLE foo2(bar INT,
|
FOREIGN KEY(bar) REFERENCES foo1(bar),
|
CHECK(bar > 1));
|
|
SHOW CREATE TABLE foo2;
|
CREATE TABLE `foo2` (
|
`bar` int(11) DEFAULT NULL,
|
KEY `bar` (`bar`),
|
CONSTRAINT `foo2_ibfk_1` FOREIGN KEY (`bar`) REFERENCES `foo1` (`bar`),
|
CONSTRAINT `CONSTRAINT_1` CHECK (bar > 1)
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|