diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-04-17 16:52:50 +0500 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-04-17 16:52:50 +0500 |
commit | 50e158402bf51521dce5fb69be9100cc8ccfebd7 (patch) | |
tree | e29bbd5f1b0c05cefdb315cb44d014d89d2a4c49 /mysql-test/t/grant.test | |
parent | 247c3a81a1cf3c72ac86a9a1bf466a750bb6c6e3 (diff) | |
download | mariadb-git-50e158402bf51521dce5fb69be9100cc8ccfebd7.tar.gz |
Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
Added missed DROP privilege check on the original table for RENAME TABLE command.
mysql-test/r/grant.result:
Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
- test result.
mysql-test/t/grant.test:
Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
- test case.
sql/sql_parse.cc:
Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
- added DROP privilege check on the original table for RENAME TABLE command.
Diffstat (limited to 'mysql-test/t/grant.test')
-rw-r--r-- | mysql-test/t/grant.test | 23 |
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 |