List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:November 26 2010 11:12am
Subject:bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:4020 to 4023)
View as plain text  
 4023 Magnus Blåudd	2010-11-26
      ndb
       - only link libndberror into ndbd
       - add ndbd_exit_codes.c to be built as part of libndbtrace
       - remove unnecessary uses of type_kernel.cmake
       - remove duplicate include file directives in cmake files
       - change printSchemaFile.cpp's include of SchemaFile to look
         in current dir first

    modified:
      storage/ndb/config/type_kernel.cmake
      storage/ndb/src/common/debugger/CMakeLists.txt
      storage/ndb/src/kernel/blocks/backup/CMakeLists.txt
      storage/ndb/src/kernel/blocks/dbdict/CMakeLists.txt
      storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
      storage/ndb/src/kernel/blocks/dbdih/CMakeLists.txt
      storage/ndb/src/kernel/blocks/dblqh/CMakeLists.txt
 4022 Magnus Blåudd	2010-11-26
      ndb
       - remove second outdated copy of printSysFile.cpp

    removed:
      storage/ndb/src/kernel/blocks/dbdih/printSysfile/
      storage/ndb/src/kernel/blocks/dbdih/printSysfile/Makefile
      storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp
 4021 Magnus Blåudd	2010-11-26
      ndb
        remove use of my_stat() from ndb_print_sys_file

    modified:
      storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp
 4020 Magnus Blåudd	2010-11-26 [merge]
      Merge 7.0-bug58163 -> 7.0

    modified:
      storage/ndb/src/mgmapi/mgmapi.cpp
      storage/ndb/test/ndbapi/testMgm.cpp
=== modified file 'storage/ndb/config/type_kernel.cmake'
--- a/storage/ndb/config/type_kernel.cmake	2008-08-21 06:37:31 +0000
+++ b/storage/ndb/config/type_kernel.cmake	2010-11-26 10:42:53 +0000
@@ -13,23 +13,11 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
-                    ${CMAKE_BINARY_DIR}/include
-                    ${CMAKE_BINARY_DIR}/storage/ndb/include
-                    ${CMAKE_SOURCE_DIR}/include
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/vm
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/error
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/blocks
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/kernel
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/transporter
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/debugger
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmapi
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmcommon
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/ndbapi
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/util
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/portlib
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/logger
-                    ${CMAKE_SOURCE_DIR}/zlib)
+INCLUDE_DIRECTORIES(
+  ${CMAKE_CURRENT_SOURCE_DIR}
+  ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/vm
+  ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/error
+  ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/blocks
+  ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel
+)
 

=== modified file 'storage/ndb/src/common/debugger/CMakeLists.txt'
--- a/storage/ndb/src/common/debugger/CMakeLists.txt	2010-11-11 15:08:52 +0000
+++ b/storage/ndb/src/common/debugger/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -22,6 +22,8 @@ ADD_LIBRARY(ndbtrace STATIC
             SignalLoggerManager.cpp
             DebuggerNames.cpp
             BlockNames.cpp
-            EventLogger.cpp)
+            EventLogger.cpp
+            ${NDB_SOURCE_DIR}/src/kernel/error/ndbd_exit_codes.c
+)
 
-TARGET_LINK_LIBRARIES(ndbtrace ndblogger ndberror ndbgeneral)
+TARGET_LINK_LIBRARIES(ndbtrace ndblogger ndbgeneral)

=== modified file 'storage/ndb/src/kernel/blocks/backup/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/backup/CMakeLists.txt	2010-01-04 00:59:59 +0000
+++ b/storage/ndb/src/kernel/blocks/backup/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -13,9 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_kernel.cmake)
-
 ADD_EXECUTABLE(ndb_print_backup_file read.cpp)
 TARGET_LINK_LIBRARIES(ndb_print_backup_file
-    ndbtrace ndblogger ndbgeneral ndberror ndbportlib)
+    ndbtrace ndblogger ndbgeneral ndbportlib)

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/dbdict/CMakeLists.txt	2010-01-04 00:59:59 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -13,10 +13,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_kernel.cmake)
-
 ADD_EXECUTABLE(ndb_print_schema_file
                printSchemaFile.cpp)
 TARGET_LINK_LIBRARIES(ndb_print_schema_file
-    ndbtrace ndblogger ndbgeneral ndberror ndbportlib)
+    ndbtrace ndblogger ndbgeneral ndbportlib)

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp	2010-03-10 07:43:06 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp	2010-11-26 10:42:53 +0000
@@ -25,7 +25,7 @@
 
 #include <NdbMain.h>
 #include <NdbOut.hpp>
