Bug #72527 Unexpected exception encountered during query
Submitted: 4 May 2014 2:09 Modified: 5 Jun 2014 14:12
Reporter: llcheng liu Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:5.1.55 OS:Linux (redhat)
Assigned to: Assigned Account CPU Architecture:Any

[4 May 2014 2:09] llcheng liu
Description:
When I query the database, reported the following error, but this is accidental, whenever the error, I put the table structure corresponding change, such as the length of the field to change a table, query, but over time will report this error

Cause: java.sql.SQLException: Unexpected exception encountered during query.
Caused by: java.sql.SQLException: Unexpected exception encountered during query.
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1086)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2874)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)
	at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:185)
	at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
	at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
	... 28 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
	at com.mysql.jdbc.Buffer.readFieldLength(Buffer.java:291)
	at com.mysql.jdbc.Buffer.fastSkipLenString(Buffer.java:172)
	at com.mysql.jdbc.MysqlIO.unpackField(MysqlIO.java:711)
	at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:431)
	at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3245)
	at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2413)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2836)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
	... 33 more

How to repeat:
accidental
[5 May 2014 14:12] Alexander Soklakov
Hi llcheng,

It looks like you're getting a corrupted MySQL protocol packet. Do you use some kind of proxy or this is a direct connection from connector to server?

Please, also, try the latest connector/J (5.1.30), and provide an example of code/configuration which leads to this failure.
[6 Jun 2014 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[1 Jun 2022 9:35] yanxiao yanxiao
Has this problem been solved? I also have this problem