diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-05-15 14:44:06 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-05-15 14:44:06 +0200 |
commit | 38b3218c4d372f6b0c5de7e4c81c824a1f308e55 (patch) | |
tree | f95ee6f5180fa77fe34c5118320c342321a4a667 /mysql-test/t/grant.test | |
parent | 5eae48c9053d91ee2001dd94a57706cdf50e5707 (diff) | |
parent | 212d78ef7a25d49c511f00ab9b3d85996ba4e76e (diff) | |
download | mariadb-git-38b3218c4d372f6b0c5de7e4c81c824a1f308e55.tar.gz |
merged
Diffstat (limited to 'mysql-test/t/grant.test')
-rw-r--r-- | mysql-test/t/grant.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index e89650c7aec..5bdb3ebe9bf 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1525,5 +1525,30 @@ DROP USER 'user1'@'localhost'; DROP USER 'user2'; DROP DATABASE db1; + +# +# Bug #53371: COM_FIELD_LIST can be abused to bypass table level grants. +# + +CREATE DATABASE db1; +CREATE DATABASE db2; +GRANT SELECT ON db1.* to 'testbug'@localhost; +USE db2; +CREATE TABLE t1 (a INT); +USE test; +connect (con1,localhost,testbug,,db1); +--error ER_NO_SUCH_TABLE +SELECT * FROM `../db2/tb2`; +--error ER_TABLEACCESS_DENIED_ERROR +SELECT * FROM `../db2`.tb2; +--error ER_NO_SUCH_TABLE +SELECT * FROM `#mysql50#/../db2/tb2`; +connection default; +disconnect con1; +DROP USER 'testbug'@localhost; +DROP TABLE db2.t1; +DROP DATABASE db1; +DROP DATABASE db2; + # Wait till we reached the initial number of concurrent sessions --source include/wait_until_count_sessions.inc |