List:Commits« Previous MessageNext Message »
From:MySQL Release Engineering Date:June 27 2012 8:07pm
Subject:bzr push into mysql-5.5 branch (mysql-re_ww_grp:3820 to 3821)
View as plain text  
 3821 hery.ramilison@stripped	2012-06-27
      applying patch for br43998

    modified:
      VERSION
      sql/ha_partition.cc
 3820 Annamalai Gurusami	2012-05-10 {clone-5.5.25-build, mysql-5.5.25} [merge]
      Merging from mysql-5.1 to mysql-5.5. 

    added:
      mysql-test/suite/innodb/r/innodb_bug14007649.result
      mysql-test/suite/innodb/t/innodb_bug14007649.test
    modified:
      storage/innobase/btr/btr0cur.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/ha_innodb.h
=== modified file 'VERSION'
--- a/VERSION	2012-05-07 20:20:42 +0000
+++ b/VERSION	2012-06-27 20:06:29 +0000
@@ -1,4 +1,4 @@
 MYSQL_VERSION_MAJOR=5
 MYSQL_VERSION_MINOR=5
 MYSQL_VERSION_PATCH=25
-MYSQL_VERSION_EXTRA=
+MYSQL_VERSION_EXTRA=-SR5703461891

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2012-03-21 12:56:29 +0000
+++ b/sql/ha_partition.cc	2012-06-27 20:06:29 +0000
@@ -6322,7 +6322,17 @@ ha_rows ha_partition::min_rows_for_estim
   DBUG_ENTER("ha_partition::min_rows_for_estimate");
 
   tot_used_partitions= bitmap_bits_set(&m_part_info->used_partitions);
-  DBUG_ASSERT(tot_used_partitions);
+
+  /*
+    All partitions might have been left as unused during partition pruning
+    due to, for example, an impossible WHERE condition. Nonetheless, the
+    optimizer might still attempt to perform (e.g. range) analysis where an
+    estimate of the the number of rows is calculated using records_in_range.
+    Hence, to handle this and other possible cases, use zero as the minimum
+    number of rows to base the estimate on if no partition is being used.
+  */
+  if (!tot_used_partitions)
+    DBUG_RETURN(0);
 
   /*
     Allow O(log2(tot_partitions)) increase in number of used partitions.

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (mysql-re_ww_grp:3820 to 3821) MySQL Release Engineering28 Jun