diff options
author | holyfoot@mysql.com <> | 2005-11-03 16:19:46 +0400 |
---|---|---|
committer | holyfoot@mysql.com <> | 2005-11-03 16:19:46 +0400 |
commit | bac54a77749b677d42688fc8d7284b7a6877f90f (patch) | |
tree | bf6e4d292ae253ac144ed239b01d9a70214a9056 /mysql-test | |
parent | e529fdc5eed0dda5de4048c6d636b1f05f28783d (diff) | |
parent | 55790f74bb00afad694511daac5f10ae0fa83aee (diff) | |
download | mariadb-git-bac54a77749b677d42688fc8d7284b7a6877f90f.tar.gz |
Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0
into mysql.com:/home/hf/work/mysql-5.0.9551
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/select.result | 40 | ||||
-rw-r--r-- | mysql-test/t/select.test | 18 |
2 files changed, 58 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 76a8b5a11e7..318cf8e7b65 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3201,3 +3201,43 @@ a b c select * from t1 join t2 straight_join t3 on (t1.a=t3.c); a b c drop table t1, t2 ,t3; +create table t1(f1 int, f2 date); +insert into t1 values(1,'2005-01-01'),(2,'2005-09-01'),(3,'2005-09-30'), +(4,'2005-10-01'),(5,'2005-12-30'); +select * from t1 where f2 >= 0; +f1 f2 +1 2005-01-01 +2 2005-09-01 +3 2005-09-30 +4 2005-10-01 +5 2005-12-30 +select * from t1 where f2 >= '0000-00-00'; +f1 f2 +1 2005-01-01 +2 2005-09-01 +3 2005-09-30 +4 2005-10-01 +5 2005-12-30 +select * from t1 where f2 >= '2005-09-31'; +f1 f2 +4 2005-10-01 +5 2005-12-30 +select * from t1 where f2 >= '2005-09-3a'; +f1 f2 +4 2005-10-01 +5 2005-12-30 +Warnings: +Warning 1292 Incorrect date value: '2005-09-3a' for column 'f2' at row 1 +select * from t1 where f2 <= '2005-09-31'; +f1 f2 +1 2005-01-01 +2 2005-09-01 +3 2005-09-30 +select * from t1 where f2 <= '2005-09-3a'; +f1 f2 +1 2005-01-01 +2 2005-09-01 +3 2005-09-30 +Warnings: +Warning 1292 Incorrect date value: '2005-09-3a' for column 'f2' at row 1 +drop table t1; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index d38371577d9..e7e6d899a66 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2711,3 +2711,21 @@ select * from t1 join t2 left join t3 on (t1.a=t3.c); select * from t1 join t2 right join t3 on (t1.a=t3.c); select * from t1 join t2 straight_join t3 on (t1.a=t3.c); drop table t1, t2 ,t3; + +# +# Bug #14093 Query takes a lot of time when date format is not valid +# fix optimizes execution. so here we just check that returned set is +# correct. +create table t1(f1 int, f2 date); +insert into t1 values(1,'2005-01-01'),(2,'2005-09-01'),(3,'2005-09-30'), + (4,'2005-10-01'),(5,'2005-12-30'); +# should return all records +select * from t1 where f2 >= 0; +select * from t1 where f2 >= '0000-00-00'; +# should return 4,5 +select * from t1 where f2 >= '2005-09-31'; +select * from t1 where f2 >= '2005-09-3a'; +# should return 1,2,3 +select * from t1 where f2 <= '2005-09-31'; +select * from t1 where f2 <= '2005-09-3a'; +drop table t1; |