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
3f24cf2d
Commit
3f24cf2d
authored
Nov 10, 2015
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't delete non existing .TMD and .OLD files for Aria internal temporary tables
(Simple speedup)
parent
65151e0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+1
-1
storage/maria/ma_delete_table.c
storage/maria/ma_delete_table.c
+9
-6
storage/maria/maria_def.h
storage/maria/maria_def.h
+2
-1
No files found.
storage/maria/ha_maria.cc
View file @
3f24cf2d
...
...
@@ -2655,7 +2655,7 @@ void ha_maria::drop_table(const char *name)
{
DBUG_ASSERT
(
file
->
s
->
temporary
);
(
void
)
ha_close
();
(
void
)
maria_delete_table_files
(
name
,
0
);
(
void
)
maria_delete_table_files
(
name
,
1
,
0
);
}
...
...
storage/maria/ma_delete_table.c
View file @
3f24cf2d
...
...
@@ -78,11 +78,11 @@ int maria_delete_table(const char *name)
DBUG_RETURN
(
1
);
}
DBUG_RETURN
(
maria_delete_table_files
(
name
,
sync_dir
));
DBUG_RETURN
(
maria_delete_table_files
(
name
,
0
,
sync_dir
));
}
int
maria_delete_table_files
(
const
char
*
name
,
myf
sync_dir
)
int
maria_delete_table_files
(
const
char
*
name
,
my
_bool
temporary
,
my
f
sync_dir
)
{
char
from
[
FN_REFLEN
];
DBUG_ENTER
(
"maria_delete_table_files"
);
...
...
@@ -97,9 +97,12 @@ int maria_delete_table_files(const char *name, myf sync_dir)
DBUG_RETURN
(
my_errno
);
// optional files from maria_pack:
fn_format
(
from
,
name
,
""
,
".TMD"
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
mysql_file_delete_with_symlink
(
key_file_dfile
,
from
,
MYF
(
0
));
fn_format
(
from
,
name
,
""
,
".OLD"
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
mysql_file_delete_with_symlink
(
key_file_dfile
,
from
,
MYF
(
0
));
if
(
!
temporary
)
{
fn_format
(
from
,
name
,
""
,
".TMD"
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
mysql_file_delete_with_symlink
(
key_file_dfile
,
from
,
MYF
(
0
));
fn_format
(
from
,
name
,
""
,
".OLD"
,
MY_UNPACK_FILENAME
|
MY_APPEND_EXT
);
mysql_file_delete_with_symlink
(
key_file_dfile
,
from
,
MYF
(
0
));
}
DBUG_RETURN
(
0
);
}
storage/maria/maria_def.h
View file @
3f24cf2d
...
...
@@ -1351,7 +1351,8 @@ void _ma_remap_file(MARIA_HA *info, my_off_t size);
MARIA_RECORD_POS
_ma_write_init_default
(
MARIA_HA
*
info
,
const
uchar
*
record
);
my_bool
_ma_write_abort_default
(
MARIA_HA
*
info
);
int
maria_delete_table_files
(
const
char
*
name
,
myf
sync_dir
);
int
maria_delete_table_files
(
const
char
*
name
,
my_bool
temporary
,
myf
sync_dir
);
/*
This cannot be in my_base.h as it clashes with HA_SPATIAL.
...
...
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