summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-11-18 15:42:40 +0100
committerSergei Golubchik <sergii@pisem.net>2014-11-18 15:42:40 +0100
commit5d0122bd7719d1b6125af43e29908cb71922e646 (patch)
treed77cdbfb63c1fbee3f8be7808c27d428dd85b7be /sql/item_timefunc.h
parent84f25c25f260373b54941d9239e8b0d758990601 (diff)
downloadmariadb-git-5d0122bd7719d1b6125af43e29908cb71922e646.tar.gz
MDEV-7113 difference between check_vcol_func_processor and check_partition_func_processor
MDEV-6789 segfault in Item_func_from_unixtime::get_date on updating table with virtual columns * prohibit VALUES in partitioning expression * prohibit user and system variables in virtual column expressions * fix Item_func_date_format to cache locale (for %M/%W to return the same as MONTHNAME/DAYNAME) * fix Item_func_from_unixtime to cache time_zone directly, not THD (and not to crash) * added tests for other incorrectly allowed (in vcols) functions to see that they don't crash
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 455540c4b0d..3a03ee4b27a 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -688,6 +688,7 @@ public:
class Item_func_date_format :public Item_str_func
{
+ MY_LOCALE *locale;
int fixed_length;
const bool is_time_format;
String value;
@@ -705,7 +706,7 @@ public:
class Item_func_from_unixtime :public Item_temporal_func
{
- THD *thd;
+ Time_zone *tz;
public:
Item_func_from_unixtime(Item *a) :Item_temporal_func(a) {}
const char *func_name() const { return "from_unixtime"; }
@@ -1046,10 +1047,4 @@ public:
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
};
-
-/* Function prototypes */
-
-bool make_date_time(DATE_TIME_FORMAT *format, MYSQL_TIME *l_time,
- timestamp_type type, String *str);
-
#endif /* ITEM_TIMEFUNC_INCLUDED */