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
b213f57d
Commit
b213f57d
authored
Dec 04, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow-up to MDEV-12288: Avoid mutex acquistion in trx_rw_is_active(0)
Suggested-by:
Sergey Vojtovich
<
svoj@mariadb.org
>
parent
751ad744
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
storage/innobase/include/trx0sys.ic
storage/innobase/include/trx0sys.ic
+10
-0
No files found.
storage/innobase/include/trx0sys.ic
View file @
b213f57d
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -343,6 +344,15 @@ trx_rw_is_active(
bool do_ref_count) /*!< in: if true then increment the
trx_t::n_ref_count */
{
if (!trx_id) {
/* In MariaDB 10.3, purge will reset DB_TRX_ID to 0
when the history is lost. Read/write transactions will
always have a nonzero trx_t::id; there the value 0 is
reserved for transactions that did not write or lock
anything yet. */
return NULL;
}
trx_t* trx;
trx_sys_mutex_enter();
...
...
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