List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:October 24 2011 12:48pm
Subject:bzr push into mysql-5.5-cluster branch (jonas.oreland:3614 to 3616)
View as plain text  
 3616 Jonas Oreland	2011-10-24
      ndb - further cmake (install) fixes
      - have_clusterj_inc - adopt to 5.5 install layout (?)
      - add shared lib version
      - install clusterj jars
      - move NDB_GET_CONFIG_VALUE into own file (used from several locations)

    added:
      storage/ndb/cmake/ndb_get_config_value.cmake
    modified:
      mysql-test/suite/ndb/include/have_clusterj.inc
      storage/ndb/CMakeLists.txt
      storage/ndb/VERSION
      storage/ndb/clusterj/CMakeLists.txt
      storage/ndb/clusterj/clusterj-api/CMakeLists.txt
      storage/ndb/clusterj/clusterj-jpatest/CMakeLists.txt
      storage/ndb/clusterj/clusterj-openjpa/CMakeLists.txt
      storage/ndb/clusterj/clusterj-test/CMakeLists.txt
      storage/ndb/include/CMakeLists.txt
      storage/ndb/src/CMakeLists.txt
 3615 Jonas Oreland	2011-10-24
      ndb - fix install/dist problems
        1) install ndb_dist_priv.sql (and let mtr search for it in installed place too)
        2) install libndbclient.so
        3) install headers

    modified:
      mysql-test/suite/ndb/t/have_ndb_dist_priv.inc
      storage/ndb/include/CMakeLists.txt
      storage/ndb/src/CMakeLists.txt
      storage/ndb/tools/CMakeLists.txt
 3614 Jonas Oreland	2011-10-24
      ndb - fix ndb_join_pushdown in ps-protocol mode...add weird work-around

    modified:
      mysql-test/suite/ndb/r/ndb_join_pushdown.result
      mysql-test/suite/ndb/t/ndb_join_pushdown.test
