mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
This commit is contained in:
@ -2128,29 +2128,21 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
|
||||
they have their own table list).
|
||||
*/
|
||||
for (TABLE_LIST *tables= lex->query_tables;
|
||||
tables;
|
||||
tables= tables->next_global)
|
||||
tables;
|
||||
tables= tables->next_global)
|
||||
{
|
||||
tables->reinit_before_use(thd);
|
||||
}
|
||||
/*
|
||||
Cleanup of the special case of DELETE t1, t2 FROM t1, t2, t3 ...
|
||||
(multi-delete). We do a full clean up, although at the moment all we
|
||||
need to clean in the tables of MULTI-DELETE list is 'table' member.
|
||||
*/
|
||||
for (TABLE_LIST *tables= (TABLE_LIST*) lex->auxiliary_table_list.first;
|
||||
tables;
|
||||
tables= tables->next_global)
|
||||
{
|
||||
/*
|
||||
Reset old pointers to TABLEs: they are not valid since the tables
|
||||
were closed in the end of previous prepare or execute call.
|
||||
*/
|
||||
tables->reinit_before_use(thd);
|
||||
|
||||
/* Reset is_schema_table_processed value(needed for I_S tables */
|
||||
tables->is_schema_table_processed= FALSE;
|
||||
|
||||
TABLE_LIST *embedded; /* The table at the current level of nesting. */
|
||||
TABLE_LIST *embedding= tables; /* The parent nested table reference. */
|
||||
do
|
||||
{
|
||||
embedded= embedding;
|
||||
if (embedded->prep_on_expr)
|
||||
embedded->on_expr= embedded->prep_on_expr->copy_andor_structure(thd);
|
||||
embedding= embedded->embedding;
|
||||
}
|
||||
while (embedding &&
|
||||
embedding->nested_join->join_list.head() == embedded);
|
||||
}
|
||||
lex->current_select= &lex->select_lex;
|
||||
|
||||
@ -2165,7 +2157,7 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
|
||||
}
|
||||
lex->allow_sum_func= 0;
|
||||
lex->in_sum_func= NULL;
|
||||
DBUG_VOID_RETURN;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user