Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

key with '.' in quoted name causes error #1

Open
martintreurnicht opened this issue May 10, 2014 · 0 comments
Open

key with '.' in quoted name causes error #1

martintreurnicht opened this issue May 10, 2014 · 0 comments

Comments

@martintreurnicht
Copy link

If you you use something like UNIQUE KEY user_email.email (gf_user_id,email) for instance then the parser causes the following error:

com.granveaud.mysql2h2converter.parser.TokenMgrError: Lexical error at line 14, column 25.  Encountered: "." (46), after : "`user_email"
    at com.granveaud.mysql2h2converter.parser.SQLParserTokenManager.getNextToken(SQLParserTokenManager.java:1806)
    at com.granveaud.mysql2h2converter.parser.SQLParser.jj_ntk(SQLParser.java:3085)
    at com.granveaud.mysql2h2converter.parser.SQLParser.ColumnConstraint(SQLParser.java:1550)
    at com.granveaud.mysql2h2converter.parser.SQLParser.CreateTableDefinition(SQLParser.java:569)
    at com.granveaud.mysql2h2converter.parser.SQLParser.CreateTableStatement(SQLParser.java:421)
    at com.granveaud.mysql2h2converter.parser.SQLParser.CreateStatement(SQLParser.java:359)
    at com.granveaud.mysql2h2converter.parser.SQLParser.Statement(SQLParser.java:103)
    at com.granveaud.mysql2h2converter.parser.SQLParser.ScriptStatement(SQLParser.java:76)
    at com.granveaud.mysql2h2converter.parser.SQLParserManager$ScriptIterator.parseNextStatement(SQLParserManager.java:23)
    at com.granveaud.mysql2h2converter.parser.SQLParserManager$ScriptIterator.next(SQLParserManager.java:37)
    at com.granveaud.mysql2h2converter.parser.SQLParserManager$ScriptIterator.next(SQLParserManager.java:12)
    at com.granveaud.mysql2h2converter.converter.H2Converter$ConverterIterator.loadNextStatements(H2Converter.java:28)
    at com.granveaud.mysql2h2converter.converter.H2Converter$ConverterIterator.<init>(H2Converter.java:23)
    at com.granveaud.mysql2h2converter.converter.H2Converter.convertScript(H2Converter.java:221)
    at com.granveaud.mysql2h2converter.converter.ConverterTest.executeScript(ConverterTest.java:86)
    at com.granveaud.mysql2h2converter.converter.ConverterTest.loadScript(ConverterTest.java:148)
    at com.granveaud.mysql2h2converter.converter.ConverterTest.testScript6(ConverterTest.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)

I've been trying to debug it, but its quite difficult to figure out what's going on, if you can point me in the right direction i can help you fix it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant