diff options
| author | Sergei Golubchik <sergii@pisem.net> | 2013-10-18 11:38:13 -0700 |
|---|---|---|
| committer | Sergei Golubchik <sergii@pisem.net> | 2013-10-18 11:38:13 -0700 |
| commit | 4cc8cda346bdd63c7e3882d687ba01143856b5dd (patch) | |
| tree | e2b85067af7ab64f3806a01f0e4c8b38060dd53f /mysql-test/t/plugin_auth.test | |
| parent | cefe5d964b6b483be51ae7d643105374a4cfe0bf (diff) | |
| download | mariadb-git-4cc8cda346bdd63c7e3882d687ba01143856b5dd.tar.gz | |
Remove the very old historical but never documented behavior,
than an empty host '' is the same as any-host wildcard '%'.
Replace '' with '%' in the parser (for GRANT ... foo@'') and when loading grant tables.
Side effect: one cannot have foo@'' and foo@'%' both at the same time
(but one can have foo@'%' and foo@'%%')
Diffstat (limited to 'mysql-test/t/plugin_auth.test')
| -rw-r--r-- | mysql-test/t/plugin_auth.test | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/mysql-test/t/plugin_auth.test b/mysql-test/t/plugin_auth.test index 4a3187a33eb..d374d098109 100644 --- a/mysql-test/t/plugin_auth.test +++ b/mysql-test/t/plugin_auth.test @@ -168,7 +168,7 @@ connection grant_plug_dest_con; --echo ## testing what an ordinary user can grant --echo this should fail : no rights to grant all --error ER_ACCESS_DENIED_NO_PASSWORD_ERROR -GRANT PROXY ON ''@'' TO grant_plug; +GRANT PROXY ON ''@'%%' TO grant_plug; --echo this should fail : not the same user --error ER_ACCESS_DENIED_NO_PASSWORD_ERROR @@ -211,11 +211,11 @@ disconnect grant_plug_dest_con; --echo # test what root can grant --echo should work : root has PROXY to all users -GRANT PROXY ON ''@'' TO grant_plug; -REVOKE PROXY ON ''@'' FROM grant_plug; +GRANT PROXY ON ''@'%%' TO grant_plug; +REVOKE PROXY ON ''@'%%' FROM grant_plug; --echo should work : root has PROXY to all users -GRANT PROXY ON ''@'' TO proxy_admin IDENTIFIED BY 'test' +GRANT PROXY ON ''@'%%' TO proxy_admin IDENTIFIED BY 'test' WITH GRANT OPTION; --echo need USAGE : PROXY doesn't contain it. @@ -225,7 +225,7 @@ connect (proxy_admin_con,localhost,proxy_admin,test); connection proxy_admin_con; --echo in proxy_admin_con; ---echo should work : proxy_admin has proxy to ''@'' +--echo should work : proxy_admin has proxy to ''@'%%' GRANT PROXY ON future_user TO grant_plug; connection default; @@ -317,9 +317,9 @@ DROP USER plug_dest; --echo # GRANT ALL PRIVILEGES ON *.* TO power_user; -GRANT USAGE ON anonymous_db.* TO ''@'' +GRANT USAGE ON anonymous_db.* TO ''@'%%' IDENTIFIED WITH 'test_plugin_server' AS 'power_user'; -GRANT PROXY ON power_user TO ''@''; +GRANT PROXY ON power_user TO ''@'%%'; CREATE DATABASE confidential_db; connect(plug_con,localhost, test_login_user, power_user, confidential_db); @@ -329,24 +329,23 @@ connection default; disconnect plug_con; DROP USER power_user; -DROP USER ''@''; +DROP USER ''@'%%'; DROP DATABASE confidential_db; --echo # Test case #2 (crash with double grant proxy) -CREATE USER ''@'' IDENTIFIED WITH 'test_plugin_server' AS 'standard_user'; +CREATE USER ''@'%%' IDENTIFIED WITH 'test_plugin_server' AS 'standard_user'; CREATE USER standard_user; CREATE DATABASE shared; GRANT ALL PRIVILEGES ON shared.* TO standard_user; -GRANT PROXY ON standard_user TO ''@''; +GRANT PROXY ON standard_user TO ''@'%%'; --echo #should not crash -GRANT PROXY ON standard_user TO ''@''; +GRANT PROXY ON standard_user TO ''@'%%'; -DROP USER ''@''; +DROP USER ''@'%%'; DROP USER standard_user; DROP DATABASE shared; - --echo # --echo # Bug #57551 : Live upgrade fails between 5.1.52 -> 5.5.7-rc --echo # |
