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
51710387
Commit
51710387
authored
Mar 31, 2007
by
svoj@april.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/svoj/devel/bk/mysql-5.0-engines
into mysql.com:/home/svoj/devel/mysql/BUG26138/mysql-5.1-engines
parents
b8e0d349
f297b5d8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
1 deletion
+40
-1
mysql-test/r/archive.result
mysql-test/r/archive.result
+10
-0
mysql-test/t/archive.test
mysql-test/t/archive.test
+10
-0
sql/handler.h
sql/handler.h
+11
-0
sql/sql_table.cc
sql/sql_table.cc
+3
-1
storage/example/ha_example.cc
storage/example/ha_example.cc
+6
-0
No files found.
mysql-test/r/archive.result
View file @
51710387
...
...
@@ -12666,3 +12666,13 @@ t6 CREATE TABLE `t6` (
KEY `a` (`a`)
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
DROP TABLE t1, t2, t4, t5, t6;
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;
mysql-test/t/archive.test
View file @
51710387
...
...
@@ -1540,3 +1540,13 @@ SHOW CREATE TABLE t6;
--
disable_warnings
DROP
TABLE
t1
,
t2
,
t4
,
t5
,
t6
;
--
enable_warnings
#
# 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
;
sql/handler.h
View file @
51710387
...
...
@@ -1472,6 +1472,17 @@ class handler :public Sql_alloc
virtual
void
free_foreign_key_create_info
(
char
*
str
)
{}
/* The following can be called without an open handler */
virtual
const
char
*
table_type
()
const
=
0
;
/*
If frm_error() is called then we will use this 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.
*/
virtual
const
char
**
bas_ext
()
const
=
0
;
virtual
int
get_default_no_partitions
(
HA_CREATE_INFO
*
info
)
{
return
1
;}
...
...
sql/sql_table.cc
View file @
51710387
...
...
@@ -3938,7 +3938,9 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
/*
Check if this is a table type that stores index and data separately,
like ISAM or MyISAM
like ISAM or MyISAM. We assume fixed order of engine file name
extentions array. First element of engine file name extentions array
is meta/index file extention. Second element - data file extention.
*/
ext
=
table
->
file
->
bas_ext
();
if
(
!
ext
[
0
]
||
!
ext
[
1
])
...
...
storage/example/ha_example.cc
View file @
51710387
...
...
@@ -247,6 +247,12 @@ ha_example::ha_example(handlerton *hton, TABLE_SHARE *table_arg)
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.
@see
rename_table method in handler.cc and
delete_table method in handler.cc
...
...
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