summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-07-01 12:05:09 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-07-01 12:05:09 +0300
commit279b3adfc78ae93f976eb8797f41c64f3bc6b4bb (patch)
treef84dbd10b8a8286a7d310d8c27ec6279de22d814 /scripts
parent3e1a47070518a1995cc48e28c36b7c817d5f6008 (diff)
downloadmariadb-git-279b3adfc78ae93f976eb8797f41c64f3bc6b4bb.tar.gz
Bug #53613: mysql_upgrade incorrectly revokes TRIGGER privilege on given table
Fixed an incomplete historical ALTER TABLE MODIFY trimming the trigger privilege bit from mysql.tables_priv.Table_priv column. Removed the duplicate ALTER TABLE MODIFY. Test suite added.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_system_tables_fix.sql4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index deeb4d4de82..90bdbdae338 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -58,7 +58,7 @@ ALTER TABLE tables_priv
COLLATE utf8_general_ci DEFAULT '' NOT NULL,
MODIFY Table_priv set('Select','Insert','Update','Delete','Create',
'Drop','Grant','References','Index','Alter',
- 'Create View','Show view')
+ 'Create View','Show view','Trigger')
COLLATE utf8_general_ci DEFAULT '' NOT NULL,
COMMENT='Table privileges';
@@ -584,8 +584,6 @@ ALTER TABLE host MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAU
ALTER TABLE db ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
ALTER TABLE db MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-
UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0;
# Activate the new, possible modified privilege tables