1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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.
This commit is contained in:
unknown
2007-04-17 16:52:50 +05:00
parent 247c3a81a1
commit 50e158402b
3 changed files with 34 additions and 2 deletions

View File

@ -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,