diff options
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); } |