List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:November 11 2010 1:22pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3998)
View as plain text  
#At file:///data0/magnus/mysql/7.0/ based on revid:magnus.blaudd@stripped

 3998 Magnus Blåudd	2010-11-11
      ndb
       - fix MYSQLCLUSTERDIR define for both Windows, *nix, automake and cmake
       - only define MYSQLCLUSTERDIR for ndb_mgmd compilation since it's
         only refernced by MgtmSrvr.* files
       - remove hardcoded value of MYSQLCLUSTERDIR on Windows
       - Remove remains of MYSQL_DATADIR, DEFAULT_MYSQL_HOME and SHAREDIR
         since they are not used (but also defined on top level Makefile or config.h)

    modified:
      storage/ndb/include/ndb_global.h
      storage/ndb/src/mgmapi/Makefile.am
      storage/ndb/src/mgmsrv/CMakeLists.txt
      storage/ndb/src/mgmsrv/Makefile.am
      storage/ndb/tools/CMakeLists.txt
      storage/ndb/tools/Makefile.am
=== modified file 'storage/ndb/include/ndb_global.h'
--- a/storage/ndb/include/ndb_global.h	2010-10-28 07:45:21 +0000
+++ b/storage/ndb/include/ndb_global.h	2010-11-11 13:19:26 +0000
@@ -46,7 +46,6 @@
 #define NDB_WIN 1
 #define PATH_MAX 256
 #define DIR_SEPARATOR "\\"
-#define MYSQLCLUSTERDIR "c:\\mysql\\mysql-cluster"
 #define HAVE_STRCASECMP
 #pragma warning(disable: 4503 4786)
 #else

=== modified file 'storage/ndb/src/mgmapi/Makefile.am'
--- a/storage/ndb/src/mgmapi/Makefile.am	2010-11-11 10:57:00 +0000
+++ b/storage/ndb/src/mgmapi/Makefile.am	2010-11-11 13:19:26 +0000
@@ -14,8 +14,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
-MYSQLCLUSTERdir=        .
-
 EXTRA_DIST = CMakeLists.txt
 
 noinst_LTLIBRARIES = libmgmapi.la
@@ -25,7 +23,7 @@ libmgmapi_la_SOURCES = mgmapi.cpp ndb_lo
 
 INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/include/mgmapi
 
-DEFS_LOC = -DNDB_MGMAPI -DMYSQLCLUSTERDIR="\"$(MYSQLCLUSTERdir)\""
+DEFS_LOC = -DNDB_MGMAPI
 
 include $(top_srcdir)/storage/ndb/config/common.mk.am
 include $(top_srcdir)/storage/ndb/config/type_util.mk.am

=== modified file 'storage/ndb/src/mgmsrv/CMakeLists.txt'
--- a/storage/ndb/src/mgmsrv/CMakeLists.txt	2010-11-10 09:42:49 +0000
+++ b/storage/ndb/src/mgmsrv/CMakeLists.txt	2010-11-11 13:19:26 +0000
@@ -24,6 +24,22 @@ ADD_LIBRARY(ndbconf
                InitConfigFileParser.cpp
 )
 
+# Define MYSQLCLUSTERDIR, the default location
+# of ndb_mgmd config files
+IF(NOT DEFINED DEFAULT_MYSQL_HOME)
+  # MySQL does not define DEFAULT_MYSQL_HOME in pre 5.5 version, fall
+  # back to our old defaults and be backwards compatible
+  IF(WIN32)
+    SET(DEFAULT_MYSQL_HOME "C:/mysql" )
+  ELSE()
+    SET(DEFAULT_MYSQL_HOME ${CMAKE_INSTALL_PREFIX})
+  ENDIF()
+ENDIF()
+SET(clusterdir ${DEFAULT_MYSQL_HOME}/mysql-cluster)
+ADD_DEFINITIONS(-DMYSQLCLUSTERDIR=\"${clusterdir}\")
+MESSAGE(STATUS "Using MYSQLCLUSTERDIR: '${clusterdir}'")
+
+
 IF(WIN32)
   # Add the rseource files for logging to event log
   SET(NDB_MGMD_EXTRA_SRC

=== modified file 'storage/ndb/src/mgmsrv/Makefile.am'
--- a/storage/ndb/src/mgmsrv/Makefile.am	2010-08-06 08:19:19 +0000
+++ b/storage/ndb/src/mgmsrv/Makefile.am	2010-11-11 13:19:26 +0000
@@ -16,11 +16,6 @@
 
 EXTRA_DIST = CMakeLists.txt
 
-MYSQLDATAdir =		$(localstatedir)
-MYSQLSHAREdir =		$(pkgdatadir)
-MYSQLBASEdir=		$(prefix)
-MYSQLCLUSTERdir=        $(prefix)/mysql-cluster
-
 ndbbin_PROGRAMS = ndb_mgmd
 
 ndb_mgmd_SOURCES = \
@@ -55,10 +50,9 @@ LDADD_LOC = $(top_builddir)/storage/ndb/
             @NDB_SCI_LIBS@ \
 	    @TERMCAP_LIB@
 
-DEFS_LOC =		-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-			-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-			-DMYSQLCLUSTERDIR="\"$(MYSQLCLUSTERdir)\""
+# Define MYSQLCLUSTERDIR, the default location
+# of ndb_mgmd config files
+DEFS_LOC = -DMYSQLCLUSTERDIR="\"$(prefix)/mysql-cluster\""
 
 include $(top_srcdir)/storage/ndb/config/common.mk.am
 include $(top_srcdir)/storage/ndb/config/type_ndbapi.mk.am

=== modified file 'storage/ndb/tools/CMakeLists.txt'
--- a/storage/ndb/tools/CMakeLists.txt	2010-10-28 08:57:25 +0000
+++ b/storage/ndb/tools/CMakeLists.txt	2010-11-11 13:19:26 +0000
@@ -50,7 +50,6 @@ TARGET_LINK_LIBRARIES(ndb_config ndbmgmc
 SET(options "-I${CMAKE_SOURCE_DIR}/storage/ndb/src/mgmapi")
 SET(options "${options} -I${CMAKE_SOURCE_DIR}/storage/ndb/src/mgmsrv")
 SET(options "${options} -I${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmcommon")
-#SET(options "${options} -DMYSQLCLUSTERDIR=\"\\\"\\\"\"")
 SET_TARGET_PROPERTIES(ndb_config PROPERTIES
                       COMPILE_FLAGS "${options}")
 

=== modified file 'storage/ndb/tools/Makefile.am'
--- a/storage/ndb/tools/Makefile.am	2010-08-06 08:19:19 +0000
+++ b/storage/ndb/tools/Makefile.am	2010-11-11 13:19:26 +0000
@@ -63,8 +63,7 @@ ndb_config_SOURCES = ndb_config.cpp \
 
 ndb_config_CXXFLAGS = -I$(top_srcdir)/storage/ndb/src/mgmapi \
                       -I$(top_srcdir)/storage/ndb/src/mgmsrv \
-                      -I$(top_srcdir)/storage/ndb/include/mgmcommon \
-                      -DMYSQLCLUSTERDIR="\"\""
+                      -I$(top_srcdir)/storage/ndb/include/mgmcommon
 
 ndb_restore_LDADD = $(top_builddir)/storage/ndb/src/common/util/libndbazio.la \
                     $(LDADD)

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20101111131926-48w2pwbnh91wqlbh.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3998) Magnus Blåudd11 Nov