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 2007/12/02 00:25:43 UTC

[jira] Created: (DERBY-3241) No syntax error when compiling statement with unterminated comment

No syntax error when compiling statement with unterminated comment
------------------------------------------------------------------

                 Key: DERBY-3241
                 URL: https://issues.apache.org/jira/browse/DERBY-3241
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.4.0.0
            Reporter: Knut Anders Hatlen
            Priority: Minor


Compiling a statement with an unterminated comment doesn't raise a syntax error.

ij> prepare p as 'values 1 /* unterminated comment ';
ij> execute p;
1          
-----------
1          

1 row selected

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


[jira] Closed: (DERBY-3241) No syntax error when compiling statement with unterminated comment

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

Knut Anders Hatlen closed DERBY-3241.
-------------------------------------

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

Thanks for the new patch, James. It seems to work fine now.
Committed revision 600990.

> No syntax error when compiling statement with unterminated comment
> ------------------------------------------------------------------
>
>                 Key: DERBY-3241
>                 URL: https://issues.apache.org/jira/browse/DERBY-3241
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: James F. Adams
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: Derby-3241-2.diff, Derby-3241.diff
>
>
> Compiling a statement with an unterminated comment doesn't raise a syntax error.
> ij> prepare p as 'values 1 /* unterminated comment ';
> ij> execute p;
> 1          
> -----------
> 1          
> 1 row selected

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


[jira] Updated: (DERBY-3241) No syntax error when compiling statement with unterminated comment

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

James F. Adams updated DERBY-3241:
----------------------------------

    Derby Info: [Patch Available]

suites.All and derbyall ran with no new errors.  Set patch available.

> No syntax error when compiling statement with unterminated comment
> ------------------------------------------------------------------
>
>                 Key: DERBY-3241
>                 URL: https://issues.apache.org/jira/browse/DERBY-3241
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: James F. Adams
>            Priority: Minor
>         Attachments: Derby-3241.diff
>
>
> Compiling a statement with an unterminated comment doesn't raise a syntax error.
> ij> prepare p as 'values 1 /* unterminated comment ';
> ij> execute p;
> 1          
> -----------
> 1          
> 1 row selected

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


[jira] Updated: (DERBY-3241) No syntax error when compiling statement with unterminated comment

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

James F. Adams updated DERBY-3241:
----------------------------------

    Attachment: Derby-3241-2.diff

Thanks for reviewing my patch, Knut.  I have attached an updated version of the patch that handles the example you described and  added an additional test.  suites.All and derbyall ran without new errors.

> No syntax error when compiling statement with unterminated comment
> ------------------------------------------------------------------
>
>                 Key: DERBY-3241
>                 URL: https://issues.apache.org/jira/browse/DERBY-3241
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: James F. Adams
>            Priority: Minor
>         Attachments: Derby-3241-2.diff, Derby-3241.diff
>
>
> Compiling a statement with an unterminated comment doesn't raise a syntax error.
> ij> prepare p as 'values 1 /* unterminated comment ';
> ij> execute p;
> 1          
> -----------
> 1          
> 1 row selected

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


[jira] Assigned: (DERBY-3241) No syntax error when compiling statement with unterminated comment

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

James F. Adams reassigned DERBY-3241:
-------------------------------------

    Assignee: James F. Adams

> No syntax error when compiling statement with unterminated comment
> ------------------------------------------------------------------
>
>                 Key: DERBY-3241
>                 URL: https://issues.apache.org/jira/browse/DERBY-3241
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: James F. Adams
>            Priority: Minor
>
> Compiling a statement with an unterminated comment doesn't raise a syntax error.
> ij> prepare p as 'values 1 /* unterminated comment ';
> ij> execute p;
> 1          
> -----------
> 1          
> 1 row selected

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


[jira] Updated: (DERBY-3241) No syntax error when compiling statement with unterminated comment

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

James F. Adams updated DERBY-3241:
----------------------------------

    Attachment: Derby-3241.diff

Attached a patch proposal (Derby-3241.diff) that I believe resolves this issue. 

The patch modifies sqlgrammar.jj to detect unterminated bracketed comments by correcting the use of SKIP and MORE regular expressions.  I also added some tests to CommentTest.java to check for unterminated bracketed comments.

> No syntax error when compiling statement with unterminated comment
> ------------------------------------------------------------------
>
>                 Key: DERBY-3241
>                 URL: https://issues.apache.org/jira/browse/DERBY-3241
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: James F. Adams
>            Priority: Minor
>         Attachments: Derby-3241.diff
>
>
> Compiling a statement with an unterminated comment doesn't raise a syntax error.
> ij> prepare p as 'values 1 /* unterminated comment ';
> ij> execute p;
> 1          
> -----------
> 1          
> 1 row selected

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


[jira] Commented: (DERBY-3241) No syntax error when compiling statement with unterminated comment

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

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

Thanks for the patch, James. It correctly makes the statement mentioned in the bug description fail. However, this statement still compiles without error:

ij> prepare p as 'values 1 /*';
ij> execute p;
1          
-----------
1          

1 row selected

> No syntax error when compiling statement with unterminated comment
> ------------------------------------------------------------------
>
>                 Key: DERBY-3241
>                 URL: https://issues.apache.org/jira/browse/DERBY-3241
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: James F. Adams
>            Priority: Minor
>         Attachments: Derby-3241.diff
>
>
> Compiling a statement with an unterminated comment doesn't raise a syntax error.
> ij> prepare p as 'values 1 /* unterminated comment ';
> ij> execute p;
> 1          
> -----------
> 1          
> 1 row selected

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