diff options
author | ram@gw.mysql.r18.ru <> | 2004-08-12 14:59:33 +0500 |
---|---|---|
committer | ram@gw.mysql.r18.ru <> | 2004-08-12 14:59:33 +0500 |
commit | 494a3b05593235089daf7a0585ab209c4f74b412 (patch) | |
tree | c02c37bce637b20c345a089da05d7f0c145e94ff /mysql-test | |
parent | 259bce85b4497048c5348091052bf5c9c33a591b (diff) | |
parent | 955e869d7cdb71e536017e5f70101dd975f06ba3 (diff) | |
download | mariadb-git-494a3b05593235089daf7a0585ab209c4f74b412.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b4898
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/grant.result | 18 | ||||
-rw-r--r-- | mysql-test/t/grant.test | 15 |
2 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 1a968fa4f2f..c76b6ee46d5 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -131,3 +131,21 @@ Wrong usage of DB GRANT and GLOBAL PRIVILEGES select 1; 1 1 +insert into mysql.user (host, user) values ('localhost', 'test11'); +insert into mysql.db (host, db, user, select_priv) values +('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); +flush privileges; +show grants for test11@localhost; +Grants for test11@localhost +GRANT USAGE ON *.* TO 'test11'@'localhost' +GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' +GRANT SELECT ON `a%`.* TO 'test11'@'localhost' +alter table mysql.db order by db desc; +flush privileges; +show grants for test11@localhost; +Grants for test11@localhost +GRANT USAGE ON *.* TO 'test11'@'localhost' +GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' +GRANT SELECT ON `a%`.* TO 'test11'@'localhost' +delete from mysql.user where user='test11'; +delete from mysql.db where user='test11'; diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 598a7186a6e..442ce4918d8 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -89,3 +89,18 @@ drop table t1; --error 1221 GRANT FILE on mysqltest.* to mysqltest_1@localhost; select 1; -- To test that the previous command didn't cause problems + + +# +# Bug #4898: User privileges depending on ORDER BY Settings of table db +# +insert into mysql.user (host, user) values ('localhost', 'test11'); +insert into mysql.db (host, db, user, select_priv) values +('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); +flush privileges; +show grants for test11@localhost; +alter table mysql.db order by db desc; +flush privileges; +show grants for test11@localhost; +delete from mysql.user where user='test11'; +delete from mysql.db where user='test11'; |