[
https://issues.apache.org/jira/browse/DERBY-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880514#action_12880514
]
Eranda Sooriyabandara commented on DERBY-2785:
----------------------------------------------
Hi Bryan,
Here I found that this exception occurs with the presence of the single
quotations with table name
ij> DESCRIBE APP.t1;
COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
I |INTEGER |0 |10 |10 |AUTOINCRE&|NULL |NO
D |DECIMAL |2 |10 |5 |NULL |NULL |YES
TEST |VARCHAR |NULL|NULL|20 |NULL |40 |YES
ij> DESCRIBE app.t1;
COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
I |INTEGER |0 |10 |10 |AUTOINCRE&|NULL |NO
D |DECIMAL |2 |10 |5 |NULL |NULL |YES
TEST |VARCHAR |NULL|NULL|20 |NULL |40 |YES
ij> DESCRIBE v1;
COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
I |INTEGER |0 |10 |10 |NULL |NULL |NO
D |DECIMAL |2 |10 |5 |NULL |NULL |YES
TEST |VARCHAR |NULL|NULL|20 |NULL |40 |YES
ij> -- should find the table, as quoted string case is preserved.
describe 'CamelCaseTable';
JAVA ERROR: java.lang.NullPointerException
ij> -- should fail, as case is wrong:
describe 'CAMELCaseTable';
JAVA ERROR: java.lang.NullPointerException
ij> -- should work, note that schema name must be upper case:
describe 'APP.CamelCaseTable';
JAVA ERROR: java.lang.NullPointerException
ij> set SCHEMA USER1;
0 rows inserted/updated/deleted
ij> -- should work, even after changing default schema, so long as schema is
right
describe 'APP.CamelCaseTable';
JAVA ERROR: java.lang.NullPointerException
ij> -- should fail, since table is in the other schema
describe 'CamelCaseTable';
JAVA ERROR: java.lang.NullPointerException
ij> -- Can use * as a wildcard for table name:
describe '*';
JAVA ERROR: java.lang.NullPointerException
ij> describe 'APP.*';
JAVA ERROR: java.lang.NullPointerException
ij> -- Observe behavior with empty string:
describe '';
JAVA ERROR: java.lang.NullPointerException
ij>
> 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
> Attachments: caidentifier.diff, derby-2785.diff, derby-2785.diff,
> derby-2785.diff, derbyall_report.txt, derbyall_report.txt,
> describeKeywords.diff, junitAll.out, step logs.txt
>
>
> 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.