summaryrefslogtreecommitdiff
path: root/mysql-test/suite/roles/grant_empty.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-01 11:55:31 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-01 11:55:31 +0100
commit04de6ccc318ea52124399312223b8c0dc0d8fc7b (patch)
treefb2323f31cbfe419918045587d428a7731b60cf6 /mysql-test/suite/roles/grant_empty.result
parent8dce8ecfda303e15daf2832d90de024a6acf8e7e (diff)
downloadmariadb-git-04de6ccc318ea52124399312223b8c0dc0d8fc7b.tar.gz
MDEV-5668 Assertion `granted_role->is_role()' fails on granting role with empty name
parser: error out on empty role names
Diffstat (limited to 'mysql-test/suite/roles/grant_empty.result')
-rw-r--r--mysql-test/suite/roles/grant_empty.result14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/roles/grant_empty.result b/mysql-test/suite/roles/grant_empty.result
new file mode 100644
index 00000000000..dfc0f513396
--- /dev/null
+++ b/mysql-test/suite/roles/grant_empty.result
@@ -0,0 +1,14 @@
+grant '' to foo@localhost;
+ERROR OP000: Invalid role specification ``.
+create user ''@localhost;
+create role r1;
+grant r1 to ''@localhost;
+select current_user;
+current_user
+@localhost
+show grants;
+Grants for @localhost
+GRANT r1 TO ''@'localhost'
+GRANT USAGE ON *.* TO ''@'localhost'
+drop role r1;
+drop user ''@localhost;