List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:May 9 2012 1:03pm
Subject:bzr push into mysql-5.5-cluster-7.2 branch (magnus.blaudd:3921 to 3923)
View as plain text  
 3923 magnus.blaudd@stripped	2012-05-09
      ndb
       - Turn off cmake's "transitive linking" for the share ndbclient library by
         using the LINK_INTERFACE_LIBARIES property. Previously anyone linking
         against shared ndbclient would also link against against the library which
         ndbclient was created from and thus resolve any unresolved depdendencies
         from those. That is no longer possible and causes a few link failures
         in our test* programs.
       - Add more references to ndbclient_exports.cpp to make more functions
         become exported from the shared ndbclient.
        - Note the number 37 passed to BitmaskImpl::setField, it has to be higher
         than 32 to avoid that BitmaskImpl::setFieldImpl() is optimized away in
         release compile.
       - Add more code to ndbclient_link_test.cpp to detect any missing symbols
         early.

    modified:
      storage/ndb/src/CMakeLists.txt
      storage/ndb/src/ndbclient_exports.cpp
      storage/ndb/src/ndbclient_link_test.cpp
 3922 magnus.blaudd@stripped	2012-05-09
      ndb
       - add link test check for ndbclient_so

    modified:
      storage/ndb/src/CMakeLists.txt
 3921 magnus.blaudd@stripped	2012-05-09
      ndb
       - add reference to JNI_OnLoad() to ndbclient_exports.cpp if
         ndbjite is linked into shared ndbclient, this causes
         "everything" from ndbjtie to be included into shared ndbclient
       - Set compiler def. NDB_WITH_NDBJTIE if ndbjtie is included 
       - Move the setup part of ndbjti into it's scope outside of
         building shared ndbclient
       - Remove use of EXTRA_SRC, ndbclient_shared now always consist only
         of the fucntions refernced in ndbclient_exports.cpp
       - Change the lib named ndbjtie to be convenience library allowing
         it to be compiled with PIC when necessary to include it
         into shared ndbclient
       - Note! The above removes double build of ndbjtie_lib.cpp

    modified:
      storage/ndb/src/CMakeLists.txt
      storage/ndb/src/ndbclient_exports.cpp
      storage/ndb/src/ndbjtie/CMakeLists.txt
=== modified file 'storage/ndb/src/CMakeLists.txt'
--- a/storage/ndb/src/CMakeLists.txt	2012-05-09 09:59:23 +0000
+++ b/storage/ndb/src/CMakeLists.txt	2012-05-09 12:44:49 +0000
@@ -64,10 +64,15 @@ SET(NDB_SHARED_LIB_VERSION "${major}.${m
 
 ADD_LIBRARY(ndbclient_so SHARED ndbclient_exports.cpp)
 TARGET_LINK_LIBRARIES(ndbclient_so ${NDBCLIENT_SO_LIBS})
+# Turn off cmake's transitive link behaviour, the shared
+# ndbclient is self contained
+TARGET_LINK_LIBRARIES(ndbclient_so LINK_INTERFACE_LIBRARIES)
 SET_TARGET_PROPERTIES(ndbclient_so PROPERTIES
   OUTPUT_NAME "ndbclient"
   SOVERSION ${NDB_SHARED_LIB_VERSION})
 MYSQL_INSTALL_TARGETS(ndbclient_so
   DESTINATION "${INSTALL_LIBDIR}"
   COMPONENT Developement)
-
+# Build test program to check linking against ndclient_so
+ADD_EXECUTABLE(ndbclient_shared_link_test ndbclient_link_test.cpp)
+TARGET_LINK_LIBRARIES(ndbclient_shared_link_test ndbclient_so)

=== modified file 'storage/ndb/src/ndbclient_exports.cpp'
--- a/storage/ndb/src/ndbclient_exports.cpp	2012-05-09 09:59:23 +0000
+++ b/storage/ndb/src/ndbclient_exports.cpp	2012-05-09 12:44:49 +0000
@@ -23,15 +23,30 @@
 */
 
 #include "../include/ndbapi/NdbApi.hpp"
+#include "ndbapi/NdbInfo.hpp"
+#include "../include/portlib/NdbDir.hpp"
 
 extern "C" void* JNI_OnLoad(void*, void*);
+extern "C" void ndb_usage(void);
+extern "C" void myRandom48Init(void);
+extern "C" void ndb_rand(void);
 
 void
 _ndbclient_exports(void)
 {
+  (void)ndb_init();
   Ndb_cluster_connection cluster_connection;
   NdbScanFilter scan_filter((NdbOperation*)0);
+  NdbIndexStat index_stat;
+  NdbInfo info(&cluster_connection, "");
+  drop_instance(); // NdbPool
 #ifdef NDB_WITH_NDBJTIE
   JNI_OnLoad(0,0);
 #endif
+  ndb_usage();
+  myRandom48Init();
+  ndb_rand();
+  (void)NdbDir::chdir("");
+  (void)BitmaskImpl::setField(0, 0, 0, 37, (Uint32*)0);
+  ndb_end(0);
 }

=== modified file 'storage/ndb/src/ndbclient_link_test.cpp'
--- a/storage/ndb/src/ndbclient_link_test.cpp	2012-05-09 07:59:21 +0000
+++ b/storage/ndb/src/ndbclient_link_test.cpp	2012-05-09 12:44:49 +0000
@@ -16,6 +16,13 @@
 */
 
 #include "../include/ndbapi/NdbApi.hpp"
+#include "ndbapi/NdbInfo.hpp"
+#include "../include/util/ndb_opts.h"
+#include "../include/util/random.h"
+#include "../include/util/ndb_rand.h"
+#include "../include/portlib/NdbDir.hpp"
+#include "../include/util/Bitmask.hpp"
+
 #include <stdio.h>
 
 int main(int argc, const char**)
@@ -49,6 +56,12 @@ int main(int argc, const char**)
     eop->isConsistent();
     NdbBlob* blob = op->getBlobHandle("");
     blob->truncate();
+    NdbInfo info(&cluster_con, "");
+    ndb_std_print_version();
+    (void)myRandom48(0);
+    (void)ndb_rand_r(0);
+    (void)NdbDir::u_rwx();
+    (void)BitmaskImpl::getField(0, 0, 0, 64, 0);
     ndb_end(0);
   }
 }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (magnus.blaudd:3921 to 3923) magnus.blaudd9 May