[MDEV-13437] InnoDB fails to return error for XA COMMIT or XA ROLLBACK in read-only mode Created: 2017-08-03 Updated: 2023-05-01 Resolved: 2017-08-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, XA |
| Affects Version/s: | 10.0, 10.1 |
| Fix Version/s: | 10.0.33, 10.1.27, 10.2.9, 10.3.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Andrei Elkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | mtr | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
|
| Comments |
| Comment by Marko Mäkelä [ 2017-08-07 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Andrei, can you debug this further? I tried with the following patch to both storage/innobase and storage/xtradb, and it will fail in binlog:
The failure was like this:
Stack trace:
It appears that a mutex is not being released in an error handling code path. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-08-15 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Also, it looks like we should revert part of this InnoDB change in MySQL 5.0.3 (making innodb_force_recovery=1 and innodb_force_recovery=2 initiate rollback of a transaction that reached the XA PREPARE state before previous crash or shutdown). | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrei Elkin [ 2017-08-21 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Elena, hello. There are small changes to mtr that's why you. I am asking Marko to review the rest of this work. Thanks! Andrei | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-08-21 ] | ||||||||||||||||||||||||||||||||||||||||||
|
The only change I see in MTR is exporting of an extra variable. It's not dangerous, so if it works for you, I have no objections. In general, we should invent a better way to fail-start the server, but it doesn't have to be done now. Re-assigning to Marko for real review. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-08-21 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Elkin, the new logic looks OK to me. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-08-24 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Looks OK now; the newest revision to the test even works with Valgrind:
|