summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-07-31 11:58:29 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-07-31 11:58:29 +0200
commit865e807125d1d3fb2d784ea33f1154ba999466ec (patch)
treeea354d6e52e97f599bb5d3809295daae8c9fceeb /sql/sql_acl.cc
parent14306bcbec0b6a999985008f3d33602c08058006 (diff)
parent4c21c367b332e4ebfff0b0c1f6f5140d5845588e (diff)
downloadmariadb-git-865e807125d1d3fb2d784ea33f1154ba999466ec.tar.gz
Merge branch '10.0' into 10.1
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 a5c91b49951..b3269660a7c 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
@@ -10182,17 +10182,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);