diff options
author | Igor Babaev <igor@askmonty.org> | 2015-12-21 12:13:39 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2015-12-21 12:13:39 -0800 |
commit | 6dbdb433cb0befb2e77a290d87ca4573e2c025f7 (patch) | |
tree | 2f133af7f95b1c8e36dd1450e6aaa7ee8f68928c /sql/sql_cte.cc | |
parent | dfc4772f83b8c5dcee459435b3e4fbb8b881a1ad (diff) | |
download | mariadb-git-6dbdb433cb0befb2e77a290d87ca4573e2c025f7.tar.gz |
Fixed compile errors of the merge of the patch for mdev-8789 with 10.2.
Diffstat (limited to 'sql/sql_cte.cc')
-rw-r--r-- | sql/sql_cte.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc index 031208dafdb..ef2a0714d41 100644 --- a/sql/sql_cte.cc +++ b/sql/sql_cte.cc @@ -270,7 +270,7 @@ bool With_clause::prepare_unreferenced_elements(THD *thd) bool With_element::set_unparsed_spec(THD *thd, char *spec_start, char *spec_end) { unparsed_spec.length= spec_end - spec_start; - unparsed_spec.str= (char*) sql_memdup(spec_start, unparsed_spec.length+1); + unparsed_spec.str= (char*) thd->memdup(spec_start, unparsed_spec.length+1); unparsed_spec.str[unparsed_spec.length]= '\0'; if (!unparsed_spec.str) @@ -394,6 +394,8 @@ err: @brief Process optional column list of this with element + @param thd The context of the statement containing this with element + @details The method processes the column list in this with element. It reports an error if the cardinality of this list differs from @@ -407,7 +409,7 @@ err: false otherwise */ -bool With_element::process_column_list() +bool With_element::process_column_list(THD *thd) { if (column_list_is_processed) return false; @@ -429,12 +431,12 @@ bool With_element::process_column_list() /* Rename the columns of the first select in the specification query */ while ((item= it++, name= nm++)) { - item->set_name(name->str, (uint) name->length, system_charset_info); + item->set_name(thd, name->str, (uint) name->length, system_charset_info); item->is_autogenerated_name= false; } } - make_valid_column_names(select->item_list); + make_valid_column_names(thd, select->item_list); column_list_is_processed= true; return false; @@ -471,8 +473,8 @@ bool With_element::prepare_unreferenced(THD *thd) thd->lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_DERIVED; if (!spec->prepared && (spec->prepare(thd, 0, 0) || - process_column_list() || - check_duplicate_names(first_sl->item_list, 1))) + process_column_list(thd) || + check_duplicate_names(thd, first_sl->item_list, 1))) rc= true; thd->lex->context_analysis_only&= ~CONTEXT_ANALYSIS_ONLY_DERIVED; |