From 989756ab99c61be289d78485ecb46067f1ebe4ae Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Mar 2004 02:03:42 +0400 Subject: [PATCH] Better comment. sql/sql_prepare.cc: While reviewing Sanja's patch finally understood what is going one here (previously marked as 'safety - nasty init' :-) ). --- sql/sql_prepare.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index ab136668cfb..0285c1eec2f 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1083,7 +1083,11 @@ static void reset_stmt_for_execute(Prepared_statement *stmt) tables; tables= tables->next) { - tables->table= 0; // safety - nasty init + /* + 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; tables->table_list= 0; }