diff options
author | Jon Olav Hauglid <jon.hauglid@sun.com> | 2009-10-09 11:57:55 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@sun.com> | 2009-10-09 11:57:55 +0200 |
commit | 4dae0e03076f54d32bcdf005b58c3feb22623be7 (patch) | |
tree | 3896808b89d38d901c27c93ee79e66dfda6722e4 /mysql-test/t/grant.test | |
parent | df3265e269cbc39dd5b7dc0c09894b77e939e616 (diff) | |
download | mariadb-git-4dae0e03076f54d32bcdf005b58c3feb22623be7.tar.gz |
Bug #25863 No database selected error, but documentation
says * for global allowed
The current behaviour of 'GRANT *' was changed as a part of the fix
for Bug#19022, Bug#17199 and Bug#18444. To avoid regression, we keep
the current behavior and update the documentation.
Test case added to grant.test.
Diffstat (limited to 'mysql-test/t/grant.test')
-rw-r--r-- | mysql-test/t/grant.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index bcd393bd6ab..6cf43620c1a 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1525,5 +1525,34 @@ DROP USER 'user1'@'localhost'; DROP USER 'user2'; DROP DATABASE db1; + +--echo # +--echo # Bug #25863 No database selected error, but documentation +--echo # says * for global allowed +--echo # + +connect(conn1,localhost,root,,*NO-ONE*); + +--error ER_NO_DB_ERROR +GRANT ALL ON * TO mysqltest_1; + +GRANT ALL ON *.* TO mysqltest_1; +SHOW GRANTS FOR mysqltest_1; +DROP USER mysqltest_1; + +USE test; + +GRANT ALL ON * TO mysqltest_1; +SHOW GRANTS FOR mysqltest_1; +DROP USER mysqltest_1; + +GRANT ALL ON *.* TO mysqltest_1; +SHOW GRANTS FOR mysqltest_1; +DROP USER mysqltest_1; + +connection default; +disconnect conn1; + + # Wait till we reached the initial number of concurrent sessions --source include/wait_until_count_sessions.inc |