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
7dae459d
Commit
7dae459d
authored
May 29, 2006
by
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#17310: Archive error for drop database
parent
2e6b5157
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
8 deletions
+38
-8
mysql-test/r/partition.result
mysql-test/r/partition.result
+12
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+17
-0
storage/archive/ha_archive.cc
storage/archive/ha_archive.cc
+9
-8
No files found.
mysql-test/r/partition.result
View file @
7dae459d
...
...
@@ -936,4 +936,16 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
drop table t1;
create database db99;
use db99;
create table t1 (a int not null)
engine=archive
partition by list (a)
(partition p0 values in (1), partition p1 values in (2));
insert into t1 values (1), (2);
create index inx on t1 (a);
alter table t1 add partition (partition p2 values in (3));
alter table t1 drop partition p2;
use test;
drop database db99;
End of 5.1 tests
mysql-test/t/partition.test
View file @
7dae459d
...
...
@@ -1077,4 +1077,21 @@ OPTIMIZE TABLE t1;
drop
table
t1
;
#
# Bug 17310 Partitions: Bugs with archived partitioned tables
#
create
database
db99
;
use
db99
;
create
table
t1
(
a
int
not
null
)
engine
=
archive
partition
by
list
(
a
)
(
partition
p0
values
in
(
1
),
partition
p1
values
in
(
2
));
insert
into
t1
values
(
1
),
(
2
);
--
error
0
,
1005
create
index
inx
on
t1
(
a
);
alter
table
t1
add
partition
(
partition
p2
values
in
(
3
));
alter
table
t1
drop
partition
p2
;
use
test
;
drop
database
db99
;
--
echo
End
of
5.1
tests
storage/archive/ha_archive.cc
View file @
7dae459d
...
...
@@ -701,14 +701,6 @@ int ha_archive::create(const char *name, TABLE *table_arg,
create_info
->
auto_increment_value
-
1
:
(
ulonglong
)
0
);
if
((
create_file
=
my_create
(
fn_format
(
name_buff
,
name
,
""
,
ARM
,
MY_REPLACE_EXT
|
MY_UNPACK_FILENAME
),
0
,
O_RDWR
|
O_TRUNC
,
MYF
(
MY_WME
)))
<
0
)
{
error
=
my_errno
;
goto
error
;
}
for
(
uint
key
=
0
;
key
<
table_arg
->
s
->
keys
;
key
++
)
{
KEY
*
pos
=
table_arg
->
key_info
+
key
;
...
...
@@ -722,11 +714,20 @@ int ha_archive::create(const char *name, TABLE *table_arg,
if
(
!
(
field
->
flags
&
AUTO_INCREMENT_FLAG
))
{
error
=
-
1
;
DBUG_PRINT
(
"info"
,
(
"Index error in creating archive table"
));
goto
error
;
}
}
}
if
((
create_file
=
my_create
(
fn_format
(
name_buff
,
name
,
""
,
ARM
,
MY_REPLACE_EXT
|
MY_UNPACK_FILENAME
),
0
,
O_RDWR
|
O_TRUNC
,
MYF
(
MY_WME
)))
<
0
)
{
error
=
my_errno
;
goto
error
;
}
write_meta_file
(
create_file
,
0
,
auto_increment_value
,
0
,
(
char
*
)
create_info
->
data_file_name
,
FALSE
);
...
...
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