summaryrefslogtreecommitdiff
path: root/mysql-test/t/grant2.test
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-07-22 22:00:51 +0200
committerunknown <serg@serg.mylan>2003-07-22 22:00:51 +0200
commitb413e5c420c3cdb32b519f67aaacf7ad1126d71e (patch)
tree4a9f976912b1c0f0407c09b08857800dc756dc8f /mysql-test/t/grant2.test
parent491cdf396fe45d1246e5ab664e0d4192244f89fd (diff)
downloadmariadb-git-b413e5c420c3cdb32b519f67aaacf7ad1126d71e.tar.gz
wild_compare fun: bug in GRANT db_pattern.* ...
Diffstat (limited to 'mysql-test/t/grant2.test')
-rw-r--r--mysql-test/t/grant2.test37
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test
new file mode 100644
index 00000000000..d1535fa17a9
--- /dev/null
+++ b/mysql-test/t/grant2.test
@@ -0,0 +1,37 @@
+#
+# 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();
+--error 1044
+grant all privileges on `my\_1`.* to mysqltest_9@localhost with grant option;
+grant all privileges on `my_%`.* to mysqltest_2@localhost with grant option;
+disconnect user1;
+connect (user2,localhost,mysqltest_2,,);
+connection user2;
+select current_user();
+grant all privileges on `mysql`.* to mysqltest_3@localhost with grant option;
+disconnect user2;
+connect (user3,localhost,mysqltest_3,,);
+connection user3;
+select current_user();
+show grants for mysqltest_3@localhost;
+disconnect user3;
+connect (root,localhost,root,,);
+connection root;
+delete from mysql.user where user like 'mysqltest\_%';
+delete from mysql.db where user like 'mysqltest\_%';
+flush privileges;
+