summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-01-14 14:55:50 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-01-14 14:55:50 +0200
commitefb510462ea34bbd45dcb890334c3a666432e70d (patch)
treeeebbf7b2c4d57111543d28b9fb85d27a21b15f01 /sql/sql_acl.cc
parenta75dbfd7183cc96680f3e3e684fd36500dac8158 (diff)
parent662217a592af4fef8a635bbd56544b5d56e5dcd6 (diff)
downloadmariadb-git-efb510462ea34bbd45dcb890334c3a666432e70d.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 748c164c6a8..126b1f2304c 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -10507,6 +10507,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);
@@ -10532,6 +10533,7 @@ int mysql_alter_user(THD* thd, List<LEX_USER> &users_list)
result= TRUE;
continue;
}
+ some_users_altered= true;
}
/* Unlock ACL data structures. */
@@ -10556,6 +10558,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);
}