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
7e31cfda
Commit
7e31cfda
authored
Sep 03, 2021
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Errors from failed drop tables where ignored by atomic ddl.
parent
40ae9c5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
sql/ddl_log.cc
sql/ddl_log.cc
+11
-5
No files found.
sql/ddl_log.cc
View file @
7e31cfda
...
...
@@ -910,9 +910,10 @@ class ddl_log_error_handler : public Internal_error_handler
int
handled_errors
;
int
unhandled_errors
;
int
first_error
;
bool
only_ignore_non_existing_errors
;
ddl_log_error_handler
()
:
handled_errors
(
0
),
unhandled_errors
(
0
),
first_error
(
0
)
first_error
(
0
)
,
only_ignore_non_existing_errors
(
0
)
{}
bool
handle_condition
(
THD
*
thd
,
...
...
@@ -923,8 +924,10 @@ class ddl_log_error_handler : public Internal_error_handler
Sql_condition
**
cond_hdl
)
{
*
cond_hdl
=
NULL
;
if
(
non_existing_table_error
(
sql_errno
)
||
sql_errno
==
EE_LINK
||
sql_errno
==
EE_DELETE
||
sql_errno
==
ER_TRG_NO_DEFINER
)
if
(
non_existing_table_error
(
sql_errno
)
||
(
!
only_ignore_non_existing_errors
&&
(
sql_errno
==
EE_LINK
||
sql_errno
==
EE_DELETE
||
sql_errno
==
ER_TRG_NO_DEFINER
)))
{
handled_errors
++
;
return
TRUE
;
...
...
@@ -936,7 +939,6 @@ class ddl_log_error_handler : public Internal_error_handler
unhandled_errors
++
;
return
FALSE
;
}
bool
safely_trapped_errors
()
{
return
(
handled_errors
>
0
&&
unhandled_errors
==
0
);
...
...
@@ -1537,7 +1539,10 @@ static int ddl_log_execute_action(THD *thd, MEM_ROOT *mem_root,
case
DDL_DROP_PHASE_TABLE
:
if
(
hton
)
{
if
((
error
=
hton
->
drop_table
(
hton
,
path
.
str
)))
no_such_table_handler
.
only_ignore_non_existing_errors
=
1
;
error
=
hton
->
drop_table
(
hton
,
path
.
str
);
no_such_table_handler
.
only_ignore_non_existing_errors
=
0
;
if
(
error
)
{
if
(
!
non_existing_table_error
(
error
))
break
;
...
...
@@ -2285,6 +2290,7 @@ static int ddl_log_execute_action(THD *thd, MEM_ROOT *mem_root,
end:
delete
file
;
/* We are only interested in errors that where not ignored */
if
((
error
=
(
no_such_table_handler
.
unhandled_errors
>
0
)))
my_errno
=
no_such_table_handler
.
first_error
;
thd
->
pop_internal_handler
();
...
...
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