WebDev/Spring

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 lev..




엑셀 업로드를 하는 과정에서 해당 오류가 발생하였다 .



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 limitedto row-based logging InnoDB is limited to 
row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.


BINLOG_FORMAT = STATEMENT 

tx_isolation  = REPEATABLE-READ


설정이 두 가지인 상태에서 커밋을 하여서 생긴 문제이다.




1. 확인



루트 계정으로 로그인후에


show variables like 'tx_isolation';


show global variables like 'binlog_format';


두 쿼리를 날려서 


BINLOG_FORMAT = STATEMENT 

tx_isolation  = REPEATABLE-READ


으로 되어 있는지 확인 한다.




2. 해결방안



루트 계정으로 로그인후에


 set global binlog_format = 'MIXED';


쿼리를 친 후에 




show global variables like 'binlog_format';

을 확인한다.