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
d7511181
Commit
d7511181
authored
Apr 04, 2010
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the result of a bad merge in storage/myisam/mi_delete_table.c in mysql-trunk-merge.
parent
cab4a776
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
48 deletions
+12
-48
storage/myisam/mi_delete_table.c
storage/myisam/mi_delete_table.c
+12
-48
No files found.
storage/myisam/mi_delete_table.c
View file @
d7511181
...
...
@@ -19,41 +19,6 @@
#include "fulltext.h"
/**
Remove MyISAM data/index file safely
@details
If name is a symlink and file it is pointing to is not in
data directory, file is also removed.
@param name file to remove
@returns
0 on success or my_errno on failure
*/
static
int
_mi_safe_delete_file
(
const
char
*
name
)
{
DBUG_ENTER
(
"_mi_safe_delete_file"
);
if
(
my_is_symlink
(
name
)
&&
(
*
myisam_test_invalid_symlink
)(
name
))
{
/*
Symlink is pointing to file in data directory.
Remove symlink, keep file.
*/
if
(
my_delete
(
name
,
MYF
(
MY_WME
)))
DBUG_RETURN
(
my_errno
);
}
else
{
if
(
my_delete_with_symlink
(
name
,
MYF
(
MY_WME
)))
DBUG_RETURN
(
my_errno
);
}
DBUG_RETURN
(
0
);
}
int
mi_delete_table
(
const
char
*
name
)
{
char
from
[
FN_REFLEN
];
...
...
@@ -107,25 +72,24 @@ int mi_delete_table(const char *name)
if
(
mysql_file_delete_with_symlink
(
mi_key_file_kfile
,
from
,
MYF
(
MY_WME
)))
DBUG_RETURN
(
my_errno
);
}
DBUG_RETURN
(
my_errno
);
fn_format
(
from
,
name
,
""
,
MI_NAME_DEXT
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
#ifdef USE_RAID
if
(
raid_type
)
DBUG_RETURN
(
my_raid_delete
(
from
,
raid_chunks
,
MYF
(
MY_WME
))
?
my_errno
:
0
);
#endif
if
(
my_is_symlink
(
from
)
&&
(
*
myisam_test_invalid_symlink
)(
from
))
{
/*
Symlink is pointing to file in data directory.
Remove symlink, keep file.
*/
if
(
mysql_file_delete
(
mi_key_file_dfile
,
from
,
MYF
(
MY_WME
)))
DBUG_RETURN
(
my_errno
);
}
{
/*
Symlink is pointing to file in data directory.
Remove symlink, keep file.
*/
if
(
mysql_file_delete
(
mi_key_file_dfile
,
from
,
MYF
(
MY_WME
)))
DBUG_RETURN
(
my_errno
);
}
else
{
if
(
mysql_file_delete_with_symlink
(
mi_key_file_dfile
,
from
,
MYF
(
MY_WME
)))
DBUG_RETURN
(
my_errno
);
}
{
if
(
mysql_file_delete_with_symlink
(
mi_key_file_dfile
,
from
,
MYF
(
MY_WME
)))
DBUG_RETURN
(
my_errno
);
}
DBUG_RETURN
(
0
);
}
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