Commit 4ac15b22 authored by Sneha Modi's avatar Sneha Modi

Bug#16995954 : PLUGIN_AUTH TESTS FAIL ON SYSTEMS WITH NO HOSTNAME OTHER

THAN LOCALHOST

      This is a test bug and the explanation for the behaviour can be found
on the bug page.Modifying the select to select user where user!=root for the line where
failure is encountered on machines with no hostname other than the localhost.
parent 6abedaea
...@@ -12,10 +12,8 @@ test_plugin_server plug_dest ...@@ -12,10 +12,8 @@ test_plugin_server plug_dest
ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES) ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES)
GRANT PROXY ON plug_dest TO plug; GRANT PROXY ON plug_dest TO plug;
test proxies_priv columns test proxies_priv columns
SELECT * FROM mysql.proxies_priv; SELECT * FROM mysql.proxies_priv WHERE user !='root';
Host User Proxied_host Proxied_user With_grant Grantor Timestamp Host User Proxied_host Proxied_user With_grant Grantor Timestamp
xx root 1 xx
xx root 1 xx
xx plug % plug_dest 0 root@localhost xx xx plug % plug_dest 0 root@localhost xx
test mysql.proxies_priv; test mysql.proxies_priv;
SHOW CREATE TABLE mysql.proxies_priv; SHOW CREATE TABLE mysql.proxies_priv;
......
...@@ -96,49 +96,31 @@ CREATE USER qa_test_6_user IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest' ...@@ -96,49 +96,31 @@ CREATE USER qa_test_6_user IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest'
CREATE USER qa_test_6_dest IDENTIFIED BY 'dest_passwd'; CREATE USER qa_test_6_dest IDENTIFIED BY 'dest_passwd';
GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_passwd'; GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_passwd';
GRANT PROXY ON qa_test_6_dest TO qa_test_6_user; GRANT PROXY ON qa_test_6_dest TO qa_test_6_user;
SELECT user,plugin,authentication_string,password FROM mysql.user; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password user plugin authentication_string password
qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest qa_test_6_user qa_auth_interface qa_test_6_dest
root
root
root
root
exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using password: YES) ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using password: YES)
GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest'; GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password user plugin authentication_string password
qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest qa_test_6_user qa_auth_interface qa_test_6_dest
root
root
root
root
root qa_auth_interface qa_test_6_dest
exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
REVOKE PROXY ON qa_test_6_dest FROM root; REVOKE PROXY ON qa_test_6_dest FROM root;
SELECT user,plugin,authentication_string FROM mysql.user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string user plugin authentication_string
qa_test_6_dest NULL qa_test_6_dest NULL
qa_test_6_user qa_auth_interface qa_test_6_dest qa_test_6_user qa_auth_interface qa_test_6_dest
root
root
root
root
root qa_auth_interface qa_test_6_dest
exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
DROP USER qa_test_6_user; DROP USER qa_test_6_user;
DROP USER qa_test_6_dest; DROP USER qa_test_6_dest;
DELETE FROM mysql.user WHERE user='root' AND plugin='qa_auth_interface'; DELETE FROM mysql.user WHERE user='root' AND plugin='qa_auth_interface';
SELECT user,plugin,authentication_string,password FROM mysql.user; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
user plugin authentication_string password user plugin authentication_string password
root
root
root
root
=== Test of the --default_auth option for clients ==== === Test of the --default_auth option for clients ====
CREATE USER qa_test_11_user IDENTIFIED WITH qa_auth_interface AS 'qa_test_11_dest'; CREATE USER qa_test_11_user IDENTIFIED WITH qa_auth_interface AS 'qa_test_11_dest';
CREATE USER qa_test_11_dest IDENTIFIED BY 'dest_passwd'; CREATE USER qa_test_11_dest IDENTIFIED BY 'dest_passwd';
......
...@@ -19,7 +19,7 @@ connect(plug_con,localhost,plug,plug_dest); ...@@ -19,7 +19,7 @@ connect(plug_con,localhost,plug,plug_dest);
GRANT PROXY ON plug_dest TO plug; GRANT PROXY ON plug_dest TO plug;
--echo test proxies_priv columns --echo test proxies_priv columns
--replace_column 1 xx 7 xx --replace_column 1 xx 7 xx
SELECT * FROM mysql.proxies_priv; SELECT * FROM mysql.proxies_priv WHERE user !='root';
--echo test mysql.proxies_priv; --echo test mysql.proxies_priv;
SHOW CREATE TABLE mysql.proxies_priv; SHOW CREATE TABLE mysql.proxies_priv;
......
...@@ -107,7 +107,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_pas ...@@ -107,7 +107,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_pas
GRANT PROXY ON qa_test_6_dest TO qa_test_6_user; GRANT PROXY ON qa_test_6_dest TO qa_test_6_user;
--sorted_result --sorted_result
SELECT user,plugin,authentication_string,password FROM mysql.user; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
--echo exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 --echo exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
--error 1 --error 1
...@@ -115,7 +115,7 @@ SELECT user,plugin,authentication_string,password FROM mysql.user; ...@@ -115,7 +115,7 @@ SELECT user,plugin,authentication_string,password FROM mysql.user;
GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest'; GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest';
--sorted_result --sorted_result
SELECT user,plugin,authentication_string,password FROM mysql.user; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
--echo exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 --echo exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
--error 1 --error 1
...@@ -123,7 +123,7 @@ SELECT user,plugin,authentication_string,password FROM mysql.user; ...@@ -123,7 +123,7 @@ SELECT user,plugin,authentication_string,password FROM mysql.user;
REVOKE PROXY ON qa_test_6_dest FROM root; REVOKE PROXY ON qa_test_6_dest FROM root;
--sorted_result --sorted_result
SELECT user,plugin,authentication_string FROM mysql.user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
--echo exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 --echo exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
--error 1 --error 1
...@@ -133,7 +133,7 @@ DROP USER qa_test_6_user; ...@@ -133,7 +133,7 @@ DROP USER qa_test_6_user;
DROP USER qa_test_6_dest; DROP USER qa_test_6_dest;
DELETE FROM mysql.user WHERE user='root' AND plugin='qa_auth_interface'; DELETE FROM mysql.user WHERE user='root' AND plugin='qa_auth_interface';
--sorted_result --sorted_result
SELECT user,plugin,authentication_string,password FROM mysql.user; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
--echo === Test of the --default_auth option for clients ==== --echo === Test of the --default_auth option for clients ====
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment