List:Commits« Previous MessageNext Message »
From:msvensson Date:December 15 2006 10:41am
Subject:bk commit into 5.1 tree (msvensson:1.2371)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of . When  does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-12-15 10:41:24+01:00, msvensson@shellback. +3 -0
  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@stripped, 2006-12-15 10:40:47+01:00, msvensson@shellback. +7 -5
    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@stripped, 2006-12-15 10:40:47+01:00, msvensson@shellback. +4 -5
    Use macros for working with "struct timespec"

  sql/log_event.cc@stripped, 2006-12-15 10:41:21+01:00, msvensson@shellback. +7 -7
    Add casts from "byte*" to "char*"

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	shellback.
# Root:	C:/mysql/mysql-5.1-new-maint

--- 1.100/include/my_pthread.h	2006-12-14 23:36:42 +01:00
+++ 1.101/include/my_pthread.h	2006-12-15 10:40:47 +01:00
@@ -56,11 +56,6 @@
 } pthread_cond_t;
 
 
-struct timespec {		/* For pthread_cond_timedwait() */
-    time_t tv_sec;
-    long tv_nsec;
-};
-
 typedef int pthread_mutexattr_t;
 #define win_pthread_self my_thread_var->pthread_self
 #define pthread_handler_t EXTERNC void * __cdecl
@@ -93,6 +88,7 @@
   GetSystemTimeAsFileTime(&((ABSTIME).start.ft)); \
   (ABSTIME).timeout_msec= (long)((NSEC)/1000000); \
 }
+#define get_timespec_sec(ABSTIME) ((((ABSTIME).start.i64 / 10000) +
(ABSTIME).timeout_msec ) / 1000)
 
 void win_pthread_init(void);
 int win_pthread_setspecific(void *A,void *B,uint length);
@@ -414,6 +410,9 @@
   (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
 }
 #endif /* !set_timespec_nsec */
+#ifndef get_timespec_sec
+#define get_timespec_sec(ABSTIME) (ABSTIME).ts_sec
+#endif /* !get_timespec_sec */
 #else
 #ifndef set_timespec
 #define set_timespec(ABSTIME,SEC) \
@@ -432,6 +431,9 @@
   (ABSTIME).tv_nsec= (long) (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
 }
 #endif /* !set_timespec_nsec */
+#ifndef get_timespec_sec
+#define get_timespec_sec(ABSTIME) (ABSTIME).tv_sec
+#endif /* !get_timespec_sec */
 #endif /* HAVE_TIMESPEC_TS_SEC */
 
 	/* safe_mutex adds checking to mutex for easier debugging */

--- 1.259/sql/log_event.cc	2006-11-30 02:40:29 +01:00
+++ 1.260/sql/log_event.cc	2006-12-15 10:41:21 +01:00
@@ -5558,9 +5558,9 @@
 
     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 @@
     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 @@
     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

--- 1.19/sql/event_queue.cc	2006-11-27 00:47:24 +01:00
+++ 1.20/sql/event_queue.cc	2006-12-15 10:40:47 +01:00
@@ -719,7 +719,6 @@
   *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 @@
     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 @@
   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,

Thread
bk commit into 5.1 tree (msvensson:1.2371)msvensson15 Dec