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 143271

Summary: Add index dialog allows proceeding without selected columns
Product: db Reporter: sunbiz <sunbiz>
Component: CodeAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED FIXED    
Severity: blocker CC: romanmostyka
Priority: P3 Keywords: NETFIX
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=88065
Issue Type: ENHANCEMENT Exception Reporter: 88065
Attachments: stacktrace
proposed patch v1 (implementing solution from comment 4)

Description sunbiz 2008-08-08 08:12:59 UTC
Build: NetBeans IDE Dev (Build 080808)
VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25
OS: Windows Vista, 6.0, x86

User Comments: 
Trying to create new unique index on table actor

Stacktrace: 
java.lang.reflect.InvocationTargetException: Unable to execute command:
create unique index actor_idx on `actor`
(
	
)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4
        at org.netbeans.modules.db.explorer.DbUtilities.doWithProgress(DbUtilities.java:117)
        at org.netbeans.modules.db.explorer.dlg.AddIndexDialog$1.actionPerformed(AddIndexDialog.java:185)
        at org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:1134)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
Comment 1 sunbiz 2008-08-08 08:13:05 UTC
Created attachment 66889 [details]
stacktrace
Comment 2 David Vancouvering 2008-08-15 20:43:16 UTC
Can you describe exactly what you put into the create index dialog to reproduce this?  This sounds like a serious issue.
Comment 3 sunbiz 2008-08-15 23:13:54 UTC
Steps to reproduce bug:
1.) Connect to sakila database
2.) Expand tables tree -> expand actor table
3.) Right-click on Indexes -> Add Index
4.) Change nothing on the window that opens and just press OK
5.) The exception is thrown, but the error window is also shown

Ideally the exception should not come up and only the error window should be shown, just like with other tables and 
databases.
Comment 4 John Baker 2008-09-05 07:09:43 UTC
This is a very minor issue.  Perhaps the OK button should be disabled until an item to add to the index is checked.
Comment 5 John Baker 2008-10-08 04:29:36 UTC
Sorry, won't be fixed in 6.5
Comment 6 Jiri Rechtacek 2009-10-16 14:03:28 UTC
Reassigned to new owner.
Comment 7 matthias42 2012-08-25 19:53:03 UTC
Created attachment 123569 [details]
proposed patch v1 (implementing solution from comment 4)
Comment 8 Jaroslav Havlin 2012-09-21 14:17:23 UTC
Patch integrated: http://hg.netbeans.org/core-main/rev/68dad7b8f822
Thank you, Matthias!
Comment 9 Quality Engineering 2012-09-22 02:19:04 UTC
Integrated into 'main-golden', will be available in build *201209220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/68dad7b8f822
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #143271: Add index dialog allows proceeding without selected columns