Commit 29662d14 authored by pem@mysql.comhem.se's avatar pem@mysql.comhem.se

Fix for stored procedures BUG#4726: Stored procedure crash when looping over...

Fix for stored procedures BUG#4726: Stored procedure crash when looping over SELECT with complex WHERE's.
parent 6cad42e3
...@@ -1671,7 +1671,10 @@ static void reset_stmt_for_execute(Prepared_statement *stmt) ...@@ -1671,7 +1671,10 @@ static void reset_stmt_for_execute(Prepared_statement *stmt)
Copy WHERE clause pointers to avoid damaging they by optimisation Copy WHERE clause pointers to avoid damaging they by optimisation
*/ */
if (sl->prep_where) if (sl->prep_where)
{
sl->where= sl->prep_where->copy_andor_structure(thd); sl->where= sl->prep_where->copy_andor_structure(thd);
sl->where->cleanup();
}
DBUG_ASSERT(sl->join == 0); DBUG_ASSERT(sl->join == 0);
ORDER *order; ORDER *order;
/* Fix GROUP list */ /* Fix GROUP list */
......
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