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 "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2011/04/04 10:19:05 UTC

[jira] [Closed] (DERBY-5170) Client doesn't handle double quotes in savepoint names

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

Knut Anders Hatlen closed DERBY-5170.
-------------------------------------

          Resolution: Fixed
       Fix Version/s: 10.8.0.0
    Issue & fix info: [Repro attached]  (was: [Repro attached, Patch Available])

> 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: 10.7.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.8.0.0
>
>         Attachments: derby-5170-1a.diff
>
>
> I added the following test case to SavepointJdbc30Test and saw that it failed with the client driver:
>     public void testQuotes() throws SQLException {
>         setAutoCommit(false);
>         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");
>         getConnection().rollback(sp);
>         JDBC.assertSingleValueResultSet(
>                 s.executeQuery("select * from test_quotes"),
>                 "1");
>     }
> Embedded had no problems with the savepoint, but the client raised this error when calling setSavepoint():
> 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