List:Commits« Previous MessageNext Message »
From:reggie Date:January 16 2006 9:23pm
Subject:bk commit into 5.1 tree (reggie:1.2055)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of reggie. When reggie 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.2055 06/01/16 15:23:29 reggie@stripped +1 -0
  Merge rburnett@stripped:/home/bk/mysql-5.1-new
  into  linux.site:/home/reggie/work/mysql-5.1-bug15968

  sql/sql_partition.cc
    1.20 06/01/16 15:23:18 reggie@stripped +0 -0
    Auto merged

# 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:	reggie
# Host:	linux.site
# Root:	/home/reggie/work/mysql-5.1-bug15968/RESYNC

--- 1.19/sql/sql_partition.cc	2006-01-06 18:52:36 -06:00
+++ 1.20/sql/sql_partition.cc	2006-01-16 15:23:18 -06:00
@@ -43,13 +43,18 @@
 /*
   Partition related functions declarations and some static constants;
 */
-static const char *hash_str= "HASH";
-static const char *range_str= "RANGE";
-static const char *list_str= "LIST";
+const LEX_STRING partition_keywords[]=
+{
+  { (char *) STRING_WITH_LEN("HASH") },
+  { (char *) STRING_WITH_LEN("RANGE") },
+  { (char *) STRING_WITH_LEN("LIST") }, 
+  { (char *) STRING_WITH_LEN("KEY") },
+  { (char *) STRING_WITH_LEN("MAXVALUE") },
+  { (char *) STRING_WITH_LEN("LINEAR ") }
+};
 static const char *part_str= "PARTITION";
 static const char *sub_str= "SUB";
 static const char *by_str= "BY";
-static const char *key_str= "KEY";
 static const char *space_str= " ";
 static const char *equal_str= "=";
 static const char *end_paren_str= ")";
@@ -629,9 +634,9 @@
   {
     const char *error_string;
     if (part_info->part_type == RANGE_PARTITION)
-      error_string= range_str;
+      error_string= partition_keywords[PKW_RANGE].str;
     else
-      error_string= list_str;
+      error_string= partition_keywords[PKW_LIST].str;
     my_error(ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0), error_string);
     goto end;
   }
@@ -1771,13 +1776,13 @@
     const char *error_str;
     if (part_info->part_type == RANGE_PARTITION)
     {
-      error_str= range_str; 
+      error_str= partition_keywords[PKW_RANGE].str; 
       if (unlikely(check_range_constants(part_info)))
         goto end;
     }
     else if (part_info->part_type == LIST_PARTITION)
     {
-      error_str= list_str; 
+      error_str= partition_keywords[PKW_LIST].str; 
       if (unlikely(check_list_constants(part_info)))
         goto end;
     }
@@ -1879,7 +1884,7 @@
 
 static int add_hash(File fptr)
 {
-  return add_part_key_word(fptr, hash_str);
+  return add_part_key_word(fptr, partition_keywords[PKW_HASH].str);
 }
 
 static int add_partition(File fptr)
@@ -1911,7 +1916,7 @@
   uint i, no_fields;
   int err;
   List_iterator<char> part_it(field_list);
-  err= add_part_key_word(fptr, key_str);
+  err= add_part_key_word(fptr, partition_keywords[PKW_KEY].str);
   no_fields= field_list.elements;
   i= 0;
   do
@@ -1993,7 +1998,7 @@
       err+= add_end_parenthesis(fptr);
     }
     else
-      err+= add_string(fptr, "MAXVALUE");
+      err+= add_string(fptr, partition_keywords[PKW_MAXVALUE].str);
   }
   else if (part_info->part_type == LIST_PARTITION)
   {
@@ -2081,15 +2086,15 @@
   {
     case RANGE_PARTITION:
       add_default_info= TRUE;
-      err+= add_part_key_word(fptr, range_str);
+      err+= add_part_key_word(fptr, partition_keywords[PKW_RANGE].str);
       break;
     case LIST_PARTITION:
       add_default_info= TRUE;
-      err+= add_part_key_word(fptr, list_str);
+      err+= add_part_key_word(fptr, partition_keywords[PKW_LIST].str);
       break;
     case HASH_PARTITION:
       if (part_info->linear_hash_ind)
-        err+= add_string(fptr, "LINEAR ");
+        err+= add_string(fptr, partition_keywords[PKW_LINEAR].str);
       if (part_info->list_of_part_fields)
         err+= add_key_partition(fptr, part_info->part_field_list);
       else
Thread
bk commit into 5.1 tree (reggie:1.2055)reggie16 Jan