Bug #97455 java.lang.ArrayIndexOutOfBoundsException ServerPreparedStatement.java:441

Submitted: 1 Nov 2019 9:41 Modified: 10 Dec 2019 11:53
Reporter: zhongxuchen chen Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.17 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[1 Nov 2019 9:41] zhongxuchen chen
Description:
参数: useServerPrepStmts=true;cachePrepStmts=true;
sql is simply like:
    select t.* from OD_RESOURCE_BID_ORDER t
    where  t.STATUS = '1' AND t.RESOURCE_ID IN (?)
 
every few days mysql server throws exception:

java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException: 39
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.17.jar:8.0.17]
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.17.jar:8.0.17]
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) ~[mysql-connector-java-8.0.17.jar:8.0.17]
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) ~[mysql-connector-java-8.0.17.jar:8.0.17]
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) ~[mysql-connector-java-8.0.17.jar:8.0.17]
        at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:441) ~[mysql-connector-java-8.0.17.jar:8.0.17]
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003) ~[mysql-connector-java-8.0.17.jar:8.0.17]
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122) ~[commons-dbcp2-2.7.0.jar:2.7.0]
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122) ~[commons-dbcp2-2.7.0.jar:2.7.0]

How to repeat:
Not necessarily!every few days mysql server throw this exception!
this bug mybe server preparedstatement cache logic bug!
Make people doubt the stability of MySQL database!

不是必然出现,隔几天就有这样问题出现!过一阵子又正常了。
[14 Nov 2019 7:20] zhongxuchen chen
Does the problem have anything to do with character encoding in the database?
[14 Nov 2019 7:51] MySQL Verification Team
Hi,

I cannot reproduce this problem.

Can you provide a test case to reproduce this problem?
[9 Dec 2019 8:09] zhongxuchen chen
The reason for this problem has been!

example:
select * from table where id=? 

Trigger condition:
when add column for this table. This error will happen!
[10 Dec 2019 11:53] MySQL Verification Team
Duplicate of #97924

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.