1
0
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:
unknown
2007-05-08 00:08:00 +04:00
parent 44e54a30de
commit dd3f1be837
2 changed files with 3 additions and 0 deletions

View File

@ -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