MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:November 2 2010 12:59pm
Subject:bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:3936 to 3937)
View as plain text  
 3937 Magnus Blåudd	2010-11-02 [merge]
      Merge 7.0-bug56438 -> 7.1

    modified:
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.h
      sql/partition_info.h
      sql/sql_partition.cc
 3936 Maitrayi Sabaratnam	2010-11-02 [merge]
      Merge 7.0 to 7.1

    modified:
      mysql-test/suite/ndb/r/ndb_basic.result
      mysql-test/suite/ndb/t/ndb_basic.test
      sql/sql_partition.cc
=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2010-10-12 11:54:35 +0000
+++ b/sql/ha_partition.cc	2010-11-02 12:50:55 +0000
@@ -6102,7 +6102,7 @@ uint8 ha_partition::table_cache_type()
   DBUG_RETURN(m_file[0]->table_cache_type());
 }
 
-
+#ifndef MCP_BUG56438
 /*
   Calculate hash value for KEY partitioning using an array of fields.
 
@@ -6130,7 +6130,7 @@ uint32 ha_partition::calculate_key_hash_
   } while (*(++field_array));
   return (uint32) nr1;
 }
-
+#endif
 
 /****************************************************************************
                 MODULE print messages

=== modified file 'sql/ha_partition.h'
--- a/sql/ha_partition.h	2010-10-12 11:54:35 +0000
+++ b/sql/ha_partition.h	2010-11-02 12:50:55 +0000
@@ -185,7 +185,11 @@ private:
   enum_monotonicity_info m_part_func_monotonicity_info;
 public:
   handler *clone(MEM_ROOT *mem_root);
+#ifndef MCP_BUG56438
   virtual void set_part_info(partition_info *part_info, bool early)
+#else
+  virtual void set_part_info(partition_info *part_info)
+#endif
   {
      m_part_info= part_info;
      m_is_sub_partitioned= part_info->is_sub_partitioned();
@@ -604,9 +608,12 @@ public:
     underlying handlers must have the same implementation for it to work.
   */
   virtual uint8 table_cache_type();
+  virtual ha_rows records();
+
+#ifndef MCP_BUG56438
   /* Calculate hash value for PARTITION BY KEY tables.  */
   uint32 calculate_key_hash_value(Field **field_array);
-  virtual ha_rows records();
+#endif
 
   /*
     -------------------------------------------------------------------------

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2010-10-22 14:13:23 +0000
+++ b/sql/handler.h	2010-11-02 12:50:55 +0000
@@ -1566,8 +1566,10 @@ public:
   virtual int info(uint)=0; // see my_base.h for full description
   virtual void get_dynamic_partition_info(PARTITION_INFO *stat_info,
                                           uint part_id);
+#ifndef MCP_BUG56438
   virtual uint32 calculate_key_hash_value(Field **field_array)
   { DBUG_ASSERT(0); return 0; }
+#endif
   virtual int extra(enum ha_extra_function operation)
   { return 0; }
   virtual int extra_opt(enum ha_extra_function operation, ulong cache_size)
@@ -1696,9 +1698,11 @@ public:
     *no_parts= 0;
     return 0;
   }
-  virtual void set_part_info(partition_info *part_info,
-                             bool early)
-  {return;}
+#ifndef MCP_BUG56438
+  virtual void set_part_info(partition_info *part_info, bool early) {return;}
+#else
+  virtual void set_part_info(partition_info *part_info) {return;}
+#endif
 
   virtual ulong index_flags(uint idx, uint part, bool all_parts) const =0;
 

=== modified file 'sql/partition_info.h'
--- a/sql/partition_info.h	2009-09-30 18:51:17 +0000
+++ b/sql/partition_info.h	2010-11-02 12:50:55 +0000
@@ -158,7 +158,9 @@ public:
   partition_element *curr_part_elem;
   partition_element *current_partition;
 
+#ifndef MCP_BUG56438
   TABLE *table;
+#endif
   /*
     These key_map's are used for Partitioning to enable quick decisions
     on whether we can derive more information about which partition to

=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc	2010-11-01 09:13:06 +0000
+++ b/sql/sql_partition.cc	2010-11-02 12:50:55 +0000
@@ -1772,7 +1772,9 @@ bool fix_partition_func(THD *thd, TABLE 
   set_up_partition_key_maps(table, part_info);
   set_up_partition_func_pointers(part_info);
   set_up_range_analysis_info(part_info);
+#ifndef MCP_BUG56438
   table->file->set_part_info(part_info, FALSE);
+#endif
   result= FALSE;
 end:
   thd->mark_used_columns= save_mark_used_columns;
@@ -2355,12 +2357,13 @@ static inline int part_val_int(Item *ite
   hash value and some parameters calculated from the number of partitions.
 */
 
