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.

Bug 250383 - Syntax highlighting on .sql file doesn't understand escaped quotes
Summary: Syntax highlighting on .sql file doesn't understand escaped quotes
Status: RESOLVED DUPLICATE of bug 152325
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P4 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-12 00:28 UTC by thorie
Modified: 2015-02-26 18:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thorie 2015-02-12 00:28:20 UTC
Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Linux version 3.13.0-44-generic running on amd64
Java; VM; Vendor = 1.7.0_75
Runtime = OpenJDK 64-Bit Server VM 24.75-b04

here's some SQL code that doesn't highlight correctly:

SELECT * FROM `mytable` WHERE `mycolumn` LIKE 'Couldn\'t connect to host';
Comment 1 matthias42 2015-02-26 18:54:06 UTC
Thank you for your report. But your example is not valid SQL. The \ is not special in SQL (at least in the standard)

See SQL-92, SQL-99 and SQL-2003 grammers here:

http://www.savage.net.au/SQL/sql-92.bnf.html#character%20representation
http://www.savage.net.au/SQL/sql-99.bnf.html#character%20representation
http://www.savage.net.au/SQL/sql-2003-2.bnf.html#character%20representation

What you see in your sql is only valid in databases following mysqls dialect. As mysql also support correct quoting, you can't support both without contradictions.

This was requested, implemented (see bug #152325) and again removed in bug #200479.

*** This bug has been marked as a duplicate of bug 152325 ***