Commit graph

5 commits

Author SHA1 Message Date
Sergei Golubchik
872649c7ba Merge branch '5.5' into 10.0 2016-04-26 23:05:26 +02:00
Sergei Golubchik
95fe71afa6 MDEV-9707 MAX(timestamp(6) column) in correlated sub-query returns non-existent row data in original table
special treatment for  temporal values in
create_tmp_field_from_item().

old code only did it when result_type() was STRING_RESULT,
but Item_cache_temporal::result_type() is INT_RESULT
2016-04-19 11:27:00 +02:00
Alexander Barkov
03f6778d61 MDEV-5298 Illegal mix of collations on timestamp
Fixed.
2013-12-10 13:34:59 +04:00
Sergei Golubchik
495fd27c0e MDEV-4284 Assertion `cmp_items[(uint)cmp_type]' fails in sql/item_cmpfunc.cc
Flip the switch and create Item_cache based on the argument's cmp_type, not argument's result_type().
Fix subselect_engine to calculate cmp_type correctly

sql/item_subselect.h:
  mdev:4284
2013-03-17 11:41:25 +01:00
Sergei Golubchik
372bc22bfa MDEV-4265 5.5 is slower than 5.3 because of many str_to_datetime calls
get_datetime_value() should not double-cache its own Item_cache_temporal items,
but it *should* cache other Item_cache items, such as Item_cache_str.

sql/item.h:
  shortcut, to avoid going through the switch in Item::cmp_type()
sql/item_cmpfunc.cc:
  even if the item is Item_cache_str - it still needs to be converted and cached.
sql/item_timefunc.h:
  all descendants of Item_temporal_func always have cmp_type==TIME_RESULT.
  Even Item_date_add_interval, that might have field_type == MYSQL_TYPE_STRING.
2013-03-13 22:33:52 +01:00