diff options
author | unknown <monty@mashka.mysql.fi> | 2003-05-08 00:12:46 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-05-08 00:12:46 +0300 |
commit | 97eef79b023c6210e3aea69a750383b2db748c68 (patch) | |
tree | 60b20adcf362b4f6c7b1eca99610284503335375 /tests | |
parent | 4d91444b15a9d156875b4ba7df2efc301e10845b (diff) | |
parent | a57e7732897ee7973d82dccea0425c436845066a (diff) | |
download | mariadb-git-97eef79b023c6210e3aea69a750383b2db748c68.tar.gz |
Merge to get security patch
BitKeeper/etc/logging_ok:
auto-union
sql/sql_acl.cc:
Auto merged
tests/grant.pl:
Auto merged
tests/grant.res:
Auto merged
BitKeeper/triggers/post-commit:
use local file
client/mysqldump.c:
Merge to get crash fix
Diffstat (limited to 'tests')
-rw-r--r-- | tests/grant.pl | 13 | ||||
-rw-r--r-- | tests/grant.res | 15 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/grant.pl b/tests/grant.pl index e32431ad63a..fb73be786b6 100644 --- a/tests/grant.pl +++ b/tests/grant.pl @@ -223,8 +223,21 @@ user_query("update $opt_database.test set b=b+1",1); safe_query("grant SELECT on *.* to $user"); user_connect(0); user_query("update $opt_database.test set b=b+1"); +user_query("update $opt_database.test set b=b+1 where a > 0"); safe_query("revoke SELECT on *.* from $user"); +safe_query("grant SELECT on $opt_database.* to $user"); user_connect(0); +user_query("update $opt_database.test set b=b+1"); +user_query("update $opt_database.test set b=b+1 where a > 0"); +safe_query("grant UPDATE on *.* to $user"); +user_connect(0); +user_query("update $opt_database.test set b=b+1"); +user_query("update $opt_database.test set b=b+1 where a > 0"); +safe_query("revoke UPDATE on *.* from $user"); +safe_query("revoke SELECT on $opt_database.* from $user"); +user_connect(0); +user_query("update $opt_database.test set b=b+1 where a > 0",1); +user_query("update $opt_database.test set b=b+1",1); # Add one privilege at a time until the user has all privileges user_query("select * from test",1); diff --git a/tests/grant.res b/tests/grant.res index a50f73740c6..7947ca692b6 100644 --- a/tests/grant.res +++ b/tests/grant.res @@ -200,8 +200,23 @@ Error in execute: SELECT command denied to user: 'grant_user@localhost' for colu grant SELECT on *.* to grant_user@localhost Connecting grant_user update grant_test.test set b=b+1 +update grant_test.test set b=b+1 where a > 0 revoke SELECT on *.* from grant_user@localhost +grant SELECT on grant_test.* to grant_user@localhost Connecting grant_user +update grant_test.test set b=b+1 +update grant_test.test set b=b+1 where a > 0 +grant UPDATE on *.* to grant_user@localhost +Connecting grant_user +update grant_test.test set b=b+1 +update grant_test.test set b=b+1 where a > 0 +revoke UPDATE on *.* from grant_user@localhost +revoke SELECT on grant_test.* from grant_user@localhost +Connecting grant_user +update grant_test.test set b=b+1 where a > 0 +Error in execute: select command denied to user: 'grant_user@localhost' for column 'a' in table 'test' +update grant_test.test set b=b+1 +Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' select * from test Error in execute: select command denied to user: 'grant_user@localhost' for table 'test' grant select on grant_test.test to grant_user@localhost |