=== modified file 'mysql-test/suite/ndb/include/have_clusterj.inc'
--- a/mysql-test/suite/ndb/include/have_clusterj.inc	2010-03-19 14:30:27 +0000
+++ b/mysql-test/suite/ndb/include/have_clusterj.inc	2011-10-24 12:45:30 +0000
@@ -22,16 +22,18 @@ my $basedir = dirname($mysql_test_dir);
 #
 
 my $clusterj_jar = my_find_file($basedir,
-                                ["storage/ndb/clusterj", 
-                                 "share/mysql/java",             # install unix
-                                 "lib/java"],                    # install windows
+                                [ "storage/ndb/clusterj", 
+                                  "share/java",
+                                  "share/mysql/java",
+                                  "lib/java" ],
                                 "clusterj-*.jar", NOT_REQUIRED);
 
 my $clusterj_test_jar = my_find_file($basedir,
-                                    ["storage/ndb/clusterj/clusterj-test",
-                                     "share/mysql/java",             # install unix
-                                     "lib/java"],                    # install windows
-                                    "clusterj-test-*.jar", NOT_REQUIRED);
+                                     [ "storage/ndb/clusterj/clusterj-test",
+                                       "share/java",
+                                       "share/mysql/java",
+                                       "lib/java" ],
+                                     "clusterj-test-*.jar", NOT_REQUIRED);
 
 my $ndbclient_lib = my_find_file($basedir,
                                 ["storage/ndb/src/.libs", 

=== modified file 'mysql-test/suite/ndb/t/have_ndb_dist_priv.inc'
--- a/mysql-test/suite/ndb/t/have_ndb_dist_priv.inc	2011-09-01 12:36:37 +0000
+++ b/mysql-test/suite/ndb/t/have_ndb_dist_priv.inc	2011-10-24 10:06:44 +0000
@@ -21,7 +21,7 @@ my $basedir = dirname($mysql_test_dir);
 # Check if the needed tests are available
 #
 my $sql_file = my_find_file($basedir,
-                            ["storage/ndb/tools", "share/mysql/"],
+                            ["storage/ndb/tools", "share/mysql/", "share" ],
                             "ndb_dist_priv.sql", NOT_REQUIRED);
 
 my $F = IO::File->new("$vardir/tmp/have_ndb_dist_priv_result.inc", "w") or die;

=== modified file 'storage/ndb/CMakeLists.txt'
--- a/storage/ndb/CMakeLists.txt	2011-10-24 07:38:43 +0000
+++ b/storage/ndb/CMakeLists.txt	2011-10-24 12:45:30 +0000
@@ -186,7 +186,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
 # Check for Java and JDK needed by ndbjtie and clusterj
 INCLUDE(FindJava)
 INCLUDE(FindJNI)
-INCLUDE("${CMAKE_SOURCE_DIR}/storage/ndb/config/type_JAVA.cmake")
+INCLUDE("${NDB_SOURCE_DIR}/config/type_JAVA.cmake")
 
 IF(JAVA_COMPILE AND JAVA_ARCHIVE)
   MESSAGE(STATUS "Found Java")

=== modified file 'storage/ndb/VERSION'
--- a/storage/ndb/VERSION	2011-10-03 08:02:28 +0000
+++ b/storage/ndb/VERSION	2011-10-24 12:45:30 +0000
@@ -4,3 +4,6 @@ NDB_VERSION_MAJOR=7
 NDB_VERSION_MINOR=2
 NDB_VERSION_BUILD=2
 NDB_VERSION_STATUS=""
+NDB_SHARED_LIB_VERSION_MAJOR=6
+NDB_SHARED_LIB_VERSION_MINOR=0
+NDB_SHARED_LIB_VERSION_BUILD=0

=== modified file 'storage/ndb/clusterj/CMakeLists.txt'
--- a/storage/ndb/clusterj/CMakeLists.txt	2011-09-06 14:49:02 +0000
+++ b/storage/ndb/clusterj/CMakeLists.txt	2011-10-24 12:45:30 +0000
@@ -61,3 +61,6 @@ CREATE_JAR(clusterj
   MERGE_JARS ${JARS}
   MANIFEST ${CMAKE_CURRENT_SOURCE_DIR}/clusterj_manifest.mf
   DEPENDENCIES ${DEP} )
+
+INSTALL(FILES clusterj-${MYSQL_CLUSTER_VERSION}.jar
+        DESTINATION ${INSTALL_MYSQLSHAREDIR}/java COMPONENT ClusterJ)

=== modified file 'storage/ndb/clusterj/clusterj-api/CMakeLists.txt'
--- a/storage/ndb/clusterj/clusterj-api/CMakeLists.txt	2011-07-31 10:04:20 +0000
+++ b/storage/ndb/clusterj/clusterj-api/CMakeLists.txt	2011-10-24 12:45:30 +0000
@@ -30,3 +30,6 @@ CREATE_MANIFEST(manifest.mf ${CLUSTERJ_A
 CREATE_JAR(clusterj-api ${JAVA_SOURCES}
   CLASSPATH target/classes
   MANIFEST ${CMAKE_CURRENT_SOURCE_DIR}/manifest.mf)
+
+INSTALL(FILES clusterj-api-${MYSQL_CLUSTER_VERSION}.jar
+        DESTINATION ${INSTALL_MYSQLSHAREDIR}/java COMPONENT ClusterJ)

=== modified file 'storage/ndb/clusterj/clusterj-jpatest/CMakeLists.txt'
--- a/storage/ndb/clusterj/clusterj-jpatest/CMakeLists.txt	2011-09-16 12:58:08 +0000
+++ b/storage/ndb/clusterj/clusterj-jpatest/CMakeLists.txt	2011-10-24 12:45:30 +0000
@@ -42,3 +42,6 @@ CREATE_JAR(clusterj-jpatest ${JAVA_SOURC
   DEPENDENCIES clusterjpa.jar
   EXTRA_FILES src/main/resources/META-INF
   BROKEN_JAVAC ${BROKEN_JAVAC})
+
+INSTALL(FILES clusterj-jpatest-${MYSQL_CLUSTER_VERSION}.jar
+        DESTINATION ${INSTALL_MYSQLSHAREDIR}/java COMPONENT ClusterJ)

=== modified file 'storage/ndb/clusterj/clusterj-openjpa/CMakeLists.txt'
--- a/storage/ndb/clusterj/clusterj-openjpa/CMakeLists.txt	2011-09-06 14:49:02 +0000
+++ b/storage/ndb/clusterj/clusterj-openjpa/CMakeLists.txt	2011-10-24 12:45:30 +0000
@@ -43,3 +43,5 @@ CREATE_JAR(clusterjpa ${JAVA_SOURCES}
   DEPENDENCIES ${DEP}
   MERGE_JARS ${JARS})
 
+INSTALL(FILES clusterjpa-${MYSQL_CLUSTER_VERSION}.jar
+        DESTINATION ${INSTALL_MYSQLSHAREDIR}/java COMPONENT ClusterJ)

=== modified file 'storage/ndb/clusterj/clusterj-test/CMakeLists.txt'
--- a/storage/ndb/clusterj/clusterj-test/CMakeLists.txt	2011-10-04 05:22:45 +0000
+++ b/storage/ndb/clusterj/clusterj-test/CMakeLists.txt	2011-10-24 12:45:30 +0000
@@ -45,3 +45,6 @@ CREATE_JAR(clusterj-test ${JAVA_SOURCES}
   EXTRA_FILES src/main/resources/META-INF
               src/main/resources/schema.sql
   BROKEN_JAVAC ${BROKEN_JAVAC})
+
+INSTALL(FILES clusterj-test-${MYSQL_CLUSTER_VERSION}.jar
+        DESTINATION ${INSTALL_MYSQLSHAREDIR}/java COMPONENT ClusterJ)

=== added file 'storage/ndb/cmake/ndb_get_config_value.cmake'
--- a/storage/ndb/cmake/ndb_get_config_value.cmake	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/cmake/ndb_get_config_value.cmake	2011-10-24 12:45:30 +0000
@@ -0,0 +1,14 @@
+MACRO(NDB_GET_CONFIG_VALUE keyword var)
+ IF(NOT ${var})
+   # Read the line which contains the keyword
+   FILE (STRINGS ${NDB_SOURCE_DIR}/VERSION str
+         REGEX "^[ ]*${keyword}=")
+   IF(str)
+     # Remove the keyword=
+     STRING(REPLACE "${keyword}=" "" str ${str})
+     # Remove whitespace
+     STRING(REGEX REPLACE "[ ].*" "" str "${str}")
+     SET(${var} ${str})
+   ENDIF()
+ ENDIF()
+ENDMACRO()

=== modified file 'storage/ndb/include/CMakeLists.txt'
--- a/storage/ndb/include/CMakeLists.txt	2011-10-03 11:34:40 +0000
+++ b/storage/ndb/include/CMakeLists.txt	2011-10-24 12:45:30 +0000
@@ -28,27 +28,9 @@ CONFIGURE_FILE(ndb_types.h.in
 LIST(APPEND CPACK_SOURCE_IGNORE_FILES include/ndb_types\\\\.h$)
 
 #
-# Read a value for variable from ndb_configure.m4
-#
-MACRO(NDB_GET_CONFIG_VALUE keyword var)
- IF(NOT ${var})
-   # Read the line which contains the keyword
-   FILE (STRINGS ${NDB_SOURCE_DIR}/VERSION str
-         REGEX "^[ ]*${keyword}=")
-   IF(str)
-     # Remove the keyword=
-     STRING(REPLACE "${keyword}=" "" str ${str})
-     # Remove whitespace
-     STRING(REGEX REPLACE "[ ].*" "" str "${str}")
-     SET(${var} ${str})
-   ENDIF()
- ENDIF()
-ENDMACRO()
-
-#
 # Read ndb_configure.m4 and extract the NDB_VERSION_XX=YY variables
 #
-
+INCLUDE("${NDB_SOURCE_DIR}/cmake/ndb_get_config_value.cmake")
 NDB_GET_CONFIG_VALUE(NDB_VERSION_MAJOR major)
 SET(NDB_VERSION_MAJOR "${major}" CACHE INTERNAL "NDB Major Version" FORCE)
 
@@ -91,3 +73,55 @@ CONFIGURE_FILE(ndb_version.h.in
 # Exclude ndb_version.h from "make dist"
 LIST(APPEND CPACK_SOURCE_IGNORE_FILES include/ndb_version\\\\.h$)
 
+
+# Install public headers
+SET(NDB_GENERAL_HEADERS
+    ndb_constants.h
+    ndb_init.h
+    ndb_types.h
+    ndb_version.h)
+
+
+SET(NDB_NDBAPI_HEADERS
+    ndbapi/ndbapi_limits.h
+    ndbapi/ndb_opt_defaults.h
+    ndbapi/Ndb.hpp
+    ndbapi/NdbApi.hpp
+    ndbapi/NdbTransaction.hpp
+    ndbapi/NdbDictionary.hpp
+    ndbapi/NdbError.hpp
+    ndbapi/NdbEventOperation.hpp
+    ndbapi/NdbIndexOperation.hpp
+    ndbapi/NdbOperation.hpp
+    ndbapi/ndb_cluster_connection.hpp
+    ndbapi/NdbBlob.hpp
+    ndbapi/NdbPool.hpp
+    ndbapi/NdbRecAttr.hpp
+    ndbapi/NdbReceiver.hpp
+    ndbapi/NdbScanFilter.hpp
+    ndbapi/NdbScanOperation.hpp
+    ndbapi/NdbIndexScanOperation.hpp
+    ndbapi/NdbIndexStat.hpp
+    ndbapi/ndberror.h
+    ndbapi/NdbInterpretedCode.hpp)
+
+SET(NDB_MGMAPI_HEADERS
+    mgmapi/mgmapi.h
+    mgmapi/mgmapi_error.h
+    mgmapi/mgmapi_debug.h
+    mgmapi/mgmapi_config_parameters.h
+    mgmapi/mgmapi_config_parameters_debug.h
+    mgmapi/ndb_logevent.h
+    mgmapi/ndbd_exit_codes.h)
+
+INSTALL(FILES ${NDB_GENERAL_HEADERS}
+        DESTINATION ${INSTALL_INCLUDEDIR}/storage/ndb
+        COMPONENT Developement)
+
+INSTALL(FILES ${NDB_NDBAPI_HEADERS}
+        DESTINATION ${INSTALL_INCLUDEDIR}/storage/ndb/ndbapi
+        COMPONENT Developement)
+
+INSTALL(FILES ${NDB_MGMAPI_HEADERS}
+        DESTINATION ${INSTALL_INCLUDEDIR}/storage/ndb/mgmapi
+        COMPONENT Developement)

=== modified file 'storage/ndb/src/CMakeLists.txt'
--- a/storage/ndb/src/CMakeLists.txt	2011-09-16 14:31:26 +0000
+++ b/storage/ndb/src/CMakeLists.txt	2011-10-24 12:45:30 +0000
@@ -64,6 +64,22 @@ IF(HAVE_JDK AND HAVE_JAVA)
   SET(EXTRA_SRC ${CMAKE_SOURCE_DIR}/storage/ndb/src/ndbjtie/ndbjtie_lib.cpp)
 ENDIF()
 
+#
+# Version
+#
+INCLUDE("${NDB_SOURCE_DIR}/cmake/ndb_get_config_value.cmake")
+NDB_GET_CONFIG_VALUE(NDB_SHARED_LIB_VERSION_MAJOR major)
+NDB_GET_CONFIG_VALUE(NDB_SHARED_LIB_VERSION_MINOR minor)
+NDB_GET_CONFIG_VALUE(NDB_SHARED_LIB_VERSION_BUILD build)
+SET(NDB_SHARED_LIB_VERSION "${major}.${minor}.${build}")
+
+#
+# libndbclient.so
+#
 ADD_LIBRARY(ndbclient_so SHARED ${EXTRA_SRC})
 TARGET_LINK_LIBRARIES(ndbclient_so ${NDBCLIENT_SO_LIBS})
-SET_TARGET_PROPERTIES(ndbclient_so PROPERTIES OUTPUT_NAME "ndbclient")
+SET_TARGET_PROPERTIES(ndbclient_so PROPERTIES
+                      OUTPUT_NAME "ndbclient"
+                      SOVERSION ${NDB_SHARED_LIB_VERSION})
+MYSQL_INSTALL_TARGETS(ndbclient_so DESTINATION "${INSTALL_LIBDIR}" COMPONENT Developement)
+

=== modified file 'storage/ndb/tools/CMakeLists.txt'
--- a/storage/ndb/tools/CMakeLists.txt	2011-10-05 13:57:58 +0000
+++ b/storage/ndb/tools/CMakeLists.txt	2011-10-24 10:06:44 +0000
@@ -100,3 +100,6 @@ IF (MYSQL_VERSION_ID LESS "50501")
   # Don't build or install this program anymore in 5.5+
   ADD_EXECUTABLE(ndb_test_platform ndb_test_platform.cpp)
 ENDIF()
+
+# Install the ndb_dist_priv.sql script
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ndb_dist_priv.sql DESTINATION ${INSTALL_MYSQLSHAREDIR})

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster branch (jonas.oreland:3614 to 3616) Jonas Oreland24 Oct