diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-19 17:45:17 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-28 17:20:46 +0000 |
commit | eba44874ca9fc317696630cb371623142289fa99 (patch) | |
tree | f67cd5dbcaf102abef2fb26f76357d14feaded04 /sql/event_scheduler.cc | |
parent | de7c2e5e545df90fc9814c60a8a5a8d20f22b2c3 (diff) | |
download | mariadb-git-eba44874ca9fc317696630cb371623142289fa99.tar.gz |
MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings
(usually coming from misusing 0x%lx and long cast in DBUG)
- Also fix printf-format warnings
Make the above mentioned warnings fatal.
- fix pthread_join on Windows to set return value.
Diffstat (limited to 'sql/event_scheduler.cc')
-rw-r--r-- | sql/event_scheduler.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index 8ed5901b69a..57bbf0e1eea 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -295,7 +295,7 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event) res= post_init_event_thread(thd); DBUG_ENTER("Event_worker_thread::run"); - DBUG_PRINT("info", ("Time is %ld, THD: 0x%lx", (long) my_time(0), (long) thd)); + DBUG_PRINT("info", ("Time is %u, THD: %p", (uint)my_time(0), thd)); inc_thread_running(); if (res) @@ -420,7 +420,7 @@ Event_scheduler::start(int *err_no) scheduler_thd= new_thd; DBUG_PRINT("info", ("Setting state go RUNNING")); state= RUNNING; - DBUG_PRINT("info", ("Forking new thread for scheduler. THD: 0x%lx", (long) new_thd)); + DBUG_PRINT("info", ("Forking new thread for scheduler. THD: %p", new_thd)); if ((*err_no= mysql_thread_create(key_thread_event_scheduler, &th, &connection_attrib, event_scheduler_thread, @@ -485,7 +485,7 @@ Event_scheduler::run(THD *thd) } DBUG_PRINT("info", ("get_top_for_execution_if_time returned " - "event_name=0x%lx", (long) event_name)); + "event_name=%p", event_name)); if (event_name) { if ((res= execute_top(event_name))) @@ -566,7 +566,7 @@ Event_scheduler::execute_top(Event_queue_element_for_exec *event_name) started_events++; executed_events++; // For SHOW STATUS - DBUG_PRINT("info", ("Event is in THD: 0x%lx", (long) new_thd)); + DBUG_PRINT("info", ("Event is in THD: %p", new_thd)); DBUG_RETURN(FALSE); error: @@ -617,7 +617,7 @@ Event_scheduler::stop() { THD *thd= current_thd; DBUG_ENTER("Event_scheduler::stop"); - DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); + DBUG_PRINT("enter", ("thd: %p", thd)); LOCK_DATA(); DBUG_PRINT("info", ("state before action %s", scheduler_states_names[state].str)); |