[Bug 225079] New: SQLIdentifiers.Quoter does not correctly quote identifiers containing the quote character itself

  • From:
  • To:
  • Subject: [Bug 225079] New: SQLIdentifiers.Quoter does not correctly quote identifiers containing the quote character itself
  • Date: Fri, 18 Jan 2013 23:14:12 +0000
  • Auto-submitted: auto-generated

http://netbeans.org/bugzilla/show_bug.cgi?id=225079

             Bug #: 225079
        Issue Type: DEFECT
           Summary: SQLIdentifiers.Quoter does not correctly quote
                    identifiers containing the quote character itself
    Classification: Unclassified
           Product: db
           Version: 7.2.1
          Platform: PC
        OS/Version: Mac OS X
            Status: NEW
          Priority: P3
         Component: Code
        AssignedTo: 

        ReportedBy: 

         QAContact: 



The default implementation of
org.netbeans.api.db.sql.support.SQLIdentifiers.Quoter does not correctly
quote/unquote identifiers that contains the quote string itself. The correct
way to do quote the quote string is, as far as I know, to include it twice (at
least for MySQL and Postgres--I just tried it).

For instance, in MySQL, the quote string is "`" (a single backtick character),
and so a table named "Table with `Backticks` and Spaces" should be quoted as
"`Table with ``Backticks`` and Spaces`".

The bug can be exhibited for instance by creating a table in MySQL with a name
containing a backtick character, then connecting to the database from 
NetBeans,
and then clicking "View Data..." on the table to see the generated query with
the incorrect quoting.

The methods that need updating are Quoter.doQuote(), Quoter.unquote(), and
probably DatabaseMetaDataQuoter.needToQuote() (the latter to ensure that the
identifier does not contain the quote string).

(As an aside: I wonder if there are databases out there that quote the quote
character differently...)

-- 
Configure bugmail: http://netbeans.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


[Bug 225079] New: SQLIdentifiers.Quoter does not correctly quote identifiers containing the quote character itself

ebakke 01/18/2013

[Bug 225079] SQLIdentifiers.Quoter does not correctly quote identifiers containing the quote character itself

matthias42 01/19/2013

[Bug 225079] SQLIdentifiers.Quoter does not correctly quote identifiers containing the quote character itself

matthias42 01/19/2013

[Bug 225079] SQLIdentifiers.Quoter does not correctly quote identifiers containing the quote character itself

ebakke 01/20/2013

Project Features

About this Project

DB was started in November 2009, is owned by Antonin Nebuzelsky, and has 113 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close