diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-09-25 19:41:53 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-09-25 19:41:53 +0200 |
commit | dcc35b666aa54513dbd48cc5b4ebeb17941b30b8 (patch) | |
tree | 334d8c06a649954555c8fb6c0e80a8974d799f5d /mysql-test/r/delete_returning_grant.result | |
parent | 1989ae9e10f5d1532613b83432dd58304807a85f (diff) | |
download | mariadb-git-dcc35b666aa54513dbd48cc5b4ebeb17941b30b8.tar.gz |
extract privilege tests from delete_returning.test into delete_returning_grant.test
that is not run for embedded server
Diffstat (limited to 'mysql-test/r/delete_returning_grant.result')
-rw-r--r-- | mysql-test/r/delete_returning_grant.result | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/mysql-test/r/delete_returning_grant.result b/mysql-test/r/delete_returning_grant.result new file mode 100644 index 00000000000..c15d3627a39 --- /dev/null +++ b/mysql-test/r/delete_returning_grant.result @@ -0,0 +1,69 @@ +CREATE TABLE t1 (a int(11), b varchar(32)); +INSERT INTO t1 VALUES (7,'ggggggg'),(1,'a'),(3,'ccc'),(4,'dddd'),(1,'A'), +(2,'BB'),(4,'DDDD'),(5,'EEEEE'),(7,'GGGGGGG'),(2,'bb'); +CREATE VIEW v1 AS SELECT a, UPPER(b) FROM t1; +CREATE DATABASE mysqltest; +CREATE TABLE mysqltest.t1 SELECT * FROM t1; +GRANT DELETE ON mysqltest.* TO mysqltest_1@localhost; +GRANT SELECT(b) ON mysqltest.t1 TO mysqltest_1@localhost; +DELETE FROM mysqltest.t1 WHERE a=2 RETURNING b; +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'a' in table 't1' +DELETE FROM mysqltest.t1 RETURNING b; +b +ggggggg +a +ccc +dddd +A +BB +DDDD +EEEEE +GGGGGGG +bb +SELECT * FROM mysqltest.t1; +a b +INSERT INTO mysqltest.t1 SELECT * FROM t1; +GRANT SELECT(a) ON mysqltest.t1 TO mysqltest_1@localhost; +DELETE FROM mysqltest.t1 WHERE a=2 RETURNING b; +b +bb +BB +SELECT * FROM mysqltest.t1; +a b +7 GGGGGGG +5 EEEEE +4 DDDD +1 A +4 dddd +3 ccc +1 a +7 ggggggg +INSERT INTO mysqltest.t1 SELECT * FROM t1; +CREATE VIEW mysqltest.v1(a) AS SELECT a FROM mysqltest.t1; +GRANT SELECT, INSERT ON mysqltest.t1 TO mysqltest_1@localhost; +DELETE FROM mysqltest.v1; +SELECT * FROM mysqltest.t1; +a b +INSERT INTO mysqltest.t1 SELECT * FROM t1; +DELETE FROM mysqltest.v1 RETURNING a; +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'a' in table 'v1' +GRANT SELECT ON mysqltest.* TO mysqltest_1@localhost; +DELETE FROM mysqltest.v1 RETURNING a; +a +7 +1 +3 +4 +1 +2 +4 +5 +7 +2 +SELECT * FROM mysqltest.t1; +a b +INSERT INTO mysqltest.t1 SELECT * FROM t1; +DROP DATABASE mysqltest; +DROP USER mysqltest_1@localhost; +DROP VIEW v1; +DROP TABLE t1; |