db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Leroux (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2785) ij "describe" built in command cannot describe a table named "run"
Date Thu, 18 Mar 2010 09:14:27 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846800#action_12846800
] 

Sylvain Leroux commented on DERBY-2785:
---------------------------------------

Hi Eranda,

'RUN' is a keyword used by ij.
http://db.apache.org/derby/papers/DerbyTut/ij_intro.html#Run+SQL+Scripts

The problem here is that if, in ij, you type a command like 'DESCRIBE RUN', the word RUN is
recognized  by the JavaCC tokenizer as a keyword. Not an identifier.

You might have to check - but it could be exactly the same for any other table having a keyword
for name. It is even quite possible, each time we add a new keyword in ij, things are going
worst!

One option could be to change the identifier() production to accept keywords. But, this require
a closer look, since by doing so, we might introduce ambiguities in the grammar.

Hope this helps,
- Sylvain

> ij "describe" built in command cannot describe a table named "run"
> ------------------------------------------------------------------
>
>                 Key: DERBY-2785
>                 URL: https://issues.apache.org/jira/browse/DERBY-2785
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.2.2.0
>         Environment: OS-X, Java 1.5
>            Reporter: Tim Halloran
>            Assignee: Eranda Sooriyabandara
>            Priority: Minor
>
> steps to duplicate:
> (attach ij to any database)
> ij> create table run (i int);
> 0 rows inserted/updated/deleted
> ij> desc run;
> ERROR 42X01: Syntax error: Encountered "desc" at line 1, column 1.
> ij> 
> I think this is a parser problem within ij where the "run" is taken as a token and that
token is not included in the definition of a tablename expression in the grammer (should be
an easy fix).

-- 
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