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 /sql | |
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 'sql')
-rw-r--r-- | sql/sql_parse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 66b68cfc2f1..659926bdea3 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2818,7 +2818,7 @@ unsent_create_error: old_list=table[0]; new_list=table->next[0]; old_list.next=new_list.next=0; - if (check_grant(thd, ALTER_ACL, &old_list, 0, UINT_MAX, 0) || + if (check_grant(thd, ALTER_ACL | DROP_ACL, &old_list, 0, UINT_MAX, 0) || (!test_all_bits(table->next->grant.privilege, INSERT_ACL | CREATE_ACL) && check_grant(thd, INSERT_ACL | CREATE_ACL, &new_list, 0, |