summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index df0b05d6d42..cc2709bf555 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -545,12 +545,15 @@ class Item_func_convert_tz :public Item_date_func
TABLE_LIST *tz_tables;
/*
If time zone parameters are constants we are caching objects that
- represent them.
+ represent them (we use separate from_tz_cached/to_tz_cached members
+ to indicate this fact, since NULL is legal value for from_tz/to_tz
+ members.
*/
+ bool from_tz_cached, to_tz_cached;
Time_zone *from_tz, *to_tz;
public:
Item_func_convert_tz(Item *a, Item *b, Item *c):
- Item_date_func(a, b, c) {}
+ Item_date_func(a, b, c), from_tz_cached(0), to_tz_cached(0) {}
longlong val_int();
double val() { return (double) val_int(); }
String *val_str(String *str);
@@ -558,6 +561,7 @@ class Item_func_convert_tz :public Item_date_func
bool fix_fields(THD *, struct st_table_list *, Item **);
void fix_length_and_dec();
bool get_date(TIME *res, uint fuzzy_date);
+ void cleanup();
};