5,期間遇到的額外問題
Cause: java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
6,總結
這個問題看似解決了,但是可能還有更多的細節沒有梳理,為什麼事務開啟後沒有ROLLBACK或者COMMIT,後續執行SELECT就會報錯呢?自己想來是DML形成排它鎖X,而查詢是有共享鎖S,X和S是互斥的(關於Innodb鎖請參考:http://blog.itpub.net/26230597/viewspace-1315111/),所以就出問題了,至於源碼層的底層分析,有待以後繼續深究,如果有遇到此類問題的朋友,歡迎share下你的處理思路以及分析過程,謝謝。