Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

New version 18.2, new format bugs :-(

User800507-OracleJul 5 2018 — edited Aug 13 2018

I've uploaded the fresh new version of sqlcl 18.2 and tried to format very simple SQL that was formatted without problems in 18.1

I used a copy of rules file that I used for 18.1 (attached)

When I run the following script on the second format buffer  I got a sqlcl crash

spool bug18_2

SELECT ROWID AS RD FROM MIGR_BATCH_HISTORIES WHERE BATCH_BATCH_ID = :B1 AND START_DATE <= SYSDATE AND END_DATE >= SYSDATE;

format buffer

format rules format_rules_18_2_1.xml

format buffer

spool off

Exception in thread "main" Syntax Error at line 347, column 32


| [node) from_clause & [node^+8 < node^)
                                ^^^

Expected: ')','^','-','+',
        at oracle.dbtools.parser.plsql.SyntaxError.checkSyntax(SyntaxError.java:164)
        at oracle.dbtools.parser.plsql.SyntaxError.checkSyntax(SyntaxError.java:101)
        at oracle.dbtools.parser.Parsed.getRoot(Parsed.java:111)
        at oracle.dbtools.parser.Parsed.getSyntaxError(Parsed.java:120)
        at oracle.dbtools.arbori.Program.compile(Program.java:254)
        at oracle.dbtools.arbori.SqlProgram.<init>(SqlProgram.java:26)
        at oracle.dbtools.app.Format$3.<init>(Format.java:258)
        at oracle.dbtools.app.Format.format(Format.java:258)
        at oracle.dbtools.raptor.newscriptrunner.commands.FormatSQLPlusCommand.handleEvent(FormatSQLPlusCommand.java:65)

        at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:427)
        at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:224)
        at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:341)
        at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:224)
        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.runFile(SqlCli.java:786)
        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.handleAtFiles(SqlCli.java:764)
        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:486)

Have you any regression tests for formatting?

Comments

Post Details

Added on Jul 5 2018
2 comments
688 views