diff options
author | unknown <kostja@bodhi.local> | 2006-07-11 21:19:57 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.local> | 2006-07-11 21:19:57 +0400 |
commit | d8b447a1b6c4f4f5d2a335eef6b5f4ac4f2f267b (patch) | |
tree | 282cc5a8f5fb6720588ef04e63fad742387f33e9 /sql/sql_prepare.cc | |
parent | 67d53e36cdbcc4cdf5dc785a5f465c1e1bc7fdbe (diff) | |
parent | 4cb0659de2b9d434cfe92b48b409dadee62fa7df (diff) | |
download | mariadb-git-d8b447a1b6c4f4f5d2a335eef6b5f4ac4f2f267b.tar.gz |
Merge bodhi.local:/opt/local/work/tmp_merge
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/ps.result:
Manual merge: use local.
mysql-test/t/ps.test:
Manual merge: remove duplicate test cases from ps.test.
sql/sql_lex.cc:
Manual merge.
sql/sql_prepare.cc:
Manual merge.
sql/table.h:
Manual merge.
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 103a0b9e54e..37a5e2f0af0 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2128,28 +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) { - /* - Reset old pointers to TABLEs: they are not valid since the tables - were closed in the end of previous prepare or execute call. - */ - tables->table= 0; - /* 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); + 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->auxilliary_table_list.first; + tables; + tables= tables->next) + { + tables->reinit_before_use(thd); } lex->current_select= &lex->select_lex; |