db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mayuresh Nirhali (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2549) ArrayIndexOutOfBoundsException in SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE
Date Fri, 27 Apr 2007 12:50:15 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mayuresh Nirhali updated DERBY-2549:
------------------------------------

    Attachment: A2549Test.java

I was able to reproduce this error. Attaching a sample program here.

I think, the issue here is that, During Heap Scan (in Compress operation) the size of the
array that can hold  the records is hard coded to 100. So when the recordCount for a page
is more than 100, during compress operation, it will throw AIOBE. This is possible in 2 cases,
either the record size is small so that in a page (with default size, 8192) more than 100
records are stored, or default page size is changed to a higher value that will accomodate
more than 100 records.

To reproduce this bug, please run the attached program as below,

java -cp $CLASSPATH:. -Dderby.debug.true=SpaceTrace -Dderby.storage.pageSize=32768 A2549Test
> log.txt



> ArrayIndexOutOfBoundsException in SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE
> -------------------------------------------------------------------------
>
>                 Key: DERBY-2549
>                 URL: https://issues.apache.org/jira/browse/DERBY-2549
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.2.0
>         Environment: Linux 2.6.x, JRE 1.5.0_b7
>            Reporter: Kurt Huwig
>         Attachments: 2549-histogram.png, A2549Test.java, derby-2549-v1.diff, DerbyDiskSpaceDiag.java
>
>
> I am doing this in my code:
> CALL SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('SPONTS','" + "journal".toUpperCase(Locale.US)
+ "',1,1,1)")
> ("journal" is actually a String-variable, but I replaced it here for easier understanding)
> Sometime - not always - I am getting this exception:
> java.sql.SQLException: The exception 'java.lang.ArrayIndexOutOfBoundsException: 100'
was thrown while evaluating an expression. SQLSTATE: XJ001:
> Java exception: '100: java.lang.ArrayIndexOutOfBoundsException'.
>         at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.Statement.execute(Unknown Source)
> [...]
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.ArrayIndexOutOfBoundsException:
100' was thrown while evaluating an expression.
>  SQLSTATE: XJ001: Java exception: '100: java.lang.ArrayIndexOutOfBoundsException'.
>         at org.apache.derby.client.am.Statement.completeExecute(Unknown Source)
>         at org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(Unknown
Source)
>         at org.apache.derby.client.net.NetStatementReply.readExecuteCall(Unknown Source)
>         at org.apache.derby.client.net.StatementReply.readExecuteCall(Unknown Source)
>         at org.apache.derby.client.net.NetStatement.readExecuteCall_(Unknown Source)
>         at org.apache.derby.client.am.Statement.readExecuteCall(Unknown Source)
>         at org.apache.derby.client.am.Statement.flowExecute(Unknown Source)
>         at org.apache.derby.client.am.Statement.executeX(Unknown Source)
>         ... 12 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message