summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2005-11-03 13:55:08 +0300
committerunknown <evgen@moonbone.local>2005-11-03 13:55:08 +0300
commitdd490fd2d585640614d4390cb2e7a6da8a0e869a (patch)
treec161da8821b8906e8ac6475dc68a39ea4ee02c8c /mysql-test/t/select.test
parent096f181d3aae24790daf5711295e570d11c5776f (diff)
parentbb841518b9755feadc97e2b1bc5b28bdd394075e (diff)
downloadmariadb-git-dd490fd2d585640614d4390cb2e7a6da8a0e869a.tar.gz
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/14093-bug-5.0-mysql mysql-test/r/select.result: Auto merged mysql-test/t/select.test: Auto merged sql/item.h: Auto merged
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test18
1 files changed, 18 insertions, 0 deletions
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;