summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-07-30 15:09:25 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-07-30 15:09:25 +0300
commit91181b225c574f65720b9ecf218a4122209a7248 (patch)
tree5a9c835e8823f29ee26f8b56a3458607448188a1 /sql/sql_acl.cc
parentd17e9a02c4a08da9ac1b8f4c653f29f067d75a22 (diff)
parentfceda2dab6f8ea6c042f910cbc1d07d5df0cbc3c (diff)
downloadmariadb-git-91181b225c574f65720b9ecf218a4122209a7248.tar.gz
Merge 5.5 into 10.0
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index b957b5713d2..fa0f4ad1563 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
Copyright (c) 2009, 2018, MariaDB
This program is free software; you can redistribute it and/or modify
@@ -9947,17 +9947,12 @@ bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
if (!(combo=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
DBUG_RETURN(TRUE);
- combo->user.str= sctx->user;
+ combo->user.str= (char *) sctx->priv_user;
mysql_mutex_lock(&acl_cache->lock);
- if ((au= find_user_wild(combo->host.str=(char*)sctx->host_or_ip, combo->user.str)))
- goto found_acl;
- if ((au= find_user_wild(combo->host.str=(char*)sctx->host, combo->user.str)))
- goto found_acl;
- if ((au= find_user_wild(combo->host.str=(char*)sctx->ip, combo->user.str)))
- goto found_acl;
- if ((au= find_user_wild(combo->host.str=(char*)"%", combo->user.str)))
+ if ((au= find_user_wild(combo->host.str= (char *) sctx->priv_host,
+ combo->user.str)))
goto found_acl;
mysql_mutex_unlock(&acl_cache->lock);