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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b32237c3
Commit
b32237c3
authored
May 04, 2006
by
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG 19062: CREATE TABLE ... PARTITION BY ... AS SELECT don't create partitioned table
parent
4ba1a4b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
9 deletions
+30
-9
mysql-test/r/partition.result
mysql-test/r/partition.result
+9
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+10
-0
sql/sql_parse.cc
sql/sql_parse.cc
+11
-9
No files found.
mysql-test/r/partition.result
View file @
b32237c3
...
@@ -886,4 +886,13 @@ s1
...
@@ -886,4 +886,13 @@ s1
2
2
3
3
drop table t1;
drop table t1;
create table t1 (a varchar(1))
partition by key (a)
as select 'a';
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a)
drop table t1;
End of 5.1 tests
End of 5.1 tests
mysql-test/t/partition.test
View file @
b32237c3
...
@@ -1009,4 +1009,14 @@ select auto_increment from information_schema.tables where table_name='t1';
...
@@ -1009,4 +1009,14 @@ select auto_increment from information_schema.tables where table_name='t1';
select
*
from
t1
;
select
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# BUG 19062 Partition clause ignored if CREATE TABLE ... AS SELECT ...;
#
create
table
t1
(
a
varchar
(
1
))
partition
by
key
(
a
)
as
select
'a'
;
show
create
table
t1
;
drop
table
t1
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
sql/sql_parse.cc
View file @
b32237c3
...
@@ -2855,6 +2855,17 @@ mysql_execute_command(THD *thd)
...
@@ -2855,6 +2855,17 @@ mysql_execute_command(THD *thd)
res
=
1
;
res
=
1
;
goto
end_with_restore_list
;
goto
end_with_restore_list
;
}
}
#ifdef WITH_PARTITION_STORAGE_ENGINE
{
partition_info
*
part_info
=
thd
->
lex
->
part_info
;
if
(
part_info
&&
!
(
part_info
=
thd
->
lex
->
part_info
->
get_clone
()))
{
res
=
-
1
;
goto
end_with_restore_list
;
}
thd
->
work_part_info
=
part_info
;
}
#endif
if
(
select_lex
->
item_list
.
elements
)
// With select
if
(
select_lex
->
item_list
.
elements
)
// With select
{
{
select_result
*
result
;
select_result
*
result
;
...
@@ -2924,15 +2935,6 @@ mysql_execute_command(THD *thd)
...
@@ -2924,15 +2935,6 @@ mysql_execute_command(THD *thd)
lex
->
like_name
);
lex
->
like_name
);
else
else
{
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
partition_info
*
part_info
=
thd
->
lex
->
part_info
;
if
(
part_info
&&
!
(
part_info
=
thd
->
lex
->
part_info
->
get_clone
()))
{
res
=
-
1
;
goto
end_with_restore_list
;
}
thd
->
work_part_info
=
part_info
;
#endif
res
=
mysql_create_table
(
thd
,
create_table
->
db
,
res
=
mysql_create_table
(
thd
,
create_table
->
db
,
create_table
->
table_name
,
&
lex
->
create_info
,
create_table
->
table_name
,
&
lex
->
create_info
,
lex
->
create_list
,
lex
->
create_list
,
...
...
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