List:Commits« Previous MessageNext Message »
From:Jan Wedvik Date:January 11 2011 11:33am
Subject:bzr commit into mysql-5.5 branch (jan.wedvik:3234) Bug#58553
View as plain text  
#At file:///net/atum17/export/home/tmp/jw159207/mysql/repo/mysql-5.5/ based on revid:magne.mahre@stripped

 3234 Jan Wedvik	2011-01-11 [merge]
      Merge of fix for bug#58553, "Queries with pushed conditions causes 'explain 
      extended' to crash mysqld" (see http://lists.mysql.com/commits/128409).

    modified:
      sql/handler.cc
      sql/sql_base.cc
      sql/sql_select.cc
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2010-12-16 19:15:55 +0000
+++ b/sql/handler.cc	2011-01-11 11:33:28 +0000
@@ -4759,6 +4759,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-12-29 00:26:31 +0000
+++ b/sql/sql_base.cc	2011-01-11 11:33:28 +0000
@@ -3068,6 +3068,11 @@ retry_share:
   table->reginfo.lock_type=TL_READ;		/* Assume read */
 
  reset:
+  /*
+    Check that there is no reference to a condtion from an earlier query
+    (cf. Bug#58553). 
+  */
+  DBUG_ASSERT(table->file->pushed_cond == NULL);
   table_list->updatable= 1; // It is not derived table nor non-updatable VIEW
   table_list->table= table;
 

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-12-29 00:26:31 +0000
+++ b/sql/sql_select.cc	2011-01-11 11:33:28 +0000
@@ -6476,7 +6476,6 @@ make_join_select(JOIN *join,SQL_SELECT *
           tab->select_cond=sel->cond=tmp;
           /* Push condition to storage engine if this is enabled
              and the condition is not guarded */
-          tab->table->file->pushed_cond= NULL;
 	  if (thd->variables.optimizer_switch &
               OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN)
           {

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.5 branch (jan.wedvik:3234) Bug#58553Jan Wedvik11 Jan