mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-32586 incorrect error about cyclic reference about JSON type virtual column
remove the hack where NO_DEFAULT_VALUE_FLAG was temporarily removed from a field to initialize DEFAULT() functions in CHECK constraints while disabling self-reference field checks. Instead, initialize DEFAULT() functions in CHECK explicitly, don't call check_field_expression_processor() for CHECK at all.
This commit is contained in:
@ -231,6 +231,19 @@ alter table t1 force;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32586 incorrect error about cyclic reference about JSON type virtual column
|
||||
--echo #
|
||||
|
||||
create table t1 (a int, b json as (a));
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a int, b int as (a) check (b > 0));
|
||||
insert t1 (a) values (1);
|
||||
--error ER_CONSTRAINT_FAILED
|
||||
insert t1 (a) values (-1);
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user