summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2006-06-27 14:31:34 +0200
committerunknown <tomas@poseidon.ndb.mysql.com>2006-06-27 14:31:34 +0200
commitd4cb502ce7e75df028243a4f01e3dab24a1a3e10 (patch)
tree5b6b3ae948fd87b42b603db64363c58b8a245b4d /sql/ha_ndbcluster.cc
parent39fa14dd7d0619278d01565a964323120d3ac606 (diff)
downloadmariadb-git-d4cb502ce7e75df028243a4f01e3dab24a1a3e10.tar.gz
changed signature of get_default_no_partitions
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 5e4b65f766e..b46a5971666 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -9590,8 +9590,12 @@ ndbcluster_show_status(THD* thd, stat_print_fn *stat_print,
/*
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 @@ static bool adjusted_frag_count(uint no_fragments, uint no_nodes,
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))
{