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
ce10cefd
Commit
ce10cefd
authored
Apr 05, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Per Heikki's request make trans_register_ha tolerant to multiple registrations
parent
5a28f962
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
sql/handler.cc
sql/handler.cc
+11
-8
No files found.
sql/handler.cc
View file @
ce10cefd
...
...
@@ -505,10 +505,16 @@ void ha_close_connection(THD* thd)
"beginning of transaction" and "beginning of statement").
Only storage engines registered for the transaction/statement
will know when to commit/rollback it.
NOTE
trans_register_ha is idempotent - storage engine may register many
times per transaction.
*/
void
trans_register_ha
(
THD
*
thd
,
bool
all
,
handlerton
*
ht_arg
)
{
THD_TRANS
*
trans
;
handlerton
**
ht
;
DBUG_ENTER
(
"trans_register_ha"
);
DBUG_PRINT
(
"enter"
,(
"%s"
,
all
?
"all"
:
"stmt"
));
...
...
@@ -520,15 +526,12 @@ void trans_register_ha(THD *thd, bool all, handlerton *ht_arg)
else
trans
=
&
thd
->
transaction
.
stmt
;
#ifndef DBUG_OFF
handlerton
**
ht
=
trans
->
ht
;
while
(
*
ht
)
{
DBUG_ASSERT
(
*
ht
!=
ht_arg
);
ht
++
;
}
#endif
for
(
ht
=
trans
->
ht
;
*
ht
;
ht
++
)
if
(
*
ht
==
ht_arg
)
DBUG_VOID_RETURN
;
trans
->
ht
[
trans
->
nht
++
]
=
ht_arg
;
DBUG_ASSERT
(
*
ht
==
ht_arg
);
trans
->
no_2pc
|=
(
ht_arg
->
prepare
==
0
);
if
(
thd
->
transaction
.
xid
.
is_null
())
thd
->
transaction
.
xid
.
set
(
thd
->
query_id
);
...
...
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