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
e83a8a89
Commit
e83a8a89
authored
Dec 08, 2022
by
Andrei
Committed by
Brandon Nesterenko
Oct 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some cleanup.
parent
cb29f566
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
3 deletions
+9
-3
sql/handler.cc
sql/handler.cc
+1
-1
sql/log.cc
sql/log.cc
+4
-0
sql/xa.cc
sql/xa.cc
+2
-2
sql/xa.h
sql/xa.h
+2
-0
No files found.
sql/handler.cc
View file @
e83a8a89
...
...
@@ -1426,7 +1426,7 @@ int ha_prepare(THD *thd)
handlerton
*
ht
=
ha_info
->
ht
();
if
(
ht
->
prepare
)
{
DBUG_EXECUTE_IF
(
"simulate_crash_
after_fir
st_engine_prepare"
,
DBUG_EXECUTE_IF
(
"simulate_crash_
before_la
st_engine_prepare"
,
if
(
!
ha_info
->
next
())
DBUG_SUICIDE
(););
if
(
unlikely
(
prepare_or_error
(
ht
,
thd
,
all
)))
...
...
sql/log.cc
View file @
e83a8a89
...
...
@@ -11065,6 +11065,10 @@ bool MYSQL_BIN_LOG::recover_explicit_xa_prepare()
// partially engine-prepared XA is first cleaned out prior replay
thd
->
lex
->
sql_command
=
SQLCOM_XA_ROLLBACK
;
ha_commit_or_rollback_by_xid
(
&
gev
->
xid
,
0
);
if
(
thd
->
fix_xid_hash_pins
())
sql_print_error
(
ER
(
ER_OUT_OF_RESOURCES
));
if
(
auto
xs
=
xid_cache_search
(
thd
,
&
gev
->
xid
))
xid_cache_delete
(
thd
,
xs
);
}
else
--
recover_xa_count
;
...
...
sql/xa.cc
View file @
e83a8a89
...
...
@@ -243,7 +243,7 @@ void xid_cache_free()
Find recovered XA transaction by XID.
*/
static
XID_cache_element
*
xid_cache_search
(
THD
*
thd
,
XID
*
xid
)
XID_cache_element
*
xid_cache_search
(
THD
*
thd
,
XID
*
xid
)
{
DBUG_ASSERT
(
thd
->
xid_hash_pins
);
XID_cache_element
*
element
=
...
...
@@ -308,7 +308,7 @@ bool xid_cache_insert(THD *thd, XID_STATE *xid_state, XID *xid)
}
static
void
xid_cache_delete
(
THD
*
thd
,
XID_cache_element
*&
element
)
void
xid_cache_delete
(
THD
*
thd
,
XID_cache_element
*&
element
)
{
DBUG_ASSERT
(
thd
->
xid_hash_pins
);
element
->
mark_uninitialized
();
...
...
sql/xa.h
View file @
e83a8a89
...
...
@@ -44,6 +44,8 @@ void xid_cache_free(void);
bool
xid_cache_insert
(
XID
*
xid
);
bool
xid_cache_insert
(
THD
*
thd
,
XID_STATE
*
xid_state
,
XID
*
xid
);
void
xid_cache_delete
(
THD
*
thd
,
XID_STATE
*
xid_state
);
XID_cache_element
*
xid_cache_search
(
THD
*
thd
,
XID
*
xid
);
void
xid_cache_delete
(
THD
*
thd
,
XID_cache_element
*&
element
);
bool
trans_xa_start
(
THD
*
thd
);
bool
trans_xa_end
(
THD
*
thd
);
...
...
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