List:Internals« Previous MessageNext Message »
From:mikael Date:September 3 2005 4:08pm
Subject:bk commit into 5.1 tree (mronstrom:1.1899)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mikron. When mikron 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.1899 05/09/03 16:08:37 mronstrom@stripped +2 -0
  WL 2602, 2603, 2604: Partition Management

  sql/sql_yacc.yy
    1.405 05/09/03 16:08:27 mronstrom@stripped +27 -4
    Add handling of temporary partition state in parser

  sql/sql_table.cc
    1.270 05/09/03 16:08:26 mronstrom@stripped +2 -0
    Some fixes

# 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:	mronstrom
# Host:	c-8409e253.1238-1-64736c10.cust.bredbandsbolaget.se
# Root:	/Users/mikron/wl2602

--- 1.269/sql/sql_table.cc	2005-09-02 19:40:23 +02:00
+++ 1.270/sql/sql_table.cc	2005-09-03 16:08:26 +02:00
@@ -161,6 +161,7 @@
   {
     DBUG_RETURN(TRUE);
   }
+  lpt->thd->lex->part_info= part_info; //Restore after mysql_create_frm
   /* Frm file have been updated to reflect the change about to happen.  */
   DBUG_RETURN(FALSE);
 }
@@ -3622,6 +3623,7 @@
         do
         {
           partition_element *part_elem= alt_it++;
+          part_elem->part_state= PART_TO_BE_ADDED;
           tab_part_info->partitions.push_back(part_elem);
         } while (++part_count < no_new_partitions);
         tab_part_info->no_parts+= no_new_partitions;

--- 1.404/sql/sql_yacc.yy	2005-09-02 19:40:23 +02:00
+++ 1.405/sql/sql_yacc.yy	2005-09-03 16:08:27 +02:00
@@ -2836,7 +2836,6 @@
           part_info->curr_part_elem= p_elem;
           part_info->current_partition= p_elem;
           part_info->use_default_partitions= FALSE;
-          part_info->partitions.push_back(p_elem);
           p_elem->engine_type= DB_TYPE_UNKNOWN;
           part_info->count_curr_parts++;
         }
@@ -2854,16 +2853,40 @@
 
 opt_part_state:
         /* empty */
-        { Lex->part_info->curr_part_elem->part_state= PART_NORMAL; }
+        { 
+          LEX *lex= Lex;
+          partition_info *part_info= lex->part_info;
+          partition_element *p_elem= part_info->curr_part_elem;
+          p_elem->part_state= PART_NORMAL;
+          part_info->partitions.push_back(p_elem);
+        }
         | PART_STATE_SYM opt_equal ident_or_text
         {
+          LEX *lex= Lex;
+          partition_info *part_info= lex->part_info;
+          partition_element *p_elem= part_info->curr_part_elem;
           char *part_state= $3.str;
+
           if (strcmp(part_state, "PART_TO_BE_DROPPED"))
           {
-            ;
+            /*
+              This part is currently removed so we keep it in a
+              temporary list for REPAIR TABLE to be able to handle
+              failures during drop partition process.
+            */
+            part_info->temp_partitions.push_back(p_elem);
+            p_elem->part_state= PART_TO_BE_DROPPED;
+            part_info->count_curr_parts--;
           } else if (strcmp(part_state, "PART_TO_BE_ADDED"))
           {
-            ;
+            /*
+              This part is currently being added so we keep it in a
+              temporary list for REPAIR TABLE to be able to handle
+              failures during add partition process.
+            */
+            part_info->temp_partitions.push_back(p_elem);
+            p_elem->part_state= PART_TO_BE_ADDED;
+            part_info->count_curr_parts--;
           } else if (strcmp(part_state, "PART_IS_ADDING"))
           {
             ;
Thread
bk commit into 5.1 tree (mronstrom:1.1899)mikael5 Sep