mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-15888 Implement FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK for views.
privilege checks for tables flushed via views
This commit is contained in:
28
mysql-test/main/flush_notembedded.result
Normal file
28
mysql-test/main/flush_notembedded.result
Normal file
@ -0,0 +1,28 @@
|
||||
#
|
||||
# MDEV-15888 Implement FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK for views.
|
||||
#
|
||||
#
|
||||
# privilege checks with views
|
||||
#
|
||||
create database mysqltest1;
|
||||
create table mysqltest1.t1 (a int);
|
||||
create user u1@localhost;
|
||||
grant reload on *.* to u1@localhost;
|
||||
grant select on mysqltest1.* to u1@localhost;
|
||||
connect u1,localhost,u1;
|
||||
flush tables mysqltest1.t1 for export;
|
||||
ERROR 42000: Access denied for user 'u1'@'localhost' to database 'mysqltest1'
|
||||
create view v as select * from mysqltest1.t1;
|
||||
create view v2 as select * from v;
|
||||
flush tables v for export;
|
||||
ERROR 42000: Access denied for user 'u1'@'localhost' to database 'mysqltest1'
|
||||
flush tables v2 for export;
|
||||
ERROR 42000: Access denied for user 'u1'@'localhost' to database 'mysqltest1'
|
||||
disconnect u1;
|
||||
connection default;
|
||||
drop database mysqltest1;
|
||||
drop view v, v2;
|
||||
drop user u1@localhost;
|
||||
#
|
||||
# End of 10.6 tests
|
||||
#
|
Reference in New Issue
Block a user