diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-09-22 20:22:55 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-09-23 20:22:46 +0200 |
commit | 80b9ce359312c1520623531bf173ee048317fee3 (patch) | |
tree | 2b6ae2fbaa78af922e9182bb6e5484b6e0c24da3 /sql/item_create.cc | |
parent | 1320ad5b9253256afe98e948d25ed0a423a1e6da (diff) | |
download | mariadb-git-80b9ce359312c1520623531bf173ee048317fee3.tar.gz |
MDEV-11553 Can't restore a PERSISTENT column that uses DATE_FORMAT()
3-argument form of DATE_FORMAT
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index b0b33041383..5f1485a1336 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -783,19 +783,6 @@ protected: #endif -class Create_func_date_format : public Create_func_arg2 -{ -public: - virtual Item *create_2_arg(THD *thd, Item *arg1, Item *arg2); - - static Create_func_date_format s_singleton; - -protected: - Create_func_date_format() {} - virtual ~Create_func_date_format() {} -}; - - class Create_func_datediff : public Create_func_arg2 { public: @@ -4051,15 +4038,6 @@ Create_func_crosses::create_2_arg(THD *thd, Item *arg1, Item *arg2) #endif -Create_func_date_format Create_func_date_format::s_singleton; - -Item* -Create_func_date_format::create_2_arg(THD *thd, Item *arg1, Item *arg2) -{ - return new (thd->mem_root) Item_func_date_format(thd, arg1, arg2, 0); -} - - Create_func_datediff Create_func_datediff::s_singleton; Item* @@ -4558,7 +4536,7 @@ Create_func_from_unixtime::create_native(THD *thd, LEX_CSTRING *name, Item *param_1= item_list->pop(); Item *param_2= item_list->pop(); Item *ut= new (thd->mem_root) Item_func_from_unixtime(thd, param_1); - func= new (thd->mem_root) Item_func_date_format(thd, ut, param_2, 0); + func= new (thd->mem_root) Item_func_date_format(thd, ut, param_2); break; } default: @@ -6511,7 +6489,7 @@ Create_func_time_format Create_func_time_format::s_singleton; Item* Create_func_time_format::create_2_arg(THD *thd, Item *arg1, Item *arg2) { - return new (thd->mem_root) Item_func_date_format(thd, arg1, arg2, 1); + return new (thd->mem_root) Item_func_time_format(thd, arg1, arg2); } @@ -6872,7 +6850,6 @@ static Native_func_registry func_array[] = { { C_STRING_WITH_LEN("CRC32") }, BUILDER(Create_func_crc32)}, { { C_STRING_WITH_LEN("CROSSES") }, GEOM_BUILDER(Create_func_crosses)}, { { C_STRING_WITH_LEN("DATEDIFF") }, BUILDER(Create_func_datediff)}, - { { C_STRING_WITH_LEN("DATE_FORMAT") }, BUILDER(Create_func_date_format)}, { { C_STRING_WITH_LEN("DAYNAME") }, BUILDER(Create_func_dayname)}, { { C_STRING_WITH_LEN("DAYOFMONTH") }, BUILDER(Create_func_dayofmonth)}, { { C_STRING_WITH_LEN("DAYOFWEEK") }, BUILDER(Create_func_dayofweek)}, |