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
ec0e9d59
Commit
ec0e9d59
authored
May 23, 2006
by
andrey@lmy004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix win32 build after push for bug#17619
parent
64404912
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
25 deletions
+9
-25
sql/event_scheduler.cc
sql/event_scheduler.cc
+7
-19
sql/event_scheduler.h
sql/event_scheduler.h
+2
-2
sql/event_timed.cc
sql/event_timed.cc
+0
-4
No files found.
sql/event_scheduler.cc
View file @
ec0e9d59
...
...
@@ -505,7 +505,6 @@ event_worker_thread(void *arg)
THD
*
thd
;
/* needs to be first for thread_stack */
Worker_thread_param
*
param
=
(
Worker_thread_param
*
)
arg
;
Event_timed
*
event
=
param
->
et
;
MEM_ROOT
worker_mem_root
;
int
ret
;
bool
startup_error
=
FALSE
;
Security_context
*
save_ctx
;
...
...
@@ -550,8 +549,6 @@ event_worker_thread(void *arg)
if
(
!
startup_error
)
{
uint
flags
;
thd
->
init_for_queries
();
thd
->
enable_slow_log
=
TRUE
;
...
...
@@ -1272,10 +1269,7 @@ Event_scheduler::run(THD *thd)
abstime
.
tv_nsec
=
0
;
while
(
is_running_or_suspended
())
{
TIME
time_now_utc
;
Event_timed
*
et
;
my_bool
tmp
;
time_t
now_utc
;
LOCK_SCHEDULER_DATA
();
if
(
check_n_wait_for_non_empty_queue
(
thd
))
...
...
@@ -1356,7 +1350,7 @@ Event_scheduler::run(THD *thd)
break
;
}
}
end_loop:
thd
->
proc_info
=
(
char
*
)
"Cleaning"
;
LOCK_SCHEDULER_DATA
();
...
...
@@ -1509,7 +1503,6 @@ Event_scheduler::clean_queue(THD *thd)
{
CHARSET_INFO
*
scs
=
system_charset_info
;
uint
i
;
int
ret
;
DBUG_ENTER
(
"Event_scheduler::clean_queue"
);
DBUG_PRINT
(
"enter"
,
(
"thd=%p"
,
thd
));
...
...
@@ -1630,7 +1623,6 @@ Event_scheduler::stop_all_running_events(THD *thd)
enum
Event_scheduler
::
enum_error_code
Event_scheduler
::
stop
()
{
int
ret
;
THD
*
thd
=
current_thd
;
DBUG_ENTER
(
"Event_scheduler::stop"
);
DBUG_PRINT
(
"enter"
,
(
"thd=%p"
,
current_thd
));
...
...
@@ -1697,7 +1689,6 @@ enum Event_scheduler::enum_error_code
Event_scheduler
::
suspend_or_resume
(
enum
Event_scheduler
::
enum_suspend_or_resume
action
)
{
enum
enum_error_code
ret
;
DBUG_ENTER
(
"Event_scheduler::suspend_or_resume"
);
DBUG_PRINT
(
"enter"
,
(
"action=%d"
,
action
));
...
...
@@ -1887,18 +1878,17 @@ Event_scheduler::check_n_wait_for_non_empty_queue(THD *thd)
Error code of pthread_mutex_lock()
*/
inline
int
inline
void
Event_scheduler
::
lock_data
(
const
char
*
func
,
uint
line
)
{
int
ret
;
DBUG_ENTER
(
"Event_scheduler::lock_mutex"
);
DBUG_PRINT
(
"enter"
,
(
"mutex_lock=%p func=%s line=%u"
,
&
LOCK_scheduler_data
,
func
,
line
));
ret
=
pthread_mutex_lock
(
&
LOCK_scheduler_data
);
pthread_mutex_lock
(
&
LOCK_scheduler_data
);
mutex_last_locked_in_func
=
func
;
mutex_last_locked_at_line
=
line
;
mutex_scheduler_data_locked
=
TRUE
;
DBUG_
RETURN
(
ret
)
;
DBUG_
VOID_RETURN
;
}
...
...
@@ -1909,12 +1899,9 @@ Event_scheduler::lock_data(const char *func, uint line)
Event_scheduler::unlock_data()
mutex Mutex to unlock
line The line number on which the unlock is done
RETURN VALUE
Error code of pthread_mutex_lock()
*/
inline
int
inline
void
Event_scheduler
::
unlock_data
(
const
char
*
func
,
uint
line
)
{
DBUG_ENTER
(
"Event_scheduler::UNLOCK_mutex"
);
...
...
@@ -1923,7 +1910,8 @@ Event_scheduler::unlock_data(const char *func, uint line)
mutex_last_unlocked_at_line
=
line
;
mutex_scheduler_data_locked
=
FALSE
;
mutex_last_unlocked_in_func
=
func
;
DBUG_RETURN
(
pthread_mutex_unlock
(
&
LOCK_scheduler_data
));
pthread_mutex_unlock
(
&
LOCK_scheduler_data
);
DBUG_VOID_RETURN
;
}
...
...
sql/event_scheduler.h
View file @
ec0e9d59
...
...
@@ -236,10 +236,10 @@ class Event_scheduler
bool
mutex_scheduler_data_locked
;
/* helper functions for working with mutexes & conditionals */
int
void
lock_data
(
const
char
*
func
,
uint
line
);
int
void
unlock_data
(
const
char
*
func
,
uint
line
);
int
...
...
sql/event_timed.cc
View file @
ec0e9d59
...
...
@@ -931,7 +931,6 @@ bool
Event_timed
::
compute_next_execution_time
()
{
TIME
time_now
;
my_time_t
now
;
int
tmp
;
DBUG_ENTER
(
"Event_timed::compute_next_execution_time"
);
...
...
@@ -1372,7 +1371,6 @@ Event_timed::get_create_event(THD *thd, String *buf)
int
Event_timed
::
execute
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
{
Security_context
*
save_ctx
;
/* this one is local and not needed after exec */
Security_context
security_ctx
;
int
ret
=
0
;
...
...
@@ -1392,8 +1390,6 @@ Event_timed::execute(THD *thd, MEM_ROOT *mem_root)
if
(
!
sphead
&&
(
ret
=
compile
(
thd
,
mem_root
)))
goto
done
;
/* Now we are sure we have valid this->sphead so we can copy the context */
sphead
->
m_security_ctx
=
security_ctx
;
/*
THD::~THD will clean this or if there is DROP DATABASE in the SP then
it will be free there. It should not point to our buffer which is allocated
...
...
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