0

0

mysql的XA事务恢复_MySQL

php中文网

php中文网

发布时间:2016-06-01 13:38:41

|

971人浏览过

|

来源于php中文网

原创

bitsCN.com


mysql的xa事务恢复

 

mysql数据库开机报错: 

InnoDB: The log sequence number in ibdata files does not match 

InnoDB: the log sequence number in the ib_logfiles! 

100224 12:24:20  InnoDB: Database was not shut down normally! 

InnoDB: Starting crash recovery. 

InnoDB: Reading tablespace information from the .ibd files... 

InnoDB: Restoring possible half-written data pages from the doublewrite 

InnoDB: buffer... 

InnoDB: Transaction 0 4497755 was in the XA prepared state. 

InnoDB: Transaction 0 4468551 was in the XA prepared state. 

InnoDB: Transaction 0 4468140 was in the XA prepared state. 

InnoDB: 3 transaction(s) which must be rolled back or cleaned up 

InnoDB: in total 0 row operations to undo 

InnoDB: Trx id counter is 0 5312768 

InnoDB: Starting in background the rollback of uncommitted transactions 

100224 12:24:20  InnoDB: Rollback of non-prepared transactions completed 

100224 12:24:20  InnoDB: Started; log sequence number 0 3805002509 

100224 12:24:20  InnoDB: Starting recovery for XA transactions... 

100224 12:24:20  InnoDB: Transaction 0 4497755 in prepared state after recovery 

100224 12:24:20  InnoDB: Transaction contains changes to 8 rows 

100224 12:24:20  InnoDB: Transaction 0 4468551 in prepared state after recovery 

100224 12:24:20  InnoDB: Transaction contains changes to 1 rows 

100224 12:24:20  InnoDB: Transaction 0 4468140 in prepared state after recovery 

100224 12:24:20  InnoDB: Transaction contains changes to 1 rows 

100224 12:24:20  InnoDB: 3 transactions in prepared state after recovery 

100224 12:24:20 [Note] Found 3 prepared transaction(s) in InnoDB 

100224 12:24:20 [Warning] Found 3 prepared XA transactions 

100224 12:24:20 [Note] Event Scheduler: Loaded 0 events 

360 AI助手
360 AI助手

360公司推出的AI聊天机器人聚合平台,集合了国内15家顶尖的AI大模型。

下载

100224 12:24:20 [Note] /opt/mysql/bin/mysqld: ready for connections. 

Version: '5.1.39'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL) 

 

意味着有三个XA的事务没有提交或回滚。 

登录到mysql 

mysql> xa recover; 

+----------+--------------+--------------+------------------------------------------------------------+ 

| formatID | gtrid_length | bqual_length | data                                                       | 

+----------+--------------+--------------+------------------------------------------------------------+ 

|   131075 |           30 |           28 | 1-7f000001:bae5:4b6928eb:f06397f000001:bae5:4b6928eb:f0650 | 

|   131075 |           30 |           28 | 1-7f000001:bae5:4b6928eb:fb5c37f000001:bae5:4b6928eb:fb5cd | 

|   131075 |           30 |           28 | 1-7f000001:bae5:4b6928eb:f03ea7f000001:bae5:4b6928eb:f0400 | 

+----------+--------------+--------------+------------------------------------------------------------+ 

数据表示信息如下: 

 

    formatIDis the             formatIDpart of the transaction             xid 

 

    gtrid_lengthis the length in bytes of             the gtridpart of the             xid 

 

    bqual_lengthis the length in bytes of             the bqualpart of the             xid 

 

    datais the concatenation of the             gtridand             bqualparts of the             xid 

 

这是三个XA事务的信息,准备直接回滚。 

mysql> xa rollback '1-7f000001:bae5:4b6928eb:fb5c3','7f000001:bae5:4b6928eb:fb5cd',131075; 

Query OK, 0 rows affected (0.41 sec) 

 

再启动就正常了。
 

bitsCN.com

相关专题

更多
ip地址修改教程大全
ip地址修改教程大全

本专题整合了ip地址修改教程大全,阅读下面的文章自行寻找合适的解决教程。

33

2025.12.26

压缩文件加密教程汇总
压缩文件加密教程汇总

本专题整合了压缩文件加密教程,阅读专题下面的文章了解更多详细教程。

18

2025.12.26

wifi无ip分配
wifi无ip分配

本专题整合了wifi无ip分配相关教程,阅读专题下面的文章了解更多详细教程。

46

2025.12.26

漫蛙漫画入口网址
漫蛙漫画入口网址

本专题整合了漫蛙入口网址大全,阅读下面的文章领取更多入口。

91

2025.12.26

b站看视频入口合集
b站看视频入口合集

本专题整合了b站哔哩哔哩相关入口合集,阅读下面的文章查看更多入口。

283

2025.12.26

俄罗斯搜索引擎yandex入口汇总
俄罗斯搜索引擎yandex入口汇总

本专题整合了俄罗斯搜索引擎yandex相关入口合集,阅读下面的文章查看更多入口。

370

2025.12.26

虚拟号码教程汇总
虚拟号码教程汇总

本专题整合了虚拟号码接收验证码相关教程,阅读下面的文章了解更多详细操作。

35

2025.12.25

错误代码dns_probe_possible
错误代码dns_probe_possible

本专题整合了电脑无法打开网页显示错误代码dns_probe_possible解决方法,阅读专题下面的文章了解更多处理方案。

25

2025.12.25

网页undefined啥意思
网页undefined啥意思

本专题整合了undefined相关内容,阅读下面的文章了解更多详细内容。后续继续更新。

72

2025.12.25

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
PostgreSQL 教程
PostgreSQL 教程

共48课时 | 6.1万人学习

Django 教程
Django 教程

共28课时 | 2.5万人学习

Excel 教程
Excel 教程

共162课时 | 9.7万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号