mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.2 into 10.3
This commit is contained in:
@ -135,3 +135,31 @@ INSERT INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
|
||||
set sql_mode=default;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16630: Ambiguous error message when check constraint
|
||||
--echo # matches table name
|
||||
--echo #
|
||||
|
||||
use test;
|
||||
--disable_warnings
|
||||
drop table if exists t;
|
||||
--enable_warnings
|
||||
|
||||
create table t(a int, b int check(b>0),
|
||||
constraint b check(a<b), constraint a check(a>0),
|
||||
constraint x check (a>10));
|
||||
|
||||
show create table t;
|
||||
|
||||
# Generate error when field constraint 'b' is violated
|
||||
--echo # Field constraint 'b' will fail
|
||||
--error ER_CONSTRAINT_FAILED
|
||||
insert into t values (-1, 0);
|
||||
|
||||
# Generate error when table constraint 'b' is violated.
|
||||
--echo # Table constraint 'b' will fail
|
||||
--error ER_CONSTRAINT_FAILED
|
||||
insert into t values (1,1);
|
||||
|
||||
drop table t;
|
||||
|
Reference in New Issue
Block a user