1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-21 08:47:42 +03:00
Files
mariadb/mysql-test/t
unknown 99bde6d9ec Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
The LEAST/GREATEST functions compared DATE/DATETIME values as
strings which in some cases could lead to a wrong result.

A new member function called cmp_datetimes() is added to the
Item_func_min_max class. It compares arguments in DATETIME context
and returns index of the least/greatest argument.
The Item_func_min_max::fix_length_and_dec() function now detects when
arguments should be compared in DATETIME context and sets the newly
added flag compare_as_dates. It indicates that the cmp_datetimes() function
should be called to get a correct result.
Item_func_min_max::val_xxx() methods are corrected to call the
cmp_datetimes() function when needed.
Objects of the Item_splocal class now stores and reports correct original
field type.


mysql-test/t/type_datetime.test:
  Added a test case for the bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
mysql-test/r/type_datetime.result:
  Added a test case for the bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
mysql-test/r/sp-vars.result:
  A test case result corrected after the fix for the bug#27759.
sql/mysql_priv.h:
  Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
  Added the prototype of the get_datetime_value() function.
sql/item_func.h:
  Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
  A new member function called cmp_datetimes() is added to the
  Item_func_min_max class.
sql/item_func.cc:
  Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
  A new member function called cmp_datetimes() is added to the
  Item_func_min_max class. It compares arguments in DATETIME context
  and returns index of the least/greatest argument.
  The Item_func_min_max::fix_length_and_dec() function now detects when
  arguments should be compared in DATETIME context and sets the newly
  added flag compare_as_dates. It indicates that the cmp_datetimes() function
  should be called to get a correct result.
  Item_func_min_max::val_xxx() methods are corrected to call the
  cmp_datetimes() function when needed.
sql/item_cmpfunc.cc:
  Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
  The get_datetime_value() function is no longer static.
sql/item.h:
  Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
  Objects of the Item_splocal class now stores and reports correct original
  field type.
sql/item.cc:
  Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
  Objects of the Item_splocal class now stores and reports correct original
  field type.
2007-05-04 18:57:10 +04:00
..
2007-04-29 00:50:33 +05:00
2006-11-20 22:42:06 +02:00
2006-11-20 22:42:06 +02:00
2007-02-23 18:49:41 +02:00
2007-04-10 16:55:48 +03:00
2007-03-08 00:27:42 +03:00
2006-11-29 13:56:59 -05:00
2007-03-27 19:28:04 +03:00
2006-11-20 22:42:06 +02:00
2007-04-11 13:58:16 +03:00
2006-11-20 22:42:06 +02:00
2007-03-28 12:11:44 +02:00
2007-03-20 19:36:11 +01:00
2007-04-18 19:36:22 -06:00
2006-11-15 10:23:27 +01:00
2007-02-07 14:22:19 -08:00
2007-02-24 13:12:20 +03:00
2007-02-24 13:12:20 +03:00
2007-04-23 21:27:43 +02:00
2007-03-31 17:18:03 +02:00
2007-04-02 16:21:12 -04:00
2007-03-21 09:13:05 +01:00
2006-11-20 22:42:06 +02:00
2007-02-01 18:00:24 +04:00
2006-11-15 10:23:27 +01:00
2006-11-15 10:23:27 +01:00
2007-02-08 15:53:14 +01:00
2006-11-15 10:23:27 +01:00
2006-11-15 10:23:27 +01:00
2007-04-10 19:08:08 +03:00
2006-12-11 18:52:24 -07:00
2006-11-20 22:42:06 +02:00
2007-02-01 18:00:24 +04:00
2007-03-20 00:46:19 +03:00
2007-04-17 12:32:01 +02:00
2007-03-29 09:08:30 +05:00
2007-04-20 10:49:45 +03:00
2007-02-24 13:12:20 +03:00
2007-04-23 17:15:51 +03:00