summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2022-06-10 16:43:30 +0300
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2022-06-12 17:26:28 +0300
commit0e1bc89cf7f8a8bd3402234982cd0520261329c5 (patch)
tree201f7f65fb8cbc4cace87cc668ff809c38cc4abc
parenta3df71dc602ef13156c6a67be43348b78f4352ca (diff)
downloadmariadb-git-0e1bc89cf7f8a8bd3402234982cd0520261329c5.tar.gz
cleanup: sp_grant_privileges - More strightforward implementation
-rw-r--r--sql/sql_acl.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 5de7d5a29f5..a3048cd574b 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -13456,15 +13456,11 @@ bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
mysql_mutex_lock(&acl_cache->lock);
- if ((au= find_user_exact(sctx->priv_host,
- sctx->priv_user)))
- goto found_acl;
-
+ au= find_user_exact(sctx->priv_host, sctx->priv_user);
mysql_mutex_unlock(&acl_cache->lock);
- DBUG_RETURN(TRUE);
- found_acl:
- mysql_mutex_unlock(&acl_cache->lock);
+ if (!au)
+ DBUG_RETURN(TRUE);
bzero((char*)tables, sizeof(TABLE_LIST));
resolved_user_list.empty();