Skip to content
Permalink
Browse files
MDEV-15141 Check constraint validation on a datetime field crashes th…
…e process

add the test case (the bug was fixed in d390e50)
  • Loading branch information
vuvova committed Mar 14, 2018
1 parent d390e50 commit 42529c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
@@ -152,3 +152,7 @@ a
1
NULL
drop table t1;
create table t1 (id int auto_increment primary key, datecol datetime, check (datecol>'0001-01-01 00:00:00'));
insert into t1 (datecol) values (now());
insert into t1 (datecol) values (now());
drop table t1;
@@ -103,3 +103,11 @@ insert t1 values (2);
insert t1 values (NULL);
select * from t1;
drop table t1;

#
# MDEV-15141 Check constraint validation on a datetime field crashes the process
#
create table t1 (id int auto_increment primary key, datecol datetime, check (datecol>'0001-01-01 00:00:00'));
insert into t1 (datecol) values (now());
insert into t1 (datecol) values (now());
drop table t1;

0 comments on commit 42529c4

Please sign in to comment.