diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-03-13 22:33:52 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-03-13 22:33:52 +0100 |
commit | 372bc22bfaacd5c6959b99729a68e2d2a3b923a4 (patch) | |
tree | a7b6962b5af81e99e35a2daf72148d93cab0c415 /sql/item_timefunc.h | |
parent | d24c8d9af104219bf2e42b89a585c4ba5c6facfa (diff) | |
download | mariadb-git-372bc22bfaacd5c6959b99729a68e2d2a3b923a4.tar.gz |
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.
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 3e3cd698efc..9b2db9e816e 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -491,6 +491,7 @@ public: enum Item_result result_type () const { return STRING_RESULT; } CHARSET_INFO *charset_for_protocol(void) const { return &my_charset_bin; } enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; } + Item_result cmp_type() const { return TIME_RESULT; } String *val_str(String *str); longlong val_int(); double val_real(); |