diff options
author | unknown <msvensson@shellback.> | 2006-12-15 10:41:24 +0100 |
---|---|---|
committer | unknown <msvensson@shellback.> | 2006-12-15 10:41:24 +0100 |
commit | eca724f45c0ec272bed53eed94616bc723391d0e (patch) | |
tree | 5d9982e3132b74ce278e5ede04f655912021f8bb /sql | |
parent | 33ab28e9ad4e663f4c801064ca80648cdd6e79c9 (diff) | |
download | mariadb-git-eca724f45c0ec272bed53eed94616bc723391d0e.tar.gz |
Add macro for retrieving sec part of "struct timespec"
Use macros for working with "struct timespec" in event_queue.cc
Fix merge problem
include/my_pthread.h:
Remove merge problem causing "struct timespec" to be declared twice
Add macro "get_timespec_sec" used for retrieving the time in seconds
sql/event_queue.cc:
Use macros for working with "struct timespec"
sql/log_event.cc:
Add casts from "byte*" to "char*"
Diffstat (limited to 'sql')
-rw-r--r-- | sql/event_queue.cc | 9 | ||||
-rw-r--r-- | sql/log_event.cc | 14 |
2 files changed, 11 insertions, 12 deletions
diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 7ec665fcd5f..879235c3e49 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -719,7 +719,6 @@ Event_queue::get_top_for_execution_if_time(THD *thd, Event_job_data **job_data) *job_data= NULL; DBUG_ENTER("Event_queue::get_top_for_execution_if_time"); - top_time.tv_nsec= 0; LOCK_QUEUE_DATA(); for (;;) { @@ -732,12 +731,12 @@ Event_queue::get_top_for_execution_if_time(THD *thd, Event_job_data **job_data) if (queue.elements) { top= ((Event_queue_element*) queue_element(&queue, 0)); - top_time.tv_sec= sec_since_epoch_TIME(&top->execute_at); + set_timespec(top_time, sec_since_epoch_TIME(&top->execute_at)); abstime= &top_time; } - if (!abstime || abstime->tv_sec > now) + if (!abstime || get_timespec_sec(*abstime) > now) { const char *msg; if (abstime) @@ -816,8 +815,8 @@ end: if (to_free) delete top; - DBUG_PRINT("info", ("returning %d et_new: 0x%lx abstime.tv_sec: %ld ", - ret, (long) *job_data, abstime ? abstime->tv_sec : 0)); + DBUG_PRINT("info", ("returning %d et_new: 0x%lx get_timespec_sec(abstime): %ld ", + ret, (long) *job_data, abstime ? get_timespec_sec(*abstime) : 0)); if (*job_data) DBUG_PRINT("info", ("db: %s name: %s definer=%s", (*job_data)->dbname.str, diff --git a/sql/log_event.cc b/sql/log_event.cc index 44cba324a02..8fc65c1a717 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -5558,9 +5558,9 @@ unpack_row(RELAY_LOG_INFO *rli, if (bitmap_is_set(cols, field_ptr - begin_ptr)) { - DBUG_ASSERT(table->record[0] <= f->ptr); - DBUG_ASSERT(f->ptr < (table->record[0] + table->s->reclength + - (f->pack_length_in_rec() == 0))); + DBUG_ASSERT((char*)table->record[0] <= f->ptr); + DBUG_ASSERT(f->ptr < (char*)(table->record[0] + table->s->reclength + + (f->pack_length_in_rec() == 0))); DBUG_PRINT("info", ("unpacking column '%s' to 0x%lx", f->field_name, (long) f->ptr)); @@ -6843,8 +6843,8 @@ static int find_and_fetch_row(TABLE *table, byte *key) trigger false warnings. */ #ifndef HAVE_purify - DBUG_DUMP("table->record[0]", table->record[0], table->s->reclength); - DBUG_DUMP("table->record[1]", table->record[1], table->s->reclength); + DBUG_DUMP("table->record[0]", (const char*)table->record[0], table->s->reclength); + DBUG_DUMP("table->record[1]", (const char*)table->record[1], table->s->reclength); #endif /* @@ -6870,8 +6870,8 @@ static int find_and_fetch_row(TABLE *table, byte *key) trigger false warnings. */ #ifndef HAVE_purify - DBUG_DUMP("table->record[0]", table->record[0], table->s->reclength); - DBUG_DUMP("table->record[1]", table->record[1], table->s->reclength); + DBUG_DUMP("table->record[0]", (const char*)table->record[0], table->s->reclength); + DBUG_DUMP("table->record[1]", (const char*)table->record[1], table->s->reclength); #endif /* Below is a minor "optimization". If the key (i.e., key number |