summaryrefslogtreecommitdiff
path: root/sql/events.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-02-14 16:29:16 +0100
committerSergei Golubchik <serg@mariadb.org>2020-03-10 19:24:23 +0100
commit70e7b5095d44f580eb0a287fb6d6c794276e75d2 (patch)
treef723c725ad14f26de2abdb019199465d2825f7b1 /sql/events.cc
parentd5a00697023d17b38b89d7b3c4d37fa98c1dd60b (diff)
downloadmariadb-git-70e7b5095d44f580eb0a287fb6d6c794276e75d2.tar.gz
perfschema sp instrumentation related changes
Diffstat (limited to 'sql/events.cc')
-rw-r--r--sql/events.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/events.cc b/sql/events.cc
index 0014ce42d28..1a97d377376 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -34,6 +34,7 @@
#include "sp_head.h" // for Stored_program_creation_ctx
#include "set_var.h"
#include "lock.h" // lock_object_name
+#include "mysql/psi/mysql_sp.h"
/**
@addtogroup Event_Scheduler
@@ -620,6 +621,9 @@ Events::drop_event(THD *thd, const LEX_CSTRING *dbname,
/* Binlog the drop event. */
DBUG_ASSERT(thd->query() && thd->query_length());
ret= write_bin_log(thd, TRUE, thd->query(), thd->query_length());
+ /* Drop statistics for this stored program from performance schema. */
+ MYSQL_DROP_SP(SP_TYPE_EVENT,
+ dbname->str, dbname->length, name->str, name->length);
}
thd->restore_stmt_binlog_format(save_binlog_format);