Derby
  1. Derby
  2. DERBY-4748

StringIndexOutOfBoundsException on syntax error (invalid COMMIT)

    Details

    • Urgency:
      Normal
    • Bug behavior facts:
      Regression

      Description

      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)
      ....

      1. derby-4748-1b-sioobe.diff
        3 kB
        Kristian Waagan
      2. derby-4748-1a-sioobe.diff
        2 kB
        Kristian Waagan

        Activity

        Gavin made changes -
        Workflow jira [ 12516076 ] Default workflow, editable Closed status [ 12802800 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Rick Hillegas made changes -
        Affects Version/s 10.7.1.1 [ 12315564 ]
        Affects Version/s 10.7.1.0 [ 12314971 ]
        Fix Version/s 10.7.1.1 [ 12315564 ]
        Fix Version/s 10.7.1.0 [ 12314971 ]
        Knut Anders Hatlen made changes -
        Fix Version/s 10.6.2.0 [ 12315342 ]
        Fix Version/s 10.6.2.1 [ 12315343 ]
        Kathey Marsden made changes -
        Fix Version/s 10.6.2.0 [ 12315342 ]
        Fix Version/s 10.6.1.1 [ 12314973 ]
        Kristian Waagan made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 10.4.2.1 [ 12313401 ]
        Fix Version/s 10.5.3.1 [ 12314182 ]
        Fix Version/s 10.6.1.1 [ 12314973 ]
        Resolution Fixed [ 1 ]
        Kristian Waagan made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Kristian Waagan made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Issue & fix info [Patch Available]
        Fix Version/s 10.7.0.0 [ 12314971 ]
        Resolution Fixed [ 1 ]
        Kristian Waagan made changes -
        Attachment derby-4748-1b-sioobe.diff [ 12450149 ]
        Kristian Waagan made changes -
        Issue & fix info [Patch Available]
        Kristian Waagan made changes -
        Attachment derby-4748-1a-sioobe.diff [ 12449917 ]
        Kristian Waagan made changes -
        Field Original Value New Value
        Assignee Kristian Waagan [ kristwaa ]
        Affects Version/s 10.4.2.1 [ 12313401 ]
        Affects Version/s 10.5.3.1 [ 12314182 ]
        Affects Version/s 10.7.0.0 [ 12314971 ]
        Component/s Network Client [ 11690 ]
        Stephen Felts created issue -

          People

          • Assignee:
            Kristian Waagan
            Reporter:
            Stephen Felts
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development