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
b2596464
Commit
b2596464
authored
Feb 03, 2012
by
Ashish Agarwal
Browse files
Options
Browse Files
Download
Plain Diff
BUG#11748748: Merge from mysql-5.1 to mysql-5.5
parents
0a17a350
cfcb5dab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
storage/archive/ha_archive.cc
storage/archive/ha_archive.cc
+6
-0
No files found.
storage/archive/ha_archive.cc
View file @
b2596464
...
...
@@ -1394,6 +1394,7 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
char
writer_filename
[
FN_REFLEN
];
DBUG_ENTER
(
"ha_archive::optimize"
);
mysql_mutex_lock
(
&
share
->
mutex
);
init_archive_reader
();
// now we close both our writer and our reader for the rename
...
...
@@ -1408,7 +1409,10 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
MY_REPLACE_EXT
|
MY_UNPACK_FILENAME
);
if
(
!
(
azopen
(
&
writer
,
writer_filename
,
O_CREAT
|
O_RDWR
|
O_BINARY
)))
{
mysql_mutex_unlock
(
&
share
->
mutex
);
DBUG_RETURN
(
HA_ERR_CRASHED_ON_USAGE
);
}
/*
Transfer the embedded FRM so that the file can be discoverable.
...
...
@@ -1494,10 +1498,12 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
rc
=
my_rename
(
writer_filename
,
share
->
data_file_name
,
MYF
(
0
));
mysql_mutex_unlock
(
&
share
->
mutex
);
DBUG_RETURN
(
rc
);
error:
DBUG_PRINT
(
"ha_archive"
,
(
"Failed to recover, error was %d"
,
rc
));
azclose
(
&
writer
);
mysql_mutex_unlock
(
&
share
->
mutex
);
DBUG_RETURN
(
rc
);
}
...
...
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