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
231c0eb7
Commit
231c0eb7
authored
Mar 02, 2023
by
Weijun Huang
Committed by
Daniel Black
Mar 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-23000: Ensure we get a warning from THD::drop_temporary_table() in case of disk errors
parent
1e58b8af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
sql/sql_class.h
sql/sql_class.h
+1
-1
sql/temporary_tables.cc
sql/temporary_tables.cc
+7
-6
No files found.
sql/sql_class.h
View file @
231c0eb7
...
...
@@ -5050,7 +5050,7 @@ class THD: public THD_count, /* this must be first */
bool
use_temporary_table
(
TABLE
*
table
,
TABLE
**
out_table
);
void
close_temporary_table
(
TABLE
*
table
);
bool
log_events_and_free_tmp_shares
();
void
free_tmp_table_share
(
TMP_TABLE_SHARE
*
share
,
bool
delete_table
);
bool
free_tmp_table_share
(
TMP_TABLE_SHARE
*
share
,
bool
delete_table
);
void
free_temporary_table
(
TABLE
*
table
);
bool
lock_temporary_tables
();
void
unlock_temporary_tables
();
...
...
sql/temporary_tables.cc
View file @
231c0eb7
...
...
@@ -670,7 +670,7 @@ bool THD::drop_temporary_table(TABLE *table, bool *is_trans, bool delete_table)
temporary_tables
->
remove
(
share
);
/* Free the TABLE_SHARE and/or delete the files. */
free_tmp_table_share
(
share
,
delete_table
);
result
=
free_tmp_table_share
(
share
,
delete_table
);
end:
if
(
locked
)
...
...
@@ -1455,20 +1455,21 @@ bool THD::log_events_and_free_tmp_shares()
@param share [IN] TABLE_SHARE to free
@param delete_table [IN] Whether to delete the table files?
@return void
@return false Success
true Error
*/
void
THD
::
free_tmp_table_share
(
TMP_TABLE_SHARE
*
share
,
bool
delete_table
)
bool
THD
::
free_tmp_table_share
(
TMP_TABLE_SHARE
*
share
,
bool
delete_table
)
{
bool
error
=
false
;
DBUG_ENTER
(
"THD::free_tmp_table_share"
);
if
(
delete_table
)
{
rm_temporary_table
(
share
->
db_type
(),
share
->
path
.
str
);
error
=
rm_temporary_table
(
share
->
db_type
(),
share
->
path
.
str
);
}
free_table_share
(
share
);
my_free
(
share
);
DBUG_VOID_RETURN
;
DBUG_RETURN
(
error
);
}
...
...
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