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 183478 - Syntax checker treats single and double quotation marks different ways
Summary: Syntax checker treats single and double quotation marks different ways
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords: NETFIX
Depends on:
Blocks:
 
Reported: 2010-04-05 11:10 UTC by Michael Nazarov
Modified: 2012-08-18 01:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (2.33 KB, image/png)
2010-04-05 11:10 UTC, Michael Nazarov
Details
proposed patch v1 (8.06 KB, patch)
2012-07-12 19:49 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nazarov 2010-04-05 11:10:52 UTC
Created attachment 96675 [details]
screenshot

If one started string with ' sign then sql statement editor treats followed characters as error. If " sign in use -- there is no error.
Check screenshot to see difference.
Comment 1 matthias42 2012-07-12 19:49:10 UTC
Created attachment 121984 [details]
proposed patch v1

The attached patch does three changes (I think they are small enough to be reviewed together):

- Add support for SQL-99 Quoting including unit-tests
- If a partly quoted identifier is encountered at the 
  end of the SQL string it is highlighted as an error
  (like in the string case)
- Fix problem in method "isEndIdentifierQuoteChar" - 
  the start character has to be checked whether it is
  a valid begin quote character, if not the end can't
  be a valid end quote
Comment 2 Jaroslav Havlin 2012-08-16 12:16:20 UTC
Patch applied as http://hg.netbeans.org/core-main/rev/bef911152a8b

Thank you very much!
Comment 3 Quality Engineering 2012-08-18 01:35:18 UTC
Integrated into 'main-golden', will be available in build *201208180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bef911152a8b
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #183478: Syntax checker treats single and double quotation marks different ways