mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge include/mysql.h: Auto merged include/sql_common.h: Auto merged libmysql/libmysql.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/t/udf.test: Auto merged ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged sql/item.cc: Auto merged sql/item_func.h: Auto merged sql/mysql_priv.h: Auto merged sql/slave.cc: Auto merged sql/sp.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged sql-common/client.c: Auto merged sql/sql_yacc.yy: Auto merged sql/table.h: Auto merged mysql-test/r/ps.result: Manual merge. mysql-test/r/sp.result: Manual merge. mysql-test/t/ps.test: Manual merge. mysql-test/t/sp.test: Manual merge. sql/sql_prepare.cc: Manual merge. sql/table.cc: Manual merge. tests/mysql_client_test.c: Manual 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