List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:October 24 2008 1:00pm
Subject:bzr commit into mysql-5.1 branch (msvensson:2673) Bug#39180
View as plain text  
#At file:///home/msvensson/mysql/bug39180/6.2/

 2673 Magnus Svensson	2008-10-24
      Bug#39180 Segfault in Logger::Log causes ndbd to hang indefinately - part2
modified:
  BUILD/SETUP.sh
  storage/ndb/include/debugger/SignalLoggerManager.hpp
  storage/ndb/include/logger/Logger.hpp
  storage/ndb/include/ndbapi/Ndb.hpp
  storage/ndb/include/util/BaseString.hpp
  storage/ndb/include/util/NdbOut.hpp
  storage/ndb/include/util/OutputStream.hpp
  storage/ndb/include/util/basestring_vsnprintf.h
  storage/ndb/include/util/socket_io.h
  storage/ndb/src/common/debugger/EventLogger.cpp
  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
  storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
  storage/ndb/src/kernel/blocks/suma/Suma.cpp
  storage/ndb/src/kernel/vm/SimulatedBlock.hpp
  storage/ndb/src/kernel/vm/WatchDog.cpp
  storage/ndb/src/mgmapi/LocalConfig.cpp
  storage/ndb/src/ndbapi/Ndb.cpp
  storage/ndb/src/ndbapi/NdbTransaction.cpp
  storage/ndb/src/ndbapi/Ndbif.cpp
  storage/ndb/src/ndbapi/ObjectMap.hpp

per-file messages:
  BUILD/SETUP.sh
    Remember the flag to make "format specifier warnings" into errors
  storage/ndb/include/debugger/SignalLoggerManager.hpp
    Add ATTRIBUTE_FORMAT
  storage/ndb/include/logger/Logger.hpp
    Add ATTRIBUTE_FORMAT
  storage/ndb/include/ndbapi/Ndb.hpp
    Add ATTRIBUTE_FORMAT
  storage/ndb/include/util/BaseString.hpp
    Add ATTRIBUTE_FORMAT
  storage/ndb/include/util/NdbOut.hpp
    Add ATTRIBUTE_FORMAT
  storage/ndb/include/util/OutputStream.hpp
    Add ATTRIBUTE_FORMAT
  storage/ndb/include/util/basestring_vsnprintf.h
    Add ATTRIBUTE_FORMAT
  storage/ndb/include/util/socket_io.h
    Add ATTRIBUTE_FORMAT
  storage/ndb/src/common/debugger/EventLogger.cpp
    Fix warning, us %% to print a %
  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    Fix warning, remove extra argument specifiers
  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
    Fix warning, use %s to print a string
  storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
    Fix warnings, use 0x%lx and cast to long for pointers
  storage/ndb/src/kernel/blocks/suma/Suma.cpp
    Fix warnings, use %llu for 64 bit values
  storage/ndb/src/kernel/vm/SimulatedBlock.hpp
    Add ATTRIBUTE_FORMAT
  storage/ndb/src/kernel/vm/WatchDog.cpp
    Fix warning, use %llu for 64bit variables
  storage/ndb/src/mgmapi/LocalConfig.cpp
    Fix warning, use %s for strings
  storage/ndb/src/ndbapi/Ndb.cpp
    Fix warnings, use 0x%lx and cast to long for pointers
  storage/ndb/src/ndbapi/NdbTransaction.cpp
    Fix warnings, use 0x%lx and cast to long for pointers
  storage/ndb/src/ndbapi/Ndbif.cpp
    Fix warnings, use 0x%lx and cast to long for pointers
  storage/ndb/src/ndbapi/ObjectMap.hpp
    Fix warnings, use 0x%lx and cast to long for pointers
=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh	2008-03-20 07:57:13 +0000
+++ b/BUILD/SETUP.sh	2008-10-24 11:00:37 +0000
@@ -94,6 +94,9 @@ if [ "x$warning_mode" != "xpedantic" ]; 
   warnings="$warnings -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare"
   warnings="$warnings -Wwrite-strings -Wunused-function -Wunused-label -Wunused-value
