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
Hide 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)
...
@@ -505,7 +505,6 @@ event_worker_thread(void *arg)
THD
*
thd
;
/* needs to be first for thread_stack */
THD
*
thd
;
/* needs to be first for thread_stack */
Worker_thread_param
*
param
=
(
Worker_thread_param
*
)
arg
;
Worker_thread_param
*
param
=
(
Worker_thread_param
*
)
arg
;
Event_timed
*
event
=
param
->
et
;
Event_timed
*
event
=
param
->
et
;
MEM_ROOT
worker_mem_root
;
int
ret
;
int
ret
;
bool
startup_error
=
FALSE
;
bool
startup_error
=
FALSE
;
Security_context
*
save_ctx
;
Security_context
*
save_ctx
;
...
@@ -550,8 +549,6 @@ event_worker_thread(void *arg)
...
@@ -550,8 +549,6 @@ event_worker_thread(void *arg)
if
(
!
startup_error
)
if
(
!
startup_error
)
{
{
uint
flags
;
thd
->
init_for_queries
();
thd
->
init_for_queries
();
thd
->
enable_slow_log
=
TRUE
;
thd
->
enable_slow_log
=
TRUE
;
...
@@ -1272,10 +1269,7 @@ Event_scheduler::run(THD *thd)
...
@@ -1272,10 +1269,7 @@ Event_scheduler::run(THD *thd)
abstime
.
tv_nsec
=
0
;
abstime
.
tv_nsec
=
0
;
while
(
is_running_or_suspended
())
while
(
is_running_or_suspended
())
{
{
TIME
time_now_utc
;
Event_timed
*
et
;
Event_timed
*
et
;
my_bool
tmp
;
time_t
now_utc
;
LOCK_SCHEDULER_DATA
();
LOCK_SCHEDULER_DATA
();
if
(
check_n_wait_for_non_empty_queue
(
thd
))
if
(
check_n_wait_for_non_empty_queue
(
thd
))
...
@@ -1356,7 +1350,7 @@ Event_scheduler::run(THD *thd)
...
@@ -1356,7 +1350,7 @@ Event_scheduler::run(THD *thd)
break
;
break
;
}
}
}
}
end_loop:
thd
->
proc_info
=
(
char
*
)
"Cleaning"
;
thd
->
proc_info
=
(
char
*
)
"Cleaning"
;
LOCK_SCHEDULER_DATA
();
LOCK_SCHEDULER_DATA
();
...
@@ -1509,7 +1503,6 @@ Event_scheduler::clean_queue(THD *thd)
...
@@ -1509,7 +1503,6 @@ Event_scheduler::clean_queue(THD *thd)
{
{
CHARSET_INFO
*
scs
=
system_charset_info
;
CHARSET_INFO
*
scs
=
system_charset_info
;
uint
i
;
uint
i
;
int
ret
;
DBUG_ENTER
(
"Event_scheduler::clean_queue"
);
DBUG_ENTER
(
"Event_scheduler::clean_queue"
);
DBUG_PRINT
(
"enter"
,
(
"thd=%p"
,
thd
));
DBUG_PRINT
(
"enter"
,
(
"thd=%p"
,
thd
));
...
@@ -1630,7 +1623,6 @@ Event_scheduler::stop_all_running_events(THD *thd)
...
@@ -1630,7 +1623,6 @@ Event_scheduler::stop_all_running_events(THD *thd)
enum
Event_scheduler
::
enum_error_code
enum
Event_scheduler
::
enum_error_code
Event_scheduler
::
stop
()
Event_scheduler
::
stop
()
{
{
int
ret
;
THD
*
thd
=
current_thd
;
THD
*
thd
=
current_thd
;
DBUG_ENTER
(
"Event_scheduler::stop"
);
DBUG_ENTER
(
"Event_scheduler::stop"
);
DBUG_PRINT
(
"enter"
,
(
"thd=%p"
,
current_thd
));
DBUG_PRINT
(
"enter"
,
(
"thd=%p"
,
current_thd
));
...
@@ -1697,7 +1689,6 @@ enum Event_scheduler::enum_error_code
...
@@ -1697,7 +1689,6 @@ enum Event_scheduler::enum_error_code
Event_scheduler
::
suspend_or_resume
(
Event_scheduler
::
suspend_or_resume
(
enum
Event_scheduler
::
enum_suspend_or_resume
action
)
enum
Event_scheduler
::
enum_suspend_or_resume
action
)
{
{
enum
enum_error_code
ret
;
DBUG_ENTER
(
"Event_scheduler::suspend_or_resume"
);
DBUG_ENTER
(
"Event_scheduler::suspend_or_resume"
);
DBUG_PRINT
(
"enter"
,
(
"action=%d"
,
action
));
DBUG_PRINT
(
"enter"
,
(
"action=%d"
,
action
));
...
@@ -1887,18 +1878,17 @@ Event_scheduler::check_n_wait_for_non_empty_queue(THD *thd)
...
@@ -1887,18 +1878,17 @@ Event_scheduler::check_n_wait_for_non_empty_queue(THD *thd)
Error code of pthread_mutex_lock()
Error code of pthread_mutex_lock()
*/
*/
inline
int
inline
void
Event_scheduler
::
lock_data
(
const
char
*
func
,
uint
line
)
Event_scheduler
::
lock_data
(
const
char
*
func
,
uint
line
)
{
{
int
ret
;
DBUG_ENTER
(
"Event_scheduler::lock_mutex"
);
DBUG_ENTER
(
"Event_scheduler::lock_mutex"
);
DBUG_PRINT
(
"enter"
,
(
"mutex_lock=%p func=%s line=%u"
,
DBUG_PRINT
(
"enter"
,
(
"mutex_lock=%p func=%s line=%u"
,
&
LOCK_scheduler_data
,
func
,
line
));
&
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_in_func
=
func
;
mutex_last_locked_at_line
=
line
;
mutex_last_locked_at_line
=
line
;
mutex_scheduler_data_locked
=
TRUE
;
mutex_scheduler_data_locked
=
TRUE
;
DBUG_
RETURN
(
ret
)
;
DBUG_
VOID_RETURN
;
}
}
...
@@ -1909,12 +1899,9 @@ Event_scheduler::lock_data(const char *func, uint line)
...
@@ -1909,12 +1899,9 @@ Event_scheduler::lock_data(const char *func, uint line)
Event_scheduler::unlock_data()
Event_scheduler::unlock_data()
mutex Mutex to unlock
mutex Mutex to unlock
line The line number on which the unlock is done
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
)
Event_scheduler
::
unlock_data
(
const
char
*
func
,
uint
line
)
{
{
DBUG_ENTER
(
"Event_scheduler::UNLOCK_mutex"
);
DBUG_ENTER
(
"Event_scheduler::UNLOCK_mutex"
);
...
@@ -1923,7 +1910,8 @@ Event_scheduler::unlock_data(const char *func, uint line)
...
@@ -1923,7 +1910,8 @@ Event_scheduler::unlock_data(const char *func, uint line)
mutex_last_unlocked_at_line
=
line
;
mutex_last_unlocked_at_line
=
line
;
mutex_scheduler_data_locked
=
FALSE
;
mutex_scheduler_data_locked
=
FALSE
;
mutex_last_unlocked_in_func
=
func
;
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
...
@@ -236,10 +236,10 @@ class Event_scheduler
bool
mutex_scheduler_data_locked
;
bool
mutex_scheduler_data_locked
;
/* helper functions for working with mutexes & conditionals */
/* helper functions for working with mutexes & conditionals */
int
void
lock_data
(
const
char
*
func
,
uint
line
);
lock_data
(
const
char
*
func
,
uint
line
);
int
void
unlock_data
(
const
char
*
func
,
uint
line
);
unlock_data
(
const
char
*
func
,
uint
line
);
int
int
...
...
sql/event_timed.cc
View file @
ec0e9d59
...
@@ -931,7 +931,6 @@ bool
...
@@ -931,7 +931,6 @@ bool
Event_timed
::
compute_next_execution_time
()
Event_timed
::
compute_next_execution_time
()
{
{
TIME
time_now
;
TIME
time_now
;
my_time_t
now
;
int
tmp
;
int
tmp
;
DBUG_ENTER
(
"Event_timed::compute_next_execution_time"
);
DBUG_ENTER
(
"Event_timed::compute_next_execution_time"
);
...
@@ -1372,7 +1371,6 @@ Event_timed::get_create_event(THD *thd, String *buf)
...
@@ -1372,7 +1371,6 @@ Event_timed::get_create_event(THD *thd, String *buf)
int
int
Event_timed
::
execute
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
Event_timed
::
execute
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
{
{
Security_context
*
save_ctx
;
/* this one is local and not needed after exec */
/* this one is local and not needed after exec */
Security_context
security_ctx
;
Security_context
security_ctx
;
int
ret
=
0
;
int
ret
=
0
;
...
@@ -1392,8 +1390,6 @@ Event_timed::execute(THD *thd, MEM_ROOT *mem_root)
...
@@ -1392,8 +1390,6 @@ Event_timed::execute(THD *thd, MEM_ROOT *mem_root)
if
(
!
sphead
&&
(
ret
=
compile
(
thd
,
mem_root
)))
if
(
!
sphead
&&
(
ret
=
compile
(
thd
,
mem_root
)))
goto
done
;
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
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
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