From 416d0aebbfaaa00802d00105a0bd2faedb8b8f04 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 1 Oct 2012 13:15:29 +0200 Subject: more fixes for test cases mysql-test/suite/innodb/include/restart_and_reinit.inc: drop and recreate mysql.innodb* tables when deleting innodb table spaces mysql-test/t/ssl_8k_key-master.opt: with loose- prefix ssl errors are ignored sql-common/client.c: compiler warnings sql/field.cc: use the new function sql/item.cc: don't convert time to double or decimal via longlong, this loses sub-second part. Use dedicated functions. sql/item.h: incorrect cast_to_int type for params sql/item_strfunc.cc: use the new function sql/lex.h: unused sql/my_decimal.h: helper macro sql/sql_plugin.cc: workaround for a compiler warning sql/sql_yacc.yy: unused sql/transaction.cc: fix the merge for SERVER_STATUS_IN_TRANS_READONLY protocol flag storage/sphinx/CMakeLists.txt: compiler warnings --- sql/events.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sql/events.cc') diff --git a/sql/events.cc b/sql/events.cc index 0a14038bc27..54ad76e40d4 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -1069,7 +1069,6 @@ Events::load_events_from_db(THD *thd) bool ret= TRUE; uint count= 0; ulong saved_master_access; - bool save_tx_read_only; DBUG_ENTER("Events::load_events_from_db"); DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); @@ -1078,11 +1077,14 @@ Events::load_events_from_db(THD *thd) 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= db_repository->open_event_table(thd, TL_WRITE, &table); -- cgit v1.2.1