diff options
author | Luis Soares <luis.soares@sun.com> | 2009-12-06 23:12:11 +0000 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2009-12-06 23:12:11 +0000 |
commit | c75712caa81a58164019754a3690ddf434d17f61 (patch) | |
tree | 1770f4ee026cc4a7073d603a251ced88cbd3bc50 /sql/sql_acl.cc | |
parent | b9f9fe2e1a8ce599140d38cfd8f7d58b5344e36e (diff) | |
download | mariadb-git-c75712caa81a58164019754a3690ddf434d17f61.tar.gz |
BUG#49119: Master crashes when executing 'REVOKE ... ON
{PROCEDURE|FUNCTION} FROM ...'
The master would hit an assertion when binary log was
active. This was due to the fact that the thread's diagnostics
area was being cleared before writing to the binlog,
independently of mysql_routine_grant returning an error or
not. When mysql_routine_grant was to return an error, the return
value and the diagnostics area contents would
mismatch. Consequently, neither my_ok would be called nor an
error would be signaled in the diagnostics area, eventually
triggering the assertion in net_end_statement.
We fix this by not clearing the diagnostics area at binlogging
time.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 77c72066429..3b81a85c368 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3378,7 +3378,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, if (write_to_binlog) { - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + write_bin_log(thd, FALSE, thd->query(), thd->query_length()); } rw_unlock(&LOCK_grant); |