mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Make SESSION_USER() comparable with CURRENT_USER()
Update `SESSION_USER()` behaviour to be comparable with `CURRENT_USER()`. `SESSION_USER()` will return the user and host columns from `mysql.user` used to authenticate the user when the session was created. Historically `SESSION_USER()` was an alias of `USER()` function. The main difference with `USER()` behaviour after this changes is that `SESSION_USER()` now returns the host column from `mysql.user` instead of the client host or ip. NOTE: `SESSION_USER_IS_USER` old mode is added to make the change backward compatible. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
This commit is contained in:
committed by
Sergei Golubchik
parent
eedbb901e5
commit
fd0cc2b1fd
@@ -208,6 +208,7 @@ enum enum_binlog_row_image {
|
||||
#define OLD_MODE_NO_NULL_COLLATION_IDS (1 << 6)
|
||||
#define OLD_MODE_LOCK_ALTER_TABLE_COPY (1 << 7)
|
||||
#define OLD_MODE_OLD_FLUSH_STATUS (1 << 8)
|
||||
#define OLD_MODE_SESSION_USER_IS_USER (1 << 9)
|
||||
|
||||
#define OLD_MODE_DEFAULT_VALUE OLD_MODE_UTF8_IS_UTF8MB3
|
||||
|
||||
|
Reference in New Issue
Block a user