Bug #2225 mysql 5.0.0 error when creating a stored procedure
Submitted: 28 Dec 2003 10:26 Modified: 2 Jan 2004 8:50
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Documentation Severity:S2 (Serious)
Version:5.0.0 OS:Microsoft Windows (winxp)
Assigned to: CPU Architecture:Any
Triage: D4 (Minor)

[28 Dec 2003 10:26] [ name withheld ]
Description:
I've installed 5.0.0 (from 24 December 2003) on WinXP. I connect with the following string

mysql --user=root

when I try to create a stored procedure in the new database with the following command:

create procedure xxx() select * from pet;

I get the following error:

ERROR 1146 (42S02): Table 'mysql.proc' doesn't exist

What should I do?

How to repeat:
create procedure xxx() select * from pet;
[29 Dec 2003 4:24] Sinisa Milivojevic
This bug report forum is mainly for repeatable bug reports. For bug
reports like this one you should use the MySQL mailing list or buy
commercial support from MySQL AB.  

The prerequisites for using stored procedures is fully explained in our manual.
[29 Dec 2003 4:55] [ name withheld ]
You reply this way:

"The prerequisites for using stored procedures is fully explained in our
manual."

But, as far as I have searched the manual (supplied with installation (5.0.0) and published at the site (4.1.1)) this information is so far NOT included in the manual.

By stored procedures I mean procedures in SQL style and not UDF-functions and procedures in C++ which are really described in the manual.

What should I do ?

Thanks
[29 Dec 2003 7:49] Sergei Golubchik
You are right, our manual is not updated yet. Sorry for this.
It will be fixed.

The quick answer to your question is - you need to run mysql_fix_privilege_tables
script (or, on Windows, execute the command "mysql --force < mysql_fix_privilege_tables.sql").
Don't forget to backup your mysql database (directory with files user.frm, tables_priv.frm, etc.) - just in case.
[30 Dec 2003 12:32] Brian Aker
This needs to be better documented. Possibly consider having an upgrade of some sort during the install fix this.
[2 Jan 2004 8:50] Sinisa Milivojevic
According to our production dept., proc table is a part of Windows distribution