Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0

into  rurik.mysql.com:/home/igor/mysql-5.0
This commit is contained in:
igor@rurik.mysql.com 2006-05-07 16:24:03 -07:00
commit 91031fc2bc

View File

@ -2085,19 +2085,20 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
sl->exclude_from_table_unique_test= FALSE; sl->exclude_from_table_unique_test= FALSE;
/* /*
Copy WHERE, HAVING clause pointers to avoid damaging them by optimisation Copy WHERE, HAVING clause pointers to avoid damaging them
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(); sl->where->cleanup();
} }
if (sl->prep_having) if (sl->prep_having)
{ {
sl->having= sl->prep_having->copy_andor_structure(thd); sl->having= sl->prep_having->copy_andor_structure(thd);
sl->having->cleanup(); sl->having->cleanup();
} }
DBUG_ASSERT(sl->join == 0); DBUG_ASSERT(sl->join == 0);
ORDER *order; ORDER *order;
/* Fix GROUP list */ /* Fix GROUP list */
for (order= (ORDER *)sl->group_list.first; order; order= order->next) for (order= (ORDER *)sl->group_list.first; order; order= order->next)