Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1d46ee77
Commit
1d46ee77
authored
Mar 26, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix @@external_user variable
parent
03d08bed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
+6
-7
mysql-test/r/plugin_auth.result
mysql-test/r/plugin_auth.result
+1
-1
mysql-test/r/plugin_auth_qa_2.result
mysql-test/r/plugin_auth_qa_2.result
+3
-3
mysql-test/r/plugin_auth_qa_3.result
mysql-test/r/plugin_auth_qa_3.result
+1
-1
sql/sys_vars.h
sql/sys_vars.h
+1
-2
No files found.
mysql-test/r/plugin_auth.result
View file @
1d46ee77
...
@@ -224,7 +224,7 @@ NULL
...
@@ -224,7 +224,7 @@ NULL
# in connection plug_con
# in connection plug_con
SELECT @@LOCAL.external_user;
SELECT @@LOCAL.external_user;
@@LOCAL.external_user
@@LOCAL.external_user
'plug'@'%'
plug_dest
# in connection default
# in connection default
## cleanup
## cleanup
DROP USER plug;
DROP USER plug;
...
...
mysql-test/r/plugin_auth_qa_2.result
View file @
1d46ee77
...
@@ -44,7 +44,7 @@ SELECT @@external_user;
...
@@ -44,7 +44,7 @@ SELECT @@external_user;
NULL
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
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
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';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
user plugin authentication_string
user plugin authentication_string
authenticated_as
authenticated_as
...
@@ -60,7 +60,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_3_dest identified by 'dest_pas
...
@@ -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;
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
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
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_user;
DROP USER qa_test_3_dest;
DROP USER qa_test_3_dest;
=== Assign too low values for *length, which should have no effect ====
=== 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
...
@@ -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;
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
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
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_user;
DROP USER qa_test_4_dest;
DROP USER qa_test_4_dest;
=== Assign empty string especially to authenticated_as (in plugin) ====
=== Assign empty string especially to authenticated_as (in plugin) ====
...
...
mysql-test/r/plugin_auth_qa_3.result
View file @
1d46ee77
...
@@ -4,7 +4,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_11_dest identified by 'dest_pa
...
@@ -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;
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
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
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
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)
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;
DROP USER qa_test_11_user, qa_test_11_dest;
...
...
sql/sys_vars.h
View file @
1d46ee77
...
@@ -547,8 +547,7 @@ class Sys_var_external_user : public Sys_var_proxy_user
...
@@ -547,8 +547,7 @@ class Sys_var_external_user : public Sys_var_proxy_user
protected:
protected:
virtual
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
virtual
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
{
{
return
thd
->
security_ctx
->
proxy_user
[
0
]
?
return
(
uchar
*
)
thd
->
security_ctx
->
external_user
;
(
uchar
*
)
&
(
thd
->
security_ctx
->
proxy_user
[
0
])
:
NULL
;
}
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment