summaryrefslogtreecommitdiff
path: root/mysql-test/main/ps_grant.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/ps_grant.test')
-rw-r--r--mysql-test/main/ps_grant.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/main/ps_grant.test b/mysql-test/main/ps_grant.test
index 3d59cc36de0..80a458bf874 100644
--- a/mysql-test/main/ps_grant.test
+++ b/mysql-test/main/ps_grant.test
@@ -40,6 +40,7 @@ grant usage on mysqltest.* to second_user@localhost
identified by 'looser' ;
grant select on mysqltest.t9 to second_user@localhost
identified by 'looser' ;
+--sorted_result
show grants for second_user@localhost ;
@@ -64,8 +65,10 @@ select a as my_col from t1;
connection default;
grant select on mysqltest.t1 to second_user@localhost
identified by 'looser' ;
+--sorted_result
show grants for second_user@localhost ;
drop table mysqltest.t9 ;
+--sorted_result
show grants for second_user@localhost ;
@@ -73,6 +76,7 @@ show grants for second_user@localhost ;
## switch to the second session
connection con3;
######## Question 1: The table t1 should be now accessible. ########
+--sorted_result
show grants for second_user@localhost ;
prepare s_t1 from 'select a as my_col from t1' ;
execute s_t1 ;
@@ -86,11 +90,13 @@ deallocate prepare s_t9;
## switch back to the first session
connection default;
revoke all privileges on mysqltest.t1 from second_user@localhost;
+--sorted_result
show grants for second_user@localhost ;
#### check the access as new user
## switch to the second session
connection con3;
+--sorted_result
show grants for second_user@localhost ;
######## Question 2: The table t1 should be now not accessible. ########
--error 1142
@@ -103,6 +109,7 @@ connection default;
disconnect con3 ;
## remove all rights of second_user@localhost
revoke all privileges, grant option from second_user@localhost ;
+--sorted_result
show grants for second_user@localhost ;
drop user second_user@localhost ;
commit ;