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 128975 - org.netbeans.api.db.explorer.DatabaseException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to user 'travel'@'d-espb04-127-12.Russia.Sun.COM' for table 'user'
Summary: org.netbeans.api.db.explorer.DatabaseException: com.mysql.jdbc.exceptions.jdb...
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Vancouvering
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-03 09:38 UTC by Roman Mostyka
Modified: 2008-03-12 17:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 32991


Attachments
stacktrace (7.42 KB, text/plain)
2008-03-03 09:38 UTC, Roman Mostyka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-03-03 09:38:47 UTC
Build: NetBeans IDE Dev (Build 200802270005)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05
OS: Windows XP, 5.1, x86

User Comments: 
1. Register MySQL DB server.
2. Rightclick "MySQL Server" node and choose "Create Database".

Result: DatabaseException arises.
Comment 1 Roman Mostyka 2008-03-03 09:38:51 UTC
Created attachment 57647 [details]
stacktrace
Comment 2 David Vancouvering 2008-03-03 17:33:59 UTC
This exception is because you are not logged in as a user that has privileges to select system tables.  I suppose what I
could do is try to detect if the user has the right privileges before trying to select the list of current MySQL users
and then just not show that drop-down of users.

If the user doesn't have select privileges on the system tables, they probably don't have privileges to create a
database either.  So maybe this is an enhancement request to check privileges before making this choice available on the
MySQL node.

What do you think?
Comment 3 Roman Mostyka 2008-03-04 07:28:15 UTC
I think it's good idea to check if user has right privileges. Now it looks like real bug, because after exception
"Create MySQL Database" dialog appears anyway.
Comment 4 David Vancouvering 2008-03-04 08:18:14 UTC
OK, I concur
Comment 5 David Vancouvering 2008-03-06 00:36:14 UTC
http://hg.netbeans.org/main?cmd=changeset;node=6d2883ba28ca
Comment 6 Roman Mostyka 2008-03-06 14:35:50 UTC
I still can reproduce this issue with build:
Product Version: NetBeans IDE Dev (Build 080306)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

I built IDE from fresh sources and successfully reproduced this issue. Please, check if your changes are in trunk. If
you're sure that this issue is fixed make it FIXED again, but I built IDE from fresh sources after you push.
Comment 7 David Vancouvering 2008-03-06 16:08:01 UTC
My apologies, I closed the wrong bug, thanks very much for spending the time to verify and catching this.
Comment 8 David Vancouvering 2008-03-11 19:06:04 UTC
http://hg.netbeans.org/main?cmd=changeset;node=b60fb1730463
Comment 9 Roman Mostyka 2008-03-12 17:56:39 UTC
Verified with build 080312.