From: Date: February 24 2006 12:30am Subject: bk commit into 5.1 tree (andrey:1.2157) BUG#16400 List-Archive: http://lists.mysql.com/commits/3088 X-Bug: 16400 Message-Id: <20060223233019.84C9D33B52@andrey.hristov.com> Below is the list of changes that have just been committed into a local 5.1 repository of andrey. When andrey does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2157 06/02/24 00:29:50 andrey@lmy004. +3 -0 fix for bug #16400 sql/sql_acl.cc 1.182 06/02/24 00:29:32 andrey@lmy004. +2 -2 fix the priv per review comment by Serg scripts/mysql_fix_privilege_tables.sql 1.41 06/02/24 00:29:31 andrey@lmy004. +5 -0 fix for bug #16400 scripts/mysql_fix_privilege_tables.sh 1.36 06/02/24 00:29:31 andrey@lmy004. +1 -5 fix the message as per #16399 # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: andrey # Host: lmy004. # Root: /work/mysql-5.1-release --- 1.35/scripts/mysql_fix_privilege_tables.sh 2005-10-04 23:08:16 +02:00 +++ 1.36/scripts/mysql_fix_privilege_tables.sh 2006-02-24 00:29:31 +01:00 @@ -163,11 +163,7 @@ s_echo() } s_echo "This script updates all the mysql privilege tables to be usable by" -s_echo "MySQL 4.0 and above." -s_echo "" -s_echo "This is needed if you want to use the new GRANT functions," -s_echo "CREATE AGGREGATE FUNCTION, stored procedures, or" -s_echo "more secure passwords in 4.1" +s_echo "MySQL 5.1 and above." s_echo "" if test $verbose = 1 --- 1.181/sql/sql_acl.cc 2006-02-14 22:21:12 +01:00 +++ 1.182/sql/sql_acl.cc 2006-02-24 00:29:32 +01:00 @@ -471,10 +471,10 @@ static my_bool acl_load(THD *thd, TABLE_ /* - if it is pre 5.1.4 privilege table then map CREATE privilege on + if it is pre 5.1.6 privilege table then map CREATE privilege on CREATE|ALTER|DROP|EXECUTE EVENT */ - if (table->s->fields <= 37 && (user.access & CREATE_ACL)) + if (table->s->fields <= 37 && (user.access & SUPER_ACL)) user.access|= EVENT_ACL; /* --- 1.40/scripts/mysql_fix_privilege_tables.sql 2006-02-02 11:35:58 +01:00 +++ 1.41/scripts/mysql_fix_privilege_tables.sql 2006-02-24 00:29:31 +01:00 @@ -630,6 +630,9 @@ CREATE TABLE event ( # EVENT privilege # +SET @hadEventPriv := 0; +SELECT @hadEventPriv :=1 FROM user WHERE Event_priv LIKE '%'; + ALTER TABLE user add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv; ALTER TABLE db add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL; ALTER TABLE event DROP PRIMARY KEY; @@ -666,6 +669,8 @@ ALTER TABLE event ADD sql_mode 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL AFTER on_completion; + +UPDATE user SET Event_priv=Super_priv WHERE @hadEventPriv = 0; -- -- TRIGGER privilege