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 144398

Summary: SQL CC: CC doesn't appear for MySQL system tables
Product: db Reporter: Roman Mostyka <romanmostyka>
Component: SQL EditorAssignee: Andrei Badea <abadea>
Status: VERIFIED FIXED    
Severity: blocker CC: jbranam
Priority: P3 Keywords: UI
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Roman Mostyka 2008-08-19 14:38:10 UTC
1. Connect to MySQL.
2. Execute following statement: "select * from information_schema.statistics;". It works.
3. Remove statement, type "select * from " and press Ctrl+Space.

Result: There is no system table in the CC list.
Comment 1 Andrei Badea 2008-08-21 18:45:31 UTC
There should be no system tables, since the completion only displays the tables in the default schema (those that you do
not need to quote). But "information_schema" should be in the completion. The problem is that, despite its name, it is a
catalog, not a schema, and the completion doesn't currently display catalogs.

So, in order to fix this, support for catalog needs to be added to the completion. That, however, requires changes in
the metadata model (which I was planning for the next release) and the completion itself in order to be implemented
properly. I will try to fix it for 6.5, but I might end up deferring it for the next release.
Comment 2 Andrei Badea 2008-09-03 12:12:14 UTC
This is also an UI change. James, the UI impact is that more items will be displayed in the SQL code completion than
currently. Do you agree with the change?
Comment 3 James Branam 2008-09-07 14:15:51 UTC
This is OK. I'll trying to figure out a way to put this into the Help. It may not be necessary.
Comment 4 James Branam 2008-09-07 14:35:31 UTC
I've just added catalogs to the code completion information in the Help.
Comment 5 Andrei Badea 2008-09-09 15:57:59 UTC
Added support for catalogs in #2213e9539ce4. However, it seems Connector/J (version 5.1.6 at least) doesn't return
information about the system tables. We will either have to retrieve them from the database ourselves (bypassing
DatabaseMetaData), or waive this issue until the driver is fixed.
Comment 6 Quality Engineering 2008-09-10 06:09:19 UTC
Integrated into 'main-golden', will be available in build *200809100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2213e9539ce4
User: Andrei Badea <abadea@netbeans.org>
Log: #144398: adding support for catalogs to the code completion
Comment 7 Andrei Badea 2008-09-10 16:32:59 UTC
Also ensuring system tables are displayed in the code completion in #f3758ff47dfa.

The Connector/J driver was fixed to provide the system tables in the development version of 5.1.7, so closing this
issue. Be sure to test with a snapshot version newer than September 10:

http://downloads.mysql.com/snapshots.php
Comment 8 Andrei Badea 2008-09-10 17:02:59 UTC
Closing.
Comment 9 Roman Mostyka 2008-09-11 17:44:12 UTC
Verified with build 080910.
Comment 10 Quality Engineering 2008-09-12 06:03:18 UTC
Integrated into 'main-golden', will be available in build *200809120201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f3758ff47dfa
User: Andrei Badea <abadea@netbeans.org>
Log: #144398: Ensuring system tables are displayed in the code completion