Derby
  1. Derby
  2. DERBY-3626

Issue with bracketed SQL comments on a remote database connection from ij

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 10.4.1.3
    • Fix Version/s: None
    • Component/s: Tools
    • Labels:
      None
    • Environment:
      Windows XP
      java version "1.5.0_13"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing)
    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached

      Description

      Testing DERBY-1749 (bracketed SQL comments) the function test org.apache.derbyTesting.functionTests.tests.lang.CommentTest pass. However, when taking the SQL comment test queries from the function tests and running them from ij, all but one pass.

      The failing test case is the query
      /* a comment */ VALUES 1 ;
      which returns an error instead of the expected value "1". See examples below and attached files.

      Strangely, this only happens on a remote database connection:
      ij version 10.5
      ij> connect 'jdbc:derby://localhost:1527/testdb;create=true';
      ij> /* a comment */ VALUES 1 ;
      ERROR X0Y79: Statement.executeUpdate() cannot be called with a statement that re
      turns a ResultSet.
      ij>

      The embedded case is fine:
      ij version 10.5
      ij> connect 'jdbc:derby:/testdb;create=true';
      ij> /* a comment */ VALUES 1 ;
      1
      -----------
      1

      1 row selected
      ij>

      Since it does seem to make a difference whether to run these queries embedded orremotely and from ij or a jdbc junit client, it might be useful to extend the function tests for bracketed comments to cover more configurations.

      1. comments_test_ok.sql
        0.6 kB
        Martin Zaun
      2. comments_test_fail.sql
        0.2 kB
        Martin Zaun

        Issue Links

          Activity

          Gavin made changes -
          Workflow jira [ 12429084 ] Default workflow, editable Closed status [ 12800922 ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Duplicate [ 3 ]
          Knut Anders Hatlen made changes -
          Link This issue duplicates DERBY-4338 [ DERBY-4338 ]
          Knut Anders Hatlen made changes -
          Urgency Normal
          Issue & fix info [Repro attached]
          Component/s Tools [ 11414 ]
          Component/s Network Client [ 11690 ]
          Kathey Marsden made changes -
          Component/s Network Client [ 11690 ]
          Knut Anders Hatlen made changes -
          Affects Version/s 10.4.1.2 [ 12313095 ]
          Martin Zaun made changes -
          Link This issue blocks DERBY-1749 [ DERBY-1749 ]
          Martin Zaun made changes -
          Link This issue blocks DERBY-3242 [ DERBY-3242 ]
          Martin Zaun made changes -
          Field Original Value New Value
          Attachment comments_test_fail.sql [ 12380228 ]
          Attachment comments_test_ok.sql [ 12380229 ]
          Martin Zaun created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Martin Zaun
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development