List:Commits« Previous MessageNext Message »
From:ahristov Date:January 12 2006 3:52pm
Subject:bk commit into 5.1 tree (andrey:1.2046)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of andrey. When andrey 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
  1.2046 06/01/12 16:51:45 andrey@lmy004. +2 -0
  WL #1034 (Internal CRON) post-push update
  - fix compile failure on QNX and FreeBSD

  sql/event_timed.cc
    1.17 06/01/12 16:51:19 andrey@lmy004. +2 -2
    do time_t* cast to satisfy compilers on various platforms
    (QNX, FreeBSD)

  sql/event_executor.cc
    1.18 06/01/12 16:51:18 andrey@lmy004. +9 -2
    time_t and my_time_t seem have the same length so cast
    in tztime.cc it's already done this way.
    Precautionary check at runtime about the sizes of my_time_t and time_t

# 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:	andrey
# Host:	lmy004.
# Root:	/work/mysql-5.1-tt-copy-works

--- 1.17/sql/event_executor.cc	2006-01-11 19:31:04 +01:00
+++ 1.18/sql/event_executor.cc	2006-01-12 16:51:18 +01:00
@@ -183,13 +183,20 @@
 
   // needs to call my_thread_init(), otherwise we get a coredump in DBUG_ stuff
   my_thread_init();
+
+  if (sizeof(my_time_t) != sizeof(time_t))
+  {
+    sql_print_error("sizeof(my_time_t) != sizeof(time_t) ."
+                    "The scheduler will not work correctly. Stopping.");
+    goto err_no_thd;
+  }
   
   //TODO Andrey: Check for NULL
   if (!(thd = new THD)) // note that contructor of THD uses DBUG_ !
   {
     sql_print_error("Cannot create THD for event_executor_main");
     goto err_no_thd;
-  }    
+  }
   thd->thread_stack = (char*)&thd; // remember where our stack is
   
   pthread_detach_this_thread();
@@ -275,7 +282,7 @@
       }
         
       DBUG_PRINT("evex main thread",("computing time to sleep till next exec"));
-      time(&now);
+      time((time_t *)&now);
       my_tz_UTC->gmt_sec_to_TIME(&time_now, now);
       t2sleep= evex_time_diff(&et->execute_at, &time_now);
       VOID(pthread_mutex_unlock(&LOCK_event_arrays));

--- 1.16/sql/event_timed.cc	2006-01-11 12:49:43 +01:00
+++ 1.17/sql/event_timed.cc	2006-01-12 16:51:19 +01:00
@@ -537,7 +537,7 @@
     }
     goto ret;
   }
-  time(&now);
+  time((time_t *)&now);
   my_tz_UTC->gmt_sec_to_TIME(&time_now, now);
 /*
   sql_print_information("[%s.%s]", dbname.str, name.str);
@@ -703,7 +703,7 @@
   TIME time_now;
   my_time_t now;
 
-  time(&now);
+  time((time_t *)&now);
   my_tz_UTC->gmt_sec_to_TIME(&time_now, now);
 
   last_executed= time_now; // was execute_at
Thread
bk commit into 5.1 tree (andrey:1.2046)ahristov12 Jan