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
d4cb502c
Commit
d4cb502c
authored
Jun 27, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed signature of get_default_no_partitions
parent
39fa14dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+7
-3
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+1
-1
sql/handler.h
sql/handler.h
+1
-1
No files found.
sql/ha_ndbcluster.cc
View file @
d4cb502c
...
...
@@ -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
))
{
...
...
sql/ha_ndbcluster.h
View file @
d4cb502c
...
...
@@ -651,7 +651,7 @@ class ha_ndbcluster: public handler
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
);
...
...
sql/handler.h
View file @
d4cb502c
...
...
@@ -1335,7 +1335,7 @@ public:
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
)
...
...
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