mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
WL#7076: Backporting wl6715 to support both formats in 5.5, 5.6, 5.7
Backporting wl6715 to mysql-5.5
This commit is contained in:
@ -388,6 +388,7 @@ extern const LEX_STRING Diag_condition_item_names[];
|
||||
|
||||
#include "sql_lex.h" /* Must be here */
|
||||
|
||||
extern LEX_CSTRING sql_statement_names[(uint) SQLCOM_END + 1];
|
||||
class Delayed_insert;
|
||||
class select_result;
|
||||
class Time_zone;
|
||||
@ -895,6 +896,11 @@ void xid_cache_delete(XID_STATE *xid_state);
|
||||
*/
|
||||
|
||||
class Security_context {
|
||||
private:
|
||||
|
||||
String host;
|
||||
String ip;
|
||||
String external_user;
|
||||
public:
|
||||
Security_context() {} /* Remove gcc warning */
|
||||
/*
|
||||
@ -904,13 +910,11 @@ public:
|
||||
priv_user - The user privilege we are using. May be "" for anonymous user.
|
||||
ip - client IP
|
||||
*/
|
||||
char *host, *user, *ip;
|
||||
char *user;
|
||||
char priv_user[USERNAME_LENGTH];
|
||||
char proxy_user[USERNAME_LENGTH + MAX_HOSTNAME + 5];
|
||||
/* The host privilege we are using */
|
||||
char priv_host[MAX_HOSTNAME];
|
||||
/* The external user (if available) */
|
||||
char *external_user;
|
||||
/* points to host if host is available, otherwise points to ip */
|
||||
const char *host_or_ip;
|
||||
ulong master_access; /* Global privileges from mysql.user */
|
||||
@ -925,7 +929,13 @@ public:
|
||||
}
|
||||
|
||||
bool set_user(char *user_arg);
|
||||
|
||||
String *get_host();
|
||||
String *get_ip();
|
||||
String *get_external_user();
|
||||
void set_host(const char *p);
|
||||
void set_ip(const char *p);
|
||||
void set_external_user(const char *p);
|
||||
void set_host(const char *str, size_t len);
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
bool
|
||||
change_security_context(THD *thd,
|
||||
|
Reference in New Issue
Block a user