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 "Martin Zaun (JIRA)" <ji...@apache.org> on 2008/04/16 02:26:22 UTC

[jira] Created: (DERBY-3626) Issue with bracketed SQL comments on a remote database connection from ij

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

                 Key: DERBY-3626
                 URL: https://issues.apache.org/jira/browse/DERBY-3626
             Project: Derby
          Issue Type: Bug
         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)
            Reporter: Martin Zaun
            Priority: Minor


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.



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


[jira] Updated: (DERBY-3626) Issue with bracketed SQL comments on a remote database connection from ij

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3626:
--------------------------------------

         Component/s:     (was: Network Client)
                      Tools
    Issue & fix info: [Repro attached]
             Urgency: Normal

Triaged for 10.5.2.

> Issue with bracketed SQL comments on a remote database connection from ij
> -------------------------------------------------------------------------
>
>                 Key: DERBY-3626
>                 URL: https://issues.apache.org/jira/browse/DERBY-3626
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.4.1.3
>         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)
>            Reporter: Martin Zaun
>            Priority: Minor
>         Attachments: comments_test_fail.sql, comments_test_ok.sql
>
>
> 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.

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


[jira] Updated: (DERBY-3626) Issue with bracketed SQL comments on a remote database connection from ij

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3626:
--------------------------------------

    Affects Version/s: 10.4.1.2

> Issue with bracketed SQL comments on a remote database connection from ij
> -------------------------------------------------------------------------
>
>                 Key: DERBY-3626
>                 URL: https://issues.apache.org/jira/browse/DERBY-3626
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.4.1.2
>         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)
>            Reporter: Martin Zaun
>            Priority: Minor
>         Attachments: comments_test_fail.sql, comments_test_ok.sql
>
>
> 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.

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


[jira] Updated: (DERBY-3626) Issue with bracketed SQL comments on a remote database connection from ij

Posted by "Martin Zaun (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Zaun updated DERBY-3626:
-------------------------------

    Attachment: comments_test_ok.sql
                comments_test_fail.sql

Attached SQL queries from bracketed comments function test, all but one passing.

> Issue with bracketed SQL comments on a remote database connection from ij
> -------------------------------------------------------------------------
>
>                 Key: DERBY-3626
>                 URL: https://issues.apache.org/jira/browse/DERBY-3626
>             Project: Derby
>          Issue Type: Bug
>         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)
>            Reporter: Martin Zaun
>            Priority: Minor
>         Attachments: comments_test_fail.sql, comments_test_ok.sql
>
>
> 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.

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


[jira] Commented: (DERBY-3626) Issue with bracketed SQL comments on a remote database connection from ij

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589710#action_12589710 ] 

Knut Anders Hatlen commented on DERBY-3626:
-------------------------------------------

The client driver checks what kind of statement it is before it sends the SQL text to the server. This code is not updated to understand bracketed comments. See org.apache.derby.client.am.Statement.parseSqlAndSetSqlModes().

> Issue with bracketed SQL comments on a remote database connection from ij
> -------------------------------------------------------------------------
>
>                 Key: DERBY-3626
>                 URL: https://issues.apache.org/jira/browse/DERBY-3626
>             Project: Derby
>          Issue Type: Bug
>         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)
>            Reporter: Martin Zaun
>            Priority: Minor
>         Attachments: comments_test_fail.sql, comments_test_ok.sql
>
>
> 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.

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


[jira] Closed: (DERBY-3626) Issue with bracketed SQL comments on a remote database connection from ij

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-3626.
-------------------------------------

    Resolution: Duplicate

The problem has later been reported as DERBY-4338 and fixed. Closing this issue as a duplicate.

> Issue with bracketed SQL comments on a remote database connection from ij
> -------------------------------------------------------------------------
>
>                 Key: DERBY-3626
>                 URL: https://issues.apache.org/jira/browse/DERBY-3626
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.4.1.3
>         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)
>            Reporter: Martin Zaun
>            Priority: Minor
>         Attachments: comments_test_fail.sql, comments_test_ok.sql
>
>
> 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.

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


[jira] Updated: (DERBY-3626) Issue with bracketed SQL comments on a remote database connection from ij

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3626:
----------------------------------

    Component/s: Network Client

> Issue with bracketed SQL comments on a remote database connection from ij
> -------------------------------------------------------------------------
>
>                 Key: DERBY-3626
>                 URL: https://issues.apache.org/jira/browse/DERBY-3626
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.4.1.3
>         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)
>            Reporter: Martin Zaun
>            Priority: Minor
>         Attachments: comments_test_fail.sql, comments_test_ok.sql
>
>
> 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.

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