diff options
Diffstat (limited to 'sql/event_data_objects.cc')
-rw-r--r-- | sql/event_data_objects.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index fd9568acf00..7c7ab4df9ad 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1455,7 +1455,6 @@ end: else { ulong saved_master_access; - bool save_tx_read_only; thd->set_query(sp_sql.c_ptr_safe(), sp_sql.length()); @@ -1463,11 +1462,14 @@ 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; - save_tx_read_only= thd->tx_read_only; + bool save_tx_read_only= thd->tx_read_only; thd->tx_read_only= false; ret= Events::drop_event(thd, dbname, name, FALSE); |