You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DISABLE Keyword causing parser if used as column name #945
I reported a similar issue with the CHANGE keyword. We have a legacy app that uses the Mysql keyword "DISABLE" as a column name. Since it's legacy, we can't easily change the column name, and it is causing the sql parser to break.
To Reproduce
Steps to reproduce the behavior:
2. Parsing "INSERT INTO SOMESCHEMA.TEST (DISABLE, TESTCOLUMN) VALUES(1, 1)" SQL using JSqlParser throws JsqlParserException.
Caused by: net.sf.jsqlparser.JSQLParserException at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:51) at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:40) ... 53 more Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: “DISABLE” “DISABLE” at line 1, column 15. Was expecting one of: “(” “ACTION” “ANY”...
FROM
DOC.DOC_DOCUMENT AS DOCUMENT_TABLE
LEFT JOIN ENGINE.PHASE_SETTINGS AS PHASE ON (DOCUMENT_TABLE.SOME$CURRENT_PHASE = PHASE.PHASE_ID)
LEFT JOIN ENGINE.WF_SETTINGS AS WF ON (PHASE.WORKFLOW_ID = WF.WORKFLOW_ID)
WHERE
DOCUMENT_TABLE.DOC_ID = 2113978200
Causes Jsqlparser exception on the quotation marks simliar to above statement.
Activity
[-]DISABLE Keyword causing parser to break [/-][+]DISABLE Keyword causing parser if used as column name[/+]wumpz commentedon Feb 9, 2020
I will look into it.