diff options
author | Alexander Barkov <bar@mariadb.org> | 2018-02-08 19:06:25 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2018-02-08 19:06:25 +0400 |
commit | 3cad31f2a758f797ef0acac5625d0e007ecbce93 (patch) | |
tree | 73c054636c4858b2a51eddf7eaa653746d67524e /sql/item_func.cc | |
parent | 560b9895d413bdfedda0a0ca871a635858990c05 (diff) | |
parent | 5c057b3fef3aa92cfadbd63043799b430132a494 (diff) | |
download | mariadb-git-3cad31f2a758f797ef0acac5625d0e007ecbce93.tar.gz |
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 7368aebcadf..cced6d70824 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -54,6 +54,7 @@ #include "set_var.h" #include "debug_sync.h" #include "sql_base.h" +#include "sql_cte.h" #ifdef NO_EMBEDDED_ACCESS_CHECKS #define sp_restore_security_context(A,B) while (0) {} @@ -703,6 +704,7 @@ my_decimal *Item_real_func::val_decimal(my_decimal *decimal_value) } +#ifdef HAVE_DLOPEN void Item_udf_func::fix_num_length_and_dec() { uint fl_length= 0; @@ -719,6 +721,7 @@ void Item_udf_func::fix_num_length_and_dec() max_length= float_length(NOT_FIXED_DEC); } } +#endif void Item_func::signal_divide_by_null() @@ -4511,10 +4514,13 @@ bool Item_func_set_user_var::fix_fields(THD *thd, Item **ref) TABLE_LIST *derived; for (derived= unit->derived; derived; - derived= derived->select_lex->master_unit()->derived) + derived= unit->derived) { derived->set_materialized_derived(); derived->prohibit_cond_pushdown= true; + if (unit->with_element && unit->with_element->is_recursive) + break; + unit= derived->select_lex->master_unit(); } } |