[
https://jira.nuxeo.com/browse/NXP-5560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=90079#action_90079
]
Florent Guillaume commented on NXP-5560:
----------------------------------------
Oracle fails if there are more than 1000 expressions in a IN(...) statement:
org.nuxeo.ecm.core.storage.StorageException: Could not select: SELECT "ID",
"PARENTID", "POS", "NAME", "ISPROPERTY", "PRIMARYTYPE", "MIXINTYPES",
"ISCHECKEDIN", "BASEVERSIONID", "MAJORVERSION", "MINORVERSION", "ISVERSION"
FROM "HIERARCHY" WHERE "ID" IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ... , ?)
at
org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getSelectRows(JDBCRowMapper.java:411)
at
org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.readSimpleRows(JDBCRowMapper.java:212)
at
org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.read(JDBCRowMapper.java:178)
at
org.nuxeo.ecm.core.storage.sql.CachingRowMapper.read(CachingRowMapper.java:308)
at
org.nuxeo.ecm.core.storage.sql.PersistenceContext.getFromMapper(PersistenceContext.java:488)
at
org.nuxeo.ecm.core.storage.sql.PersistenceContext.getMulti(PersistenceContext.java:531)
at
org.nuxeo.ecm.core.storage.sql.SessionImpl.getNodesByIds(SessionImpl.java:604)
at
org.nuxeo.ecm.core.storage.sql.SessionImpl.getNodesByIds(SessionImpl.java:673)
at
org.nuxeo.ecm.core.storage.sql.TestSQLBackend.testBulkFetchMany(TestSQLBackend.java:1378)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of
expressions in a list is 1000
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:205)
at
oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:861)
at
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1267)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
at
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3493)
at
oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
at
org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getSelectRows(JDBCRowMapper.java:381)
... 27 more
> VCS multi-document fetch should have internal batching
> ------------------------------------------------------
>
> Key: NXP-5560
> URL: https://jira.nuxeo.com/browse/NXP-5560
> Project: Nuxeo Enterprise Platform
> Issue Type: Bug
> Affects Versions: 5.3.2
> Reporter: Florent Guillaume
> Assignee: Florent Guillaume
> Priority: Major
> Fix For: 5.4.1
>
>
> When reading multiple documents in one batch, in JDBCRowMapper.getSelectRows
> we should check the batch size and subdivide if it's too big, to avoid
> prepared statements with too many variables.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets