summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-03-26 09:29:33 +0400
committerAlexander Barkov <bar@mariadb.com>2020-03-26 09:31:50 +0400
commitb8e75791943d8220fde6c1ab80885e01601253c3 (patch)
tree9026e92bbe92dc3d6e43f6385d621d86976ee4b0
parent6ef3dbb1ff9f5f4ad6821cdaa7a8259918525bc8 (diff)
downloadmariadb-git-b8e75791943d8220fde6c1ab80885e01601253c3.tar.gz
MDEV-22040 versioning.truncate_privilege : GRANT fails with "Access denied", for root user
main.mysql_upgrade_noengine did not do "FLUSH PRIVILEGES" after restoring the original backed global_priv table. So following tests might fail on lack of some privileges. Adding the FLUSH PRIVILEGES statement.
-rw-r--r--mysql-test/main/mysql_upgrade_noengine.result4
-rw-r--r--mysql-test/main/mysql_upgrade_noengine.test3
2 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/main/mysql_upgrade_noengine.result b/mysql-test/main/mysql_upgrade_noengine.result
index 79ad04e1849..27afb198c0e 100644
--- a/mysql-test/main/mysql_upgrade_noengine.result
+++ b/mysql-test/main/mysql_upgrade_noengine.result
@@ -315,3 +315,7 @@ uninstall plugin blackhole;
uninstall plugin archive;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR root@localhost;
+Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
+Grants for root@localhost GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
diff --git a/mysql-test/main/mysql_upgrade_noengine.test b/mysql-test/main/mysql_upgrade_noengine.test
index e3c3e718591..5b063fb3d8c 100644
--- a/mysql-test/main/mysql_upgrade_noengine.test
+++ b/mysql-test/main/mysql_upgrade_noengine.test
@@ -76,3 +76,6 @@ uninstall plugin archive;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
+
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR root@localhost;