[MDEV-15505] Fix wsrep XID storage byte order Created: 2018-03-07  Updated: 2018-03-21  Resolved: 2018-03-21

Status: Closed
Project: MariaDB Server
Component/s: Galera, Storage Engine - InnoDB
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3
Fix Version/s: 10.3.6

Type: Bug Priority: Major
Reporter: Teemu Ollakka Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: contribution, foundation


 Description   

The sequence number part of wsrep XID is currently stored in host byte order into XID data buffer. This will become a problem for example in a case when a physical backup is prepared on a machine with big endian architecture and is recovered on a machine with little endian architecture. The recovered sequence number will have wrong value.

A solution for this problem is to store wsrep XID sequence number part in little endian byte order into XID data buffer by using ```int8store()``` and to read the seqno part with ```sint8korr()```.

In order to keep backwards compatibility, the seqno should be read in host byte order from TRX_SYS page when upgrading.


Generated at Thu Feb 08 08:21:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.