List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:October 2 2008 9:44am
Subject:bzr push into mysql-5.1 branch (stewart:2873 to 2877)
View as plain text  
 2877 Stewart Smith	2008-10-02
      fix cast to Uint32 warning
modified:
  storage/ndb/src/common/portlib/win32/NdbTick.c

 2876 Stewart Smith	2008-10-02
      fix NDB_TICKS vs Uint32/int warnings for SignalSender
modified:
  storage/ndb/src/ndbapi/SignalSender.cpp

 2875 Stewart Smith	2008-10-02
      some typecast warnings in NdBDictionaryImpl. Assert on invalid ranges.
modified:
  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp

 2874 Stewart Smith	2008-10-02
      remove false warning suppressions (hiding real bugs). Should also be fixed in this tree with struct my_socket patches.
modified:
  support-files/compiler_warnings.supp

 2873 Stewart Smith	2008-10-01 [merge]
      merge telco-6.4 (incl build fixes)
modified:
  mysql-test/suite/ndb/t/disabled.def
  sql/mysqld.cc
  storage/ndb/src/common/debugger/SignalLoggerManager.cpp
  storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
  storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
  storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
  storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp
  storage/ndb/src/kernel/vm/SimulatedBlock.cpp
  storage/ndb/test/ndbapi/flexAsynch.cpp
  support-files/compiler_warnings.supp

=== modified file 'storage/ndb/src/common/portlib/win32/NdbTick.c'
--- a/storage/ndb/src/common/portlib/win32/NdbTick.c	2008-09-21 15:53:13 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbTick.c	2008-10-02 09:41:59 +0000
@@ -36,6 +36,6 @@ NdbTick_CurrentMicrosecond(NDB_TICKS * s
   QueryPerformanceFrequency(&liFreq);
   *secs = liCount.QuadPart / liFreq.QuadPart;
   liCount.QuadPart -= *secs * liFreq.QuadPart;
-  *micros = (liCount.QuadPart*1000000) / liFreq.QuadPart;
+  *micros = (Uint32)((liCount.QuadPart*1000000) / liFreq.QuadPart);
   return 0;
 }

=== modified file 'storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2008-09-17 13:23:21 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2008-10-02 07:18:35 +0000
@@ -2657,7 +2657,9 @@ NdbDictInterface::parseTableInfo(NdbTabl
     Uint16 replicaCount = ntohs(tableDesc->ReplicaData[0]);
     Uint16 fragCount = ntohs(tableDesc->ReplicaData[1]);
 
-    impl->m_replicaCount = replicaCount;
+    assert(replicaCount <= 256);
+
+    impl->m_replicaCount = (Uint8)replicaCount;
     impl->m_fragmentCount = fragCount;
     DBUG_PRINT("info", ("replicaCount=%x , fragCount=%x",replicaCount,fragCount));
     Uint32 pos = 2;
@@ -4838,9 +4840,12 @@ static int scanEventTable(Ndb* pNdb, 
       goto error;
     }
 
-    tmp_list.count = row_count;
+    /* Cannot handle > 2^32 yet (limit on tmp_list.count is unsigned int) */
+    assert((row_count & 0xffffffff) == row_count);
+
+    tmp_list.count = (unsigned int)row_count;
     tmp_list.elements =
-      new NdbDictionary::Dictionary::List::Element[row_count];
+      new NdbDictionary::Dictionary::List::Element[(unsigned int)row_count];
 
     int eof;
     unsigned rows = 0;

=== modified file 'storage/ndb/src/ndbapi/SignalSender.cpp'
--- a/storage/ndb/src/ndbapi/SignalSender.cpp	2008-09-17 13:23:21 +0000
+++ b/storage/ndb/src/ndbapi/SignalSender.cpp	2008-10-02 07:51:11 +0000
@@ -161,7 +161,7 @@ SignalSender::waitFor(Uint32 timeOutMill
 
   NDB_TICKS now = NdbTick_CurrentMillisecond();
   NDB_TICKS stop = now + timeOutMillis;
-  NDB_TICKS wait = (timeOutMillis == 0 ? 10 : timeOutMillis);
+  Uint32 wait = (timeOutMillis == 0 ? 10 : timeOutMillis);
   do {
     NdbCondition_WaitTimeout(m_cond,
 			     theFacade->theMutexPtr, 
@@ -178,7 +178,7 @@ SignalSender::waitFor(Uint32 timeOutMill
     }
     
     now = NdbTick_CurrentMillisecond();
-    wait = (timeOutMillis == 0 ? 10 : stop - now);
+    wait = (Uint32)(timeOutMillis == 0 ? 10 : stop - now);
   } while(stop > now || timeOutMillis == 0);
   
   return 0;

=== modified file 'support-files/compiler_warnings.supp'
--- a/support-files/compiler_warnings.supp	2008-10-01 10:26:06 +0000
+++ b/support-files/compiler_warnings.supp	2008-10-02 06:57:12 +0000
@@ -69,12 +69,6 @@ db_vrfy.c : .*comparison is always false
 .*/storage/ndb/.* : .*is used uninitialized in this function.*
 .*/storage/ndb/.* : .*unused variable.*
 
-#
-# Unexplanable (?) stuff
-#
-listener.cc : .*conversion from 'SOCKET' to 'int'.*
-net_serv.cc : .*conversion from 'SOCKET' to 'int'.*
-
 # 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 (stewart:2873 to 2877) Stewart Smith2 Oct