-#if 0
+#ifndef MCP_BUG56438
 /*
   Obsoleted by handler::calculate_key_hash_value
   Handlers can now implement their own calculate_key_hash_value function
   or use the method defined in ha_partition.cc
 */
+#else
 
 /*
   Calculate hash value for KEY partitioning using an array of fields.
@@ -2494,13 +2497,21 @@ static int get_part_id_linear_hash(parti
 */
 
 inline
+#ifndef MCP_BUG56438
 static uint32 get_part_id_key(handler *file,
                               Field **field_array,
+#else
+static uint32 get_part_id_key(Field **field_array,
+#endif
                               uint no_parts,
                               longlong *func_value)
 {
   DBUG_ENTER("get_part_id_key");
+#ifndef MCP_BUG56438
   *func_value= file->calculate_key_hash_value(field_array);
+#else
+  *func_value= calculate_key_value(field_array);
+#endif
   DBUG_RETURN((uint32) (*func_value % no_parts));
 }
 
@@ -2527,7 +2538,11 @@ static uint32 get_part_id_linear_key(par
 {
   DBUG_ENTER("get_partition_id_linear_key");
 
+#ifndef MCP_BUG56438
   *func_value= part_info->table->file->calculate_key_hash_value(field_array);
+#else
+  *func_value= calculate_key_value(field_array);
+#endif
   DBUG_RETURN(get_part_id_from_linear_hash(*func_value,
                                            part_info->linear_hash_mask,
                                            no_parts));
@@ -3105,8 +3120,12 @@ int get_partition_id_key_nosub(partition
                                 uint32 *part_id,
                                 longlong *func_value)
 {
+#ifndef MCP_BUG56438
   *part_id= get_part_id_key(part_info->table->file,
                             part_info->part_field_array,
+#else
+  *part_id= get_part_id_key(part_info->part_field_array,
+#endif
                             part_info->no_parts, func_value);
   return 0;
 }
@@ -3200,8 +3219,12 @@ int get_partition_id_range_sub_key(parti
     DBUG_RETURN(error);
   }
   no_subparts= part_info->no_subparts;
+#ifndef MCP_BUG56438
   sub_part_id= get_part_id_key(part_info->table->file,
                                part_info->subpart_field_array,
+#else
+  sub_part_id= get_part_id_key(part_info->subpart_field_array,
+#endif
                                no_subparts, &local_func_value);
   *part_id= get_part_id_for_sub(loc_part_id, sub_part_id, no_subparts);
   DBUG_RETURN(0);
@@ -3307,8 +3330,12 @@ int get_partition_id_list_sub_key(partit
     DBUG_RETURN(error);
   }
   no_subparts= part_info->no_subparts;
+#ifndef MCP_BUG56438
   sub_part_id= get_part_id_key(part_info->table->file,
                                part_info->subpart_field_array,
+#else
+  sub_part_id= get_part_id_key(part_info->subpart_field_array,
+#endif
                                no_subparts, &local_func_value);
   *part_id= get_part_id_for_sub(loc_part_id, sub_part_id, no_subparts);
   DBUG_RETURN(0);
@@ -3386,8 +3413,12 @@ int get_partition_id_key_sub(partition_i
                              uint32 *part_id)
 {
   longlong func_value;
+#ifndef MCP_BUG56438
   *part_id= get_part_id_key(part_info->table->file,
                             part_info->subpart_field_array,
+#else
+  *part_id= get_part_id_key(part_info->subpart_field_array,
+#endif
                             part_info->no_subparts, &func_value);
   return FALSE;
 }
@@ -4034,8 +4065,12 @@ bool mysql_unpack_partition(THD *thd,
     }
   }
   table->part_info= part_info;
+#ifndef MCP_BUG56438
   part_info->table= table;
   table->file->set_part_info(part_info, TRUE);
+#else
+  table->file->set_part_info(part_info);
+#endif
   if (!part_info->default_engine_type)
     part_info->default_engine_type= default_db_type;
   DBUG_ASSERT(part_info->default_engine_type == default_db_type);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:3936 to 3937) Magnus Blåudd2 Nov