Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-05-08 00:08:00+04:00, evgen@stripped +2 -0
Additional fix for the bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
mysql-test/t/type_datetime.test@stripped, 2007-05-08 00:01:10+04:00, evgen@stripped +2 -0
Additional test case for the bug#27759.
sql/item_func.h@stripped, 2007-05-08 00:01:44+04:00, evgen@stripped +1 -0
Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
Now the Item_func_min_max::result_as_longlong() returns TRUE when LEAST()
compares DATE/DATETIME values. This allows caller to obtain correct integer
values through the val_int() function.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: evgen
# Host: moonbone.local
# Root: /mnt/gentoo64/work/27759-bug-5.0-opt-mysql
--- 1.166/sql/item_func.h 2007-05-07 15:08:26.000000000 +0400
+++ 1.167/sql/item_func.h 2007-05-08 00:01:44.000000000 +0400
@@ -703,6 +703,7 @@
my_decimal *val_decimal(my_decimal *);
void fix_length_and_dec();
enum Item_result result_type () const { return cmp_type; }
+ bool result_as_longlong() { return compare_as_dates; };
uint cmp_datetimes(ulonglong *value);
};
--- 1.26/mysql-test/t/type_datetime.test 2007-05-07 22:22:50.000000000 +0400
+++ 1.27/mysql-test/t/type_datetime.test 2007-05-08 00:01:10.000000000 +0400
@@ -206,6 +206,8 @@
select least(cast('01-01-01' as date), '01-01-02') + 0;
select greatest(cast('01-01-01' as date), '01-01-02') + 0;
select least(cast('01-01-01' as datetime), '01-01-02') + 0;
+select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed);
+select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal);
--disable_warnings
DROP PROCEDURE IF EXISTS test27759 ;
--enable_warnings
| Thread |
|---|
| • bk commit into 5.0 tree (evgen:1.2476) BUG#27759 | eugene | 7 May |