Bug #7746 Segfaults in user administration for MySQL 4.0.x server
Submitted: 8 Jan 2005 19:57 Modified: 12 Apr 2005 2:51
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.0.19 OS:Linux (Linux/Debian)
Assigned to: Alfredo Kojima CPU Architecture:Any

[8 Jan 2005 19:57] [ name withheld ]
Description:
Could not retrieve user information from server
MySQL Error Nr. 1054
Unknown column 'Show_db_priv' in 'field list'

then it segfaults,

#0  0x080cd643 in MAUserAdministrationPanel::user_selected (this=0x82e6048, sender=0x849a498, cnode=@0x0)
    at MAUserAdministrationPanel.cc:2038
#1  0x080d004c in SigC::ObjectSlot2_<void, MGBrowserList*, Gtk::TreeIter const&, MAUserAdministrationPanel>::proxy (p1=@0x0, p2=@0x0, 
    s=0x0) at object_slot.h:138
#2  0x08136a83 in SigC::Signal2<void, MGBrowserList*, Gtk::TreeIter const&, SigC::Marshal<void> >::emit_ (p1=@0xbffff1bc, p2=@0xbffff1c0, 
    data=0x0) at signal.h:761
#3  0x08135ede in MGBrowserList::emit_when_idle (this=0x849a498) at signal.h:726
#4  0x08136dfc in SigC::ObjectSlot0_<bool, MGBrowserList>::proxy (s=0x85a36b8) at object_slot.h:62
#5  0xb77a2686 in (anonymous namespace)::glibmm_source_callback () from /usr/lib/libglibmm-2.0.so.1
#6  0xb75c8033 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#7  0xb75c4c02 in g_main_depth () from /usr/lib/libglib-2.0.so.0
#8  0xb75c5cf8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#9  0xb75c6030 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#10 0xb75c6673 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#11 0xb78fdc83 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#12 0xb7c5e229 in Gtk::Main::run_impl () from /usr/lib/libgtkmm-2.0.so.1
#13 0xb7c5dfc4 in Gtk::Main::run () from /usr/lib/libgtkmm-2.0.so.1
#14 0x080bc9b5 in main (argc=1, argv=0xbffff824) at main.cc:491

How to repeat:
1. Connect to MySQL 4.0.x database
2. Select user administration
3. click on any user

Suggested fix:
1.0.19 has not been officially released yet, though it does appear on the mirrors. I would suggest fixing this bug before releasing next version.
[11 Jan 2005 17:14] Evan Wies
I am having the same problem.  I can't remember when this worked, but it did once upon a time.

I was using 1.0.19, then tried 1.0.18, then 1.0.16... I got the same error as the first comment.

However, when I rolled back to 1.0.14, I received a different error:
  Could not retrieve user information from server
  MySQL Error Nr. 1048
  Column 'o' cannot be null

My server is v4.0.23_Debian on Debian w/ kernel 2.6.8.1.
[11 Jan 2005 17:56] Jorge del Conde
Hi!

Can you tell us what version of mysqld are you connecting to, and if the username that you're using has the 'Show Privileges' privilege enabled ?

Is there any way you can provide a step by step set of instructions that tell us how to reproduce this problem ?

Thanks !
[11 Jan 2005 18:06] [ name withheld ]
I think this might have to do with the MySQL server installation (default install in Debian).

I just reproduced this with Admin 1.0.18, and that did NOT happen before.

I'll investigate...
[11 Jan 2005 18:28] [ name withheld ]
The user table looks like,

mysql> describe user;
+-----------------+-----------------+------+-----+---------+-------+
| Field           | Type            | Null | Key | Default | Extra |
+-----------------+-----------------+------+-----+---------+-------+
| Host            | char(60) binary |      | PRI |         |       |
| User            | char(16) binary |      | PRI |         |       |
| Password        | char(16) binary |      |     |         |       |
| Select_priv     | enum('N','Y')   |      |     | N       |       |
| Insert_priv     | enum('N','Y')   |      |     | N       |       |
| Update_priv     | enum('N','Y')   |      |     | N       |       |
| Delete_priv     | enum('N','Y')   |      |     | N       |       |
| Create_priv     | enum('N','Y')   |      |     | N       |       |
| Drop_priv       | enum('N','Y')   |      |     | N       |       |
| Reload_priv     | enum('N','Y')   |      |     | N       |       |
| Shutdown_priv   | enum('N','Y')   |      |     | N       |       |
| Process_priv    | enum('N','Y')   |      |     | N       |       |
| File_priv       | enum('N','Y')   |      |     | N       |       |
| Grant_priv      | enum('N','Y')   |      |     | N       |       |
| References_priv | enum('N','Y')   |      |     | N       |       |
| Index_priv      | enum('N','Y')   |      |     | N       |       |
| Alter_priv      | enum('N','Y')   |      |     | N       |       |
+-----------------+-----------------+------+-----+---------+-------+
17 rows in set (0.00 sec)

And after updating the privilege tables (using /usr/bin/mysql_fix_privilege_tables), everything works again...

I guess this bug can now be closed.

- Adam

PS. Nevertheless, the application should not segfault.
[11 Jan 2005 18:56] Jorge del Conde
Thanks, I was just able to repeat this. 

> PS. Nevertheless, the application should not segfault.

You're right.  Administrator shouldn't segfault thus this bug will be marked as verified.
[12 Apr 2005 2:51] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html