diff options
author | Ashish Agarwal <ashish.y.agarwal@oracle.com> | 2013-08-23 09:07:09 +0530 |
---|---|---|
committer | Ashish Agarwal <ashish.y.agarwal@oracle.com> | 2013-08-23 09:07:09 +0530 |
commit | d75c58e11fb864abafb48d74efd9bb1dbdc9f4c4 (patch) | |
tree | 01a2e2f69168201021668f8d6144a6aa701c61ad /sql/sql_class.h | |
parent | f7e0cc8204ab2e9e09e96e77f015dfb369553de0 (diff) | |
parent | f5b5e6b951eabe6d6add84fa915d305a4a95cddf (diff) | |
download | mariadb-git-d75c58e11fb864abafb48d74efd9bb1dbdc9f4c4.tar.gz |
WL#7076: Backporting wl6715 to support both formats
in 5.5, 5.6, 5.7.
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 2c574e4fa33..e3a84bf6fc8 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, |