• Christian Gonzalez's avatar
    Make SESSION_USER() comparable with CURRENT_USER() · c88cb0b7
    Christian Gonzalez authored
    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.
    c88cb0b7
item_strfunc.h 75.7 KB