summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2017-12-14 18:14:21 +0300
committerAleksey Midenkov <midenok@gmail.com>2017-12-14 18:14:21 +0300
commit1668efb722d6d2fb483745d23915378167937d1d (patch)
treea2cc6994a50055784976b5069e8e6b6f23dd4f51 /sql/item_timefunc.h
parent765569602d4211a5daa0f175faa78a4922819bc4 (diff)
downloadmariadb-git-1668efb722d6d2fb483745d23915378167937d1d.tar.gz
MDEV-14645: AS OF TIMESTAMP is misused as TRX_ID [fixes #396]
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index adc7b2535a9..878179105be 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -1184,6 +1184,20 @@ public:
};
+class Item_datetime_from_unixtime_typecast :public Item_datetime_typecast
+{
+ THD *thd;
+public:
+ Item_datetime_from_unixtime_typecast(THD *_thd, Item *a, uint dec_arg):
+ Item_datetime_typecast(_thd, a, dec_arg), thd(_thd) {}
+ const char *func_name() const { return "cast_as_datetime_from_unixtime"; }
+ const char *cast_type() const { return "datetime"; }
+ void fix_length_and_dec();
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_datetime_from_unixtime_typecast>(thd, this); }
+};
+
+
class Item_func_makedate :public Item_datefunc
{
bool check_arguments() const