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
6dcad7d8
Commit
6dcad7d8
authored
Jan 12, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function mysql_rm_tmp_tables():
fixed valgrind error fixed indentation
parent
71fd4583
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
sql/sql_base.cc
sql/sql_base.cc
+26
-26
No files found.
sql/sql_base.cc
View file @
6dcad7d8
...
@@ -6103,36 +6103,36 @@ my_bool mysql_rm_tmp_tables(void)
...
@@ -6103,36 +6103,36 @@ my_bool mysql_rm_tmp_tables(void)
(
file
->
name
[
1
]
==
'.'
&&
!
file
->
name
[
2
])))
(
file
->
name
[
1
]
==
'.'
&&
!
file
->
name
[
2
])))
continue
;
continue
;
if
(
!
bcmp
(
file
->
name
,
tmp_file_prefix
,
tmp_file_prefix_length
))
if
(
!
bcmp
(
file
->
name
,
tmp_file_prefix
,
tmp_file_prefix_length
))
{
char
*
ext
=
fn_ext
(
file
->
name
);
uint
ext_len
=
strlen
(
ext
);
uint
filePath_len
=
my_snprintf
(
filePath
,
sizeof
(
filePath
),
"%s%c%s"
,
tmpdir
,
FN_LIBCHAR
,
file
->
name
);
if
(
!
bcmp
(
reg_ext
,
ext
,
ext_len
))
{
{
handler
*
handler_file
=
0
;
char
*
ext
=
fn_ext
(
file
->
name
);
/* We should cut file extention before deleting of table */
uint
ext_len
=
strlen
(
ext
);
memcpy
(
filePathCopy
,
filePath
,
filePath_len
-
ext_len
);
uint
filePath_len
=
my_snprintf
(
filePath
,
sizeof
(
filePath
),
filePathCopy
[
filePath_len
-
ext_len
]
=
0
;
"%s%c%s"
,
tmpdir
,
FN_LIBCHAR
,
init_tmp_table_share
(
&
share
,
""
,
0
,
""
,
filePathCopy
);
file
->
name
);
if
(
!
open_table_def
(
thd
,
&
share
,
0
)
&&
if
(
!
bcmp
(
reg_ext
,
ext
,
ext_len
))
((
handler_file
=
get_new_handler
(
&
share
,
thd
->
mem_root
,
share
.
db_type
))))
{
{
handler_file
->
delete_table
(
filePathCopy
);
handler
*
handler_file
=
0
;
delete
handler_file
;
/* 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
))))
{
handler_file
->
delete_table
(
filePathCopy
);
delete
handler_file
;
}
free_table_share
(
&
share
);
}
}
free_table_share
(
&
share
);
/*
}
File can be already deleted by tmp_table.file->delete_table().
So we hide error messages which happnes during deleting of these
files(MYF(0)).
*/
VOID
(
my_delete
(
filePath
,
MYF
(
0
)));
}
}
/*
File can be already deleted by tmp_table.file->delete_table().
So we hide error messages which happnes during deleting of these
files(MYF(0)).
*/
VOID
(
my_delete
(
filePath
,
MYF
(
0
)));
}
}
my_dirend
(
dirp
);
my_dirend
(
dirp
);
}
}
...
...
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