1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Luis Soares
2009-12-06 23:12:11 +00:00
parent f6ff4a5810
commit 289c14931b
3 changed files with 174 additions and 1 deletions

View File

@ -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);