summaryrefslogtreecommitdiff
path: root/mysql-test/t/grant.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/grant.test')
-rw-r--r--mysql-test/t/grant.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index 3365145650a..ea148c67262 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -451,4 +451,25 @@ delete from mysql.tables_priv where user='mysqltest1';
flush privileges;
drop database mysqltest;
-# End of 4.1 tests
+#
+# Bug #27515: DROP previlege is not required for RENAME TABLE
+#
+connection master;
+create database db27515;
+use db27515;
+create table t1 (a int);
+grant alter on db27515.t1 to user27515@localhost;
+grant insert, create on db27515.t2 to user27515@localhost;
+
+connect (conn27515, localhost, user27515, , db27515);
+connection conn27515;
+--error 1142
+rename table t1 to t2;
+disconnect conn27515;
+
+connection master;
+revoke all privileges, grant option from user27515@localhost;
+drop user user27515@localhost;
+drop database db27515;
+
+--echo End of 4.1 tests