diff options
author | Oleksandr Byelkin <sanja@askmonty.org> | 2011-05-31 15:33:14 +0300 |
---|---|---|
committer | Oleksandr Byelkin <sanja@askmonty.org> | 2011-05-31 15:33:14 +0300 |
commit | e89da2e0f1e04fa6291155fce6904310e911b8e9 (patch) | |
tree | 4c19a1f1c309ed3b25ddd840c61cc942c1cd7272 /mysql-test/r | |
parent | 55d26463ad29c3262b14a9b959adf852b1e650bc (diff) | |
download | mariadb-git-e89da2e0f1e04fa6291155fce6904310e911b8e9.tar.gz |
Return commented out tests.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/view.result | 22 | ||||
-rw-r--r-- | mysql-test/r/view_grant.result | 35 |
2 files changed, 42 insertions, 15 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index a581b83b133..4eaf1eb4793 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2881,6 +2881,28 @@ Tables_in_test t1 DROP TABLE t1; DROP VIEW IF EXISTS v1; +CREATE DATABASE bug21261DB; +USE bug21261DB; +CREATE TABLE t1 (x INT); +CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT x FROM t1; +GRANT INSERT, UPDATE ON v1 TO 'user21261'@'localhost'; +GRANT INSERT, UPDATE ON t1 TO 'user21261'@'localhost'; +CREATE TABLE t2 (y INT); +GRANT SELECT ON t2 TO 'user21261'@'localhost'; +INSERT INTO v1 (x) VALUES (5); +UPDATE v1 SET x=1; +GRANT SELECT ON v1 TO 'user21261'@'localhost'; +GRANT SELECT ON t1 TO 'user21261'@'localhost'; +UPDATE v1,t2 SET x=1 WHERE x=y; +SELECT * FROM t1; +x +1 +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user21261'@'localhost'; +DROP USER 'user21261'@'localhost'; +DROP VIEW v1; +DROP TABLE t1; +DROP DATABASE bug21261DB; +USE test; create table t1 (f1 datetime); create view v1 as select * from t1 where f1 between now() and now() + interval 1 minute; show create view v1; diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 2ae5b46a048..261743e9d3c 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -172,29 +172,30 @@ a b 35 4 46 5 50 10 +update v1 set a=a+c; select * from t1; a b -13 2 -24 3 -35 4 -46 5 -50 10 +16 2 +28 3 +40 4 +52 5 +61 10 update t2,v2 set v2.a=v2.a+v2.c where t2.x=v2.c; select * from t1; a b -13 2 -27 3 -39 4 -51 5 -50 10 +16 2 +31 3 +44 4 +57 5 +61 10 update v2 set a=a+c; select * from t1; a b -15 2 -30 3 -43 4 -56 5 -60 10 +18 2 +34 3 +48 4 +62 5 +71 10 update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c; ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2' update v2 set c=a+c; @@ -575,12 +576,16 @@ UPDATE mysqltest1.v_ts SET x= 200 WHERE x = 100; ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'v_ts' UPDATE mysqltest1.v_ts SET x= 200; ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'v_ts' +UPDATE mysqltest1.v_tu SET x= 200 WHERE x = 100; +UPDATE mysqltest1.v_tus SET x= 200 WHERE x = 100; +UPDATE mysqltest1.v_tu SET x= 200; DELETE FROM mysqltest1.v_ts WHERE x= 200; ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table 'v_ts' DELETE FROM mysqltest1.v_ts; ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table 'v_ts' DELETE FROM mysqltest1.v_td WHERE x= 200; ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for column 'x' in table 'v_td' +DELETE FROM mysqltest1.v_tds WHERE x= 200; DELETE FROM mysqltest1.v_td; DROP VIEW mysqltest1.v_tds; DROP VIEW mysqltest1.v_td; |