Bug #29817 Queries with UDF fail with non-descriptive error if mysql.proc is missing
Submitted: 16 Jul 2007 12:04 Modified: 22 Nov 2007 11:47
Reporter: Philip Stoev Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.0.41-debug-log OS:Any
Assigned to: Konstantin Osipov CPU Architecture:Any

[16 Jul 2007 12:04] Philip Stoev
If the server is started with "--skip-grant-tables" or for some other reason does not have a mysql database and or a mysql.proc table, the parser will fail to parse queries containing UDF functions with "ERROR 1146 (42S02): Table 'mysql.proc' doesn't exist".

In my opinion this message is non-descriptive. If the mysql.proc table is not accessible, the parser should report that the function can not be found and/or that UDF functions are not available.

How to repeat:
shell1> mysqld --skip-grant-tables
shell2> mysql
mysql> select foo(1);
ERROR 1146 (42S02): Table 'mysql.proc' doesn't exist

Suggested fix:
The errmsg.sys contains a suitable wording for an error message - 

"Failed to load routine %s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)"
[16 Jul 2007 12:07] Philip Stoev
Sorry, --skip-grant-tables is not to blame, the real issue is missing a mysql database and/or a mysql.proc table.
[8 Aug 2007 11:36] Konstantin Osipov
Will be discussed with the architecture board, this and similar bugs are unlikely to be fixed.
[22 Nov 2007 11:47] Konstantin Osipov
This was fixed by the patch for Bug#28318
[22 Nov 2007 11:48] 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:


ChangeSet@1.2621, 2007-11-22 14:48:03+03:00, kostja@bodhi.(none) +2 -0
  Add a test case for Bug#29817. The bug was fixed by the patch for
[6 Dec 2007 10:00] Bugs System
Pushed into 5.1.23-rc
[6 Dec 2007 10:02] Bugs System
Pushed into 6.0.5-alpha