diff options
author | Sachin <sachin.setiya@mariadb.com> | 2018-12-19 22:30:28 +0530 |
---|---|---|
committer | Sachin <sachin.setiya@mariadb.com> | 2018-12-19 22:30:28 +0530 |
commit | 364f7583d9514963ec30e27876c366678c8af240 (patch) | |
tree | bd09af6211d0c2b31a17a0674b04701d870d699a /sql/sql_acl.cc | |
parent | 0c2fc9b3da467132cba7fd3a9d92995c98057f06 (diff) | |
download | mariadb-git-bb-10.2-17753.tar.gz |
MDEV-17753 ALTER USER fail to replicatebb-10.2-17753
Change mysql_alter_user to log alter user command.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 50c9c33e8fa..37c5817ef8d 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -10476,6 +10476,7 @@ int mysql_alter_user(THD* thd, List<LEX_USER> &users_list) DBUG_ENTER("mysql_alter_user"); int result= 0; String wrong_users; + bool some_users_altered= false; /* The only table we're altering is the user table. */ Grant_tables tables(Table_user, TL_WRITE); @@ -10501,6 +10502,7 @@ int mysql_alter_user(THD* thd, List<LEX_USER> &users_list) result= TRUE; continue; } + some_users_altered= true; } /* Unlock ACL data structures. */ @@ -10525,6 +10527,10 @@ int mysql_alter_user(THD* thd, List<LEX_USER> &users_list) wrong_users.c_ptr_safe()); } } + + if (some_users_altered) + result|= write_bin_log(thd, FALSE, thd->query(), + thd->query_length()); DBUG_RETURN(result); } |