mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Manul merge
This commit is contained in:
@ -2716,6 +2716,18 @@ public:
|
||||
}
|
||||
void leave_locked_tables_mode();
|
||||
int decide_logging_format(TABLE_LIST *tables);
|
||||
void set_current_user_used() { current_user_used= TRUE; }
|
||||
bool is_current_user_used() { return current_user_used; }
|
||||
void clean_current_user_used() { current_user_used= FALSE; }
|
||||
void get_definer(LEX_USER *definer);
|
||||
void set_invoker(const LEX_STRING *user, const LEX_STRING *host)
|
||||
{
|
||||
invoker_user= *user;
|
||||
invoker_host= *host;
|
||||
}
|
||||
LEX_STRING get_invoker_user() { return invoker_user; }
|
||||
LEX_STRING get_invoker_host() { return invoker_host; }
|
||||
bool has_invoker() { return invoker_user.length > 0; }
|
||||
private:
|
||||
|
||||
/** The current internal error handler for this thread, or NULL. */
|
||||
@ -2738,6 +2750,25 @@ private:
|
||||
MEM_ROOT main_mem_root;
|
||||
Warning_info main_warning_info;
|
||||
Diagnostics_area main_da;
|
||||
|
||||
/**
|
||||
It will be set TURE if CURRENT_USER() is called in account management
|
||||
statements or default definer is set in CREATE/ALTER SP, SF, Event,
|
||||
TRIGGER or VIEW statements.
|
||||
|
||||
Current user will be binlogged into Query_log_event if current_user_used
|
||||
is TRUE; It will be stored into invoker_host and invoker_user by SQL thread.
|
||||
*/
|
||||
bool current_user_used;
|
||||
|
||||
/**
|
||||
It points to the invoker in the Query_log_event.
|
||||
SQL thread use it as the default definer in CREATE/ALTER SP, SF, Event,
|
||||
TRIGGER or VIEW statements or current user in account management
|
||||
statements if it is not NULL.
|
||||
*/
|
||||
LEX_STRING invoker_user;
|
||||
LEX_STRING invoker_host;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user