fix @@external_user variable
This commit is contained in:
parent
03d08bedf1
commit
1d46ee77d1
@ -224,7 +224,7 @@ NULL
|
||||
# in connection plug_con
|
||||
SELECT @@LOCAL.external_user;
|
||||
@@LOCAL.external_user
|
||||
'plug'@'%'
|
||||
plug_dest
|
||||
# in connection default
|
||||
## cleanup
|
||||
DROP USER plug;
|
||||
|
@ -44,7 +44,7 @@ SELECT @@external_user;
|
||||
NULL
|
||||
exec MYSQL -h localhost -P MASTER_MYPORT -u qa_test_2_user --password=qa_test_2_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
|
||||
current_user() user() @@local.proxy_user @@local.external_user
|
||||
authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' 'qa_test_2_user'@'%'
|
||||
authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' externaluser
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
authenticated_as
|
||||
@ -60,7 +60,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_3_dest identified by 'dest_pas
|
||||
GRANT PROXY ON qa_test_3_dest TO qa_test_3_user;
|
||||
exec MYSQL -h localhost -P MASTER_MYPORT -u qa_test_3_user --password=qa_test_3_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
|
||||
current_user() user() @@local.proxy_user @@local.external_user
|
||||
qa_test_3_dest@% qa_test_3_user@localhost 'qa_test_3_user'@'%' 'qa_test_3_user'@'%'
|
||||
qa_test_3_dest@% qa_test_3_user@localhost 'qa_test_3_user'@'%' qa_test_3_dest
|
||||
DROP USER qa_test_3_user;
|
||||
DROP USER qa_test_3_dest;
|
||||
=== Assign too low values for *length, which should have no effect ====
|
||||
@ -70,7 +70,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_4_dest identified by 'dest_pas
|
||||
GRANT PROXY ON qa_test_4_dest TO qa_test_4_user;
|
||||
exec MYSQL -h localhost -P MASTER_MYPORT -u qa_test_4_user --password=qa_test_4_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
|
||||
current_user() user() @@local.proxy_user @@local.external_user
|
||||
qa_test_4_dest@% qa_test_4_user@localhost 'qa_test_4_user'@'%' 'qa_test_4_user'@'%'
|
||||
qa_test_4_dest@% qa_test_4_user@localhost 'qa_test_4_user'@'%' qa_test_4_dest
|
||||
DROP USER qa_test_4_user;
|
||||
DROP USER qa_test_4_dest;
|
||||
=== Assign empty string especially to authenticated_as (in plugin) ====
|
||||
|
@ -4,7 +4,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_11_dest identified by 'dest_pa
|
||||
GRANT PROXY ON qa_test_11_dest TO qa_test_11_user;
|
||||
exec MYSQL --default_auth=qa_auth_client -h localhost -P MASTER_MYPORT -u qa_test_11_user --password=qa_test_11_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
|
||||
current_user() user() @@local.proxy_user @@local.external_user
|
||||
qa_test_11_dest@% qa_test_11_user@localhost 'qa_test_11_user'@'%' 'qa_test_11_user'@'%'
|
||||
qa_test_11_dest@% qa_test_11_user@localhost 'qa_test_11_user'@'%' NULL
|
||||
exec MYSQL --default_auth=qa_auth_client -h localhost -P MASTER_MYPORT -u qa_test_2_user --password=qa_test_11_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_2_user'@'localhost' (using password: NO)
|
||||
DROP USER qa_test_11_user, qa_test_11_dest;
|
||||
|
@ -547,8 +547,7 @@ public:
|
||||
protected:
|
||||
virtual uchar *session_value_ptr(THD *thd, LEX_STRING *base)
|
||||
{
|
||||
return thd->security_ctx->proxy_user[0] ?
|
||||
(uchar *) &(thd->security_ctx->proxy_user[0]) : NULL;
|
||||
return (uchar*)thd->security_ctx->external_user;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user