diff options
author | unknown <monty@mashka.mysql.fi> | 2003-03-14 17:08:42 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-03-14 17:08:42 +0200 |
commit | 03b0df9481c6f83ab67c1c79d8c6cc2db0ca9223 (patch) | |
tree | 2c4870b4c69060f127e0c4aca401c4312128a363 /tests | |
parent | f3eb7fe0c3259b001f77c30844f42f96562c23f1 (diff) | |
download | mariadb-git-03b0df9481c6f83ab67c1c79d8c6cc2db0ca9223.tar.gz |
Check for empty table/column names
mysql-test/t/create.test:
Test for empty table/column name
tests/grant.pl:
More tests
tests/grant.res:
More tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/grant.pl | 10 | ||||
-rw-r--r-- | tests/grant.res | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/grant.pl b/tests/grant.pl index c41b22157bd..bf67ce5e790 100644 --- a/tests/grant.pl +++ b/tests/grant.pl @@ -207,6 +207,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 1c74e5b1d1b..44e20db555f 100644 --- a/tests/grant.res +++ b/tests/grant.res @@ -192,6 +192,11 @@ 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' +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 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 |