-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.2affects-7.3affects-7.4affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.compatibility-mysql80This is a compatibility issue with MySQL 8.0(but NOT 5.7)This is a compatibility issue with MySQL 8.0(but NOT 5.7)component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
CREATE TABLE `t` (`a` int(11) DEFAULT NULL);
insert t values(1);
alter table t ADD CONSTRAINT chk CHECK (a > 1) NOT ENFORCED;
2. What did you expect to see? (Required)
MySQL 8.0:
mysql> alter table t ADD CONSTRAINT chk CHECK (a > 1) NOT ENFORCED;
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0
3. What did you see instead (Required)
mysql> alter table t ADD CONSTRAINT chk CHECK (a > 1) NOT ENFORCED;
ERROR 3819 (HY000): Check constraint 'chk' is violated.
4. What is your TiDB version? (Required)
master
Metadata
Metadata
Assignees
Labels
affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.2affects-7.3affects-7.4affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.compatibility-mysql80This is a compatibility issue with MySQL 8.0(but NOT 5.7)This is a compatibility issue with MySQL 8.0(but NOT 5.7)component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.