mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-10370 Check constraints on virtual columns fails on INSERT when column not specified
add columns needed for CHECK constraints not only to read_set, but also to vcol_set.
This commit is contained in:
@@ -69,3 +69,12 @@ create or replace table t1 (a int, b int,
|
||||
constraint CONSTRAINT_2 check (a>b));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# MDEV-10370 Check constraints on virtual columns fails on INSERT when column not specified
|
||||
#
|
||||
create table t1(c1 int, c2 int as (c1 + 1), check (c2 > 2));
|
||||
--error ER_CONSTRAINT_FAILED
|
||||
insert into t1(c1) values(1);
|
||||
insert into t1(c1) values(2);
|
||||
drop table t1;
|
||||
|
||||
Reference in New Issue
Block a user