diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-09-27 12:32:59 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-09-27 12:32:59 +0300 |
commit | 2e57478d9278b7b84b6bbbe6368a4fd8f68039c4 (patch) | |
tree | 72a3e5f03123ab2e82f6a6914420c1fd8ba57fe2 /mysql-test/t/grant2.test | |
parent | 4f6658967b40f88cbf0742066888d626812fec56 (diff) | |
parent | 500d856faf5dca0eb2731617fb11c09b83e3ef0d (diff) | |
download | mariadb-git-2e57478d9278b7b84b6bbbe6368a4fd8f68039c4.tar.gz |
merged the fix for bug 30468 to 5.1-opt
mysql-test/t/grant2.test:
Auto merged
sql/sql_acl.h:
Auto merged
sql/sql_base.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/grant2.test')
-rw-r--r-- | mysql-test/t/grant2.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test index f6075ba2ee4..0f0c92e82eb 100644 --- a/mysql-test/t/grant2.test +++ b/mysql-test/t/grant2.test @@ -585,5 +585,37 @@ drop user mysqltest_1@localhost; drop user mysqltest_2@localhost; +# +# Bug #30468: column level privileges not respected when joining tables +# +CREATE DATABASE db1; + +USE db1; +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,1),(2,2); + +CREATE TABLE t2 (b INT, c INT); +INSERT INTO t2 VALUES (1,100),(2,200); + +GRANT SELECT ON t1 TO mysqltest1@localhost; +GRANT SELECT (b) ON t2 TO mysqltest1@localhost; + +connect (conn1,localhost,mysqltest1,,); +connection conn1; +USE db1; +--error ER_COLUMNACCESS_DENIED_ERROR +SELECT c FROM t2; +--error ER_COLUMNACCESS_DENIED_ERROR +SELECT * FROM t2; +--error ER_COLUMNACCESS_DENIED_ERROR +SELECT * FROM t1 JOIN t2 USING (b); + +connection default; +disconnect conn1; +DROP TABLE db1.t1, db1.t2; +DROP USER mysqltest1@localhost; +DROP DATABASE db1; + + --echo End of 5.0 tests |