Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ef7d9429
Commit
ef7d9429
authored
Feb 07, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
parents
a2ca134d
6bbaeed5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+10
-5
No files found.
sql/ha_ndbcluster.cc
View file @
ef7d9429
...
...
@@ -3513,18 +3513,23 @@ static void ndb_set_fragmentation(NDBTAB &tab, TABLE *form, uint pk_length)
uint
no_fragments
;
{
#if MYSQL_VERSION_ID >= 50000
uint
acc_row_size
=
25
+
2
;
uint
acc_row_size
=
25
+
/*safety margin*/
2
;
#else
uint
acc_row_size
=
pk_length
*
4
;
/* add acc overhead */
if
(
pk_length
<=
8
)
acc_row_size
+=
25
+
2
;
/* main page will set the limit */
else
acc_row_size
+=
4
+
4
;
/* overflow page will set the limit */
if
(
pk_length
<=
8
)
/* main page will set the limit */
acc_row_size
+=
25
+
/*safety margin*/
2
;
else
/* overflow page will set the limit */
acc_row_size
+=
4
+
/*safety margin*/
4
;
#endif
ulonglong
acc_fragment_size
=
512
*
1024
*
1024
;
ulonglong
max_rows
=
form
->
max_rows
;
#if MYSQL_VERSION_ID >= 50100
no_fragments
=
(
max_rows
*
acc_row_size
)
/
acc_fragment_size
+
1
;
#else
no_fragments
=
((
max_rows
*
acc_row_size
)
/
acc_fragment_size
+
1
+
1
/*correct rounding*/
)
/
2
;
#endif
}
{
uint
no_nodes
=
g_ndb_cluster_connection
->
no_db_nodes
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment