diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-18 16:46:57 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-18 16:46:57 +0200 |
commit | 5f6380adde2dac3f32b40339b9b702c0135eb7d6 (patch) | |
tree | 31068acc0b39c208d35d524688a5985831af0447 /mysql-test/t/strict.test | |
parent | 8a23ae088dc38f591efeab9eccdef5eb9094add9 (diff) | |
parent | 97e640b9ae83e07b444fceede6b0524256c7a3cc (diff) | |
download | mariadb-git-5f6380adde2dac3f32b40339b9b702c0135eb7d6.tar.gz |
10.0-base merge
Diffstat (limited to 'mysql-test/t/strict.test')
-rw-r--r-- | mysql-test/t/strict.test | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index f6080de6c2c..c429e9cfe5b 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -188,13 +188,15 @@ INSERT INTO t1 (col1) VALUES (STR_TO_DATE('15.10.2004','%d.%m.%Y')); INSERT INTO t1 (col2) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); +# Zero year is not a problem for DATE/DATETIME +INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); +INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); + ## Test INSERT with STR_TO_DATE into DATE # All test cases expected to fail should return # SQLSTATE 22007 <invalid date value> --error 1411 -INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); ---error 1411 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); --error 1411 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -214,8 +216,6 @@ INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); # SQLSTATE 22007 <invalid datetime value> --error 1411 -INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); ---error 1411 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); --error 1411 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -234,7 +234,7 @@ INSERT INTO t1 (col2) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); # All test cases expected to fail should return # SQLSTATE 22007 <invalid datetime value> ---error 1411 +--error 1292 INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); --error 1411 INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); |