From 1968527da980bab642ee8341c6f96a8bf4a57c7a Mon Sep 17 00:00:00 2001
From: unknown <jimw@mysql.com>
Date: Mon, 7 Feb 2005 18:40:14 -0800
Subject: Add Create_routine_priv, Alter_routine_priv, and Execute_priv
 privileges to the 'host' privilege table. (Bug #8166)

scripts/mysql_fix_privilege_tables.sql:
  Add Create_routine_priv, Alter_routine_priv, and Execute_priv to host table
scripts/mysql_create_system_tables.sh:
  Add Create_routine_priv, Alter_routine_priv, and Execute_priv to host table
mysql-test/r/system_mysql_db.result:
  Update results
---
 scripts/mysql_fix_privilege_tables.sql | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'scripts/mysql_fix_privilege_tables.sql')

diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql
index 9373a888bc2..5a235c24d50 100644
--- a/scripts/mysql_fix_privilege_tables.sql
+++ b/scripts/mysql_fix_privilege_tables.sql
@@ -202,21 +202,25 @@ SELECT @hadCreateRoutinePriv:=1 FROM user WHERE Create_routine_priv LIKE '%';
 # Create PROCEDUREs privileges (v5.0)
 #
 ALTER TABLE db ADD Create_routine_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Show_view_priv;
+ALTER TABLE host ADD Create_routine_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Show_view_priv;
 ALTER TABLE user ADD Create_routine_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Show_view_priv;
 
 #
 # Alter PROCEDUREs privileges (v5.0)
 #
 ALTER TABLE db ADD Alter_routine_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
+ALTER TABLE host ADD Alter_routine_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
 ALTER TABLE user ADD Alter_routine_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
 
 ALTER TABLE db ADD Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
+ALTER TABLE host ADD Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
 
 #
 # Assign create/alter routine privileges to people who have create privileges
 #
 UPDATE user SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv where user<>"" AND @hadCreateRoutinePriv = 0;
 UPDATE db SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv, Execute_priv=Select_priv where user<>"" AND @hadCreateRoutinePriv = 0;
+UPDATE host SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv, Execute_priv=Select_priv where @hadCreateRoutinePriv = 0;
 
 #
 # Add max_user_connections resource limit 
-- 
cgit v1.2.1

