diff options
author | unknown <dlenev@mysql.com> | 2005-01-28 10:22:50 +0300 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2005-01-28 10:22:50 +0300 |
commit | 8cac2c0562ec5460368be91602b329ddce653d0d (patch) | |
tree | 654d19586759f3b5343d53fba8af67eb8e5ce42f /sql/item_timefunc.h | |
parent | a6bfe13c6f4fc2e0c2bebea8a295a445aa5765e8 (diff) | |
parent | bf89dc063a6576cb08f2da29c8f505846965590b (diff) | |
download | mariadb-git-8cac2c0562ec5460368be91602b329ddce653d0d.tar.gz |
Manual merge of fixes for bugs #7899 "CREATE TABLE .. SELECT .. and
CONVERT_TZ() function does not work well together" and bug #7705
"CONVERT_TZ() crashes with subquery/WHERE on index column" in 5.0
tree.
mysql-test/r/timezone2.result:
Auto merged
mysql-test/t/timezone2.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/set_var.h:
Auto merged
sql/set_var.cc:
Manual merge.
sql/sql_lex.cc:
Ignoring changes in st_lex::unlink_first_table()/link_first_table_back()
made in 4.1 since they are not applicable to 5.0.
sql/tztime.cc:
Manual merge.
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index dccba7f52b1..917018463e5 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_real() { 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(); }; |