mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Additional fix for the bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
mysql-test/t/type_datetime.test: Additional test case for the bug#27759. sql/item_func.h: 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 commit is contained in:
@ -206,6 +206,8 @@ select greatest(cast('01-01-01' as date), '01-01-02');
|
||||
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
|
||||
|
Reference in New Issue
Block a user