db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-5170) Client doesn't handle double quotes in savepoint names
Date Thu, 31 Mar 2011 18:08:05 GMT
Client doesn't handle double quotes in savepoint names

                 Key: DERBY-5170
                 URL: https://issues.apache.org/jira/browse/DERBY-5170
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions:
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen

I added the following test case to SavepointJdbc30Test and saw that it failed with the client

    public void testQuotes() throws SQLException {
        Statement s = createStatement();
        s.execute("create table test_quotes(x int)");
        s.execute("insert into test_quotes values 1");

        Savepoint sp = getConnection().setSavepoint("a \" b ' c");

        s.execute("insert into test_quotes values 2");


                s.executeQuery("select * from test_quotes"),

Embedded had no problems with the savepoint, but the client raised this error when calling

java.sql.SQLSyntaxErrorException: Syntax error: Encountered "b" at line 1, column 16.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message