-#include <SchemaFile.hpp>
+#include "SchemaFile.hpp"
 #include <kernel_types.h>
 
 static const char* progname = 0;

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/dbdih/CMakeLists.txt	2010-01-04 00:59:59 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -14,8 +14,6 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_kernel.cmake)
-
 ADD_EXECUTABLE(ndb_print_sys_file printSysfile.cpp)
 TARGET_LINK_LIBRARIES(ndb_print_sys_file
-    ndbtrace ndblogger ndbgeneral ndberror ndbportlib)
+    ndbtrace ndblogger ndbgeneral ndbportlib)

=== removed directory 'storage/ndb/src/kernel/blocks/dbdih/printSysfile'
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp	2010-03-10 07:43:06 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp	2010-11-26 10:37:44 +0000
@@ -18,11 +18,11 @@
 
 
 #include <ndb_global.h>
-#include <my_dir.h>
+#include <sys/stat.h>
 
 #include <NdbMain.h>
 #include <NdbOut.hpp>
-#include <Sysfile.hpp>
+#include "Sysfile.hpp"
 
 static int g_all = 0;
 
@@ -139,9 +139,9 @@ NDB_COMMAND(printSysfile, 
       continue;
     }
     
-    MY_STAT sbuf,*st;
+    struct stat sbuf;
 
