From: Ole John Aske Date: March 24 2011 10:07am Subject: bzr push into mysql-5.1-telco-7.0-spj-scan-vs-scan branch (ole.john.aske:3453 to 3454) List-Archive: http://lists.mysql.com/commits/133745 Message-Id: <20110324100741.8D232218@fimafeng09.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3454 Ole John Aske 2011-03-24 [merge] Merge from telco mainline to SPJ modified: sql/handler.cc sql/sql_base.cc sql/sql_select.cc 3453 Ole John Aske 2011-03-24 SPJ: Updated resultfile after format of EXPLAIN for pushed joins has changed. modified: mysql-test/suite/ndb/r/ndb_dbug_tc_select.result === modified file 'sql/handler.cc' --- a/sql/handler.cc 2011-02-08 14:29:52 +0000 +++ b/sql/handler.cc 2011-03-24 10:07:10 +0000 @@ -4939,6 +4939,7 @@ int handler::ha_reset() free_io_cache(table); /* reset the bitmaps to point to defaults */ table->default_column_bitmaps(); + pushed_cond= NULL; DBUG_RETURN(reset()); } === modified file 'sql/sql_base.cc' --- a/sql/sql_base.cc 2010-10-22 14:13:23 +0000 +++ b/sql/sql_base.cc 2011-03-24 10:00:09 +0000 @@ -3001,6 +3001,11 @@ TABLE *open_table(THD *thd, TABLE_LIST * table->insert_values= 0; table->fulltext_searched= 0; table->file->ft_handler= 0; + /* + Check that there is no reference to a condtion from an earlier query + (cf. Bug#58553). + */ + DBUG_ASSERT(table->file->pushed_cond == NULL); table->reginfo.impossible_range= 0; /* Catch wrong handling of the auto_increment_field_not_null. */ DBUG_ASSERT(!table->auto_increment_field_not_null); === modified file 'sql/sql_select.cc' --- a/sql/sql_select.cc 2011-03-23 14:07:43 +0000 +++ b/sql/sql_select.cc 2011-03-24 10:07:10 +0000 @@ -6608,7 +6608,6 @@ make_join_select(JOIN *join,SQL_SELECT * } } - tab->table->file->pushed_cond= NULL; if (tmp || !cond || tab->type == JT_REF) { DBUG_EXECUTE("where",print_where(tmp,tab->table->alias, QT_ORDINARY);); No bundle (reason: useless for push emails).