summaryrefslogtreecommitdiff
path: root/sql/event_queue.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-09-19 17:45:17 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-09-28 17:20:46 +0000
commiteba44874ca9fc317696630cb371623142289fa99 (patch)
treef67cd5dbcaf102abef2fb26f76357d14feaded04 /sql/event_queue.cc
parentde7c2e5e545df90fc9814c60a8a5a8d20f22b2c3 (diff)
downloadmariadb-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_queue.cc')
-rw-r--r--sql/event_queue.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/event_queue.cc b/sql/event_queue.cc
index ae8ba258717..01a1507f6f2 100644
--- a/sql/event_queue.cc
+++ b/sql/event_queue.cc
@@ -135,7 +135,7 @@ bool
Event_queue::init_queue(THD *thd)
{
DBUG_ENTER("Event_queue::init_queue");
- DBUG_PRINT("enter", ("this: 0x%lx", (long) this));
+ DBUG_PRINT("enter", ("this: %p", this));
LOCK_QUEUE_DATA();
@@ -201,7 +201,7 @@ Event_queue::create_event(THD *thd, Event_queue_element *new_element,
bool *created)
{
DBUG_ENTER("Event_queue::create_event");
- DBUG_PRINT("enter", ("thd: 0x%lx et=%s.%s", (long) thd,
+ DBUG_PRINT("enter", ("thd: %p et=%s.%s", thd,
new_element->dbname.str, new_element->name.str));
/* Will do nothing if the event is disabled */
@@ -213,7 +213,7 @@ Event_queue::create_event(THD *thd, Event_queue_element *new_element,
DBUG_RETURN(FALSE);
}
- DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element));
+ DBUG_PRINT("info", ("new event in the queue: %p", new_element));
LOCK_QUEUE_DATA();
*created= (queue_insert_safe(&queue, (uchar *) new_element) == FALSE);
@@ -242,7 +242,7 @@ Event_queue::update_event(THD *thd, LEX_STRING dbname, LEX_STRING name,
Event_queue_element *new_element)
{
DBUG_ENTER("Event_queue::update_event");
- DBUG_PRINT("enter", ("thd: 0x%lx et=[%s.%s]", (long) thd, dbname.str, name.str));
+ DBUG_PRINT("enter", ("thd: %p et=[%s.%s]", thd, dbname.str, name.str));
if ((new_element->status == Event_parse_data::DISABLED) ||
(new_element->status == Event_parse_data::SLAVESIDE_DISABLED))
@@ -264,7 +264,7 @@ Event_queue::update_event(THD *thd, LEX_STRING dbname, LEX_STRING name,
/* If not disabled event */
if (new_element)
{
- DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element));
+ DBUG_PRINT("info", ("new event in the queue: %p", new_element));
queue_insert_safe(&queue, (uchar *) new_element);
mysql_cond_broadcast(&COND_queue_state);
}
@@ -290,7 +290,7 @@ void
Event_queue::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name)
{
DBUG_ENTER("Event_queue::drop_event");
- DBUG_PRINT("enter", ("thd: 0x%lx db :%s name: %s", (long) thd,
+ DBUG_PRINT("enter", ("thd: %p db :%s name: %s", thd,
dbname.str, name.str));
LOCK_QUEUE_DATA();
@@ -545,7 +545,7 @@ Event_queue::dbug_dump_queue(my_time_t when)
i++)
{
et= ((Event_queue_element*)queue_element(&queue, i));
- DBUG_PRINT("info", ("et: 0x%lx name: %s.%s", (long) et,
+ DBUG_PRINT("info", ("et: %p name: %s.%s", et,
et->dbname.str, et->name.str));
DBUG_PRINT("info", ("exec_at: %lu starts: %lu ends: %lu execs_so_far: %u "
"expr: %ld et.exec_at: %ld now: %ld "
@@ -673,8 +673,8 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
end:
UNLOCK_QUEUE_DATA();
- DBUG_PRINT("info", ("returning %d et_new: 0x%lx ",
- ret, (long) *event_name));
+ DBUG_PRINT("info", ("returning %d et_new: %p ",
+ ret, *event_name));
if (*event_name)
{