国产片侵犯亲女视频播放_亚洲精品二区_在线免费国产视频_欧美精品一区二区三区在线_少妇久久久_在线观看av不卡

服務器之家:專注于服務器技術及軟件下載分享
分類導航

Mysql|Sql Server|Oracle|Redis|MongoDB|PostgreSQL|Sqlite|DB2|mariadb|Access|數據庫技術|

服務器之家 - 數據庫 - Mysql - mysql的XA事務恢復過程詳解

mysql的XA事務恢復過程詳解

2019-12-10 14:56MYSQL教程網 Mysql

XA事務支持限于InnoDB存儲引擎,本文將詳細介紹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 
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) 
再啟動就正常了。 

MySQL XA 
I.5. 對XA事務的限制 
XA事務支持限于InnoDB存儲引擎。 
MySQL XA實施是針對外部XA的,其中,MySQL服務器作為資源管理器,而客戶端程序作為事務管理器。未實施“內部XA”。這樣,就允許MySQL服務器內的單獨存儲引擎作為RM(資源管理器),而服務器本身作為TM(事務管理器)。處理包含1個以上存儲引擎的XA事務時,需要內部XA。內部XA的實施是不完整的,這是因為,它要求存儲引擎在表處理程序層面上支持兩階段提交,目前僅對InnoDB實現了該特性。 
對于XA START,不支持JOIN和RESUME子句。 

對于XA END,不支持SUSPEND [FOR MIGRATE]子句。 
在全局事務內,對于每個XA事務,xid值的bqual部分應是不同的,該要求是對當前MySQL XA實施的限制。它不是XA規范的組成部分。 

如果XA事務達到PREPARED狀態而且MySQL服務器宕機,當服務器重啟后,能夠繼續處理事務。就像原本應當的那樣。但是,如果客戶端連接中止而服務器繼續運行,服務器將回滾任何未完成的XA事務,即使該事務已達到PREPARED狀態也同樣。它應能提交或回滾PREPARED XA事務,但在不更改二進制日志機制的情況下不能這樣。

延伸 · 閱讀

精彩推薦
Weibo Article 1 Weibo Article 2 Weibo Article 3 Weibo Article 4 Weibo Article 5 Weibo Article 6 Weibo Article 7 Weibo Article 8 Weibo Article 9 Weibo Article 10 Weibo Article 11 Weibo Article 12 Weibo Article 13 Weibo Article 14 Weibo Article 15 Weibo Article 16 Weibo Article 17 Weibo Article 18 Weibo Article 19 Weibo Article 20 Weibo Article 21 Weibo Article 22 Weibo Article 23 Weibo Article 24 Weibo Article 25 Weibo Article 26 Weibo Article 27 Weibo Article 28 Weibo Article 29 Weibo Article 30 Weibo Article 31 Weibo Article 32 Weibo Article 33 Weibo Article 34 Weibo Article 35 Weibo Article 36 Weibo Article 37 Weibo Article 38 Weibo Article 39 Weibo Article 40
主站蜘蛛池模板: 国产精品九九九 | 天天久久综合网 | 欧美成年黄网站色视频 | 亚洲综合色视频在线观看 | 3344视频| 亚州成人| 久久久久综合狠狠综合日本高清 | 一级黄色在线观看 | av在线免费网址 | 亚洲精品a在线观看 | 亚洲成人一区在线 | 欧美在线99 | 欧美成人一区二免费视频软件 | 欧美亚洲在线 | 免费看国产片在线观看 | 黄色免费视频 | 免费骚视频 | 国产精品久久久久久久浪潮网站 | 午夜精品久久久久久久久 | 日韩精品久久久 | 久久久精品一区二区 | 成人午夜| 欧美专区在线观看 | 日韩操操操 | 91久久国产综合久久 | 精品国产污网站污在线观看15 | 日韩av片无码一区二区不卡电影 | 久久久久久久国产精品 | 欧洲精品视频在线观看 | 狠狠天天 | 欧美国产日韩在线 | 国产成人精品一区二区三区视频 | 精品国产色 | 91精品国产综合久久久蜜臀粉嫩 | 99免费观看| 中文在线观看视频 | 北条麻妃在线一区二区 | 国产精品久久久久无码av | 亚洲精品一区二区三区在线观看 | 精品久久久久久亚洲精品 | 黄色毛片在线看 |