summaryrefslogtreecommitdiff
path: root/sql/events.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/events.cc')
-rw-r--r--sql/events.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/sql/events.cc b/sql/events.cc
index a548bda53e2..5379ec2c9eb 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -16,7 +16,7 @@
#include "sql_priv.h"
#include "unireg.h"
#include "sql_parse.h" // check_access
-#include "sql_base.h" // close_thread_tables
+#include "sql_base.h" // close_mysql_tables
#include "sql_show.h" // append_definer
#include "events.h"
#include "sql_db.h" // check_db_dir_existence
@@ -754,7 +754,6 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */)
{
char *db= NULL;
int ret;
- Open_tables_backup open_tables_backup;
DBUG_ENTER("Events::fill_schema_events");
if (check_if_system_tables_error())
@@ -773,15 +772,7 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */)
DBUG_RETURN(1);
db= thd->lex->select_lex.db;
}
- /*
- Reset and backup of the currently open tables in this thread
- is a way to allow SELECTs from INFORMATION_SCHEMA.events under
- LOCK TABLES and in pre-locked mode. See also
- Events::show_create_event for additional comments.
- */
- thd->reset_n_backup_open_tables_state(&open_tables_backup);
ret= db_repository->fill_schema_events(thd, tables, db);
- thd->restore_backup_open_tables_state(&open_tables_backup);
DBUG_RETURN(ret);
}
@@ -1161,8 +1152,7 @@ Events::load_events_from_db(THD *thd)
end:
end_read_record(&read_record_info);
- close_thread_tables(thd);
-
+ close_mysql_tables(thd);
DBUG_RETURN(ret);
}