Commit 68a01120 authored by andrey@lmy004's avatar andrey@lmy004

Merge mysqldev@production.mysql.com:my/mysql-5.1-release

into lmy004.:/work/mysql-5.1-release
parents adc97236 5ac46bb9
...@@ -163,11 +163,7 @@ s_echo() ...@@ -163,11 +163,7 @@ s_echo()
} }
s_echo "This script updates all the mysql privilege tables to be usable by" s_echo "This script updates all the mysql privilege tables to be usable by"
s_echo "MySQL 4.0 and above." s_echo "MySQL 5.1 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 "" s_echo ""
if test $verbose = 1 if test $verbose = 1
......
...@@ -630,6 +630,9 @@ CREATE TABLE event ( ...@@ -630,6 +630,9 @@ CREATE TABLE event (
# EVENT privilege # 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 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 db add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL;
ALTER TABLE event DROP PRIMARY KEY; ALTER TABLE event DROP PRIMARY KEY;
...@@ -667,6 +670,8 @@ ALTER TABLE event ADD sql_mode ...@@ -667,6 +670,8 @@ ALTER TABLE event ADD sql_mode
'HIGH_NOT_PRECEDENCE' 'HIGH_NOT_PRECEDENCE'
) DEFAULT '' NOT NULL AFTER on_completion; ) DEFAULT '' NOT NULL AFTER on_completion;
UPDATE user SET Event_priv=Super_priv WHERE @hadEventPriv = 0;
-- --
-- TRIGGER privilege -- TRIGGER privilege
-- --
......
...@@ -471,10 +471,10 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) ...@@ -471,10 +471,10 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
/* /*
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 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; user.access|= EVENT_ACL;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment