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
b8227de1
Commit
b8227de1
authored
May 08, 2006
by
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#19140: Create index caused crash
parent
4ba1a4b3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
4 deletions
+40
-4
mysql-test/r/ndb_partition_key.result
mysql-test/r/ndb_partition_key.result
+4
-0
mysql-test/r/partition.result
mysql-test/r/partition.result
+5
-0
mysql-test/t/ndb_partition_key.test
mysql-test/t/ndb_partition_key.test
+7
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+14
-0
sql/sql_partition.cc
sql/sql_partition.cc
+2
-2
sql/sql_table.cc
sql/sql_table.cc
+8
-2
No files found.
mysql-test/r/ndb_partition_key.result
View file @
b8227de1
...
...
@@ -197,3 +197,7 @@ ENGINE=NDB
PARTITION BY KEY(c3);
ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1;
DROP TABLE t1;
CREATE TABLE t1 (a int)
PARTITION BY KEY(a)
(PARTITION p0 ENGINE = NDB);
DROP TABLE t1;
mysql-test/r/partition.result
View file @
b8227de1
...
...
@@ -886,4 +886,9 @@ s1
2
3
drop table t1;
create table t1 (a int) engine=memory
partition by key(a);
insert into t1 values (1);
create index inx1 on t1(a);
drop table t1;
End of 5.1 tests
mysql-test/t/ndb_partition_key.test
View file @
b8227de1
...
...
@@ -196,3 +196,10 @@ CREATE TABLE t1 (
ALTER
TABLE
t1
ADD
COLUMN
c4
INT
AFTER
c1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
a
int
)
PARTITION
BY
KEY
(
a
)
(
PARTITION
p0
ENGINE
=
NDB
);
DROP
TABLE
t1
;
mysql-test/t/partition.test
View file @
b8227de1
...
...
@@ -9,6 +9,11 @@
drop
table
if
exists
t1
;
--
enable_warnings
create
table
t1
(
a
int
)
partition
by
key
(
a
)
(
partition
p0
engine
=
MEMORY
);
drop
table
t1
;
#
# Partition by key no partition defined => OK
#
...
...
@@ -1009,4 +1014,13 @@ select auto_increment from information_schema.tables where table_name='t1';
select
*
from
t1
;
drop
table
t1
;
#
# BUG 19140 Partitions: Create index for partitioned table crashes
#
create
table
t1
(
a
int
)
engine
=
memory
partition
by
key
(
a
);
insert
into
t1
values
(
1
);
create
index
inx1
on
t1
(
a
);
drop
table
t1
;
--
echo
End
of
5.1
tests
sql/sql_partition.cc
View file @
b8227de1
...
...
@@ -4509,7 +4509,7 @@ the generated partition syntax in a correct manner.
if
(
alter_info
->
flags
&
ALTER_REMOVE_PARTITIONING
)
{
DBUG_PRINT
(
"info"
,
(
"Remove partitioning"
));
if
(
!
(
thd
->
lex
->
create_info
.
used_fields
&
HA_CREATE_USED_ENGINE
))
if
(
!
(
create_info
->
used_fields
&
HA_CREATE_USED_ENGINE
))
{
DBUG_PRINT
(
"info"
,
(
"No explicit engine used"
));
create_info
->
db_type
=
table
->
part_info
->
default_engine_type
;
...
...
@@ -4526,7 +4526,7 @@ the generated partition syntax in a correct manner.
beneath.
*/
thd
->
work_part_info
=
table
->
part_info
;
if
(
thd
->
lex
->
create_info
.
used_fields
&
HA_CREATE_USED_ENGINE
&&
if
(
create_info
->
used_fields
&
HA_CREATE_USED_ENGINE
&&
create_info
->
db_type
!=
table
->
part_info
->
default_engine_type
)
{
/*
...
...
sql/sql_table.cc
View file @
b8227de1
...
...
@@ -3105,8 +3105,8 @@ bool mysql_create_table_internal(THD *thd,
}
DBUG_PRINT
(
"info"
,
(
"db_type = %d"
,
ha_legacy_type
(
part_info
->
default_engine_type
)));
if
(
part_info
->
check_partition_info
(
&
engine_type
,
file
,
create_info
->
max_rows
))
if
(
part_info
->
check_partition_info
(
&
engine_type
,
file
,
create_info
->
max_rows
))
goto
err
;
part_info
->
default_engine_type
=
engine_type
;
...
...
@@ -3165,6 +3165,12 @@ bool mysql_create_table_internal(THD *thd,
}
else
if
(
create_info
->
db_type
!=
engine_type
)
{
/*
We come here when we don't use a partitioned handler.
Since we use a partitioned table it must be "native partitioned".
We have switched engine from defaults, most likely only specified
engines in partition clauses.
*/
delete
file
;
if
(
!
(
file
=
get_new_handler
((
TABLE_SHARE
*
)
0
,
thd
->
mem_root
,
engine_type
)))
{
...
...
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