summaryrefslogtreecommitdiff
path: root/sql/examples
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com/june.mysql.com>2007-03-30 13:00:21 +0500
committerunknown <svoj@mysql.com/june.mysql.com>2007-03-30 13:00:21 +0500
commit0da1a0cdecd77d98c4e849030a2efa9774c5f536 (patch)
tree5b389c352c3cde60ec4de181522882af5dd2b654 /sql/examples
parent817a474c3d767cd9c91cfe2b4240e775a7aa33af (diff)
downloadmariadb-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 'sql/examples')
-rw-r--r--sql/examples/ha_example.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/examples/ha_example.cc b/sql/examples/ha_example.cc
index 19c686ee495..d59ada3b445 100644
--- a/sql/examples/ha_example.cc
+++ b/sql/examples/ha_example.cc
@@ -211,6 +211,12 @@ ha_example::ha_example(TABLE *table_arg)
If frm_error() is called then we will use this to to find out what file extentions
exist for the storage engine. This is also used by the default rename_table and
delete_table method in handler.cc.
+
+ For engines that have two file name extentions (separate meta/index file
+ and data file), the order of elements is relevant. First element of engine
+ file name extentions array should be meta/index file extention. Second
+ element - data file extention. This order is assumed by
+ prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued.
*/
static const char *ha_example_exts[] = {
NullS