summaryrefslogtreecommitdiff
path: root/scripts/mysql_fix_privilege_tables.sql
diff options
context:
space:
mode:
authorunknown <acurtis@xiphis.org>2005-05-17 19:54:20 +0100
committerunknown <acurtis@xiphis.org>2005-05-17 19:54:20 +0100
commit55171821d238704a8b43a7ba4d150384f9ea70e1 (patch)
tree09011cb747c8c1ed831bf8ca66668d0aa4f2610a /scripts/mysql_fix_privilege_tables.sql
parent9b07cafe1e7a1230218c06f85b88f68b5741c9ef (diff)
downloadmariadb-git-55171821d238704a8b43a7ba4d150384f9ea70e1.tar.gz
Bug#10246 - Parser: bad syntax for GRANT EXECUTE
Rename some functions more fine-grained sp privileges make grant/revoke sp grammar less ambigious mysql-test/r/sp-security.result: change test for new syntax mysql-test/r/system_mysql_db.result: change test for new syntax mysql-test/t/sp-security.test: change test for new syntax scripts/mysql_create_system_tables.sh: now store routine_type for procs_priv scripts/mysql_fix_privilege_tables.sql: now store routine_type for procs_priv sql/item_func.cc: rename of function sql/mysql_priv.h: rename of function sql/sp_head.cc: extra arg for check_some_routine_access sql/sql_acl.cc: rename of function. now handle func/proc acls seperately sql/sql_acl.h: rename of function sql/sql_parse.cc: rename of function grants for procs handled distinctly from funcs sql/sql_show.cc: check_some_routine_access extra arg sql/sql_base.cc: fix for build sql/sql_yacc.yy: fix for build
Diffstat (limited to 'scripts/mysql_fix_privilege_tables.sql')
-rw-r--r--scripts/mysql_fix_privilege_tables.sql9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql
index 292720371c8..68b31cf1519 100644
--- a/scripts/mysql_fix_privilege_tables.sql
+++ b/scripts/mysql_fix_privilege_tables.sql
@@ -67,6 +67,10 @@ ALTER TABLE tables_priv
ALTER TABLE procs_priv ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE procs_priv
modify Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+ALTER TABLE procs_priv
+ add Routine_type enum('FUNCTION','PROCEDURE') COLLATE utf8_general_ci NOT NULL AFTER Routine_name;
+ALTER TABLE procs_priv
+ modify Timestamp timestamp(14) AFTER Proc_priv;
CREATE TABLE IF NOT EXISTS columns_priv (
Host char(60) DEFAULT '' NOT NULL,
@@ -316,10 +320,11 @@ Host char(60) binary DEFAULT '' NOT NULL,
Db char(64) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL,
Routine_name char(64) binary DEFAULT '' NOT NULL,
+Routine_type enum('FUNCTION','PROCEDURE') NOT NULL,
Grantor char(77) DEFAULT '' NOT NULL,
-Timestamp timestamp(14),
Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
-PRIMARY KEY (Host,Db,User,Routine_name),
+Timestamp timestamp(14),
+PRIMARY KEY (Host,Db,User,Routine_name,Routine_type),
KEY Grantor (Grantor)
) CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';