1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-01 08:45:04 +03:00
unknown 5e71afcbe7 Bug#21811 Odd casting with date + INTERVAL arithmetic
- Type casting was not consequent, thus when adding a DATE type with
  a WEEK interval the result type was DATETIME and not DATE as is the
  norm.
- By changing the order of the date internal enumerations the deviant
  type casting is resolved (Item_date_add_interval::fix_length_and_dec()
  which determines result type for this operation assumes that addition
  of any interval with value <= INTERVAL_DAY to date value will result
  in date). There are two independant places to change:
  interval_names[] and interval_type.


mysql-test/r/func_date_add.result:
  Updated result file for type casting test
mysql-test/r/func_time.result:
  Updated result file for type casting test
mysql-test/t/func_date_add.test:
  Added test for type casting when adding intervals to date.
sql/item_timefunc.cc:
  Changed order of "week" key word to match the date interval enumeration.
sql/item_timefunc.h:
  Changed the order of the enumeration to better follow interval sizes.
2006-10-02 12:37:01 +02:00
..
2006-05-29 16:27:45 +02:00
2006-05-01 21:30:09 +03:00
2006-06-17 02:57:50 +04:00
2006-06-17 02:57:50 +04:00
2006-03-01 15:50:15 +04:00
2006-06-27 00:47:52 +04:00
2006-09-07 18:09:49 +05:00
2006-05-24 17:21:35 +03:00
2006-06-14 23:54:08 +04:00
2006-06-20 00:52:26 +04:00
2006-04-11 15:26:18 +05:00
2006-08-30 03:22:59 +04:00
2006-07-21 11:59:46 +03:00
2006-05-06 23:48:13 -07:00
2006-08-21 14:20:03 +04:00
2006-08-21 14:20:03 +04:00
2006-03-06 23:43:47 +01:00
2006-05-29 19:07:35 +04:00
2006-05-01 22:10:50 -04:00
2006-02-20 15:03:16 +01:00
2006-02-07 19:57:31 +01:00
2006-06-17 02:57:50 +04:00
2006-03-08 10:40:29 +01:00
2006-04-27 21:59:04 +09:30
2006-08-24 20:56:28 +04:00
2006-08-30 03:22:59 +04:00