summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-02-23 12:48:15 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-27 12:35:10 +0100
commit199f88cb9cfb08cefced1b51a7d98fe4c91b7a2e (patch)
tree1bdd8eee1160d505d1215f7890bcd245e2043ee1 /sql/sql_acl.cc
parent494a94158a6f509afad1078615679c51b723b7a6 (diff)
downloadmariadb-git-199f88cb9cfb08cefced1b51a7d98fe4c91b7a2e.tar.gz
MDEV-5999 MySQL Bug#12766319 - 61865: RENAME USER DOES NOT WORK CORRECTLY - REQUIRES FLUSH PRIVILEGES
use update_hostname() to update the hostname. test case comes from commit 0abdeed1d6d Author: gopal.shankar@oracle.com <> Date: Thu Mar 29 00:20:54 2012 +0530 Bug#12766319 - 61865: RENAME USER DOES NOT WORK CORRECTLY - REQUIRES FLUSH PRIVILEGES
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 0a1c11ef97a..03f0e878db6 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -6285,12 +6285,12 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop,
switch ( struct_no ) {
case USER_ACL:
acl_user->user= strdup_root(&mem, user_to->user.str);
- acl_user->host.hostname= strdup_root(&mem, user_to->host.str);
+ update_hostname(&acl_user->host, strdup_root(&mem, user_to->host.str));
break;
case DB_ACL:
acl_db->user= strdup_root(&mem, user_to->user.str);
- acl_db->host.hostname= strdup_root(&mem, user_to->host.str);
+ update_hostname(&acl_db->host, strdup_root(&mem, user_to->host.str));
break;
case COLUMN_PRIVILEGES_HASH: