db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1767) insertRow(), updateRow() and deleteRow() cannot handle table names and column names containing double quotes
Date Thu, 07 Sep 2006 19:33:23 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1767?page=all ]

Knut Anders Hatlen updated DERBY-1767:

    Fix Version/s:
       Derby Info:   (was: [Patch Available])

Thank you, Fernanda! I committed the patch with revision 441185.

One thing that I didn't notice in my previous review, was that the new JUnit test was run
as a separate test, not as part of _Suite.junit. It would be good if this were addressed in
a follow-up patch.

> insertRow(), updateRow() and deleteRow() cannot handle table names and column names containing
double quotes
> ------------------------------------------------------------------------------------------------------------
>                 Key: DERBY-1767
>                 URL: http://issues.apache.org/jira/browse/DERBY-1767
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>         Assigned To: Fernanda Pizzorno
>            Priority: Minor
>             Fix For:
>         Attachments: derby-1767.diff, derby-1767.stat, derby-1767v2.diff, derby-1767v2.stat,
> ResultSet.insertRow(), ResultSet.updateRow() and ResultSet.deleteRow() fail with syntax
error if the table name or a column name contains a double quote character. The attached repro
gives this stack trace:
> Exception in thread "main" java.sql.SQLSyntaxErrorException: Syntax error: Encountered
"quoted" at line 1, column 24.
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:137)
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:72)
>         at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:203)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:380)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:345)
>         at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1378)
>         at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
>         at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(EmbedResultSet.java:4342)
>         at org.apache.derby.impl.jdbc.EmbedResultSet.insertRow(EmbedResultSet.java:3678)
>         at QuotesInNames.main(QuotesInNames.java:15)
> Caused by: java.sql.SQLException: Syntax error: Encountered "quoted" at line 1, column
>         ... 11 more

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message