mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -1413,3 +1413,26 @@ DROP USER 'user1';
|
|||||||
DROP USER 'user1'@'localhost';
|
DROP USER 'user1'@'localhost';
|
||||||
DROP USER 'user2';
|
DROP USER 'user2';
|
||||||
DROP DATABASE db1;
|
DROP DATABASE db1;
|
||||||
|
#
|
||||||
|
# Bug #25863 No database selected error, but documentation
|
||||||
|
# says * for global allowed
|
||||||
|
#
|
||||||
|
GRANT ALL ON * TO mysqltest_1;
|
||||||
|
ERROR 3D000: No database selected
|
||||||
|
GRANT ALL ON *.* TO mysqltest_1;
|
||||||
|
SHOW GRANTS FOR mysqltest_1;
|
||||||
|
Grants for mysqltest_1@%
|
||||||
|
GRANT ALL PRIVILEGES ON *.* TO 'mysqltest_1'@'%'
|
||||||
|
DROP USER mysqltest_1;
|
||||||
|
USE test;
|
||||||
|
GRANT ALL ON * TO mysqltest_1;
|
||||||
|
SHOW GRANTS FOR mysqltest_1;
|
||||||
|
Grants for mysqltest_1@%
|
||||||
|
GRANT USAGE ON *.* TO 'mysqltest_1'@'%'
|
||||||
|
GRANT ALL PRIVILEGES ON `test`.* TO 'mysqltest_1'@'%'
|
||||||
|
DROP USER mysqltest_1;
|
||||||
|
GRANT ALL ON *.* TO mysqltest_1;
|
||||||
|
SHOW GRANTS FOR mysqltest_1;
|
||||||
|
Grants for mysqltest_1@%
|
||||||
|
GRANT ALL PRIVILEGES ON *.* TO 'mysqltest_1'@'%'
|
||||||
|
DROP USER mysqltest_1;
|
||||||
|
@ -1525,5 +1525,34 @@ DROP USER 'user1'@'localhost';
|
|||||||
DROP USER 'user2';
|
DROP USER 'user2';
|
||||||
DROP DATABASE db1;
|
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
|
# Wait till we reached the initial number of concurrent sessions
|
||||||
--source include/wait_until_count_sessions.inc
|
--source include/wait_until_count_sessions.inc
|
||||||
|
Reference in New Issue
Block a user