diff options
Diffstat (limited to 'mysql-test/t/grant2.test')
-rw-r--r-- | mysql-test/t/grant2.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test new file mode 100644 index 00000000000..148c4d3da21 --- /dev/null +++ b/mysql-test/t/grant2.test @@ -0,0 +1,30 @@ +# +# GRANT tests that require several connections +# (usually it's GRANT, reconnect as another user, try something) +# + + +# +# wild_compare fun +# + +delete from mysql.user where user like 'mysqltest\_%'; +delete from mysql.db where user like 'mysqltest\_%'; +flush privileges; +grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option; +connect (user1,localhost,mysqltest_1,,); +connection user1; +select current_user(); +grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option; +--error 1044 +grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option; +disconnect user1; +connection default; +show grants for mysqltest_1@localhost; +show grants for mysqltest_2@localhost; +--error 1141 +show grants for mysqltest_3@localhost; +delete from mysql.user where user like 'mysqltest\_%'; +delete from mysql.db where user like 'mysqltest\_%'; +flush privileges; + |