db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2255) ij should indicate that it is waiting for more input in a multi-line interactive statement.
Date Sat, 20 Jan 2007 07:02:30 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466218

Andrew McIntyre commented on DERBY-2255:

The changes in derby-2255-2.diff look good, though I found an issue with the change to readSingleLineComment().
With the derby-2255-2 patch, if you begin a -- comment in an interactive ij session, it is
impossible to get out of the comment, at least on Mac OS X and I suspect Linux (haven't tried
on Windows yet). 

There is something subtle going on with the input stream and prompting, because if I remove
the single line:

utilMain.doPrompt(false, promptwriter, "");

from readSingleLineComment then it behaves as I would suspect: comments are consumed up to
the newline and normal processing is resumed. Originally I removed this line from readSingleLineComment()
because we don't want to prompt after consuming the contents of a single line comment, we
want to continue normal statement processing. I was surprised that just removing the prompt
fixed the problem of being stuck in comment-mode though.

Attaching a patch which includes the previously mentioned change, along with some improved
comments. I would appreciate it if any interested parties could review the new and old patches
and perhaps look into the unusual comment behavior.

> ij should indicate that it is waiting for more input in a multi-line interactive statement.
> -------------------------------------------------------------------------------------------
>                 Key: DERBY-2255
>                 URL: https://issues.apache.org/jira/browse/DERBY-2255
>             Project: Derby
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions:
>            Reporter: Anders Morken
>         Assigned To: Anders Morken
>            Priority: Trivial
>         Attachments: DERBY-2255-1.diff, DERBY-2255-2.diff, derby-2255-3.diff
> Many users have been confused by the lack of response from ij when they forget to end
a statement with a semicolon, and believe that Derby is taking its sweet time answering their
query, while ij is simply waiting for more input.
> This issue tries to address this by adding a short "> " prompt to the next line after
a newline has been entered by the user without ending the statement with a semicolon.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message