Loading sql/ha_ndbcluster.cc +7 −2 Original line number Diff line number Diff line Loading @@ -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 } Loading Loading
sql/ha_ndbcluster.cc +7 −2 Original line number Diff line number Diff line Loading @@ -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 } Loading