Commit 99030e3f authored by konstantin@mysql.com's avatar konstantin@mysql.com

Fix the coding style in a few new files.

parent 94e3b91d
...@@ -43,13 +43,13 @@ ...@@ -43,13 +43,13 @@
extern ulong opt_event_executor; extern ulong opt_event_executor;
enum enum_event_on_completion enum enum_event_on_completion
{ {
MYSQL_EVENT_ON_COMPLETION_DROP = 1, MYSQL_EVENT_ON_COMPLETION_DROP = 1,
MYSQL_EVENT_ON_COMPLETION_PRESERVE MYSQL_EVENT_ON_COMPLETION_PRESERVE
}; };
enum enum_event_status enum enum_event_status
{ {
MYSQL_EVENT_ENABLED = 1, MYSQL_EVENT_ENABLED = 1,
MYSQL_EVENT_DISABLED MYSQL_EVENT_DISABLED
}; };
...@@ -60,9 +60,9 @@ enum evex_table_field ...@@ -60,9 +60,9 @@ enum evex_table_field
EVEX_FIELD_NAME, EVEX_FIELD_NAME,
EVEX_FIELD_BODY, EVEX_FIELD_BODY,
EVEX_FIELD_DEFINER, EVEX_FIELD_DEFINER,
EVEX_FIELD_EXECUTE_AT, EVEX_FIELD_EXECUTE_AT,
EVEX_FIELD_INTERVAL_EXPR, EVEX_FIELD_INTERVAL_EXPR,
EVEX_FIELD_TRANSIENT_INTERVAL, EVEX_FIELD_TRANSIENT_INTERVAL,
EVEX_FIELD_CREATED, EVEX_FIELD_CREATED,
EVEX_FIELD_MODIFIED, EVEX_FIELD_MODIFIED,
EVEX_FIELD_LAST_EXECUTED, EVEX_FIELD_LAST_EXECUTED,
...@@ -112,7 +112,7 @@ public: ...@@ -112,7 +112,7 @@ public:
ulong sql_mode; ulong sql_mode;
const uchar *body_begin; const uchar *body_begin;
bool dropped; bool dropped;
bool free_sphead_on_delete; bool free_sphead_on_delete;
uint flags;//all kind of purposes uint flags;//all kind of purposes
...@@ -123,26 +123,26 @@ public: ...@@ -123,26 +123,26 @@ public:
status(MYSQL_EVENT_ENABLED), sphead(0), sql_mode(0), status(MYSQL_EVENT_ENABLED), sphead(0), sql_mode(0),
body_begin(0), dropped(false), free_sphead_on_delete(true), body_begin(0), dropped(false), free_sphead_on_delete(true),
flags(0) flags(0)
{ {
pthread_mutex_init(&this->LOCK_running, MY_MUTEX_INIT_FAST); pthread_mutex_init(&this->LOCK_running, MY_MUTEX_INIT_FAST);
init(); init();
} }
~event_timed() ~event_timed()
{ {
pthread_mutex_destroy(&this->LOCK_running); pthread_mutex_destroy(&this->LOCK_running);
if (free_sphead_on_delete) if (free_sphead_on_delete)
free_sp(); free_sp();
} }
void void
init(); init();
int int
init_definer(THD *thd); init_definer(THD *thd);
int int
init_execute_at(THD *thd, Item *expr); init_execute_at(THD *thd, Item *expr);
...@@ -157,7 +157,7 @@ public: ...@@ -157,7 +157,7 @@ public:
int int
init_ends(THD *thd, Item *ends); init_ends(THD *thd, Item *ends);
void void
init_body(THD *thd); init_body(THD *thd);
...@@ -168,38 +168,38 @@ public: ...@@ -168,38 +168,38 @@ public:
load_from_row(MEM_ROOT *mem_root, TABLE *table); load_from_row(MEM_ROOT *mem_root, TABLE *table);
bool bool
compute_next_execution_time(); compute_next_execution_time();
void void
mark_last_executed(THD *thd); mark_last_executed(THD *thd);
int int
drop(THD *thd); drop(THD *thd);
bool bool
update_fields(THD *thd); update_fields(THD *thd);
int int
get_create_event(THD *thd, String *buf); get_create_event(THD *thd, String *buf);
int int
execute(THD *thd, MEM_ROOT *mem_root= NULL); execute(THD *thd, MEM_ROOT *mem_root= NULL);
int int
compile(THD *thd, MEM_ROOT *mem_root= NULL); compile(THD *thd, MEM_ROOT *mem_root= NULL);
my_bool my_bool
is_running() is_running()
{ {
my_bool ret; my_bool ret;
VOID(pthread_mutex_lock(&this->LOCK_running)); VOID(pthread_mutex_lock(&this->LOCK_running));
ret= running; ret= running;
VOID(pthread_mutex_unlock(&this->LOCK_running)); VOID(pthread_mutex_unlock(&this->LOCK_running));
return ret; return ret;
} }
void free_sp() void free_sp()
{ {
delete sphead; delete sphead;
...@@ -241,7 +241,7 @@ shutdown_events(); ...@@ -241,7 +241,7 @@ shutdown_events();
// auxiliary // auxiliary
int int
event_timed_compare(event_timed **a, event_timed **b); event_timed_compare(event_timed **a, event_timed **b);
......
...@@ -36,8 +36,8 @@ evex_db_find_event_aux(THD *thd, const LEX_STRING dbname, ...@@ -36,8 +36,8 @@ evex_db_find_event_aux(THD *thd, const LEX_STRING dbname,
const LEX_STRING rname, const LEX_STRING rname,
const LEX_STRING definer, const LEX_STRING definer,
TABLE *table); TABLE *table);
int int
event_timed_compare_q(void *vptr, byte* a, byte *b); event_timed_compare_q(void *vptr, byte* a, byte *b);
int db_drop_event(THD *thd, event_timed *et, bool drop_if_exists, int db_drop_event(THD *thd, event_timed *et, bool drop_if_exists,
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment