List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:November 7 2008 11:04am
Subject:bzr push into mysql-5.1 branch (msvensson:3055)
View as plain text  
 3055 Magnus Svensson	2008-11-07 [merge]
      Merge
modified:
  sql/mysqld.cc
  storage/ndb/include/ndbinfo.h
  storage/ndb/src/common/transporter/TransporterRegistry.cpp
  storage/ndb/src/cw/cpcd/APIService.cpp

=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh	2008-11-06 19:47:31 +0000
+++ b/BUILD/SETUP.sh	2008-11-07 11:00:38 +0000
@@ -93,16 +93,16 @@ if [ "x$warning_mode" != "xpedantic" ]; 
   warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W"
   warnings="$warnings -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare"
   warnings="$warnings -Wwrite-strings -Wunused-function -Wunused-label"
-  warnings="$warnings -Wunused-value -Wunused-variable -Wno-format-zero-length"
+  warnings="$warnings -Wunused-value -Wunused-variable"
 
   # Make "printf like format specifier warnings" into error
-  #warnings="$warnings -Werror=format"
+  warnings="$warnings -Werror=format"
 
 # For more warnings, uncomment the following line
 # warnings="$global_warnings -Wshadow"
 
 # C warnings
-  c_warnings="$warnings -Wunused-parameter"
+  c_warnings="$warnings -Wunused-parameter -Wno-format-zero-length"
 # C++ warnings
   cxx_warnings="$warnings"
 # cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"

=== modified file 'mysql-test/suite/ndb/t/ndb_dbug_lock.test'
--- a/mysql-test/suite/ndb/t/ndb_dbug_lock.test	2008-10-29 22:10:29 +0000
+++ b/mysql-test/suite/ndb/t/ndb_dbug_lock.test	2008-11-07 10:33:31 +0000
@@ -49,6 +49,7 @@ lock tables t1 write;
 --echo # issue alter in parallell, which should be hanging waiting on
 --connection another_con
 --send alter table t1 add column (d int)
+--sleep 1
 
 --echo # check thread state which should be:
 --echo # "Waiting for allowed to take ndbcluster global schema lock"

=== modified file 'storage/ndb/src/common/debugger/EventLogger.cpp'
--- a/storage/ndb/src/common/debugger/EventLogger.cpp	2008-11-06 16:52:59 +0000
+++ b/storage/ndb/src/common/debugger/EventLogger.cpp	2008-11-07 11:00:38 +0000
@@ -897,8 +897,8 @@ void getTextLogFileInitStatus(QQQQ) {
   if (theData[2])
     BaseString::snprintf(m_text, m_text_len,
                          "Local redo log file initialization status:\n"
-                         "#Total files: %lu, Completed: %lu\n"
-                         "#Total MBytes: %lu, Completed: %lu",
+                         "#Total files: %u, Completed: %u\n"
+                         "#Total MBytes: %u, Completed: %u",
 //                         refToNode(theData[1]),
                          theData[2], theData[3],
                          theData[4], theData[5]);
@@ -910,8 +910,8 @@ void getTextLogFileInitStatus(QQQQ) {
 void getTextLogFileInitCompStatus(QQQQ) {
     BaseString::snprintf(m_text, m_text_len,
                          "Local redo log file initialization completed:\n"
-                         "#Total files: %lu, Completed: %lu\n"
-                         "#Total MBytes: %lu, Completed: %lu",
+                         "#Total files: %u, Completed: %u\n"
+                         "#Total MBytes: %u, Completed: %u",
 //                         refToNode(theData[1]),
                          theData[2], theData[3],
                          theData[4], theData[5]);

=== modified file 'storage/ndb/src/common/logger/FileLogHandler.cpp'
--- a/storage/ndb/src/common/logger/FileLogHandler.cpp	2008-10-05 07:12:28 +0000
+++ b/storage/ndb/src/common/logger/FileLogHandler.cpp	2008-11-07 11:00:38 +0000
@@ -204,7 +204,7 @@ FileLogHandler::setParam(const BaseStrin
 
 bool FileLogHandler::getParams(BaseString &config)
 {
-  config.assfmt("FILE:filename=%s,maxsize=%u,maxfiles=%u",
+  config.assfmt("FILE:filename=%s,maxsize=%lu,maxfiles=%u",
                 m_pLogFile->getName(),
                 m_maxFileSize,
                 m_maxNoFiles);

=== modified file 'storage/ndb/src/cw/cpcd/Process.cpp'
--- a/storage/ndb/src/cw/cpcd/Process.cpp	2006-12-23 19:20:40 +0000
+++ b/storage/ndb/src/cw/cpcd/Process.cpp	2008-11-07 08:01:33 +0000
@@ -308,7 +308,7 @@ CPCD::Process::do_exec() {
     }
     int f = fds[i]= open(redirects[i]->c_str(), flags, mode);
     if(f == -1){
-      logger.error("Cannot redirect %d to/from '%s' : %s\n", i, 
+      logger.error("Cannot redirect %ld to/from '%s' : %s\n", i,
 		   redirects[i]->c_str(), strerror(errno));
       _exit(1);
     }

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2008-11-03 08:38:27 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2008-11-07 11:00:38 +0000
@@ -2452,7 +2452,7 @@ void Dbdih::gcpBlockedLab(Signal* signal
   if (getNodeActiveStatus(nodePtr.i) == Sysfile::NS_NotDefined)
   {
     jam();
-    infoEvent("Adding node % to sysfile, NS_Configured",
+    infoEvent("Adding node %d to sysfile, NS_Configured",
               nodePtr.i);
     setNodeActiveStatus(nodePtr.i, Sysfile::NS_Configured);
     Sysfile::setNodeGroup(nodePtr.i, SYSFILE->nodeGroups,

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2008-11-06 16:52:59 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2008-11-07 11:00:38 +0000
@@ -19352,7 +19352,7 @@ Dblqh::validate_filter(Signal* signal)
       start += 3;
       break;
     default:
-      infoEvent("Invalid filter op: 0x%x pos: %d",
+      infoEvent("Invalid filter op: 0x%x pos: %ld",
 		* start,
 		start - (signal->theData + 1));
       return false;

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2008-11-06 10:13:37 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2008-11-07 11:00:38 +0000
@@ -12255,7 +12255,7 @@ Dbtc::validate_filter(Signal* signal)
       start += 3;
       break;
     default:
-      infoEvent("Invalid filter op: 0x%x pos: %d",
+      infoEvent("Invalid filter op: 0x%x pos: %ld",
 		* start,
 		start - (signal->theData + 1));
       return false;

=== modified file 'storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp'
--- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2008-08-21 06:39:11 +0000
+++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2008-11-07 11:00:38 +0000
@@ -289,7 +289,7 @@ Ndbd_mem_manager::init(Uint32 *watchCoun
     m_resource_limit[0].m_min = pages;
   }
   
-  g_eventLogger->info("Ndbd_mem_manager::init(%d) min: %dMb initial: %dMb",
+  g_eventLogger->info("Ndbd_mem_manager::init(%d) min: %ldMb initial: %ldMb",
                       alloc_less_memory,
                       (sizeof(Alloc_page)*m_resource_limit[0].m_min)>>20,
                       (sizeof(Alloc_page)*pages)>>20);

=== modified file 'storage/ndb/src/mgmsrv/Services.cpp'
--- a/storage/ndb/src/mgmsrv/Services.cpp	2008-11-06 10:56:21 +0000
+++ b/storage/ndb/src/mgmsrv/Services.cpp	2008-11-07 11:00:38 +0000
@@ -542,7 +542,9 @@ MgmApiSession::get_nodeid(Parser_t::Cont
   int r = my_getpeername(m_socket, (struct sockaddr*)&addr, &addrlen);
   if (r != 0 ) {
     m_output->println(cmd);
-    m_output->println("result: getpeername(%d) failed, err= %d", m_socket, r);
+    m_output->println("result: getpeername(" MY_SOCKET_FORMAT   \
+                      ") failed, err= %d",
+                      MY_SOCKET_FORMAT_VALUE(m_socket), r);
     m_output->println("");
     return;
   }
@@ -663,7 +665,7 @@ MgmApiSession::getConfig(Parser_t::Conte
 
   m_output->println("get config reply");
   m_output->println("result: Ok");
-  m_output->println("Content-Length: %d", strlen(tmp_str));
+  m_output->println("Content-Length: %ld", strlen(tmp_str));
   m_output->println("Content-Type: ndbconfig/octet-stream");
   SLEEP_ERROR_INSERTED(2);
   m_output->println("Content-Transfer-Encoding: base64");
@@ -916,7 +918,7 @@ MgmApiSession::setLogLevel(Parser<MgmApi
 
   if(level > NDB_MGM_MAX_LOGLEVEL) {
     m_output->println("set loglevel reply");
-    m_output->println("result: Invalid loglevel", errorString.c_str());
+    m_output->println("result: Invalid loglevel: %s", errorString.c_str());
     m_output->println("");
     return;
   }

=== modified file 'storage/ndb/src/ndbapi/ObjectMap.cpp'
--- a/storage/ndb/src/ndbapi/ObjectMap.cpp	2008-04-22 19:36:05 +0000
+++ b/storage/ndb/src/ndbapi/ObjectMap.cpp	2008-11-07 08:01:33 +0000
@@ -53,7 +53,7 @@ int NdbObjectIdMap::expand(Uint32 incSiz
   else
   {
     NdbMutex_Unlock(m_mutex);
-    g_eventLogger->error("NdbObjectIdMap::expand: realloc(%u*%u) failed",
+    g_eventLogger->error("NdbObjectIdMap::expand: realloc(%u*%lu) failed",
                          newSize, sizeof(MapEntry));
     return -1;
   }

=== modified file 'support-files/compiler_warnings.supp'
--- a/support-files/compiler_warnings.supp	2008-10-02 06:57:12 +0000
+++ b/support-files/compiler_warnings.supp	2008-11-07 11:00:38 +0000
@@ -69,6 +69,9 @@ db_vrfy.c : .*comparison is always false
 .*/storage/ndb/.* : .*is used uninitialized in this function.*
 .*/storage/ndb/.* : .*unused variable.*
 
+# Ignore warning produced by passing "" to a printf like function
+.*/ndb/.* : zero-length printf format string
+
 # allow a little moving space for the warning below
 mi_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 560-600
 

Thread
bzr push into mysql-5.1 branch (msvensson:3055) Magnus Svensson7 Nov