List:Commits« Previous MessageNext Message »
From:Patrick Galbraith Date:January 25 2006 7:50pm
Subject:bk commit into 5.1 tree (patg:1.2075)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of patg. When patg 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.2075 06/01/25 11:50:42 patg@stripped +2 -0
  WL# 2986
  
  Post review fixes per Sergey Petrunia

  sql/opt_range.cc
    1.195 06/01/25 11:50:39 patg@stripped +5 -7
    WL# 2986
    
    Post review changes per Sergey Petrunia

  sql/ha_partition.cc
    1.28 06/01/25 11:50:39 patg@stripped +14 -14
    WL# 2986
    
    Review changes per Sergey Petrunia

# 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:	patg
# Host:	govinda.patg.net
# Root:	/home/patg/mysql-build/mysql-5.1-wl2986

--- 1.194/sql/opt_range.cc	2006-01-20 10:28:10 -08:00
+++ 1.195/sql/opt_range.cc	2006-01-25 11:50:39 -08:00
@@ -2501,7 +2501,7 @@
   if (!(bitmap_buf= (uint32*)alloc_root(ppar->range_param.mem_root,
                                         bitmap_bytes)))
   {
-    /* 
+    /*
       Fallback, process just first SEL_IMERGE. This can leave us with more
       partitions marked as used then actually needed.
     */
@@ -2509,7 +2509,7 @@
   }
   bitmap_init(&all_merges, bitmap_buf, n_bits, FALSE);
   bitmap_set_prefix(&all_merges, n_bits);
-  
+
   List_iterator<SEL_IMERGE> it(merges);
   SEL_IMERGE *imerge;
   while ((imerge=it++))
@@ -2520,7 +2520,7 @@
       /* no used partitions on one ANDed imerge => no used partitions at all */
       return 0;
     }
-    
+
     if (res != -1)
       bitmap_intersect(&all_merges, &ppar->part_info->used_partitions);
 
@@ -2749,12 +2749,10 @@
         for (uint32 num= ppar->start_part_num; num != ppar->end_part_num; 
              num++)
         {
-          uint part_id= (ppar->part_num_to_part_id(ppar, num) *
+          uint32 part_id= (ppar->part_num_to_part_id(ppar, num) *
                          part_info->no_subparts) + subpart_id;
           DBUG_PRINT("info", ("2:Mark subpartition %u as used", part_id));
-          bitmap_set_bit(&part_info->used_partitions,
-                         ppar->part_num_to_part_id(ppar, num) * 
-                         part_info->no_subparts + subpart_id);
+          bitmap_set_bit(&part_info->used_partitions, part_id);
         }
         res= 1; /* Some partitions were marked as used */
         goto pop_and_go_right;

--- 1.27/sql/ha_partition.cc	2006-01-20 11:29:36 -08:00
+++ 1.28/sql/ha_partition.cc	2006-01-25 11:50:39 -08:00
@@ -2240,7 +2240,7 @@
     }
   }
 
-  /* Initialze the bitmap we use to determine what partitions are used */
+  /* Initialise the bitmap we use to determine what partitions are used */
   bitmap_init(&(m_part_info->used_partitions), NULL, m_tot_parts, TRUE);
   bitmap_set_all(&(m_part_info->used_partitions));
 
@@ -2887,7 +2887,7 @@
 {
   int error;
   uint i= 0;
-  uint part_id;
+  uint32 part_id;
   handler **file;
   DBUG_ENTER("ha_partition::rnd_init");
 
@@ -2896,7 +2896,7 @@
   /* Now we see what the index of our first important partition is */
   DBUG_PRINT("info", ("m_part_info->used_partitions 0x%x",
              *(uint32*)m_part_info->used_partitions.bitmap));
-  part_id = bitmap_get_first_set(&(m_part_info->used_partitions));
+  part_id= bitmap_get_first_set(&(m_part_info->used_partitions));
   DBUG_PRINT("info", ("m_part_spec.start_part %d", part_id));
 
   if (MY_BIT_NONE == part_id)
@@ -2922,7 +2922,7 @@
   {
     for (i= part_id; i < m_tot_parts; i++)
     {
-      if (_bitmap_is_set(&(m_part_info->used_partitions), i))
+      if (bitmap_is_set(&(m_part_info->used_partitions), i))
       {
         if ((error= m_file[i]->ha_rnd_init(scan)))
           goto err;
@@ -2938,7 +2938,7 @@
 err:
   while ((int)--i >= (int)part_id)
   {
-    if (_bitmap_is_set(&(m_part_info->used_partitions), i))
+    if (bitmap_is_set(&(m_part_info->used_partitions), i))
 	  m_file[i]->ha_rnd_end();
   }
 err1:
@@ -2977,7 +2977,7 @@
     file= m_file;
     do
     {
-      if (_bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
+      if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
         (*file)->ha_rnd_end();
     } while (*(++file));
     break;
@@ -3206,7 +3206,7 @@
   do
   {
     /* TODO RONM: Change to index_init() when code is stable */
-    if (_bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
+    if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
       if ((error= (*file)->ha_index_init(inx, sorted)))
       {
         DBUG_ASSERT(0);                           // Should never happen
@@ -3245,7 +3245,7 @@
   {
     int tmp;
     /* TODO RONM: Change to index_end() when code is stable */
-    if (_bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
+    if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
       if ((tmp= (*file)->ha_index_end()))
         error= tmp;
   } while (*(++file));
@@ -3808,7 +3808,7 @@
     int error;
     handler *file;
 
-    if (!(_bitmap_is_set(&(m_part_info->used_partitions), i)))
+    if (!(bitmap_is_set(&(m_part_info->used_partitions), i)))
       continue;
     file= m_file[i];
     m_part_spec.start_part= i;
@@ -3887,7 +3887,7 @@
   DBUG_PRINT("info", ("m_part_spec.start_part %d", m_part_spec.start_part));
   for (i= m_part_spec.start_part; i <= m_part_spec.end_part; i++)
   {
-    if (!(_bitmap_is_set(&(m_part_info->used_partitions), i)))
+    if (!(bitmap_is_set(&(m_part_info->used_partitions), i)))
       continue;
     byte *rec_buf_ptr= rec_buf(i);
     int error;
@@ -4204,7 +4204,7 @@
     file_array= m_file;
     do
     {
-      if (_bitmap_is_set(&(m_part_info->used_partitions), (file_array - m_file)))
+      if (bitmap_is_set(&(m_part_info->used_partitions), (file_array - m_file)))
       {
         file= *file_array;
         file->info(HA_STATUS_VARIABLE);
@@ -4901,7 +4901,7 @@
   DBUG_ENTER("ha_partition::scan_time");
 
   for (file= m_file; *file; file++)
-    if (_bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
+    if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
       scan_time+= (*file)->scan_time();
   DBUG_RETURN(scan_time);
 }
@@ -4967,7 +4967,7 @@
   file= m_file;
   do
   {
-    if (_bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
+    if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
       in_range+= (*file)->records_in_range(inx, min_key, max_key);
   } while (*(++file));
   DBUG_RETURN(in_range);
@@ -4993,7 +4993,7 @@
   file= m_file;
   do
   {
-    if (_bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
+    if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
     {
       rows= (*file)->estimate_rows_upper_bound();
       if (rows == HA_POS_ERROR)
Thread
bk commit into 5.1 tree (patg:1.2075)Patrick Galbraith25 Jan