[
https://issues.apache.org/jira/browse/OAK-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15175778#comment-15175778
]
Julian Reschke commented on OAK-4082:
-------------------------------------
We might; I'll have a look at my unit test code that wraps connections for
diagnostics exactly like that...
> Don't pool prepared statements using lists
> ------------------------------------------
>
> Key: OAK-4082
> URL: https://issues.apache.org/jira/browse/OAK-4082
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: rdbmk
> Reporter: Tomek Rękawek
> Fix For: 1.4, 1.6
>
> Attachments: OAK-4082.patch
>
>
> In the RDBDocumentStoreJDBC we should invoke {{setPoolable(false)}} on all
> prepared statements containing a list of ids. Otherwise we can get exceptions
> like this:
> {noformat}
> 15:45:58 Caused by:
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Can't create more
> than max_prepared_stmt_count statements (current value: 16382)
> 15:45:58 at
> sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source)
> 15:45:58 at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 15:45:58 at
> java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> 15:45:58 at com.mysql.jdbc.Util.handleNewInstance(Util.java:400)
> 15:45:58 at com.mysql.jdbc.Util.getInstance(Util.java:383)
> 15:45:58 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:980)
> 15:45:58 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847)
> 15:45:58 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783)
> 15:45:58 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447)
> 15:45:58 at
> com.mysql.jdbc.ServerPreparedStatement.serverPrepare(ServerPreparedStatement.java:1514)
> 15:45:58 at
> com.mysql.jdbc.ServerPreparedStatement.<init>(ServerPreparedStatement.java:389)
> 15:45:58 at
> com.mysql.jdbc.ServerPreparedStatement.prepareBatchedInsertSQL(ServerPreparedStatement.java:2832)
> 15:45:58 at
> com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1524)
> 15:45:58 at
> com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1262)
> 15:45:58 at
> org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStoreJDBC.insert(RDBDocumentStoreJDBC.java:302)
> 15:45:58 at
> org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStoreJDBC.update(RDBDocumentStoreJDBC.java:446)
> 15:45:58 at
> org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.bulkUpdate(RDBDocumentStore.java:456)
> 15:45:58 ... 21 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)