summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2018-08-02 11:44:02 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2018-08-02 11:44:02 +0300
commitc5a8583b3146613429d88c1c044de88a4c4c94b0 (patch)
treefe8c0476ae87e918655483aa1b417189c938780c /sql/sql_acl.cc
parentc863159c320008676aff978a7cdde5732678f975 (diff)
parente023f9a4d5a620b54d7f7132567150d80b630692 (diff)
downloadmariadb-git-c5a8583b3146613429d88c1c044de88a4c4c94b0.tar.gz
Merge tag 'mariadb-10.0.36' into 10.0-galera
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 ce3198e2bc5..cbca413a93d 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
@@ -9987,17 +9987,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);