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
63e59592
Commit
63e59592
authored
Jan 11, 2007
by
gluh@mysql.com/eagle.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merge fix
parent
42e49682
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
sql/sql_base.cc
sql/sql_base.cc
+14
-11
No files found.
sql/sql_base.cc
View file @
63e59592
...
...
@@ -6076,7 +6076,7 @@ my_bool mysql_rm_tmp_tables(void)
char
filePath
[
FN_REFLEN
],
*
tmpdir
,
filePathCopy
[
FN_REFLEN
];
MY_DIR
*
dirp
;
FILEINFO
*
file
;
TABLE
tmp_tabl
e
;
TABLE
_SHARE
shar
e
;
THD
*
thd
;
DBUG_ENTER
(
"mysql_rm_tmp_tables"
);
...
...
@@ -6108,21 +6108,24 @@ my_bool mysql_rm_tmp_tables(void)
char
*
ext
=
fn_ext
(
file
->
name
);
uint
ext_len
=
strlen
(
ext
);
uint
filePath_len
=
my_snprintf
(
filePath
,
sizeof
(
filePath
),
"%s%c%s"
,
FN_LIBCHAR
,
tmpdir
,
"%s%c%s"
,
tmpdir
,
FN_LIBCHAR
,
file
->
name
);
if
(
!
bcmp
(
reg_ext
,
ext
,
ext_len
))
{
TABLE
tmp_table
;
if
(
!
openfrm
(
thd
,
filePath
,
"tmp_table"
,
(
uint
)
0
,
READ_KEYINFO
|
COMPUTE_TYPES
|
EXTRA_RECORD
,
0
,
&
tmp_table
))
handler
*
handler_file
=
0
;
/* We should cut file extention before deleting of table */
memcpy
(
filePathCopy
,
filePath
,
filePath_len
-
ext_len
);
filePathCopy
[
filePath_len
-
ext_len
]
=
0
;
init_tmp_table_share
(
&
share
,
""
,
0
,
""
,
filePathCopy
);
if
(
!
open_table_def
(
thd
,
&
share
,
0
)
&&
((
handler_file
=
get_new_handler
(
&
share
,
thd
->
mem_root
,
share
.
db_type
))))
{
/* We should cut file extention before deleting of table */
memcpy
(
filePathCopy
,
filePath
,
filePath_len
-
ext_len
);
filePathCopy
[
filePath_len
-
ext_len
]
=
0
;
tmp_table
.
file
->
delete_table
(
filePathCopy
);
closefrm
(
&
tmp_table
);
handler_file
->
delete_table
(
filePathCopy
);
delete
handler_file
;
}
free_table_share
(
&
share
);
}
}
/*
File can be already deleted by tmp_table.file->delete_table().
...
...
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