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
53040a07
Commit
53040a07
authored
Feb 07, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
parents
30ddc47a
96721c40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+1
-0
sql/sql_partition.cc
sql/sql_partition.cc
+14
-8
No files found.
sql/ha_ndbcluster.cc
View file @
53040a07
...
@@ -9592,6 +9592,7 @@ bool ha_ndbcluster::get_no_parts(const char *name, uint *no_parts)
...
@@ -9592,6 +9592,7 @@ bool ha_ndbcluster::get_no_parts(const char *name, uint *no_parts)
break
;
break
;
}
}
ndb
=
get_ndb
();
ndb
=
get_ndb
();
ndb
->
setDatabaseName
(
m_dbname
);
dict
=
ndb
->
getDictionary
();
dict
=
ndb
->
getDictionary
();
if
(
!
(
tab
=
dict
->
getTable
(
m_tabname
)))
if
(
!
(
tab
=
dict
->
getTable
(
m_tabname
)))
ERR_BREAK
(
dict
->
getNdbError
(),
err
);
ERR_BREAK
(
dict
->
getNdbError
(),
err
);
...
...
sql/sql_partition.cc
View file @
53040a07
...
@@ -250,14 +250,14 @@ char *are_partitions_in_table(partition_info *new_part_info,
...
@@ -250,14 +250,14 @@ char *are_partitions_in_table(partition_info *new_part_info,
FALSE Success
FALSE Success
*/
*/
bool
partition_default_handling
(
TABLE
*
table
,
partition_info
*
part_info
)
bool
partition_default_handling
(
TABLE
*
table
,
partition_info
*
part_info
,
const
char
*
normalized_path
)
{
{
DBUG_ENTER
(
"partition_default_handling"
);
DBUG_ENTER
(
"partition_default_handling"
);
if
(
part_info
->
use_default_no_partitions
)
if
(
part_info
->
use_default_no_partitions
)
{
{
if
(
table
->
file
->
get_no_parts
(
table
->
s
->
normalized_path
.
str
,
if
(
table
->
file
->
get_no_parts
(
normalized_path
,
&
part_info
->
no_parts
))
&
part_info
->
no_parts
))
{
{
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
...
@@ -266,8 +266,7 @@ bool partition_default_handling(TABLE *table, partition_info *part_info)
...
@@ -266,8 +266,7 @@ bool partition_default_handling(TABLE *table, partition_info *part_info)
part_info
->
use_default_no_subpartitions
)
part_info
->
use_default_no_subpartitions
)
{
{
uint
no_parts
;
uint
no_parts
;
if
(
table
->
file
->
get_no_parts
(
table
->
s
->
normalized_path
.
str
,
if
(
table
->
file
->
get_no_parts
(
normalized_path
,
&
no_parts
))
&
no_parts
))
{
{
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
...
@@ -2005,7 +2004,8 @@ bool fix_partition_func(THD *thd, const char* name, TABLE *table,
...
@@ -2005,7 +2004,8 @@ bool fix_partition_func(THD *thd, const char* name, TABLE *table,
if
(
!
is_create_table_ind
)
if
(
!
is_create_table_ind
)
{
{
if
(
partition_default_handling
(
table
,
part_info
))
if
(
partition_default_handling
(
table
,
part_info
,
table
->
s
->
normalized_path
.
str
))
{
{
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
...
@@ -3901,9 +3901,15 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
...
@@ -3901,9 +3901,15 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
old_lex->name contains the t2 and the table we are opening has
old_lex->name contains the t2 and the table we are opening has
name t1.
name t1.
*/
*/
if
(
partition_default_handling
(
table
,
part_info
))
Table_ident
*
table_ident
=
(
Table_ident
*
)
old_lex
->
name
;
char
*
src_db
=
table_ident
->
db
.
str
?
table_ident
->
db
.
str
:
thd
->
db
;
char
*
src_table
=
table_ident
->
table
.
str
;
char
buf
[
FN_REFLEN
];
build_table_filename
(
buf
,
sizeof
(
buf
),
src_db
,
src_table
,
""
);
if
(
partition_default_handling
(
table
,
part_info
,
buf
))
{
{
DBUG_RETURN
(
TRUE
);
result
=
TRUE
;
goto
end
;
}
}
}
}
else
else
...
...
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