diff options
author | evgen@moonbone.local <> | 2007-07-11 23:37:02 +0400 |
---|---|---|
committer | evgen@moonbone.local <> | 2007-07-11 23:37:02 +0400 |
commit | 6c985ff92135129e9916359e8f3600f74e467a0f (patch) | |
tree | fa3d05eb7205ff053e87256ed25d9d411eb08098 /sql | |
parent | 13513be628362c0fe721ab27d0edbebbfcb41589 (diff) | |
parent | df9c376e7279d7b2574f4a051dcadce1d72026d5 (diff) | |
download | mariadb-git-6c985ff92135129e9916359e8f3600f74e467a0f.tar.gz |
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/29555-bug-5.0-opt-mysql
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_cmpfunc.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index ed0c09f0b32..70df1b4d09c 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -706,6 +706,18 @@ int Arg_comparator::set_cmp_func(Item_bool_func2 *owner_arg, func= &Arg_comparator::compare_datetime; return 0; } + else if (type == STRING_RESULT && (*a)->field_type() == MYSQL_TYPE_TIME && + (*b)->field_type() == MYSQL_TYPE_TIME) + { + /* Compare TIME values as integers. */ + thd= current_thd; + owner= owner_arg; + func= ((test(owner && owner->functype() == Item_func::EQUAL_FUNC)) ? + &Arg_comparator::compare_e_int : + &Arg_comparator::compare_int_unsigned); + return 0; + } + return set_compare_func(owner_arg, type); } |