-Wunused-variable"
 
+  # Make "printf like format specifier warnings" into error
+  #warnings="$warnings -Werror=format"
+
 # For more warnings, uncomment the following line
 # warnings="$global_warnings -Wshadow"
 

=== modified file 'storage/ndb/include/debugger/SignalLoggerManager.hpp'
--- a/storage/ndb/include/debugger/SignalLoggerManager.hpp	2006-12-23 19:20:40 +0000
+++ b/storage/ndb/include/debugger/SignalLoggerManager.hpp	2008-10-24 11:00:37 +0000
@@ -86,7 +86,8 @@ public:
   /**
    * Generic messages in the signal log
    */
-  void log(BlockNumber bno, const char * msg, ...);
+  void log(BlockNumber bno, const char * msg, ...)
+    ATTRIBUTE_FORMAT(printf, 3, 4);
   
   /**
    * LogModes

=== modified file 'storage/ndb/include/logger/Logger.hpp'
--- a/storage/ndb/include/logger/Logger.hpp	2006-12-23 19:20:40 +0000
+++ b/storage/ndb/include/logger/Logger.hpp	2008-10-24 11:00:37 +0000
@@ -228,7 +228,8 @@ public:
    *
    * @param pMsg the message.
    */
-  virtual void alert(const char* pMsg, ...) const;
+  virtual void alert(const char* pMsg, ...) const
+    ATTRIBUTE_FORMAT(printf, 2, 3);
   virtual void alert(BaseString &pMsg) const { alert(pMsg.c_str()); };
   
   /**
@@ -236,7 +237,8 @@ public:
    *
    * @param pMsg the message.
    */
-  virtual void critical(const char* pMsg, ...) const;
+  virtual void critical(const char* pMsg, ...) const
+    ATTRIBUTE_FORMAT(printf, 2, 3);
   virtual void critical(BaseString &pMsg) const { critical(pMsg.c_str()); };
 
   /**
@@ -244,7 +246,8 @@ public:
    *
    * @param pMsg the message.
    */
-  virtual void error(const char* pMsg, ...) const;
+  virtual void error(const char* pMsg, ...) const
+    ATTRIBUTE_FORMAT(printf, 2, 3);
   virtual void error(BaseString &pMsg) const { error(pMsg.c_str()); };
 
   /**
@@ -252,7 +255,8 @@ public:
    *
    * @param pMsg the message.
    */
-  virtual void warning(const char* pMsg, ...) const;
+  virtual void warning(const char* pMsg, ...) const
+    ATTRIBUTE_FORMAT(printf, 2, 3);
   virtual void warning(BaseString &pMsg) const { warning(pMsg.c_str()); };
 
   /**
@@ -260,7 +264,8 @@ public:
    *
    * @param pMsg the message.
    */
-  virtual void info(const char* pMsg, ...) const;
+  virtual void info(const char* pMsg, ...) const
+    ATTRIBUTE_FORMAT(printf, 2, 3);
   virtual void info(BaseString &pMsg) const { info(pMsg.c_str()); };
 
   /**
@@ -268,7 +273,8 @@ public:
    *
    * @param pMsg the message.
    */
-  virtual void debug(const char* pMsg, ...) const;
+  virtual void debug(const char* pMsg, ...) const
+    ATTRIBUTE_FORMAT(printf, 2, 3);
   virtual void debug(BaseString &pMsg) const { debug(pMsg.c_str()); };
 
 protected:

=== modified file 'storage/ndb/include/ndbapi/Ndb.hpp'
--- a/storage/ndb/include/ndbapi/Ndb.hpp	2008-04-02 22:28:14 +0000
+++ b/storage/ndb/include/ndbapi/Ndb.hpp	2008-10-24 11:00:37 +0000
@@ -1881,7 +1881,9 @@ private:
 			     struct LinearSectionPtr ptr[3]);
   static void statusMessage(void*, Uint32, bool, bool);
 #ifdef VM_TRACE
