summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 7e5cffabffd..2fd07cef649 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -4720,6 +4720,19 @@ extern "C" void thd_create_random_password(MYSQL_THD thd,
}
+extern "C" const char *thd_priv_host(MYSQL_THD thd, size_t *length)
+{
+ const Security_context *sctx= thd->security_ctx;
+ if (!sctx)
+ {
+ *length= 0;
+ return NULL;
+ }
+ *length= strlen(sctx->priv_host);
+ return sctx->priv_host;
+}
+
+
#ifdef INNODB_COMPATIBILITY_HOOKS
/** open a table and add it to thd->open_tables