List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:October 9 2008 8:26am
Subject:bzr push into mysql-5.1 branch (stewart:2987 to 2991)
View as plain text  
 2991 Stewart Smith	2008-10-09
       fix use of non-portable gettimeofday so that Win32 builds again
modified:
  sql/ha_ndbcluster_lock_ext.h

 2990 Stewart Smith	2008-10-09
       disable some spurious warnings on MSVC for NDB
modified:
  storage/ndb/CMakeLists.txt

 2989 Stewart Smith	2008-10-09
       add missing files for longsignal support to Cmake (fix build on win32)
modified:
  storage/ndb/src/kernel/vm/CMakeLists.txt

 2988 Stewart Smith	2008-10-09
       use correct cast (is bitmask for < 32bits so casting to Uint32 is okay)
modified:
  storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp

 2987 Stewart Smith	2008-10-09 [merge]
      merge mainline
added:
  storage/ndb/src/kernel/vm/LongSignal.cpp
  storage/ndb/src/kernel/vm/LongSignalImpl.hpp
  storage/ndb/src/kernel/vm/LongSignal_mt.cpp
  storage/ndb/src/kernel/vm/LongSignal_nonmt.cpp
  storage/ndb/src/kernel/vm/SimplePropertiesSection_mt.cpp
  storage/ndb/src/kernel/vm/SimplePropertiesSection_nonmt.cpp
  storage/ndb/src/kernel/vm/mt-asm.h
modified:
  config/ac-macros/ha_ndbcluster.m4
  configure.in
  storage/ndb/include/util/SimpleProperties.hpp
  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
  storage/ndb/src/kernel/blocks/dbinfo/ndbinfo_helpers.cpp
  storage/ndb/src/kernel/vm/ArrayPool.hpp
  storage/ndb/src/kernel/vm/LongSignal.hpp
  storage/ndb/src/kernel/vm/Makefile.am
  storage/ndb/src/kernel/vm/SimplePropertiesSection.cpp
  storage/ndb/src/kernel/vm/SimulatedBlock.cpp
  storage/ndb/src/kernel/vm/SimulatedBlock.hpp
  storage/ndb/src/kernel/vm/TransporterCallback.cpp
  storage/ndb/src/kernel/vm/mt.cpp
  storage/ndb/src/kernel/vm/mt.hpp

=== modified file 'sql/ha_ndbcluster_lock_ext.h'
--- a/sql/ha_ndbcluster_lock_ext.h	2008-10-07 08:20:50 +0000
+++ b/sql/ha_ndbcluster_lock_ext.h	2008-10-09 09:48:11 +0000
@@ -14,6 +14,8 @@
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include <NdbTick.h>
+
 /*
   These functions are shared with ndb_restore so that the creating of
   tables through ndb_restore is syncronized correctly with the mysqld's
@@ -36,12 +38,12 @@ ndbcluster_global_schema_lock_ext(THD *t
   NdbOperation *op;
   NdbTransaction *trans= NULL;
   int retry_sleep= 50; /* 50 milliseconds, transaction */
-  struct timeval time_end;
+  NDB_TICKS time_end;
 
   if (retry_time > 0)
   {
-    gettimeofday(&time_end, 0);
-    time_end.tv_sec+= retry_time;
+    time_end= NdbTick_CurrentMillisecond();
+    time_end+= retry_time*1000;
   }
   while (1)
   {
@@ -79,11 +81,8 @@ ndbcluster_global_schema_lock_ext(THD *t
       goto error_handler;
     if (retry_time > 0)
     {
-      struct timeval time_now;
-      gettimeofday(&time_now, 0);
-      if ((time_end.tv_sec < time_now.tv_sec) ||
-          (time_end.tv_sec == time_now.tv_sec && time_end.tv_usec < time_now.tv_usec))
-        goto error_handler;
+	  if(time_end < NdbTick_CurrentMillisecond())
+	    goto error_handler;
     }
     if (trans)
     {

=== modified file 'storage/ndb/CMakeLists.txt'
--- a/storage/ndb/CMakeLists.txt	2008-08-20 13:22:09 +0000
+++ b/storage/ndb/CMakeLists.txt	2008-10-09 09:40:16 +0000
@@ -15,6 +15,14 @@
 
 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DVM_TRACE")
 SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DVM_TRACE")
+
+# Disable some warnings for NDB build:
+# 4200: non-standard extension used: zero length array
+# 4355: 'this': used in base member initializer list
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4355 /wd4200")
+SET(CMAKE_C_FLAGS   "${CMAKE_CXX_FLAGS} /wd4355 /wd4200")
+
 ADD_SUBDIRECTORY(include)
 ADD_SUBDIRECTORY(src)
 ADD_SUBDIRECTORY(tools)

=== modified file 'storage/ndb/src/kernel/vm/CMakeLists.txt'
--- a/storage/ndb/src/kernel/vm/CMakeLists.txt	2008-08-27 02:45:19 +0000
+++ b/storage/ndb/src/kernel/vm/CMakeLists.txt	2008-10-09 09:34:24 +0000
@@ -43,4 +43,6 @@ ADD_LIBRARY(ndbsched STATIC
             TransporterCallback_nonmt.cpp
             SimulatedBlock_nonmt.cpp
 	    dummy_nonmt.cpp
+	    SimplePropertiesSection_nonmt.cpp
+	    LongSignal_nonmt.cpp
 )

=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp	2008-09-14 20:00:09 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp	2008-10-09 09:03:01 +0000
@@ -649,7 +649,7 @@ private:
   NdbMutex *m_add_drop_mutex;
 
   inline Gci_container* find_bucket(Uint64 gci){
-    Uint32 pos = (gci & ACTIVE_GCI_MASK);
+    Uint32 pos = (Uint32)(gci & ACTIVE_GCI_MASK);
     Gci_container *bucket= ((Gci_container*)(m_active_gci.getBase())) + pos;
     if(likely(gci == bucket->m_gci))
       return bucket;

Thread
bzr push into mysql-5.1 branch (stewart:2987 to 2991) Stewart Smith9 Oct