Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7360c1a8
Commit
7360c1a8
authored
Feb 15, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the coding style in a few new files.
parent
36418a7b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
263 additions
and
259 deletions
+263
-259
sql/event.h
sql/event.h
+22
-22
sql/event_priv.h
sql/event_priv.h
+2
-2
sql/event_timed.cc
sql/event_timed.cc
+239
-235
No files found.
sql/event.h
View file @
7360c1a8
...
@@ -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 @@ class event_timed
...
@@ -112,7 +112,7 @@ class event_timed
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 @@ class event_timed
...
@@ -123,26 +123,26 @@ class event_timed
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 @@ class event_timed
...
@@ -157,7 +157,7 @@ class event_timed
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 @@ class event_timed
...
@@ -168,38 +168,38 @@ class event_timed
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
);
...
...
sql/event_priv.h
View file @
7360c1a8
...
@@ -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
,
...
...
sql/event_timed.cc
View file @
7360c1a8
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment