Commit 129bc589 authored by unknown's avatar unknown

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.


sql/sql_prepare.cc:
  Cleanup cond items too. (Fix for stored procedures.)
parent 929d1a16
...@@ -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