Bug #16400 Events: mysql_fix_privilege_tables.sql is bad
Submitted: 12 Jan 2006 3:41 Modified: 1 Mar 2006 5:01
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.6-alpha-debug OS:Linux (SUSE 10.0)
Assigned to: Andrey Hristov CPU Architecture:Any

[12 Jan 2006 3:41] Peter Gulutzan
Description:
The mysql_fix_privilege_tables.sql file is necessary
for the script for upgrading for version-5.1 for events.

It has a "CREATE TABLE event ..." statement. Unlike the other
"CREATE TABLE ..." statements in this .sql file, this one
has no "IF NOT EXISTS" clause.

It has two "ALTER TABLE ..." statements. These statements
add a column Event_priv to the User and db tables. But
the default values is 'N', so the privilege will be
missing for users who should have it. I don't define
those users, but _somebody_ must have the privileges
initially.

How to repeat:
less mysql_fix_privilege_tables.sql
[23 Feb 2006 18:53] 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/3077
[23 Feb 2006 23:32] 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/3088
[24 Feb 2006 15:15] Paul DuBois
Noted in 5.1.7 changelog.

The <filename>mysql_fix_privilege_tables.sql</filename> script
did not properly initialize the <literal>Event_priv</literal>
column to <literal>'Y'</literal> for those accounts thatshould have the <literal>EVENT</literal> privilege. (Bug#16400)
[1 Mar 2006 5:01] Andrey Hristov
Already documented and in 5.1-new merged from 5.1.7 clone.