diff options
author | Ashish Agarwal <ashish.y.agarwal@oracle.com> | 2013-07-02 11:58:39 +0530 |
---|---|---|
committer | Ashish Agarwal <ashish.y.agarwal@oracle.com> | 2013-07-02 11:58:39 +0530 |
commit | f5b5e6b951eabe6d6add84fa915d305a4a95cddf (patch) | |
tree | e923a916e758c6cde635765b285649506d0fe00a /sql/sql_class.h | |
parent | 3ee4a82fd1b3f886c027f0144bdce260b721c5a1 (diff) | |
download | mariadb-git-f5b5e6b951eabe6d6add84fa915d305a4a95cddf.tar.gz |
WL#7076: Backporting wl6715 to support both formats in 5.5, 5.6, 5.7
Backporting wl6715 to mysql-5.5
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 093758ce389..6e5e53f4d8f 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -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, |