Bug #17568 mysql_fix_privilege_tables doesn't create mysql.plugin
Submitted: 20 Feb 2006 8:46 Modified: 2 Mar 2006 1:55
Reporter: Michael Widenius Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1 OS:
Assigned to: Sergei Glukhov CPU Architecture:Any

[20 Feb 2006 8:46] Michael Widenius
Description:
When one tries to use MySQL 5.1 with tables from 5.1 one gets the following error at startup:

 [ERROR] Can't open the mysql.plugin table. Please run the mysql_install_db script to create it

The problem is that one should not have to run mysql_install_db when installing a new MySQL version, it should be enough to run mysql_fix_privilege_tables or mysql_upgrade

How to repeat:
Run MySQL 5.1 on a 5.0 installation or drop table mysql.plugin and restart MySQL 5.1

Suggested fix:
mysql_fix_privilege_tables should create mysql.plugin
Change error message to be 'run mysql_upgrade' instead of 'run mysql_install_db'
[20 Feb 2006 10:34] Hartmut Holzgraefe
verified:

./sql/sql_plugin.cc:682:    sql_print_error("Can't open the mysql.plugin table. Please run the mysql_install_db script to create it.");

the same seems to apply to the UDF func table, too:

./sql/sql_udf.cc:149:    sql_print_error("Can't open the mysql.func table. Please run the mysql_install_db script to create it.");

and maybe both should use a localizeable error message in sql/share/errmsg.txt instead
of hardcoded messages?
[28 Feb 2006 8:38] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3222
[1 Mar 2006 4:43] Alexander Barkov
The patch looks ok to push.
[1 Mar 2006 6:35] Sergei Glukhov
Fixed in 5.1.8
[2 Mar 2006 1:55] Paul DuBois
Noted in 5.1.8 changelog.

<command>mysql_fix_privilege_tables</command> didn't create
the <literal>mysql.plugin</literal> table. (Bug #17568)