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
143e771d
Commit
143e771d
authored
Mar 13, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ha_start_consistent_snapshot() did not check for errors
parent
6e899642
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
sql/handler.cc
sql/handler.cc
+10
-3
sql/sql_parse.cc
sql/sql_parse.cc
+1
-3
No files found.
sql/handler.cc
View file @
143e771d
...
...
@@ -2212,7 +2212,8 @@ static my_bool snapshot_handlerton(THD *thd, plugin_ref plugin,
if
(
hton
->
state
==
SHOW_OPTION_YES
&&
hton
->
start_consistent_snapshot
)
{
hton
->
start_consistent_snapshot
(
hton
,
thd
);
if
(
hton
->
start_consistent_snapshot
(
hton
,
thd
))
return
TRUE
;
*
((
bool
*
)
arg
)
=
false
;
}
return
FALSE
;
...
...
@@ -2220,7 +2221,7 @@ static my_bool snapshot_handlerton(THD *thd, plugin_ref plugin,
int
ha_start_consistent_snapshot
(
THD
*
thd
)
{
bool
warn
=
true
;
bool
err
,
warn
=
true
;
/*
Holding the LOCK_commit_ordered mutex ensures that we get the same
...
...
@@ -2230,9 +2231,15 @@ int ha_start_consistent_snapshot(THD *thd)
have a consistent binlog position.
*/
mysql_mutex_lock
(
&
LOCK_commit_ordered
);
plugin_foreach
(
thd
,
snapshot_handlerton
,
MYSQL_STORAGE_ENGINE_PLUGIN
,
&
warn
);
err
=
plugin_foreach
(
thd
,
snapshot_handlerton
,
MYSQL_STORAGE_ENGINE_PLUGIN
,
&
warn
);
mysql_mutex_unlock
(
&
LOCK_commit_ordered
);
if
(
err
)
{
ha_rollback_trans
(
thd
,
true
);
return
1
;
}
/*
Same idea as when one wants to CREATE TABLE in one engine which does not
exist:
...
...
sql/sql_parse.cc
View file @
143e771d
...
...
@@ -5515,9 +5515,7 @@ mysql_execute_command(THD *thd)
(
longlong
)
thd
->
thread_id
);
goto
error
;
}
/* MyRocks: hton->start_consistent_snapshot call may fail with an error */
if
(
!
thd
->
is_error
())
my_ok
(
thd
);
my_ok
(
thd
);
break
;
case
SQLCOM_COMMIT
:
{
...
...
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