Commit 9f9c118d 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 14a46c6c
......@@ -1671,7 +1671,10 @@ static void reset_stmt_for_execute(Prepared_statement *stmt)
Copy WHERE clause pointers to avoid damaging they by optimisation
*/
if (sl->prep_where)
{
sl->where= sl->prep_where->copy_andor_structure(thd);
sl->where->cleanup();
}
DBUG_ASSERT(sl->join == 0);
ORDER *order;
/* 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