Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.3.20
-
None
-
mysql client :
MariaDB [(none)]> \s
--------------
mysql Ver 15.1 Distrib 10.3.20-MariaDB, for Linux (x86_64) using readline 5.1
Connection id: 13
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.3.20-MariaDB-log MariaDB Server
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /data/3310/init/mysql3310.sock
Uptime: 35 min 32 sec
Threads: 9 Questions: 47 Slow queries: 0 Opens: 23 Flush tables: 1 Open tables: 16 Queries per second avg: 0.022
--------------
MariaDB [(none)]>
mysql client : MariaDB [(none)]> \s -------------- mysql Ver 15.1 Distrib 10.3.20-MariaDB, for Linux (x86_64) using readline 5.1 Connection id: 13 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server: MariaDB Server version: 10.3.20-MariaDB-log MariaDB Server Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: utf8 Db characterset: utf8 Client characterset: utf8 Conn. characterset: utf8 UNIX socket: /data/3310/init/mysql3310.sock Uptime: 35 min 32 sec Threads: 9 Questions: 47 Slow queries: 0 Opens: 23 Flush tables: 1 Open tables: 16 Queries per second avg: 0.022 -------------- MariaDB [(none)]>
Description
test sequence :
session 1 ( which is killed ) :
create table test( id int, text varchar(30) );
xa start 'test1';
insert into test values ( 1, 'killing this ses' );
xa end 'test1';
xa prepare 'test1';
– to my knowledge : this prepared XA transaction has to survive a crash otherwise cant the transaction coordinator issue a xa commit;
kontrol session 2 :
MariaDB [(none)]> xa recover;
---------------------------------------+
formatID | gtrid_length | bqual_length | data |
---------------------------------------+
1 | 5 | 0 | test1 |
---------------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> kill 10;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> xa recover;
Empty set (0.00 sec)
MariaDB [(none)]>
So when the kill session is issued the xa recover list becomes empty.
If this simulated crash happends, then the XA transaction coordinator will not be able to do XA commit if the XA transaction in the mariadb was part of a transaction involving multiple XA transaction providers.
This can lead to data discrepency ( some does XA commit, mariadb cant ) during crash and XA should be crash proof.
mysql 5.7.28 lists the XA transaction when the XA transaction is prepared and session is killed.
It looks like bug :
https://bugs.mysql.com/bug.php?id=12161
hasnt been resolved into the mariadb code.
Kind regards
Steen
Attachments
Issue Links
- is duplicated by
-
MDEV-742 LP:803649 - Xa recovery failed on client disconnection
- Closed