summaryrefslogtreecommitdiff
path: root/scripts/mysql_system_tables_fix.sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-12 16:26:11 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-12 23:43:48 +0100
commitf7621f17bd8a3dd08fae6ad023716cc66412e1b1 (patch)
treeead2e10b405a702e945417f38a2cdb6c51d7587c /scripts/mysql_system_tables_fix.sql
parentf51ecfee933f4dc004c35c73c6662f0ab9a8346c (diff)
downloadmariadb-git-f7621f17bd8a3dd08fae6ad023716cc66412e1b1.tar.gz
rename mysql.user and mysql.db column
Truncate_versioning_priv->Delete_history_priv because the command and the privilege were renamed
Diffstat (limited to 'scripts/mysql_system_tables_fix.sql')
-rw-r--r--scripts/mysql_system_tables_fix.sql16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index a835a164f22..8e27dfbdc7e 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -651,16 +651,18 @@ UPDATE user SET Create_tablespace_priv = Super_priv WHERE @hadCreateTablespacePr
# System versioning
#
-SET @had_truncate_versioning_priv := 0;
-SELECT @had_truncate_versioning_priv :=1 FROM user WHERE Truncate_versioning_priv LIKE '%';
+ALTER TABLE user change Truncate_versioning_priv Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N';
+ALTER TABLE db change Truncate_versioning_priv Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N';
-ALTER TABLE user add Truncate_versioning_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N' after Create_tablespace_priv;
-ALTER TABLE user modify Truncate_versioning_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N';
-ALTER TABLE db add Truncate_versioning_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N' after Trigger_priv;
-ALTER TABLE db modify Truncate_versioning_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N';
+SET @had_user_delete_history_priv := 0;
+SELECT @had_user_delete_history_priv :=1 FROM user WHERE Delete_history_priv LIKE '%';
-UPDATE user SET Truncate_versioning_priv = Super_priv WHERE @had_truncate_versioning_priv = 0;
+ALTER TABLE user add Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N' after Create_tablespace_priv;
+ALTER TABLE user modify Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N';
+ALTER TABLE db add Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N' after Trigger_priv;
+ALTER TABLE db modify Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N';
+UPDATE user SET Delete_history_priv = Super_priv WHERE @had_user_delete_history_priv = 0;
ALTER TABLE user ADD plugin char(64) DEFAULT '', ADD authentication_string TEXT;
ALTER TABLE user ADD password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;