List:Commits« Previous MessageNext Message »
From:Patrick Galbraith Date:December 31 2005 2:32am
Subject:bk commit into 5.1 tree (patg:1.2010)
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.2010 05/12/30 18:32:41 patg@stripped +1 -0
  WL# 2682 post merge changes

  sql/ha_partition.cc
    1.22 05/12/30 18:31:33 patg@stripped +13 -7
    WL# 2682 More cleanup, post merge tweaks

# 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.site
# Root:	/home/patg/mysql-build/mysql-5.1-wl2682

--- 1.21/sql/ha_partition.cc	2005-12-30 16:58:17 -08:00
+++ 1.22/sql/ha_partition.cc	2005-12-30 18:31:33 -08:00
@@ -1086,7 +1086,7 @@
 
 int ha_partition::external_lock(THD *thd, int lock_type)
 {
-  int i= 0;
+  int i= 0, start_part;
   uint error;
   handler **file;
   bool is_in_list;
@@ -1105,13 +1105,19 @@
       DBUG_PRINT("info", ("selected partition %s is in table",
                           thd->lex->part_info->selected_partition));
       current_partition_index= index;
+      start_part= index;
     }
     else
     {
-      my_error(ER_NO_SUCH_PARTITION, MYF(0),
+      error= my_error(ER_NO_SUCH_PARTITION, MYF(0),
                thd->lex->part_info->selected_partition);
+      DBUG_RETURN(error);
     }
   }
+  else
+  {
+    start_part= 0;
+  }
 
   DBUG_PRINT("info", ("is_in_list %d", is_in_list));
 
@@ -1119,14 +1125,13 @@
     Now we loop over all the partitions starting at first_partition_set calling
     external_lock for each one
   */
-  for (i= current_partition_index; i < (int) m_part_info->no_parts; i++)
+  for (i= start_part; i < (int) m_part_info->no_parts; i++)
   {
     if (_bitmap_is_set(&(m_part_info->used_partitions), i))
       if ((error= m_file[i]->external_lock(thd, lock_type)))
       {
         DBUG_PRINT("info", ("(file)->s->table_name.str",
-                            (*file)->table_share->table_name.str));
-        if (lock_type != F_UNLCK)
+                            (*file)->table_share->table_name.str)); if (lock_type != F_UNLCK)
           goto err_handler;
       }
   }
@@ -1135,7 +1140,7 @@
   DBUG_RETURN(0);
 
 err_handler:
-  while (i >= current_partition_index)
+  while (i >= (int) current_partition_index)
   {
     if (_bitmap_is_set(&(m_part_info->used_partitions), i))
       m_file[i--]->external_lock(thd, F_UNLCK);
@@ -1541,7 +1546,7 @@
   for (i= current_partition_index; i < m_part_info->no_parts; i++)
   {
     if (_bitmap_is_set(&(m_part_info->used_partitions), i))
-      if (error= m_file[i]->ha_rnd_init(scan))
+      if ((error= m_file[i]->ha_rnd_init(scan)))
         goto err;
     if (scan) break;
   }
@@ -1563,6 +1568,7 @@
 int ha_partition::rnd_end()
 {
   int i= 0;
+  handler **file;
   DBUG_ENTER("ha_partition::rnd_end");
   switch (m_scan_value) 
   {
Thread
bk commit into 5.1 tree (patg:1.2010)Patrick Galbraith31 Dec