From 70455c517bf3c329f5d877f4c68c5d5e8fee50bf Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Wed, 13 Jul 2011 20:00:28 -0700 Subject: [PATCH] Corrected the patch for bug 809206 to fix valgrind failures. --- sql/sql_select.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index fdee99b88f4..b323cae468d 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -902,9 +902,10 @@ JOIN::optimize() /* Save this info for the next executions */ if (select_lex->save_leaf_tables(thd)) DBUG_RETURN(1); - eval_select_list_used_tables(); } + eval_select_list_used_tables(); + table_count= select_lex->leaf_tables.elements; if (setup_ftfuncs(select_lex)) /* should be after having->fix_fields */