Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL)
Description
--source include/have_innodb.inc
|
|
create table t (a int) engine=InnoDB; |
insert into t values (0); |
alter table t add b int default 0 check(b!=a); |
show create table t; |
select * from t; |
|
# Cleanup
|
drop table t; |
10.4 ff3d4395 |
alter table t add b int default 0 check(b!=a); |
show create table t; |
Table Create Table |
t CREATE TABLE `t` ( |
`a` int(11) DEFAULT NULL, |
`b` int(11) DEFAULT 0 CHECK (`b` <> `a`) |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci |
select * from t; |
a b
|
0 0
|
An even simpler, but a degenerate test case is
create table t (a int) engine=InnoDB; |
insert into t values (0); |
alter table t add b int check(a!=a); |
Result is the same.
Not reproducible with algorithm=copy.
Attachments
Issue Links
- blocks
-
MDEV-16356 Allow ALGORITHM=NOCOPY for ADD CONSTRAINT
- Open