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 "Suresh Thalamati (JIRA)" <ji...@apache.org> on 2006/11/21 01:04:01 UTC

[jira] Created: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection. 
-----------------------------------------------------------------------------------------------------------------

                 Key: DERBY-2103
                 URL: http://issues.apache.org/jira/browse/DERBY-2103
             Project: Derby
          Issue Type: Bug
    Affects Versions: 10.3.0.0
            Reporter: Suresh Thalamati
            Priority: Minor


connect 'jdbc:derby:wombat;create=true';
create table t1(a int ) ;
create table "t2"(a int ) ;
-- this should fail. 
create table foo (a int ,  \"YEAR\" int ) ;
-- but this should not fail. But failing
create table t4 ( b int ) ;

FYI:
$ java org.apache.derby.tools.ij
ij version 10.3
ij> run 'weird1.sql';
ij> connect 'jdbc:derby:wombat;create=true';
ij> create table t1(a int ) ;
0 rows inserted/updated/deleted
ij> create table "t2"(a int ) ;
0 rows inserted/updated/deleted
ij> -- this should fail.
create table foo (a int ,  \"YEAR\" int ) ;
ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
: "".
ij> -- but this should not fail. But failing
create table t4 ( b int ) ;
ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
ij>




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

        

[jira] Commented: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

Posted by "Mayuresh Nirhali (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465742 ] 

Mayuresh Nirhali commented on DERBY-2103:
-----------------------------------------

I figured that there is a better way to fix this issue by cleaning up the cachedParser object, (only) in case of Exception. This ensures that for subsequent compilation a clean Parser object is populated. This approach does not touch the sql grammer code. The bug is a side affect of caching the parser for the subsequent compilations and hence it makes sense to fix that in the SqlParserImpl instead of changes to grammer.

Derbyall runs fine without any errors... This patch is ready for review.

Thanks

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0
>
>         Attachments: derby2103.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Commented: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

Posted by "Mayuresh Nirhali (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465141 ] 

Mayuresh Nirhali commented on DERBY-2103:
-----------------------------------------

derbyall testrun just finished with the proposed fix and it did not show any new failures.

Mayuresh

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Commented: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

Posted by "Mayuresh Nirhali (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465138 ] 

Mayuresh Nirhali commented on DERBY-2103:
-----------------------------------------

After some investigation, I found that, when the expected error happens, lookingAhead flag in SQLParser implementation is true and due  to the exception this flag is not cleared. The parser object is cached and later used by the next parsing activity. Following code demonstrates the scenario.

  final private boolean jj_3_12() {
    Token xsp;
    xsp = jj_scanpos;
    lookingAhead = true;
    jj_semLA = getToken(3).kind != LARGE;   // ------- The exception happens in this call   
    lookingAhead = false;                                    // ------- This is not called due to the exception.
    if (!jj_semLA || jj_3R_60()) return true;
    if (jj_3R_61()) return true;
    return false;
  }

The simple fix could be to wrap the lookingAhead assignment  after the call within finally block.
then, the same method would look like below,

    lookingAhead = true;
    try { jj_semLA = getToken(3).kind != LARGE; }
    finally { lookingAhead = false; }

I tried this and this has fixed the testcase.
Now, my concern is that, there are many such methods in SQLParser implementation.For the fix to be complete and to be able to avoid future issues due to same problem, all methods which should change needs to identified.
While, I am trying to do the same, I would really appreciate any inputs in this regard.

Thanks,
Mayuresh

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Commented: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

Posted by "Mayuresh Nirhali (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465783 ] 

Mayuresh Nirhali commented on DERBY-2103:
-----------------------------------------

uploading a new patch with comments for the code change. 
please review derby2103_v2.diff

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.0.0
>
>         Attachments: derby2103.diff, derby2103_v2.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Updated: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

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

Mayuresh Nirhali updated DERBY-2103:
------------------------------------

    Attachment: derby2103_v2.diff

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0
>
>         Attachments: derby2103.diff, derby2103_v2.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Updated: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

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

Mayuresh Nirhali updated DERBY-2103:
------------------------------------

    Attachment: Derby2103_v3.diff

I have attached version 3 of this patch modifying comments.
The comments now clarify that this is a workaround and the issue has been raised with javacc team.

I will monitor the javacc-152 issue and depending on their analysis, I will file a bug to remove this workaround, as Dag suggested. Thanks dag for your expert comments on this.

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.0.0
>
>         Attachments: derby2103.diff, derby2103_v2.diff, Derby2103_v3.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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


[jira] Commented: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

Posted by "Mayuresh Nirhali (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465948 ] 

Mayuresh Nirhali commented on DERBY-2103:
-----------------------------------------

Thanks Dag!

I have raised this with javacc (issue-152).
So, does it make sense to treat this as a workaround or should we wait for javacc team to respond ??

I believe, the cost of committing this workaround (temporarily) is that in case of exceptions the parser object will be populated again, and this is a small performance hit compared to the performance if the bug is fixed in javacc itself.

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.0.0
>
>         Attachments: derby2103.diff, derby2103_v2.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Commented: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559880#action_12559880 ] 

Kristian Waagan commented on DERBY-2103:
----------------------------------------

The javacc-152 issue has been fixed, and is marked for inclusion in the 4.1 milestone.
I do not know the planned release date, but we should keep our eyes open and consider upgrading JavaCC when the update is out.

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4
>            Reporter: Suresh Thalamati
>            Assignee: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.1.4
>
>         Attachments: derby2103.diff, derby2103_v2.diff, Derby2103_v3.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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


[jira] Updated: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

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

Kathey Marsden updated DERBY-2103:
----------------------------------

    Component/s: SQL

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.1.4
>            Reporter: Suresh Thalamati
>            Assignee: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.1.4
>
>         Attachments: derby2103.diff, derby2103_v2.diff, Derby2103_v3.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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


[jira] Updated: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

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

Mayuresh Nirhali updated DERBY-2103:
------------------------------------

       Derby Info: [Patch Available]
    Fix Version/s: 10.2.3.0

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0
>
>         Attachments: derby2103.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Commented: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465942 ] 

Dag H. Wanvik commented on DERBY-2103:
--------------------------------------

I looked at this, the fix will work, but it seems to me this might
be an bug in JavaCC and should be fixed there; why isn't this 
state flag reset by the (generated) ReInit method(s)? 
I didn't find any issue in JavaCC's bug database and 
I also looked at the source of JavaCC and it is never generates a
reset on reinitialization; so it might be worth raising the issue with
the JavaCC folks..




> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.0.0
>
>         Attachments: derby2103.diff, derby2103_v2.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Updated: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

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

Mayuresh Nirhali updated DERBY-2103:
------------------------------------

    Attachment: derby2103.diff

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>         Attachments: derby2103.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Assigned: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

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

Mayuresh Nirhali reassigned DERBY-2103:
---------------------------------------

    Assignee: Mayuresh Nirhali

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Resolved: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

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

Kristian Waagan resolved DERBY-2103.
------------------------------------

    Resolution: Fixed
    Derby Info:   (was: [Patch Available])

Committed 'Derby2103_v3.diff ' to trunk with revision 499299.
Merged fix to 10.2 (svn merge -c 499299 .) with revision 499304.

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.0.0
>
>         Attachments: derby2103.diff, derby2103_v2.diff, Derby2103_v3.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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


[jira] Commented: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466049 ] 

