在mysql restart上提交xa挂起事务时,我得到以下错误。请帮我解决这个错误。
mysql> XA RECOVER CONVERT XID;
+----------+--------------+--------------+------------------------------------------------------------------------------------------------+
| formatID | gtrid_length | bqual_length | data |
+----------+--------------+--------------+------------------------------------------------------------------------------------------------+
| 4871251 | 26 | 20 | 0xA223010095EDCC9A6369736861322C7365727665722C503130306369736861322C7365727665722C503130302C00 |
| 4871251 | 26 | 20 | 0xA123010095EDCC9A6369736861322C7365727665722C503130306369736861322C7365727665722C503130302C00 |
| 4871251 | 26 | 20 | 0xA023010095EDCC9A6369736861322C7365727665722C503130306369736861322C7365727665722C503130302C01 |
mysql> XA COMMIT 0x7023010095EDCC9A6369736861322C7365727665722C503130,0x306369736861322C7365727665722C503130302C00,4871251;
ERROR 1397 (XAE04): XAER_NOTA: Unknown XID
[root@db1 ~]# mysql --version
mysql Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using EditLine wrapper
[root@db1 ~]# uname -a
Linux db1 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@db1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
1条答案
按热度按时间lmvvr0a81#
根据你的数据
gtrid
的长度是26,但是gtrid
你承诺的价值(7023010095EDCC9A6369736861322C7365727665722C503130
)只有50个字符,所以实际长度只有25个,而不是26个。相应地,你的bqual
是更长的。你的gtrid
应该是7023010095EDCC9A6369736861322C7365727665722C50313030
并且应该调整bqual
相应地。