roidba 一直推崇看官方文檔,自己做實驗測試,只要這樣才能成為一名合格的DBA。
創(chuàng)新互聯(lián)公司10多年企業(yè)網站制作服務;為您提供網站建設,網站制作,網頁設計及高端網站定制服務,企業(yè)網站制作及推廣,對效果圖設計等多個行業(yè)擁有多年的網站設計經驗的網站建設公司。
鍛煉自己的動手能力。
解決開發(fā)寫SQL不commit 問題
This feature limits the age of idle transactions, for all transactional storage engines. If a transaction is idle for more seconds than the threshold specified, it will be killed. This prevents users from blocking InnoDB purge by mistake.
In Percona Server5.7.17-11 this feature has been re-implemented by setting a connection socket read timeout value instead of periodically scanning the internal InnoDB transaction list.
Version Specific Information
5.7.10-1:
Feature ported from Percona Server 5.6
5.7.17-11:
Feature re-implemented using socket timeouts
System Variables
variable innodb_kill_idle_transaction
Version Info: | 5.7.17-11 – Variable is now an alias of kill_idle_transaction |
Scope: | GLOBAL |
Config: | YES |
Dynamic: | YES |
Variable Type: | INTEGER |
Default Value: | 0 (disabled) |
Units: | Seconds |
To enable this feature, set this variable to the desired seconds wait until the transaction is killed. NOTE: This variable has been deprecated and it will be removed in a future major release.
variable kill_idle_transaction
Version Info: | 5.7.17-11 – Variable implemented |
Scope: | GLOBAL |
Config: | YES |
Dynamic: | YES |
Variable Type: | INTEGER |
Default Value: | 0 (disabled) |
Units: | Seconds |
If non-zero, any idle transaction will be killed after being idle for this many seconds.
官網鏈接
https://www.percona.com/doc/percona-server/LATEST/management/innodb_kill_idle_trx.html