db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2785) ij "describe" built in command cannot describe a table named "run"
Date Sun, 20 Jun 2010 15:12:23 GMT

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

Bryan Pendleton commented on DERBY-2785:

Hi Eranda,

I see you are right, there is no exception in the derby.log.

To see the stack trace, I had to add

  e.printStackTrace() ;

to the 2 catch() blocks near line 375 of 

When I did that, I see:

ij> describe 'CamelCaseTable';
	at org.apache.derby.impl.tools.ij.ij.caIdentifier(ij.java:2635)
	at org.apache.derby.impl.tools.ij.ij.DescTableStatement(ij.java:1445)
	at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:1110)
	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:341)
	at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:261)
	at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
	at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
	at org.apache.derby.tools.ij.main(ij.java:59)
JAVA ERROR: java.lang.NullPointerException

In my tree, line 2635 of ij.java is the line:

        DatabaseMetaData dbmd = theConnection.getMetaData();
        String identifier = i;

            identifier = t.image;
        if (dbmd.storesLowerCaseIdentifiers())
            identifier = identifier.toLowerCase(Locale.ENGLISH);
        else if (dbmd.storesUpperCaseIdentifiers())
            identifier = identifier.toUpperCase(Locale.ENGLISH);       <====== THIS IS
LINE 2635

        {if (true) return identifier;}
    throw new Error("Missing return statement in function");

So 'identifier' must be NULL at this point.

Maybe you can investigate and determine why this is?



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

View raw message