-    if(!(st=my_stat(filename, &sbuf,0)))
+    if(stat(filename, &sbuf) != 0)
     {
       ndbout << "Could not find file: \"" << filename << "\"" << endl;
       continue;

=== removed file 'storage/ndb/src/kernel/blocks/dbdih/printSysfile/Makefile'
--- a/storage/ndb/src/kernel/blocks/dbdih/printSysfile/Makefile	2005-04-27 01:19:54 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/printSysfile/Makefile	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-include .defs.mk
-
-TYPE := ndbapi
-
-BIN_TARGET := printSysfile
-BIN_TARGET_ARCHIVES := portlib general
-
-CCFLAGS_LOC += -I..
-
-SOURCES := printSysfile.cpp
-
-include $(NDB_TOP)/Epilogue.mk

=== removed file 'storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp	2009-10-15 12:31:11 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp	1970-01-01 00:00:00 +0000
@@ -1,162 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-
-#include <ndb_global.h>
-
-#include <NdbMain.h>
-#include <NdbOut.hpp>
-#include <Sysfile.hpp>
-
-void 
-usage(const char * prg){
-  ndbout << "Usage " << prg 
-	 << " P[0-1].sysfile" << endl;  
-}
-
-struct NSString {
-  Sysfile::ActiveStatus NodeStatus;
-  const char * desc;
-};
-
-static const
-NSString NodeStatusStrings[] = {
-  { Sysfile::NS_Active,                 "Active         " },
-  { Sysfile::NS_ActiveMissed_1,         "Active missed 1" },
-  { Sysfile::NS_ActiveMissed_2,         "Active missed 2" },
-  { Sysfile::NS_ActiveMissed_3,         "Active missed 3" },
-  { Sysfile::NS_HotSpare,               "Hot spare      " },
-  { Sysfile::NS_NotActive_NotTakenOver, "Not active     " },
-  { Sysfile::NS_TakeOver,               "Take over      " },
-  { Sysfile::NS_NotActive_TakenOver,    "Taken over     " },
-  { Sysfile::NS_NotDefined,             "Not defined    " },
-  { Sysfile::NS_Standby,                "Stand by       " }
-};
-
-const
-char * getNSString(Uint32 ns){
-  for(Uint32 i = 0; i<(sizeof(NodeStatusStrings)/sizeof(NSString)); i++)
-    if((Uint32)NodeStatusStrings[i].NodeStatus == ns)
-      return NodeStatusStrings[i].desc;
-  return "<Unknown state>";
-}
-
-void
-fill(const char * buf, int mod){
-  int len = strlen(buf)+1;
-  ndbout << buf << " ";
-  while((len % mod) != 0){
-    ndbout << " ";
-    len++;
-  }
-}
-
-void 
-print(const char * filename, const Sysfile * sysfile){
-  char buf[255];
-  ndbout << "----- Sysfile: " << filename << " -----" << endl;
-  ndbout << "Initial start ongoing: " 
-	 << Sysfile::getInitialStartOngoing(sysfile->systemRestartBits) 
-	 << ", ";
-
-  ndbout << "Restart Ongoing: "
-	 << Sysfile::getRestartOngoing(sysfile->systemRestartBits) 
-	 << ", ";
-
-  ndbout << "LCP Ongoing: "
-	 << Sysfile::getLCPOngoing(sysfile->systemRestartBits) 
-	 << endl;
-
-
-  ndbout << "-- Global Checkpoint Identities: --" << endl;
-  sprintf(buf, "keepGCI = %u", sysfile->keepGCI);
-  fill(buf, 40); 
-  ndbout << " -- Tail of REDO log" << endl;
-  
-  sprintf(buf, "oldestRestorableGCI = %u", sysfile->oldestRestorableGCI);
-  fill(buf, 40);
-  ndbout << " -- " << endl;
-
-  sprintf(buf, "newestRestorableGCI = %u", sysfile->newestRestorableGCI);
-  fill(buf, 40);
-  ndbout << " -- " << endl;
-
-  sprintf(buf, "latestLCP = %u", sysfile->latestLCP_ID);
-  fill(buf, 40);
-  ndbout << " -- " << endl;
-
-  ndbout << "-- Node status: --" << endl;
-  for(int i = 1; i < MAX_NDB_NODES; i++){
-    if(Sysfile::getNodeStatus(i, sysfile->nodeStatus) !=Sysfile::NS_NotDefined){
-      sprintf(buf, 
-	      "Node %.2d -- %s GCP: %d, NodeGroup: %d, TakeOverNode: %d, "
-	      "LCP Ongoing: %s",
-	      i, 
-	      getNSString(Sysfile::getNodeStatus(i,sysfile->nodeStatus)),
-	      sysfile->lastCompletedGCI[i],
-	      Sysfile::getNodeGroup(i, sysfile->nodeGroups),
-	      Sysfile::getTakeOverNode(i, sysfile->takeOver),
-	      BitmaskImpl::get(NdbNodeBitmask::Size, 
-			       sysfile->lcpActive, i) != 0 ? "yes" : "no");
-      ndbout << buf << endl;
-    }
-  }
-}
-
-NDB_COMMAND(printSysfile, 
-	    "printSysfile", "printSysfile", "Prints a sysfile", 16384){ 
-  ndb_init();
-  if(argc < 2){
-    usage(argv[0]);
-    return 0;
-  }
-
-  for(int i = 1; i<argc; i++){
-    const char * filename = argv[i];
-    
-    MY_STAT sbuf,*st;
-
-    if(!st=my_stat(filename, &sbuf,0))
-    {
-      ndbout << "Could not find file: \"" << filename << "\"" << endl;
-      continue;
-    }
-    const Uint32 bytes = sbuf.st_size;
-    
-    Uint32 * buf = new Uint32[bytes/4+1];
-    
-    FILE * f = fopen(filename, "rb");
-    if(f == 0){
-      ndbout << "Failed to open file" << endl;
-      delete [] buf;
-      continue;
-    }
-    Uint32 sz = fread(buf, 1, bytes, f);
-    fclose(f);
-    if(sz != bytes){
-      ndbout << "Failure while reading file" << endl;
-      delete [] buf;
-      continue;
-    }
-    
-    print(filename, (Sysfile *)&buf[0]);
-    delete [] buf;
-    continue;
-  }
-  return 0;
-}

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/dblqh/CMakeLists.txt	2010-01-04 00:59:59 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -14,10 +14,8 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_kernel.cmake)
-
 ADD_EXECUTABLE(ndb_redo_log_reader
     redoLogReader/records.cpp
     redoLogReader/reader.cpp)
 TARGET_LINK_LIBRARIES(ndb_redo_log_reader
-    ndbtrace ndblogger ndbgeneral ndberror ndbportlib)
+    ndbtrace ndblogger ndbgeneral ndbportlib)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:4020 to 4023) Magnus Blåudd26 Nov