Re: MySQLQueryInterruptedException while no one killed the query
Posted by: Todd Farmer
Date: October 02, 2014 03:04PM

Hello Nikolay,

I don't recognize this as a known (to me) bug. The Connector/Java code which throws this exception is pretty well-contained, and found in SQLError.createSQLException():


} else if (sqlState.startsWith("70100")) {
if(!Util.isJdbc4()) {
sqlEx = new MySQLQueryInterruptedException(message, sqlState, vendorErrorCode);
} else {
sqlEx = (SQLException) Util.getInstance(
"com.mysql.jdbc.exceptions.jdbc4.MySQLQueryInterruptedException",
new Class[] { String.class, String.class,
Integer.TYPE }, new Object[] {
message, sqlState,
Integer.valueOf(vendorErrorCode) }, interceptor);
}


We can assume that the connector received an error with SQLState = 70100 during execution. That SQLState is tied to MySQL error code 1317, (ER_QUERY_INTERRUPTED macro): http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html . I don't find server-side code which will generate that error in the absence of a KILL command.

What's the result of the following command?

SHOW GLOBAL STATUS LIKE '%kill%';

Note that the following blog post demonstrates how to identify the source of KILL commands, but requires PERFORMANCE_SCHEMA features in MySQL 5.6 (maybe one reason to consider an upgrade):

http://mysqlblog.fivefarmers.com/2013/07/30/practical-p_s-finding-the-killer/

Hope that helps!

--
Todd Farmer
MySQL @ Oracle
http://www.oracle.com/mysql/

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.