Dag H. Wanvik commented on DERBY-2103:
--------------------------------------

I agree this is a good workaround. Might be good to
update the patch comment with this new info so it can be
removed if/when this is fixed in JavaCC. If they accept
issue-152, you might want to make a new JIRA to track a 
cleanup.

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.0.0
>
>         Attachments: derby2103.diff, derby2103_v2.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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

        

[jira] Commented: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466730 ] 

Kristian Waagan commented on DERBY-2103:
----------------------------------------

New revision of the patch looks good. I will commit this after my test-run has completed.

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.0.0
>
>         Attachments: derby2103.diff, derby2103_v2.diff, Derby2103_v3.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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


[jira] Updated: (DERBY-2103) After a Lexical Error due to syntax error , even a simple create table does not work on the same connection.

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

Mayuresh Nirhali updated DERBY-2103:
------------------------------------

    Fix Version/s: 10.3.0.0

had removed 10.3 in Fix Version field by mistake.

> After a Lexical Error due to syntax error ,    even a simple create table does not work  on the same connection.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2103
>                 URL: https://issues.apache.org/jira/browse/DERBY-2103
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Suresh Thalamati
>         Assigned To: Mayuresh Nirhali
>            Priority: Minor
>             Fix For: 10.2.3.0, 10.3.0.0
>
>         Attachments: derby2103.diff, derby2103_v2.diff
>
>
> connect 'jdbc:derby:wombat;create=true';
> create table t1(a int ) ;
> create table "t2"(a int ) ;
> -- this should fail. 
> create table foo (a int ,  \"YEAR\" int ) ;
> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> FYI:
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> run 'weird1.sql';
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create table "t2"(a int ) ;
> 0 rows inserted/updated/deleted
> ij> -- this should fail.
> create table foo (a int ,  \"YEAR\" int ) ;
> ERROR 42X02: Lexical error at line 2, column 28.  Encountered: "\\" (92), after
> : "".
> ij> -- but this should not fail. But failing
> create table t4 ( b int ) ;
> ERROR 42X01: Syntax error: Encountered "" at line 2, column 21.
> ij>

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