List:Commits« Previous MessageNext Message »
From:tomas Date:February 28 2006 1:30pm
Subject:bk commit into 5.1 tree (tomas:1.2195) BUG#17499
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2195 06/02/28 14:29:48 tomas@stripped +2 -0
  Bug #17499 Alter table of ndb partitioned tables causes mysqld to core
  - moved used_partitions initialization

  sql/sql_table.cc
    1.313 06/02/28 14:29:41 tomas@stripped +0 -2
    Bug #17499 Alter table of ndb partitioned tables causes mysqld to core
    - moved used_partitions initialization

  sql/ha_ndbcluster.cc
    1.276 06/02/28 14:29:40 tomas@stripped +6 -1
    Bug #17499 Alter table of ndb partitioned tables causes mysqld to core
    - moved used_partitions initialization

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new

--- 1.312/sql/sql_table.cc	2006-02-28 12:40:10 +01:00
+++ 1.313/sql/sql_table.cc	2006-02-28 14:29:41 +01:00
@@ -5200,8 +5200,6 @@
   */
   to->file->ha_set_all_bits_in_write_set();
   from->file->ha_retrieve_all_cols();
-  if (from->part_info)
-    bitmap_set_all(&(from->part_info->used_partitions));
   init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1,1);
   if (ignore ||
       handle_duplicates == DUP_REPLACE)

--- 1.275/sql/ha_ndbcluster.cc	2006-02-28 12:27:46 +01:00
+++ 1.276/sql/ha_ndbcluster.cc	2006-02-28 14:29:40 +01:00
@@ -3381,8 +3381,13 @@
     DBUG_PRINT("info", ("HA_EXTRA_RESET"));
     DBUG_PRINT("info", ("Clearing condition stack"));
     cond_clear();
+    /*
+     * Regular partition pruning will set the bitmap appropriately.
+     * Some queries like ALTER TABLE doesn't use partition pruning and
+     * thus the 'used_partitions' bitmap needs to be initialized
+     */
     if (m_part_info)
-      bitmap_clear_all(&m_part_info->used_partitions);
+      bitmap_set_all(&m_part_info->used_partitions);
     break;
   case HA_EXTRA_IGNORE_DUP_KEY:       /* Dup keys don't rollback everything*/
     DBUG_PRINT("info", ("HA_EXTRA_IGNORE_DUP_KEY"));
Thread
bk commit into 5.1 tree (tomas:1.2195) BUG#17499tomas28 Feb