我有一個mysql錯誤,直到現在我還沒有找到答案在互聯網上:「等待一個鎖被中止,由於等待排他鎖」 我有很多交易在相同時間。這些基於innodb表,有幾個觸發器。這些觸發器讀取和寫入其他innodb和myisam表。 我知道什麼是「等待鎖定」,但我沒有足夠的關於「獨佔鎖定」的信息。我應該怎麼做才能終止這個錯誤,因爲這些事務沒有完成,也沒有更新這個表中的行。MySQL:獨佔鎖
我有一個Windows Server 2012 R2標準和MySQL 5.6.15。數據庫位於SSD驅動器上,日誌位於簡單的HDD上。
這是我的ini文件:
[mysqld]
port=3306
basedir="C:/MySQL/mysql-5.6.15-winx64/"
datadir="C:/DB/myCustomer/data"
innodb_data_home_dir="C:/DB/myCustomer/innodb/"
log-bin = "E:/Log/mysqldblog/myCustomer/mysql-bin/log"
log-error = "E:/Log/mysqldblog/myCustomer/errorlog/error"
tmpdir ="E:/MySQLTEMP/"
innodb_buffer_pool_size=1024M
join_buffer_size = 4M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
innodb_log_buffer_size = 4M
innodb_flush_log_at_trx_commit=1
max_allowed_packet = 100M
tmp_table_size=64M
max_heap_table_size=64M
innodb_log_file_size = 256M
innodb_thread_concurrency = 16
federated=1
default-storage-engine=INNODB
event-scheduler = ON
max_sp_recursion_depth = 50
character-set-server=utf8
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
binlog_format=mixed
transaction-isolation = READ-COMMITTED
log-warnings = 0
我會apprisiate如果有人能幫助我解決這個問題。 非常感謝。
親切的問候, 安德拉什
非常感謝您的回答。 我尋找這些東西,但我沒有結果。問題發生不可預知。 你能告訴我什麼是「鎖等待超時」和「等待一個鎖被中止,由於一個未決的排他鎖」? 謝謝! – bertaandras
嗯,第一個是服務器系統變量(配置設置),第二個是錯誤消息。甚至不是同一類別。你究竟試圖問這個問題? – Shadow
我試過問,當我發現「Lock超時超時;嘗試重新啓動事務「錯誤消息,並且」由於等待排他鎖定而中止等待鎖定「錯誤消息? – bertaandras