summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-03-15 04:41:57 +0200
committermonty@mashka.mysql.fi <>2003-03-15 04:41:57 +0200
commit968e9a73d4744701056286a2a2825a502fd08bdc (patch)
tree872ca3e7569fe0db0147fd6f118af292b828ffc0 /tests
parenta6482b1304e8a5f1cde9465fd9bf187376ddceea (diff)
parent369da47836dc6da2c187697aa6b99edf8c4e7310 (diff)
downloadmariadb-git-968e9a73d4744701056286a2a2825a502fd08bdc.tar.gz
merge with 3.23 to get:
- Fix for empty table/column names
Diffstat (limited to 'tests')
-rw-r--r--tests/grant.pl10
-rw-r--r--tests/grant.res7
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/grant.pl b/tests/grant.pl
index ba95d78d068..5a24127d79d 100644
--- a/tests/grant.pl
+++ b/tests/grant.pl
@@ -210,6 +210,16 @@ user_query("delete from $opt_database.test where a=1",1);
user_query("update $opt_database.test set b=3 where b=1",1);
user_query("update $opt_database.test set b=b+1",1);
+#
+# Test global SELECT privilege combined with table level privileges
+#
+
+safe_query("grant SELECT on *.* to $user");
+user_connect(0);
+user_query("update $opt_database.test set b=b+1");
+safe_query("revoke SELECT on *.* from $user");
+user_connect(0);
+
# Add one privilege at a time until the user has all privileges
user_query("select * from test",1);
safe_query("grant select on $opt_database.test to $user");
diff --git a/tests/grant.res b/tests/grant.res
index 822e9320f53..92d271cd864 100644
--- a/tests/grant.res
+++ b/tests/grant.res
@@ -195,7 +195,12 @@ update grant_test.test set b=3 where b=1
Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' 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
+grant SELECT on *.* to grant_user@localhost
+Connecting grant_user
+update grant_test.test set b=b+1
+revoke SELECT on *.* from grant_user@localhost
+Connecting grant_user
+lect * 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
delete from grant_test.test where a=1