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
eb8f7005
Commit
eb8f7005
authored
Jul 28, 2019
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: remove few #ifdef's
parent
4af932e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
28 deletions
+20
-28
sql/handler.cc
sql/handler.cc
+20
-28
No files found.
sql/handler.cc
View file @
eb8f7005
...
...
@@ -2048,9 +2048,9 @@ static char* xid_to_str(char *buf, XID *xid)
}
#endif
#ifdef WITH_WSREP
static
my_xid
wsrep_order_and_check_continuity
(
XID
*
list
,
int
len
)
{
#ifdef WITH_WSREP
wsrep_sort_xid_array
(
list
,
len
);
wsrep
::
gtid
cur_position
=
wsrep_get_SE_checkpoint
();
long
long
cur_seqno
=
cur_position
.
seqno
().
get
();
...
...
@@ -2068,8 +2068,10 @@ static my_xid wsrep_order_and_check_continuity(XID *list, int len)
}
WSREP_INFO
(
"Last wsrep seqno to be recovered %lld"
,
cur_seqno
);
return
(
cur_seqno
<
0
?
0
:
cur_seqno
);
}
#else
return
0
;
#endif
/* WITH_WSREP */
}
/**
recover() step of xa.
...
...
@@ -2107,7 +2109,6 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
{
sql_print_information
(
"Found %d prepared transaction(s) in %s"
,
got
,
hton_name
(
hton
)
->
str
);
#ifdef WITH_WSREP
/* If wsrep_on=ON, XIDs are first ordered and then the range of
recovered XIDs is checked for continuity. All the XIDs which
are in continuous range can be safely committed if binlog
...
...
@@ -2123,12 +2124,10 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
crashes after T2 finishes prepare step but before T1 starts
the prepare.
*/
my_xid
wsrep_limit
=
0
;
my_xid
wsrep_limit
__attribute__
((
unused
))
=
0
;
if
(
WSREP_ON
)
{
wsrep_limit
=
wsrep_order_and_check_continuity
(
info
->
list
,
got
);
}
#endif
/* WITH_WSREP */
for
(
int
i
=
0
;
i
<
got
;
i
++
)
{
my_xid
x
=
IF_WSREP
(
WSREP_ON
&&
wsrep_is_wsrep_xid
(
&
info
->
list
[
i
])
?
...
...
@@ -2137,10 +2136,10 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
info
->
list
[
i
].
get_my_xid
());
if
(
!
x
)
// not "mine" - that is generated by external TM
{
#ifndef DBUG_OFF
char
buf
[
XIDDATASIZE
*
4
+
6
];
// see xid_to_str
DBUG_PRINT
(
"info"
,
(
"ignore xid %s"
,
xid_to_str
(
buf
,
info
->
list
+
i
)
));
#endif
DBUG_EXECUTE
(
"info"
,{
char
buf
[
XIDDATASIZE
*
4
+
6
];
_db_doprnt_
(
"ignore xid %s"
,
xid_to_str
(
buf
,
info
->
list
+
i
));
});
xid_cache_insert
(
info
->
list
+
i
);
info
->
found_foreign_xids
++
;
continue
;
...
...
@@ -2161,32 +2160,25 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
my_hash_search
(
info
->
commit_list
,
(
uchar
*
)
&
x
,
sizeof
(
x
))
!=
0
:
tc_heuristic_recover
==
TC_HEURISTIC_RECOVER_COMMIT
))
{
#ifndef DBUG_OFF
int
rc
=
#endif
hton
->
commit_by_xid
(
hton
,
info
->
list
+
i
);
#ifndef DBUG_OFF
int
rc
=
hton
->
commit_by_xid
(
hton
,
info
->
list
+
i
);
if
(
rc
==
0
)
{
char
buf
[
XIDDATASIZE
*
4
+
6
];
// see xid_to_str
DBUG_PRINT
(
"info"
,
(
"commit xid %s"
,
xid_to_str
(
buf
,
info
->
list
+
i
)));
DBUG_EXECUTE
(
"info"
,{
char
buf
[
XIDDATASIZE
*
4
+
6
];
_db_doprnt_
(
"commit xid %s"
,
xid_to_str
(
buf
,
info
->
list
+
i
));
});
}
#endif
}
else
{
#ifndef DBUG_OFF
int
rc
=
#endif
hton
->
rollback_by_xid
(
hton
,
info
->
list
+
i
);
#ifndef DBUG_OFF
int
rc
=
hton
->
rollback_by_xid
(
hton
,
info
->
list
+
i
);
if
(
rc
==
0
)
{
char
buf
[
XIDDATASIZE
*
4
+
6
];
// see xid_to_str
DBUG_PRINT
(
"info"
,
(
"rollback xid %s"
,
xid_to_str
(
buf
,
info
->
list
+
i
)));
DBUG_EXECUTE
(
"info"
,{
char
buf
[
XIDDATASIZE
*
4
+
6
];
_db_doprnt_
(
"rollback xid %s"
,
xid_to_str
(
buf
,
info
->
list
+
i
));
});
}
#endif
}
}
if
(
got
<
info
->
len
)
...
...
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