Bug #3021 mysql_install_db does not create system tables correctly in 5.0.0a
Submitted: 1 Mar 2004 3:14 Modified: 4 Aug 2004 14:58
Reporter: Marcus Eriksson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.0.0a OS:Linux (Linux - fedora core 1)
Assigned to: Lenz Grimmer CPU Architecture:Any

[1 Mar 2004 3:14] Marcus Eriksson
Description:
Upgrade to 5.0.0a does not seem to create table 'proc' properly. I installed the RPMs from www.mysql.com when installing both 4.0.18 and 5.0.0a. 4.0.18 was installed over an old 3.23.x installation if i remember correctly.

--------------
# mysql -u root -p
Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 5.0.0-alpha-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Didn't find any fields in table 'help_category'
Didn't find any fields in table 'help_keyword'
Didn't find any fields in table 'help_relation'
Didn't find any fields in table 'help_topic'
Didn't find any fields in table 'proc'
Database changed
mysql> select * from proc;
ERROR 1017 (HY000): Can't find file: './mysql/proc.frm' (errno: 13)
mysql>
-----------
It is not possible to create stored procedures either;
mysql> create procedure simpleproc (OUT param1 INT)
    -> begin
    -> select count(*) into param1 from t;
    -> end
    -> |
ERROR 1291 (HY000): Failed to CREATE PROCEDURE simpleproc
------------
If i drop the tables without fields displayed after "use mysql" and run "mysql_create_system_tables real /var/lib/mysql localhost | mysql -u root -p" all tables get created nicely. If i run mysql_install_db after doing this, the tables become unusable again.

How to repeat:
# rpm --upgrade (--nodeps) MySQL*5.0.0*.rpm
# mysql_fix_privilege_tables
# mysql -u root -p
# use mysql;
----------
mysql> use mysql;
mysql> drop table help_category;
mysql> drop table help_keyword;
mysql> drop table help_relation;
mysql> drop table help_topic;
mysql> drop table proc;
mysql> quit;

# mysql_create_system_tables real /var/lib/mysql localhost | mysql -u root -p
# mysql_install_db
[26 Jun 2004 6:14] Patrick Galbraith
Lenz, could you please look at this? Thanks!
[4 Aug 2004 14:58] Lenz Grimmer
This has been fixed for 5.0.1
[1 Nov 2005 21:31] Denis Putnam
I have this problem on redhat es3 with mysql version 5.0.15.  Does someone know of a fix?