MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:tomas Date:June 27 2006 12:31pm
Subject:bk commit into 5.1 tree (tomas:1.2224)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2224 06/06/27 14:31:34 tomas@stripped +3 -0
  changed signature of get_default_no_partitions

  sql/handler.h
    1.220 06/06/27 14:31:26 tomas@stripped +1 -1
    changed signature of get_default_no_partitions

  sql/ha_ndbcluster.h
    1.144 06/06/27 14:31:26 tomas@stripped +1 -1
    changed signature of get_default_no_partitions

  sql/ha_ndbcluster.cc
    1.339 06/06/27 14:31:26 tomas@stripped +7 -3
    changed signature of get_default_no_partitions

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new-ndb

--- 1.219/sql/handler.h	2006-06-23 02:21:08 +02:00
+++ 1.220/sql/handler.h	2006-06-27 14:31:26 +02:00
@@ -1335,7 +1335,7 @@
   virtual const char *table_type() const =0;
   virtual const char **bas_ext() const =0;
 
-  virtual int get_default_no_partitions(ulonglong max_rows) { return 1;}
+  virtual int get_default_no_partitions(TABLE_SHARE *) { return 1;}
   virtual void set_auto_partitions(partition_info *part_info) { return; }
   virtual bool get_no_parts(const char *name,
                             uint *no_parts)

--- 1.338/sql/ha_ndbcluster.cc	2006-06-27 11:30:16 +02:00
+++ 1.339/sql/ha_ndbcluster.cc	2006-06-27 14:31:26 +02:00
@@ -9590,8 +9590,12 @@
 /*
   Create a table in NDB Cluster
  */
-static uint get_no_fragments(ulonglong max_rows)
+static uint get_no_fragments(TABLE_SHARE *table_share)
 {
+  ha_rows max_rows= table_share->max_rows;
+  ha_rows min_rows= table_share->min_rows;
+  if (max_rows < min_rows)
+    max_rows= min_rows;
 #if MYSQL_VERSION_ID >= 50000
   uint acc_row_size= 25 + /*safety margin*/ 2;
 #else
@@ -9628,10 +9632,10 @@
   return (reported_frags < no_fragments);
 }
 
-int ha_ndbcluster::get_default_no_partitions(ulonglong max_rows)
+int ha_ndbcluster::get_default_no_partitions(TABLE_SHARE *table_share)
 {
   uint reported_frags;
-  uint no_fragments= get_no_fragments(max_rows);
+  uint no_fragments= get_no_fragments(table_share);
   uint no_nodes= g_ndb_cluster_connection->no_db_nodes();
   if (adjusted_frag_count(no_fragments, no_nodes, reported_frags))
   {

--- 1.143/sql/ha_ndbcluster.h	2006-06-23 01:49:15 +02:00
+++ 1.144/sql/ha_ndbcluster.h	2006-06-27 14:31:26 +02:00
@@ -651,7 +651,7 @@
   int create(const char *name, TABLE *form, HA_CREATE_INFO *info);
   int create_handler_files(const char *file, const char *old_name,
                            int action_flag, HA_CREATE_INFO *info);
-  int get_default_no_partitions(ulonglong max_rows);
+  int get_default_no_partitions(TABLE_SHARE *);
   bool get_no_parts(const char *name, uint *no_parts);
   void set_auto_partitions(partition_info *part_info);
 
Thread
bk commit into 5.1 tree (tomas:1.2224)tomas27 Jun