Commit 6736de28 authored by unknown's avatar unknown

don't delete select_lex->having and select_lex->where as we delete

all items in free_prep_stmt(free_items);

indentation fix

parent 046b80bb
......@@ -671,8 +671,6 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables,
fix_tables_pointers(thd->lex.all_selects_list);
if (!result && !(result= new select_send()))
{
delete select_lex->having;
delete select_lex->where;
send_error(thd, ER_OUT_OF_RESOURCES);
DBUG_RETURN(1);
}
......@@ -680,10 +678,10 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables,
JOIN *join= new JOIN(thd, fields, select_options, result);
thd->used_tables= 0; // Updated by setup_fields
if (join->prepare(&select_lex->ref_pointer_array, tables,
wild_num, conds, og_num, order, group, having, proc,
select_lex, unit))
DBUG_RETURN(1);
if (join->prepare(&select_lex->ref_pointer_array, tables,
wild_num, conds, og_num, order, group, having, proc,
select_lex, unit))
DBUG_RETURN(1);
if (send_prep_stmt(stmt, fields.elements) ||
thd->protocol_simple.send_fields(&fields, 0) ||
#ifndef EMBEDDED_LIBRARY
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment