mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge mysql.com:/home/hf/work/27957/my50-27957
into mysql.com:/home/hf/work/27957/my51-27957
This commit is contained in:
@@ -415,6 +415,7 @@ connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||
connection user1;
|
||||
-- error 1142
|
||||
alter table t1 rename t2;
|
||||
disconnect user1;
|
||||
connection root;
|
||||
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
|
||||
delete from mysql.user where user=_binary'mysqltest_1';
|
||||
@@ -1235,6 +1236,30 @@ DROP DATABASE mysqltest2;
|
||||
|
||||
DROP USER mysqltest_1@localhost;
|
||||
|
||||
#
|
||||
# Bug#27878: Unchecked privileges on a view referring to a table from another
|
||||
# database.
|
||||
#
|
||||
use test;
|
||||
CREATE TABLE t1 (f1 int, f2 int);
|
||||
INSERT INTO t1 VALUES(1,1), (2,2);
|
||||
CREATE DATABASE db27878;
|
||||
GRANT UPDATE(f1) ON t1 TO 'mysqltest_1'@'localhost';
|
||||
GRANT SELECT ON `test`.* TO 'mysqltest_1'@'localhost';
|
||||
GRANT ALL ON db27878.* TO 'mysqltest_1'@'localhost';
|
||||
use db27878;
|
||||
CREATE SQL SECURITY INVOKER VIEW db27878.v1 AS SELECT * FROM test.t1;
|
||||
connect (user1,localhost,mysqltest_1,,test);
|
||||
connection user1;
|
||||
use db27878;
|
||||
--error 1356
|
||||
UPDATE v1 SET f2 = 4;
|
||||
SELECT * FROM test.t1;
|
||||
disconnect user1;
|
||||
connection default;
|
||||
DROP VIEW v1;
|
||||
use test;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user