-  void printState(const char* fmt, ...);
+#include <my_attribute.h>
+  void printState(const char* fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
 #endif
 };
 

=== modified file 'storage/ndb/include/util/BaseString.hpp'
--- a/storage/ndb/include/util/BaseString.hpp	2007-04-11 13:51:09 +0000
+++ b/storage/ndb/include/util/BaseString.hpp	2008-10-24 11:00:37 +0000
@@ -97,10 +97,12 @@ public:
 		     const BaseString &separator = BaseString(" "));
 
   /** @brief Assigns from a format string a la printf() */
-  BaseString& assfmt(const char* ftm, ...);
+  BaseString& assfmt(const char* ftm, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
 
   /** @brief Appends a format string a la printf() to the end */
-  BaseString& appfmt(const char* ftm, ...);
+  BaseString& appfmt(const char* ftm, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
 
   /**
    * Split a string into a vector of strings. Separate the string where
@@ -183,7 +185,8 @@ public:
   /**
    * snprintf on some platforms need special treatment
    */
-  static int snprintf(char *str, size_t size, const char *format, ...);
+  static int snprintf(char *str, size_t size, const char *format, ...)
+    ATTRIBUTE_FORMAT(printf, 3, 4);
   static int vsnprintf(char *str, size_t size, const char *format, va_list ap);
 private:
   char* m_chr;

=== modified file 'storage/ndb/include/util/NdbOut.hpp'
--- a/storage/ndb/include/util/NdbOut.hpp	2006-12-23 19:20:40 +0000
+++ b/storage/ndb/include/util/NdbOut.hpp	2008-10-24 11:00:37 +0000
@@ -76,8 +76,10 @@ public:
   NdbOut(OutputStream &);
   virtual ~NdbOut();
 
-  void print(const char * fmt, ...);
-  void println(const char * fmt, ...);
+  void print(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
+  void println(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
   
   OutputStream * m_out;
 private:
@@ -125,7 +127,7 @@ private:
 };
 
 #else
-void ndbout_c(const char * fmt, ...);
+void ndbout_c(const char * fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
 #endif
 
 #endif

=== modified file 'storage/ndb/include/util/OutputStream.hpp'
--- a/storage/ndb/include/util/OutputStream.hpp	2008-08-05 11:53:52 +0000
+++ b/storage/ndb/include/util/OutputStream.hpp	2008-10-24 11:00:37 +0000
@@ -26,8 +26,10 @@ class OutputStream {
 public:
   OutputStream() {}
   virtual ~OutputStream() {}
-  virtual int print(const char * fmt, ...) = 0;
-  virtual int println(const char * fmt, ...) = 0;
+  virtual int print(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3) = 0;
+  virtual int println(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3) = 0;
   virtual void flush() {};
   virtual void reset_timeout() {};
 };
@@ -39,8 +41,10 @@ public:
   virtual ~FileOutputStream() {}
   FILE *getFile() { return f; }
 
-  int print(const char * fmt, ...);
-  int println(const char * fmt, ...);
+  int print(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
+  int println(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
   void flush() { fflush(f); }
 };
 
@@ -56,8 +60,10 @@ public:
   bool timedout() { return m_timedout; };
   void reset_timeout() { m_timedout= false; m_timeout_remain= m_timeout_ms;};
 
-  int print(const char * fmt, ...);
-  int println(const char * fmt, ...);
+  int print(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
+  int println(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
 };
 
 
@@ -68,8 +74,10 @@ public:
                            unsigned write_timeout_ms = 1000);
   virtual ~BufferedSockOutputStream();
 
-  int print(const char * fmt, ...);
-  int println(const char * fmt, ...);
+  int print(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
+  int println(const char * fmt, ...)
+    ATTRIBUTE_FORMAT(printf, 2, 3);
 
   void flush();
 };

=== modified file 'storage/ndb/include/util/basestring_vsnprintf.h'
--- a/storage/ndb/include/util/basestring_vsnprintf.h	2006-12-23 19:20:40 +0000
+++ b/storage/ndb/include/util/basestring_vsnprintf.h	2008-10-24 11:00:37 +0000
@@ -15,12 +15,14 @@
 
 #ifndef BASESTRING_VSNPRINTF_H
 #define BASESTRING_VSNPRINTF_H
+#include <ndb_global.h>
 #include <stdarg.h>
 #if defined(__cplusplus)
 extern "C"
 {
 #endif
-int basestring_snprintf(char*, size_t, const char*, ...);
+int basestring_snprintf(char*, size_t, const char*, ...)
+  ATTRIBUTE_FORMAT(printf, 3, 4);
 int basestring_vsnprintf(char*,size_t, const char*,va_list);
 #if defined(__cplusplus)
 }

=== modified file 'storage/ndb/include/util/socket_io.h'
--- a/storage/ndb/include/util/socket_io.h	2007-03-22 11:35:07 +0000
+++ b/storage/ndb/include/util/socket_io.h	2008-10-24 11:00:37 +0000
@@ -35,9 +35,9 @@ extern "C" {
                    const char[], int len);
 
   int print_socket(NDB_SOCKET_TYPE, int timeout_ms, int *time,
-                   const char *, ...);
+                   const char *, ...) ATTRIBUTE_FORMAT(printf, 4, 5);
   int println_socket(NDB_SOCKET_TYPE, int timeout_ms, int *time,
-                     const char *, ...);
+                     const char *, ...) ATTRIBUTE_FORMAT(printf, 4, 5);
   int vprint_socket(NDB_SOCKET_TYPE, int timeout_ms, int *time,
                     const char *, va_list);
   int vprintln_socket(NDB_SOCKET_TYPE, int timeout_ms, int *time,

=== modified file 'storage/ndb/src/common/debugger/EventLogger.cpp'
--- a/storage/ndb/src/common/debugger/EventLogger.cpp	2008-04-22 19:36:05 +0000
+++ b/storage/ndb/src/common/debugger/EventLogger.cpp	2008-10-24 11:00:37 +0000
@@ -758,7 +758,7 @@ void getTextEventBufferStatus(QQQQ) {
   convert_unit(alloc, alloc_unit);
   convert_unit(max_, max_unit);
   BaseString::snprintf(m_text, m_text_len,
-		       "Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) "
+		       "Event buffer status: used=%d%s(%d%%) alloc=%d%s(%d%%) "
 		       "max=%d%s apply_epoch=%u/%u latest_epoch=%u/%u",
 		       used, used_unit,
 		       theData[2] ? (Uint32)((((Uint64)theData[1])*100)/theData[2]) : 0,

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2008-05-30 08:03:55 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2008-10-24 11:00:37 +0000
@@ -12608,7 +12608,7 @@ Dbdict::buildIndex_recvReply(Signal* sig
     if (ref == 0) {
       infoEvent("DICT: index %u rebuild done", (unsigned)key);
     } else {
-      warningEvent("DICT: index %u rebuild failed: code=%d line=%d node=%d",
+      warningEvent("DICT: index %u rebuild failed: code=%d",
 		   (unsigned)key, ref->getErrorCode());
     }
     rebuildIndexes(signal, key + 1);

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2008-08-21 06:47:02 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2008-10-24 11:00:37 +0000
@@ -19269,7 +19269,7 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal
 	      TlcpPtr.p->lcpQueued,
 	      TlcpPtr.p->reportEmpty);
     char buf[8*_NDB_NODE_BITMASK_SIZE+1];
-    infoEvent(" m_EMPTY_LCP_REQ=%d", 
+    infoEvent(" m_EMPTY_LCP_REQ=%s",
 	      TlcpPtr.p->m_EMPTY_LCP_REQ.getText(buf));
     
     return;

=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2007-05-30 18:29:14 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2008-10-24 11:00:37 +0000
@@ -1040,7 +1040,7 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal
     
     for (unsigned i = 0; i < theOpenFiles.size(); i++){
       AsyncFile* file = theOpenFiles.getFile(i);
-      infoEvent("%2d (0x%x): %s", i,file, file->theFileName.c_str());
+      infoEvent("%2d (0x%lx): %s", i, (long)file, file->theFileName.c_str());
     }
     return;
   }
@@ -1049,7 +1049,7 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal
     
     for (unsigned i = 0; i < theFiles.size(); i++){
       AsyncFile* file = theFiles[i];
-      infoEvent("%2d (0x%x): %s", i,file, file->isOpen()?"OPEN":"CLOSED");
+      infoEvent("%2d (0x%lx): %s", i, (long)file, file->isOpen()?"OPEN":"CLOSED");
     }
     return;
   }
@@ -1058,7 +1058,7 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal
     
     for (unsigned i = 0; i < theIdleFiles.size(); i++){
       AsyncFile* file = theIdleFiles[i];
-      infoEvent("%2d (0x%x): %s", i,file, file->isOpen()?"OPEN":"CLOSED");
+      infoEvent("%2d (0x%lx): %s", i, (long)file, file->isOpen()?"OPEN":"CLOSED");
     }
     return;
   }

=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2008-08-13 12:30:19 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2008-10-24 11:00:37 +0000
@@ -1162,7 +1162,7 @@ Suma::execDUMP_STATE_ORD(Signal* signal)
     for(Uint32 i = 0; i<c_no_of_buckets; i++)
     {
       Bucket* ptr= c_buckets + i;
-      infoEvent("Bucket %d %d%d-%x switch gci: %d max_acked_gci: %d max_gci: %d tail: %d
head: %d",
+      infoEvent("Bucket %d %d%d-%x switch gci: %llu max_acked_gci: %llu max_gci: %llu
tail: %d head: %d",
 		i, 
 		m_active_buckets.get(i),
 		m_switchover_buckets.get(i),
@@ -3803,7 +3803,7 @@ Suma::execSUB_GCP_COMPLETE_REP(Signal* s
   rep->flags = flags;
   rep->senderRef  = reference();
   rep->gcp_complete_rep_count = m_gcp_complete_rep_count;
-  
+
   if(m_gcp_complete_rep_count && !c_subscriber_nodes.isclear())
   {
     CRASH_INSERTION(13033);

=== modified file 'storage/ndb/src/kernel/vm/SimulatedBlock.hpp'
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	2008-05-29 15:58:58 +0000
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	2008-10-24 11:00:37 +0000
@@ -393,8 +393,10 @@ protected:
   /**
    * General info event (sent to cluster log)
    */
-  void infoEvent(const char * msg, ...) const ;
-  void warningEvent(const char * msg, ...) const ;
+  void infoEvent(const char * msg, ...) const
+    ATTRIBUTE_FORMAT(printf, 2, 3);
+  void warningEvent(const char * msg, ...) const
+    ATTRIBUTE_FORMAT(printf, 2, 3);
   
   /**
    * Get node state

=== modified file 'storage/ndb/src/kernel/vm/WatchDog.cpp'
--- a/storage/ndb/src/kernel/vm/WatchDog.cpp	2008-04-22 19:36:05 +0000
+++ b/storage/ndb/src/kernel/vm/WatchDog.cpp	2008-10-24 11:00:37 +0000
@@ -139,7 +139,7 @@ WatchDog::run()
       g_eventLogger->info("Watchdog: User time: %llu  System time: %llu",
                           (Uint64)my_tms.tms_utime,
                           (Uint64)my_tms.tms_stime);
-      g_eventLogger->warning("Watchdog: Warning overslept %u ms, expected %u ms.",
+      g_eventLogger->warning("Watchdog: Warning overslept %llu ms, expected %u ms.",
                              NdbTick_getMicrosPassed(last_time, now)/1000,
                              sleep_time);
     }

=== modified file 'storage/ndb/src/mgmapi/LocalConfig.cpp'
--- a/storage/ndb/src/mgmapi/LocalConfig.cpp	2007-01-27 01:46:45 +0000
+++ b/storage/ndb/src/mgmapi/LocalConfig.cpp	2008-10-24 11:00:37 +0000
@@ -286,7 +286,7 @@ LocalConfig::readConnectString(const cha
   bool return_value = parseString(connectString, err);
   if (!return_value) {
     BaseString err2;
-    err2.assfmt("Reading %d \"%s\": %s", info, connectString, err.c_str());
+    err2.assfmt("Reading %s \"%s\": %s", info, connectString, err.c_str());
     setError(0,err2.c_str());
   }
   return return_value;

=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp	2008-06-16 12:34:47 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp	2008-10-24 11:00:37 +0000
@@ -687,7 +687,7 @@ Ndb::startTransactionLocal(Uint32 aPrior
   }//if
 #ifdef VM_TRACE
   if (tConnection->theListState != NdbTransaction::NotInList) {
-    printState("startTransactionLocal %x", tConnection);
+    printState("startTransactionLocal %lx", (long)tConnection);
     abort();
   }
 #endif

=== modified file 'storage/ndb/src/ndbapi/NdbTransaction.cpp'
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp	2008-08-06 15:33:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp	2008-10-24 11:00:37 +0000
@@ -578,7 +578,7 @@ NdbTransaction::executeNoBlobs(NdbTransa
       for (unsigned i = 0; i < theNdb->theNoOfCompletedTransactions; i++)
         anyway += theNdb->theCompletedTransactionsArray[i] == this;
       if (anyway) {
-        theNdb->printState("execute %x", this);
+        theNdb->printState("execute %lx", (long)this);
         abort();
       }
 #endif
@@ -1043,7 +1043,7 @@ NdbTransaction::release(){
   theInUseState = false;
 #ifdef VM_TRACE
   if (theListState != NotInList) {
-    theNdb->printState("release %x", this);
+    theNdb->printState("release %lx", (long)this);
     abort();
   }
 #endif

=== modified file 'storage/ndb/src/ndbapi/Ndbif.cpp'
--- a/storage/ndb/src/ndbapi/Ndbif.cpp	2008-04-22 19:36:05 +0000
+++ b/storage/ndb/src/ndbapi/Ndbif.cpp	2008-10-24 11:00:37 +0000
@@ -44,7 +44,6 @@
 #include <NdbTick.h>
 
 #include <EventLogger.hpp>
-extern EventLogger * g_eventLogger;
 
 /******************************************************************************
  * int init( int aNrOfCon, int aNrOfOp );
@@ -315,7 +314,7 @@ Ndb::abortTransactionsAfterNodeFailure(U
         localCon->theCompletionStatus = NdbTransaction::CompletedSuccess;
       } else {
 #ifdef VM_TRACE
-        printState("abortTransactionsAfterNodeFailure %x", this);
+        printState("abortTransactionsAfterNodeFailure %lx", (long)this);
         abort();
 #endif
       }

=== modified file 'storage/ndb/src/ndbapi/ObjectMap.hpp'
--- a/storage/ndb/src/ndbapi/ObjectMap.hpp	2008-04-22 19:36:05 +0000
+++ b/storage/ndb/src/ndbapi/ObjectMap.hpp	2008-10-24 11:00:37 +0000
@@ -85,7 +85,7 @@ NdbObjectIdMap::unmap(Uint32 id, void *o
       m_map[i].m_next = m_firstFree;
       m_firstFree = i;
     } else {
-      g_eventLogger->error("NdbObjectIdMap::unmap(%u, 0x%x) obj=0x%x",
+      g_eventLogger->error("NdbObjectIdMap::unmap(%u, 0x%lx) obj=0x%lx",
                            id, (long) object, (long) obj);
       DBUG_PRINT("error",("NdbObjectIdMap::unmap(%u, 0x%lx) obj=0x%lx",
                           id, (long) object, (long) obj));

Thread
bzr commit into mysql-5.1 branch (msvensson:2673) Bug#39180Magnus Svensson24 Oct