summaryrefslogtreecommitdiff
path: root/mysql-test/r/type_time.result
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-07-15 21:51:36 +0400
committerunknown <evgen@moonbone.local>2007-07-15 21:51:36 +0400
commit6e078ff5433080699416ed473a332395d48a1bfa (patch)
tree4ef5486e94cf10e1661efa4c4a3fa315f4093b7f /mysql-test/r/type_time.result
parent4b7e6a3842600ca3dc0bbf242bdc6c2b2fb75ab5 (diff)
downloadmariadb-git-6e078ff5433080699416ed473a332395d48a1bfa.tar.gz
Extended fix for the bug#29555.
The get_time_value function is added. It is used to obtain TIME values both from items the can return time as an integer and from items that can return time only as a string. The Arg_comparator::compare_datetime function now uses pointer to a getter function to obtain values to compare. Now this function is also used for comparison of TIME values. The get_value_func variable is added to the Arg_comparator class. It points to a getter function for the DATE/DATETIME/TIME comparator. mysql-test/t/type_time.test: Extended test case for the bug#29555. mysql-test/r/type_time.result: Extended test case for the bug#29555. sql/item_cmpfunc.cc: Extended fix for the bug#29555. The get_time_value function is added. It is used to obtain TIME values both from items the can return time as an integer and from items that can return time only as a string. The Arg_comparator::compare_datetime function now uses pointer to a getter function to obtain values to compare. Now this function is also used for comparison of TIME values. sql/item_cmpfunc.h: Extended fix for the bug#29555. The get_value_func variable is added to the Arg_comparator class. It points to a getter function for the DATE/DATETIME/TIME comparator.
Diffstat (limited to 'mysql-test/r/type_time.result')
-rw-r--r--mysql-test/r/type_time.result6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result
index def94bd707b..96bf23109df 100644
--- a/mysql-test/r/type_time.result
+++ b/mysql-test/r/type_time.result
@@ -103,6 +103,12 @@ cast('100:55:50' as time) > cast('024:00:00' as time)
select cast('300:55:50' as time) > cast('240:00:00' as time);
cast('300:55:50' as time) > cast('240:00:00' as time)
1
+create table t1 (f1 time);
+insert into t1 values ('24:00:00');
+select cast('24:00:00' as time) = (select f1 from t1);
+cast('24:00:00' as time) = (select f1 from t1)
+1
+drop table t1;
create table t1(f1 time, f2 time);
insert into t1 values('20:00:00','150:00:00');
select 1 from t1 where cast('100:00:00' as time) between f1 and f2;