Commit 42529c43 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-15141 Check constraint validation on a datetime field crashes the process

add the test case (the bug was fixed in d390e501)
parent d390e501
......@@ -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;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment