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

Mike Matrigali updated DERBY-2549:
----------------------------------

    Attachment: derby2549_mikem.diff

I think there is yet a third option.  The intent of this loop is to operate 
like the standard group fetch for normal scans.  So  it should just work to 
fetch N rows and have the loop check for N, and just return from the middle of 
the loop and leave the scan to get the rest of the rows on the next scan.  It 
shouldn't be necessary to size the group exactly and should not be necessary to 
just give up on a page if it has more rows.

I have attached a quick patch i did, but have not run full tests.  It did seem 
to pass the attached bug case and passed the existing online compress test.  
Would appreciate if you could run this patch with your debugging to verify that 
we get all 111 rows rather than skipping the remaining 11.

A real checkin should include a new test case, probably based on the recent 
case that  reproduces the problem.  Though I noted that license has not been 
granted on that attachment.  

> 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
>         Assigned To: Mayuresh Nirhali
>         Attachments: 2549-histogram.png, A2549Test.java, derby-2549-v1.diff, 
> derby2549_mikem.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.

Reply via email to