diff options
Diffstat (limited to 'sql/event_data_objects.cc')
-rw-r--r-- | sql/event_data_objects.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index c41194d1a8d..7c7ab4df9ad 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1462,13 +1462,19 @@ end: NOTE: even if we run in read-only mode, we should be able to lock the mysql.event table for writing. In order to achieve this, we should call mysql_lock_tables() under the super-user. + + Same goes for transaction access mode. + Temporarily reset it to read-write. */ saved_master_access= thd->security_ctx->master_access; thd->security_ctx->master_access |= SUPER_ACL; + bool save_tx_read_only= thd->tx_read_only; + thd->tx_read_only= false; ret= Events::drop_event(thd, dbname, name, FALSE); + thd->tx_read_only= save_tx_read_only; thd->security_ctx->master_access= saved_master_access; } } |