Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3.4, 10.2, 10.3
-
None
Description
When a check constraint is added to a table where existing data violates the constraint, the resulting error message includes the table name of the temporary table created by alter, instead of the name of the altered table.
MariaDB [test]> create table t1 (id int); |
Query OK, 0 rows affected (0.010 sec) |
|
MariaDB [test]> insert into t1 values (1),(10); |
Query OK, 2 rows affected (0.001 sec) |
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> alter table t1 add constraint chk_id check (id<10); |
ERROR 4025 (23000): CONSTRAINT `chk_id` failed for `test`.`#sql-51e_1d` |