Syntax\n------\n\nSESSION_USER()\n\nDescription\n-----------\n\nShows the value of CURRENT_USER() when the session was created, that is, it shows a user@host pair from the mysql.global_priv table, like CURRENT_USER(), but unlike CURRENT_USER() it will not change inside stored routines and views. This is SQL Standard behavior for the SESSION_USER function.\n\nSESSION_USER() is a synonym for USER().\n\nBackward-compatible behavior can be restored by setting old mode to SESSION_USER_IS_USER.\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/session_user