summaryrefslogtreecommitdiff
path: root/mysql-test/r/check_constraint.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/check_constraint.result')
-rw-r--r--mysql-test/r/check_constraint.result10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/check_constraint.result b/mysql-test/r/check_constraint.result
index 308b6a2fc2b..525140d96e7 100644
--- a/mysql-test/r/check_constraint.result
+++ b/mysql-test/r/check_constraint.result
@@ -142,3 +142,13 @@ create table t1 (a int check (@b in (select user from mysql.user)));
ERROR HY000: Function or expression 'select ...' cannot be used in the CHECK clause of `a`
create table t1 (a int check (a > @b));
ERROR HY000: Function or expression '@b' cannot be used in the CHECK clause of `a`
+create table t1 (a int check (a = 1));
+insert t1 values (1);
+insert t1 values (2);
+ERROR 23000: CONSTRAINT `a` failed for `test`.`t1`
+insert t1 values (NULL);
+select * from t1;
+a
+1
+NULL
+drop table t1;