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
c9c4e4f8
Commit
c9c4e4f8
authored
Jan 27, 2011
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1-innodb to mysql-5.5-innodb.
parents
6f6ad4e8
3db404c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
storage/innobase/include/trx0trx.h
storage/innobase/include/trx0trx.h
+2
-2
storage/innobase/trx/trx0trx.c
storage/innobase/trx/trx0trx.c
+11
-14
No files found.
storage/innobase/include/trx0trx.h
View file @
c9c4e4f8
...
...
@@ -214,12 +214,12 @@ trx_recover_for_mysql(
/*******************************************************************//**
This function is used to find one X/Open XA distributed transaction
which is in the prepared state
@return trx or NULL */
@return trx or NULL
; on match, the trx->xid will be invalidated
*/
UNIV_INTERN
trx_t
*
trx_get_trx_by_xid
(
/*===============*/
XID
*
xid
);
/*!< in: X/Open XA transaction identification
*/
const
XID
*
xid
);
/*!< in: X/Open XA transaction identifier
*/
/**********************************************************************//**
If required, flushes the log to disk if we called trx_commit_for_mysql()
with trx->flush_log_later == TRUE.
...
...
storage/innobase/trx/trx0trx.c
View file @
c9c4e4f8
...
...
@@ -2004,18 +2004,18 @@ trx_recover_for_mysql(
/*******************************************************************//**
This function is used to find one X/Open XA distributed transaction
which is in the prepared state
@return trx or NULL */
@return trx or NULL
; on match, the trx->xid will be invalidated
*/
UNIV_INTERN
trx_t
*
trx_get_trx_by_xid
(
/*===============*/
XID
*
xid
)
/*!< in: X/Open XA transaction identification
*/
const
XID
*
xid
)
/*!< in: X/Open XA transaction identifier
*/
{
trx_t
*
trx
;
if
(
xid
==
NULL
)
{
return
(
NULL
);
return
(
NULL
);
}
mutex_enter
(
&
kernel_mutex
);
...
...
@@ -2028,10 +2028,16 @@ trx_get_trx_by_xid(
of gtrid_length+bqual_length bytes should be
the same */
if
(
xid
->
gtrid_length
==
trx
->
xid
.
gtrid_length
if
(
trx
->
conc_state
==
TRX_PREPARED
&&
xid
->
gtrid_length
==
trx
->
xid
.
gtrid_length
&&
xid
->
bqual_length
==
trx
->
xid
.
bqual_length
&&
memcmp
(
xid
->
data
,
trx
->
xid
.
data
,
xid
->
gtrid_length
+
xid
->
bqual_length
)
==
0
)
{
/* Invalidate the XID, so that subsequent calls
will not find it. */
memset
(
&
trx
->
xid
,
0
,
sizeof
(
trx
->
xid
));
trx
->
xid
.
formatID
=
-
1
;
break
;
}
...
...
@@ -2040,14 +2046,5 @@ trx_get_trx_by_xid(
mutex_exit
(
&
kernel_mutex
);
if
(
trx
)
{
if
(
trx
->
conc_state
!=
TRX_PREPARED
)
{
return
(
NULL
);
}
return
(
trx
);
}
else
{
return
(
NULL
);
}
return
(
trx
);
}
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