Commit d40a8e49 authored by unknown's avatar unknown

ndb - post-merge fix 5.0 to 5.0-ndb: number of frags if --without-big-tables


sql/ha_ndbcluster.cc:
  calculate frags with (ulonglong)max_rows in case --without-big-tables
parent 7b029fa3
......@@ -4175,10 +4175,15 @@ static void ndb_set_fragmentation(NDBTAB &tab, TABLE *form, uint pk_length)
acc_row_size+= 4 + /*safety margin*/ 4;
#endif
ulonglong acc_fragment_size= 512*1024*1024;
/*
* if not --with-big-tables then max_rows is ulong
* the warning in this case is misleading though
*/
ulonglong big_max_rows = (ulonglong)max_rows;
#if MYSQL_VERSION_ID >= 50100
no_fragments= (max_rows*acc_row_size)/acc_fragment_size+1;
no_fragments= (big_max_rows*acc_row_size)/acc_fragment_size+1;
#else
no_fragments= ((max_rows*acc_row_size)/acc_fragment_size+1
no_fragments= ((big_max_rows*acc_row_size)/acc_fragment_size+1
+1/*correct rounding*/)/2;
#endif
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment