This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Here is a sample code: CREATE OR REPLACE PACKAGE BODY TEST IS FUNCTION GETCODE(REC_ID IN INTEGER) RETURN VARCHAR2 IS RESULTS VARCHAR2(40) := ' '; singleValue number; BEGIN singleValue := function2('ddd','\'); singleValue := singleValue || 'fff'; END GETCODE; END TEST; / in this case, lexer shows us exception on \' and treat all next to it as string. In SQL \' does not escape '. It should be treated as single slash.
Actually \ is an escape character - not in SQL standard, but in mysql. Personally I would like to see: - # completely dropped as a comment char -- needs adjustments in multiple modules. Problem is # is ambiguous and the meaning can't be deduced from context - remove \ as a valid escape character (example here) There are other db specific configurations, but either these are in the execute path (this is where you can be DB specific, as you know the target) or they are not ambiguous like different quoting chars ([] vs "" vs ``).
*** Bug 241482 has been marked as a duplicate of this bug. ***
Created attachment 147809 [details] proposed patch part 1 v1
Created attachment 147810 [details] proposed patch part 2 v1
I attached two patches: Part 1: remove support for \ as string escape character - this is conflicts with the sql standard Part 2: The lexer reports <>, <= and similar operators as two tokens - Part 2 fixes this and returns just one token for these sequences
Patch applied in changeset - http://hg.netbeans.org/core-main/rev/bed2ebf1a1b3 Thank you very much for it Matthias.
Integrated into 'main-silver', will be available in build *201407090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/bed2ebf1a1b3 User: Libor Fischmeistr <lfischmeistr@netbeans.org> Log: #200479: lexer - SQL - \' is not an excape character