1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed compile errors of the merge of the patch for mdev-8789 with 10.2.

This commit is contained in:
Igor Babaev
2015-12-21 12:13:39 -08:00
parent dfc4772f83
commit 6dbdb433cb
5 changed files with 13 additions and 9 deletions

View File

@ -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;