You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kristian Waagan (JIRA)" <ji...@apache.org> on 2010/08/10 17:20:15 UTC

[jira] Resolved: (DERBY-4748) StringIndexOutOfBoundsException on syntax error (invalid COMMIT)

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

Kristian Waagan resolved DERBY-4748.
------------------------------------

    Fix Version/s: 10.4.2.1
                   10.5.3.1
                   10.6.1.1
       Resolution: Fixed

Backported to 10.6 with revision 984074, 10.5 with revision 984079, and finally to 10.4 with revision 984080. suites.All and derbyall ran without failures, with the exception of store/aes.sql on 10.4.

Stephen, the issue is ready for verification and closing.

> StringIndexOutOfBoundsException on syntax error (invalid COMMIT)
> ----------------------------------------------------------------
>
>                 Key: DERBY-4748
>                 URL: https://issues.apache.org/jira/browse/DERBY-4748
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client, SQL
>    Affects Versions: 10.4.2.1, 10.5.3.1, 10.6.1.0, 10.7.0.0
>         Environment: Windows XP
>            Reporter: Stephen Felts
>            Assignee: Kristian Waagan
>             Fix For: 10.4.2.1, 10.5.3.1, 10.6.1.1, 10.7.0.0
>
>         Attachments: derby-4748-1a-sioobe.diff, derby-4748-1b-sioobe.diff
>
>
> Start the network server on port 1527 on localhost.
> Run ant on the following:
> <project default="all"> 
>   <property environment="env" /> 
>   <path id="derby.classpath.id"> 
>     <fileset dir="${env.DERBY_LIB"> 
>       <include name="derbynet.jar" /> 
>       <include name="derbyclient.jar" /> 
>     </fileset> 
>   </path> 
>   <target name="all"> 
>     <sql driver="org.apache.derby.jdbc.ClientDriver" 
>          
> url="jdbc:derby://localhost:1527/derbyDB;create=true;user=derbyuser;passsword=derbypwd" 
>          userid="derbyuser" 
>          password="derbypwd" 
>          classpathref="derby.classpath.id" 
>          onerror="continue">
> create table mytable1 (mycol varchar(255)); 
> commit; 
>     </sql> 
>   </target> 
> </project> 
> On 10.5.3, I get
>       [sql] Executing commands 
>       [sql] Failed to execute:  commit 
>       [sql] java.sql.SQLSyntaxErrorException: Syntax error: Encountered 
> "commit" 
>  at line 1, column 1. 
>       [sql] 1 of 2 SQL statements executed successfully 
> but on 10.6.1, I get
>      [sql] Executing commands 
> BUILD FAILED 
> java.lang.StringIndexOutOfBoundsException: String index out of range: 6 
>         at java.lang.String.charAt(String.java:686) 
>         at org.apache.derby.client.am.Statement.isolateAnyInitialIdentifier(Unknown Source) 
>         at org.apache.derby.client.am.Statement.getStatementToken(Unknown Source) 
>         at org.apache.derby.client.am.Statement.parseSqlAndSetSqlModes(Unknown Source) 
> ....

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