1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

Bug #23675 Partitions: possible security breach via alter

now we return different error message if user doesn't have
SELECT grants
This commit is contained in:
holyfoot/hf@mysql.com/hfmain.(none)
2007-04-04 14:01:47 +05:00
parent 45fb6c90f0
commit f55ab9ef5e
7 changed files with 63 additions and 16 deletions

View File

@@ -19,7 +19,16 @@ revoke alter on mysqltest_1.* from mysqltest_1@localhost;
alter table t1 drop partition p3;
ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
revoke select,alter,drop on mysqltest_1.* from mysqltest_1@localhost;
drop user mysqltest_1@localhost;
drop table t1;
create table t1 (s1 int);
insert into t1 values (1);
grant alter on mysqltest_1.* to mysqltest_1@localhost;
alter table t1 partition by list (s1) (partition p1 values in (2));
ERROR HY000: Table has no partition for some existing values
grant select, alter on mysqltest_1.* to mysqltest_1@localhost;
alter table t1 partition by list (s1) (partition p1 values in (2));
ERROR HY000: Table has no partition for value 1
drop table t1;
drop user mysqltest_1@localhost;
drop schema mysqltest_1;
End of 5.1 tests