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] Updated: (DERBY-3242) ij doesn't understand bracketed comments
Date Fri, 14 Dec 2007 14:15:43 GMT

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

Knut Anders Hatlen updated DERBY-3242:
--------------------------------------

    Attachment: comment3.sql

Thanks again, James. I think the last patch is very close, but there seems to be a problem
with nested comments. Please see the attached sql script.

$ java -jar derbyrun.jar ij comment3.sql
ij version 10.4
ij> /* let's start the file with a /* nested comment */ and see what happens */
connect 'jdbc:derby:d3242;create=true';
IJ ERROR: Unable to establish connection
ij> values 'hi!';
IJ ERROR: Unable to establish connection
ij>

This script works if the comment isn't nested. I don't know what's causing this, but I suspect
that it's the rather cryptic regex you uncommented in ij.jj that doesn't handle nested comments.
Nested comments in the middle of a statement do however work correctly.

> ij doesn't understand bracketed comments
> ----------------------------------------
>
>                 Key: DERBY-3242
>                 URL: https://issues.apache.org/jira/browse/DERBY-3242
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL, Tools
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: James F. Adams
>         Attachments: comment.sql, comment2.sql, comment3.sql, Derby-3241-v2.txt, Derby-3242.txt
>
>
> When I execute this sql script in ij
> ------
> create table t (x int);
> /*
> insert into t values 1, 2, 3;
> insert into t values 4, 5, 6;
> */
> ------
> the first INSERT statement in the comment is correctly ignored, but the second one is
executed. So after running the script, table T contains these rows:
> ij> select * from t;
> X          
> -----------
> 4          
> 5          
> 6          
> 3 rows selected

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


Mime
View raw message