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
41f23283
Commit
41f23283
authored
Mar 12, 2010
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fix for main.xa failures.
parent
4db97ede
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
sql/set_var.cc
sql/set_var.cc
+11
-10
No files found.
sql/set_var.cc
View file @
41f23283
...
...
@@ -3203,9 +3203,17 @@ static bool set_option_autocommit(THD *thd, set_var *var)
need to commit any outstanding transactions.
*/
if
(
var
->
save_result
.
ulong_value
!=
0
&&
(
thd
->
options
&
OPTION_NOT_AUTOCOMMIT
)
&&
ha_commit
(
thd
))
return
1
;
(
thd
->
options
&
OPTION_NOT_AUTOCOMMIT
))
{
if
(
thd
->
transaction
.
xid_state
.
xa_state
!=
XA_NOTR
)
{
my_error
(
ER_XAER_RMFAIL
,
MYF
(
0
),
xa_state_names
[
thd
->
transaction
.
xid_state
.
xa_state
]);
return
1
;
}
if
(
ha_commit
(
thd
))
return
1
;
}
if
(
var
->
save_result
.
ulong_value
!=
0
)
thd
->
options
&=
~
((
sys_var_thd_bit
*
)
var
->
var
)
->
bit_flag
;
...
...
@@ -3217,13 +3225,6 @@ static bool set_option_autocommit(THD *thd, set_var *var)
if
((
org_options
&
OPTION_NOT_AUTOCOMMIT
))
{
/* We changed to auto_commit mode */
if
(
thd
->
transaction
.
xid_state
.
xa_state
!=
XA_NOTR
)
{
thd
->
options
=
org_options
;
my_error
(
ER_XAER_RMFAIL
,
MYF
(
0
),
xa_state_names
[
thd
->
transaction
.
xid_state
.
xa_state
]);
return
1
;
}
thd
->
options
&=
~
(
ulonglong
)
(
OPTION_BEGIN
|
OPTION_KEEP_LOG
);
thd
->
transaction
.
all
.
modified_non_trans_table
=
FALSE
;
thd
->
server_status
|=
SERVER_STATUS_AUTOCOMMIT
;
...
...
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