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
774cdc3c
Commit
774cdc3c
authored
Nov 17, 2009
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
e4f9bd3d
3ebb8be9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
15 deletions
+31
-15
mysql-test/r/partition.result
mysql-test/r/partition.result
+6
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+9
-0
sql/sql_partition.cc
sql/sql_partition.cc
+16
-15
No files found.
mysql-test/r/partition.result
View file @
774cdc3c
drop table if exists t1, t2;
drop table if exists t1, t2;
CREATE TABLE t1 (a INT, b INT)
PARTITION BY LIST (a)
SUBPARTITION BY HASH (b)
(PARTITION p1 VALUES IN (1));
ALTER TABLE t1 ADD COLUMN c INT;
DROP TABLE t1;
CREATE TABLE t1 (
CREATE TABLE t1 (
a int NOT NULL,
a int NOT NULL,
b int NOT NULL);
b int NOT NULL);
...
...
mysql-test/t/partition.test
View file @
774cdc3c
...
@@ -14,6 +14,15 @@
...
@@ -14,6 +14,15 @@
drop
table
if
exists
t1
,
t2
;
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
--
enable_warnings
#
# Bug#48276: can't add column if subpartition exists
CREATE
TABLE
t1
(
a
INT
,
b
INT
)
PARTITION
BY
LIST
(
a
)
SUBPARTITION
BY
HASH
(
b
)
(
PARTITION
p1
VALUES
IN
(
1
));
ALTER
TABLE
t1
ADD
COLUMN
c
INT
;
DROP
TABLE
t1
;
#
#
# Bug#46639: 1030 (HY000): Got error 124 from storage engine on
# Bug#46639: 1030 (HY000): Got error 124 from storage engine on
# INSERT ... SELECT ...
# INSERT ... SELECT ...
...
...
sql/sql_partition.cc
View file @
774cdc3c
...
@@ -196,26 +196,27 @@ bool partition_default_handling(TABLE *table, partition_info *part_info,
...
@@ -196,26 +196,27 @@ bool partition_default_handling(TABLE *table, partition_info *part_info,
{
{
DBUG_ENTER
(
"partition_default_handling"
);
DBUG_ENTER
(
"partition_default_handling"
);
if
(
part_info
->
use_default_no_partitions
)
if
(
!
is_create_table_ind
)
{
{
if
(
!
is_create_table_ind
&&
if
(
part_info
->
use_default_no_partitions
)
table
->
file
->
get_no_parts
(
normalized_path
,
&
part_info
->
no_parts
))
{
{
DBUG_RETURN
(
TRUE
);
if
(
table
->
file
->
get_no_parts
(
normalized_path
,
&
part_info
->
no_parts
))
{
DBUG_RETURN
(
TRUE
);
}
}
}
}
else
if
(
part_info
->
is_sub_partitioned
()
&&
else
if
(
part_info
->
is_sub_partitioned
()
&&
part_info
->
use_default_no_subpartitions
)
part_info
->
use_default_no_subpartitions
)
{
uint
no_parts
;
if
(
!
is_create_table_ind
&&
(
table
->
file
->
get_no_parts
(
normalized_path
,
&
no_parts
)))
{
{
DBUG_RETURN
(
TRUE
);
uint
no_parts
;
if
(
table
->
file
->
get_no_parts
(
normalized_path
,
&
no_parts
))
{
DBUG_RETURN
(
TRUE
);
}
DBUG_ASSERT
(
part_info
->
no_parts
>
0
);
DBUG_ASSERT
((
no_parts
%
part_info
->
no_parts
)
==
0
);
part_info
->
no_subparts
=
no_parts
/
part_info
->
no_parts
;
}
}
DBUG_ASSERT
(
part_info
->
no_parts
>
0
);
part_info
->
no_subparts
=
no_parts
/
part_info
->
no_parts
;
DBUG_ASSERT
((
no_parts
%
part_info
->
no_parts
)
==
0
);
}
}
part_info
->
set_up_defaults_for_partitioning
(
table
->
file
,
part_info
->
set_up_defaults_for_partitioning
(
table
->
file
,
(
ulonglong
)
0
,
(
uint
)
0
);
(
ulonglong
)
0
,
(
uint
)
0
);
...
...
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