diff options
author | unknown <svoj@mysql.com/june.mysql.com> | 2007-03-30 13:00:21 +0500 |
---|---|---|
committer | unknown <svoj@mysql.com/june.mysql.com> | 2007-03-30 13:00:21 +0500 |
commit | 0da1a0cdecd77d98c4e849030a2efa9774c5f536 (patch) | |
tree | 5b389c352c3cde60ec4de181522882af5dd2b654 /mysql-test | |
parent | 817a474c3d767cd9c91cfe2b4240e775a7aa33af (diff) | |
download | mariadb-git-0da1a0cdecd77d98c4e849030a2efa9774c5f536.tar.gz |
BUG#26138 - REPAIR TABLE with option USE_FRM erases all records in
ARCHIVE table
ARCHIVE table was truncated by REPAIR TABLE ... USE_FRM statement.
The table handler returned its file name extensions in a wrong order.
REPAIR TABLE believed it has to use the meta file to create a new table
from it.
With the fixed order, REPAIR TABLE does now use the data file to create
a new table. So REPAIR TABLE ... USE_FRM works well with ARCHIVE engine
now.
This issue affects 5.0 only, since in 5.1 ARCHIVE engine stores meta
information and data in the same file.
mysql-test/r/archive.result:
A test case for bug#26138.
mysql-test/t/archive.test:
A test case for bug#26138.
sql/examples/ha_example.cc:
Added a comment.
sql/ha_archive.cc:
First element of engine file name extentions array should be meta/index
file extention. Second element - data file extention. This is true
for engines that have separate meta/index file and data file.
Reoder ha_archive_exts elements to meet described above requirement.
sql/handler.h:
Added a comment.
sql/sql_table.cc:
Added a comment.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/archive.result | 9 | ||||
-rw-r--r-- | mysql-test/t/archive.test | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index f73a80dde65..d89cecedcdd 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12355,3 +12355,12 @@ auto fld1 companynr fld3 fld4 fld5 4 011403 37 intercepted audiology tinily 4 011403 37 intercepted audiology tinily drop table t1, t2, t4; +create table t1 (i int) engine=archive; +insert into t1 values (1); +repair table t1 use_frm; +Table Op Msg_type Msg_text +test.t1 repair status OK +select * from t1; +i +1 +drop table t1; diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 80533f21311..0ffbfab3d4f 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1364,3 +1364,13 @@ SELECT * from t2; drop table t1, t2, t4; + +# +# BUG#26138 - REPAIR TABLE with option USE_FRM erases all records in ARCHIVE +# table +# +create table t1 (i int) engine=archive; +insert into t1 values (1); +repair table t1 use_frm; +select * from t1; +drop table t1; |