diff options
author | Teemu Ollakka <teemu.ollakka@galeracluster.com> | 2018-03-07 18:40:15 +0200 |
---|---|---|
committer | Teemu Ollakka <teemu.ollakka@galeracluster.com> | 2018-03-12 14:46:20 +0200 |
commit | dd74b94823711ecb4529b8368c2f6161f39b9fa0 (patch) | |
tree | e9daf35be635413542f3f91179031d8cb228798d /sql/sql_plugin_services.ic | |
parent | 09c5c335e3e8447e7d07c987293042175b51b495 (diff) | |
download | mariadb-git-dd74b94823711ecb4529b8368c2f6161f39b9fa0.tar.gz |
MDEV-15505 Fix wsrep XID seqno byte order
The problem is that the seqno part of wsrep XID is always
stored in host byte order. This may cause issues when a physical
backup is restored on a host with different architecture, the
seqno part with XID may have incorrect value.
In order to fix this, wsrep XID seqno is always written into
XID data buffer in little endian byte order using int8store()
and read from data buffer using sint8korr(). For backwards
compatibility the seqno is read from TRX_SYS page in host
byte order during upgrade.
This patch implements byte ordering in wsrep_xid_init(),
wsrep_xid_seqno(), and exposes functions to read wsrep
XID uuid and seqno in wsrep_service_st. Backwards compatibility
for upgrade is provided in trx_rseg_init_wsrep_xid().
Diffstat (limited to 'sql/sql_plugin_services.ic')
-rw-r--r-- | sql/sql_plugin_services.ic | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_plugin_services.ic b/sql/sql_plugin_services.ic index ea6aefa5993..47decf38973 100644 --- a/sql/sql_plugin_services.ic +++ b/sql/sql_plugin_services.ic @@ -154,6 +154,8 @@ static struct wsrep_service_st wsrep_handler = { wsrep_aborting_thd_enqueue, wsrep_consistency_check, wsrep_is_wsrep_xid, + wsrep_xid_seqno, + wsrep_xid_uuid, wsrep_lock_rollback, wsrep_on, wsrep_post_commit, |