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 136216

Summary: MySQL server Node Error
Product: db Reporter: nvarun <nvarun>
Component: MySQLAssignee: Andrei Badea <abadea>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: server disconnected, yet the node shows connected

Description nvarun 2008-05-31 15:29:01 UTC
Firstly, I would like to tell, how I got started Database Management using MySQL Community Server 5.0! I had downloaded
MySQL no-install-zip, extracted and used pre-configured option files to do the configuration using MySQL Administrator.

I ran the server, created New Instance, everything uptil now worked smoothly. Even, I connected using Connector/J and
created database, followed this document - http://www.netbeans.org/kb/60/ide/mysql.html

Though its for 6.0, still it worked for 6.1!

Now, the issue is when I disconnect MySQL Server using Admin Tool, it affects the MySQL Server Node in Database
Explorer, only partially. It stops expanding, but it doesn't show, that its disconnected. When I restart NB, then it
shows disconnected.
Comment 1 nvarun 2008-05-31 15:31:33 UTC
Created attachment 62209 [details]
server disconnected, yet the node shows connected
Comment 2 David Vancouvering 2008-06-03 19:59:28 UTC
When you say you disconnect MySQL Server using the Admin Tool, I think you mean you stop it,right?

You had mentioned in email that you want a workaround, but I realized when I re-read the description that I'm not sure
what you want.  Is the problem that you can not reconnect to the MySQL Server once you start it again?  

Comment 3 nvarun 2008-06-04 12:03:34 UTC
> When you say you disconnect MySQL Server using the Admin Tool, I think you mean you stop it,right?

In the attached image, the MySQL Server Node, whose Tooltip is displayed, its context menu has an option "Run Admin
Tool...". I clicked that and MySQL Administrator opened, I stopped connection by switching to "Service Control" Tab.

Now, if I switch back to NetBeans IDE, it shows that Tooltip, and doesn't expand, which should happen. But, Tooltip is
an error and then, its context menu has option of "Create Database...", which IMO should not be active.

> You had mentioned in email that you want a workaround, but I realized when I re-read the description that I'm not sure
> what you want.  Is the problem that you can not reconnect to the MySQL Server once you start it again?  

I wrote that I will look for a possible workaround, as you told TBD is 6.5 release. So, if you can help me out, that
would be great, else I am looking for workaround, simultaneously.
Comment 4 David Vancouvering 2008-06-04 18:07:41 UTC
So, can you please clarify: what task do you want to accomplish that you are unable to do?  I agree that it is incorrect
that "Create Database..." is shown, and the tool tip is wrong, but that doesn't directly affect your ability to
accomplish a task.

What task do you want to do that you can't do and for which you need a workaround?
Comment 5 nvarun 2008-06-04 18:19:03 UTC
I guess what I could do is, when I stop service using Admin Tool, which is executing as mentioned before. So, I would
delete the MySQL Server node, and re-register it. Now, I will start service, and click "Connect", in the server node's
context-menu, to get started again!

This could be a possible workaround. What do you think?
Comment 6 David Vancouvering 2008-06-04 19:23:42 UTC
OK, what you want to be able to do is reconnect, and you can't.

Yes, your proposed workaround can work.  Another less dramatic approach is to start the MySQL service, and then right
click on the MySQL node, and choose Properties.  Change the password, press OK.  Since a field was changed, NB will
automatically try to reconnect, which will fail with an error dialog.  Press [OK], and the Properties node will come
back up again.  This time type in the right password, press [OK] and you should be good to go.

Having a workaround doesn't mean the bug is resolved.  We need to fix this.

I think both of these workaround are pretty onerous, so I'm upgrading this issue to a P2.
Comment 7 nvarun 2008-06-04 19:33:05 UTC
> Having a workaround doesn't mean the bug is resolved.  We need to fix this.

Sorry for that. Anyways, the 2nd workaround you have suggested, that too worked for me!

> I think both of these workaround are pretty onerous, so I'm upgrading this issue to a P2.

I agree. It should be set to P2. 

Thanks!
Comment 8 Andrei Badea 2008-06-17 13:13:06 UTC
FWIW, this doesn't qualify as a P3 I think. Anyway, David, how do you think this should be fixed? Should there be a
Disconnct action next to Connect on the MySQL server node, similar to the database connection nodes?
Comment 9 David Vancouvering 2008-06-17 15:05:21 UTC
Yes, I think we need a Disconnect action as a minimum.

In this scenario actually a Reconnect could be useful, but I think Disconnect followed by Connect is probably sufficient.

I think you meant it doesn't qualify as a P2.  I think that given that your only option is to restart NB or futz around
with the Properties dialog (very nonintuitive), if it's not a P2 it's pretty darn close.  Anyway, not worth arguing
about, shd. be pretty easy to fix.
Comment 10 Andrei Badea 2008-06-18 13:43:35 UTC
1f91c57ada21
Comment 11 Quality Engineering 2008-06-19 04:29:29 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #268 build
Changeset: http://hg.netbeans.org/main/rev/1f91c57ada21
User: Andrei Badea <abadea@netbeans.org>
Log: #136216: MySQL server Node Error
Comment 12 rbalada 2008-07-17 12:09:58 UTC
David/Andrei/nvarun,

can you please verify the bugfix in trunk builds. Only verified bugfixed can be ported into NB 6.1 Patch (3) release.

Thanks,
-R
Comment 13 nvarun 2008-07-26 17:41:36 UTC
I tested this bug fix when updated to Patch 2, and its working, i.e. When MySQL Server is stopped/started using MySQL
Administrator, it does trigger Node collapse/expansion, in DB Explorer in IDE, which is good. Still, the tooltip is not
correct at that moment. It shows "connected as user $username", where $username is root, or something else. Just need to
fix the tooltip rest is fine!
Comment 14 rbalada 2008-08-04 15:53:39 UTC
Please note that NetBeans 6.1 Patch3 cut-off is going to happen on close of
business August 5th. If you would like to have bugfix for this issue as part of
NetBeans 6.1 Patch3, then this issue must have information about bugfix' trunk
changeset and it's status must be "VERIFIED".
Comment 15 Roman Mostyka 2008-08-05 17:29:36 UTC
v
Comment 16 rbalada 2008-08-05 20:50:09 UTC
The changeset http://hg.netbeans.org/main/rev/1f91c57ada21 is inapplicable against release61_fixes repository.

The changeset tries to modify files MySQLDatabaseServer.java and ServerNode.java, which do not exist in release61_fixes
repository (perhaps some refactoring in NB 6.5?). Please advise how proceed with this bugfix (i.e. add also changeset
"this" and "that").
Comment 17 Roman Mostyka 2008-08-07 12:49:40 UTC
Since it's too risky to have this fix in the Patch 3, it is removed from the Patch 3 issues list.