summaryrefslogtreecommitdiff
path: root/sql/events.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2015-10-15 12:11:17 +0300
committerMichael Widenius <monty@mariadb.org>2015-10-21 16:31:11 +0300
commit18f7dfed179204dcfc02a27790e22bb9cc4e2e32 (patch)
treecf404263c6ee35c5e9c80811f5fd3845c0b98aca /sql/events.h
parent95faf34d859aee242812fae31629b224feeb868a (diff)
downloadmariadb-git-18f7dfed179204dcfc02a27790e22bb9cc4e2e32.tar.gz
Allow mysql_upgrade to enable event after table is corrected
new features: set event_scheduler=ON|OFF will now try to init event scheduler if it's not enabled set event_scheduler=default will try to enable it based on the value of the event_scheduler when mysqld was started
Diffstat (limited to 'sql/events.h')
-rw-r--r--sql/events.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/sql/events.h b/sql/events.h
index 646fd257d52..91a0e6f28eb 100644
--- a/sql/events.h
+++ b/sql/events.h
@@ -79,9 +79,11 @@ public:
and the @@global.event_scheduler SQL variable.
See sys_var.cc
*/
- enum enum_opt_event_scheduler { EVENTS_OFF, EVENTS_ON, EVENTS_DISABLED };
+ enum enum_opt_event_scheduler { EVENTS_OFF, EVENTS_ON, EVENTS_DISABLED,
+ EVENTS_ORIGINAL };
/* Protected using LOCK_global_system_variables only. */
- static ulong opt_event_scheduler;
+ static ulong opt_event_scheduler, startup_state;
+ static ulong inited;
static bool check_if_system_tables_error();
static bool start(int *err_no);
static bool stop();
@@ -91,8 +93,7 @@ public:
static Event_db_repository *
get_db_repository() { return db_repository; }
- static bool
- init(bool opt_noacl);
+ static bool init(THD *thd, bool opt_noacl);
static void
deinit();
@@ -130,6 +131,11 @@ public:
static void
dump_internal_status();
+ static void set_original_state(ulong startup_state_org)
+ {
+ startup_state= startup_state_org;
+ }
+
private:
static bool
@@ -139,8 +145,6 @@ private:
static Event_queue *event_queue;
static Event_scheduler *scheduler;
static Event_db_repository *db_repository;
- /* Set to TRUE if an error at start up */
- static bool check_system_tables_error;
private:
/* Prevent use of these */