summaryrefslogtreecommitdiff
path: root/sql/events.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-04-25 18:51:28 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2019-04-28 12:49:59 +0200
commite8778f1c7cded1151aba589b1f4d9c3fc1bd369a (patch)
treefe876655c60bf5088b5322077b7e0e80e2921fdc /sql/events.cc
parent7590861779e3da5760153c0d01ffbf26048e4cef (diff)
downloadmariadb-git-e8778f1c7cded1151aba589b1f4d9c3fc1bd369a.tar.gz
MDEV-19265 Server should throw warning if event is created and event_scheduler = OFF
Diffstat (limited to 'sql/events.cc')
-rw-r--r--sql/events.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/events.cc b/sql/events.cc
index 187a3208d9f..17417997632 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -417,6 +417,12 @@ Events::create_event(THD *thd, Event_parse_data *parse_data)
thd->restore_stmt_binlog_format(save_binlog_format);
+ if (!ret && Events::opt_event_scheduler == Events::EVENTS_OFF)
+ {
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
+ "Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.");
+ }
+
DBUG_RETURN(ret);
WSREP_ERROR_LABEL: