List:Commits« Previous MessageNext Message »
From:Ignacio Galarza Date:July 31 2009 7:22pm
Subject:bzr commit into mysql-5.0-bugteam branch (iggy:2794) Bug#17270
View as plain text  
#At file:///src/mysql_bzr/mysql-5.0-bugteam_17270/ based on revid:matthias.leich@stripped

 2794 Ignacio Galarza	2009-07-31
      Bug#17270 - mysql client tool could not find ../share/charsets folder and fails.
      - Define and pass compile time path variables as pre-processor definitions to 
        mimic the makefile build.
      - Set new CMake version and policy requirements explicitly.
      - Changed DATADIR to MYSQL_DATADIR to avoid conflicting definition in 
        Platform SDK header ObjIdl.h which also defines DATADIR.

    modified:
      CMakeLists.txt
      client/Makefile.am
      include/config-netware.h
      include/config-win.h
      libmysql/Makefile.shared
      libmysqld/Makefile.am
      mysys/Makefile.am
      ndb/src/mgmsrv/Makefile.am
      sql/Makefile.am
      sql/mysqld.cc
      sql/unireg.h
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	2009-07-15 13:46:25 +0000
+++ b/CMakeLists.txt	2009-07-31 19:22:02 +0000
@@ -14,6 +14,9 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
+IF(COMMAND cmake_policy)
+  cmake_policy(SET CMP0005 NEW)
+ENDIF(COMMAND cmake_policy)
 
 PROJECT(MySql)
 
@@ -26,6 +29,13 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/inclu
 # Set standard options
 ADD_DEFINITIONS(-DCMAKE_BUILD)
 ADD_DEFINITIONS(-DHAVE_YASSL)
+ADD_DEFINITIONS(-DCMAKE_CONFIGD)
+ADD_DEFINITIONS(-DDEFAULT_MYSQL_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/")
+ADD_DEFINITIONS(-DDEFAULT_BASEDIR="c:/Program Files/MySQL/")
+ADD_DEFINITIONS(-DMYSQL_DATADIR="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/data")
+ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/")
+ADD_DEFINITIONS(-DPACKAGE=mysql)
+ADD_DEFINITIONS(-DSHAREDIR="share")
 
 # Set debug options
 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")

=== modified file 'client/Makefile.am'
--- a/client/Makefile.am	2007-11-01 14:42:19 +0000
+++ b/client/Makefile.am	2009-07-31 19:22:02 +0000
@@ -57,7 +57,7 @@ strings_src=decimal.c
 # Fix for mit-threads
 DEFS =			-DUNDEF_THREADS_HACK \
 			-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
-			-DDATADIR="\"$(localstatedir)\""
+			-DMYSQL_DATADIR="\"$(localstatedir)\""
 
 EXTRA_DIST =		get_password.c CMakeLists.txt echo.c
 

=== modified file 'include/config-netware.h'
--- a/include/config-netware.h	2009-05-01 17:35:04 +0000
+++ b/include/config-netware.h	2009-07-31 19:22:02 +0000
@@ -110,7 +110,7 @@ extern "C" {
 #define DEFAULT_BASEDIR       "sys:/"
 #define SHAREDIR              "share/"
 #define DEFAULT_CHARSET_HOME  "sys:/mysql/"
-#define DATADIR               "data/"
+#define MYSQL_DATADIR         "data/"
 
 /* 64-bit file system calls */
 #define SIZEOF_OFF_T          8

=== modified file 'include/config-win.h'
--- a/include/config-win.h	2009-07-15 13:46:25 +0000
+++ b/include/config-win.h	2009-07-31 19:22:02 +0000
@@ -303,13 +303,15 @@ inline ulonglong double2ulonglong(double
 #ifdef _CUSTOMCONFIG_
 #include <custom_conf.h>
 #else
+#ifndef CMAKE_CONFIGD
 #define DEFAULT_MYSQL_HOME	"c:\\mysql"
-#define DATADIR         	"c:\\mysql\\data"
+#define MYSQL_DATADIR          "c:\\mysql\\data"
 #define PACKAGE			"mysql"
 #define DEFAULT_BASEDIR		"C:\\"
 #define SHAREDIR		"share"
 #define DEFAULT_CHARSET_HOME	"C:/mysql/"
 #endif
+#endif
 #ifndef DEFAULT_HOME_ENV
 #define DEFAULT_HOME_ENV MYSQL_HOME
 #endif

=== modified file 'libmysql/Makefile.shared'
--- a/libmysql/Makefile.shared	2007-12-05 03:58:21 +0000
+++ b/libmysql/Makefile.shared	2009-07-31 19:22:02 +0000
@@ -82,7 +82,7 @@ vio_objects= vio.lo viosocket.lo viossl.
 CLEANFILES =		$(target_libadd) $(SHLIBOBJS) \
 			$(target)
 DEFS =			-DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
-			-DDATADIR="\"$(MYSQLDATAdir)\"" \
+			-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
 			-DDEFAULT_HOME_ENV=MYSQL_HOME \
 			-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
 			-DDEFAULT_SYSCONFDIR="\"$(sysconfdir)\"" \

=== modified file 'libmysqld/Makefile.am'
--- a/libmysqld/Makefile.am	2007-07-02 14:46:46 +0000
+++ b/libmysqld/Makefile.am	2009-07-31 19:22:02 +0000
@@ -23,7 +23,7 @@ MYSQLBASEdir=		$(prefix)
 
 DEFS =			-DEMBEDDED_LIBRARY -DMYSQL_SERVER \
 			-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-			-DDATADIR="\"$(MYSQLDATAdir)\"" \
+			-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
 			-DSHAREDIR="\"$(MYSQLSHAREdir)\""
 INCLUDES=		@bdb_includes@  @innodb_includes@ @ndbcluster_includes@ \
 			-I$(top_builddir)/include -I$(top_srcdir)/include \

=== modified file 'mysys/Makefile.am'
--- a/mysys/Makefile.am	2007-11-07 22:23:50 +0000
+++ b/mysys/Makefile.am	2009-07-31 19:22:02 +0000
@@ -66,7 +66,7 @@ libmysys_a_LIBADD =	@THREAD_LOBJECTS@
 # charset2html_DEPENDENCIES=	$(LIBRARIES)
 EXTRA_PROGRAMS =	
 DEFS =			-DDEFAULT_BASEDIR=\"$(prefix)\" \
-			-DDATADIR="\"$(MYSQLDATAdir)\"" \
+			-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
 			-DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
 			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
 			-DDEFAULT_HOME_ENV=MYSQL_HOME \

=== modified file 'ndb/src/mgmsrv/Makefile.am'
--- a/ndb/src/mgmsrv/Makefile.am	2007-08-01 02:56:58 +0000
+++ b/ndb/src/mgmsrv/Makefile.am	2009-07-31 19:22:02 +0000
@@ -48,7 +48,7 @@ LDADD_LOC = $(top_builddir)/ndb/src/mgmc
 	    @TERMCAP_LIB@
 
 DEFS_LOC =		-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-			-DDATADIR="\"$(MYSQLDATAdir)\"" \
+			-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
 			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
 			-DMYSQLCLUSTERDIR="\"$(MYSQLCLUSTERdir)\""
 

=== modified file 'sql/Makefile.am'
--- a/sql/Makefile.am	2008-12-17 20:01:34 +0000
+++ b/sql/Makefile.am	2009-07-31 19:22:02 +0000
@@ -114,7 +114,7 @@ mysql_tzinfo_to_sql_LDADD =  @MYSQLD_EXT
 
 DEFS =			-DMYSQL_SERVER \
 			-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-			-DDATADIR="\"$(MYSQLDATAdir)\"" \
+			-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
 			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
 			@DEFS@
 

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-07-27 23:31:48 +0000
+++ b/sql/mysqld.cc	2009-07-31 19:22:02 +0000
@@ -6865,7 +6865,7 @@ static void mysql_init_variables(void)
 
   /* Set directory paths */
   strmake(language, LANGUAGE, sizeof(language)-1);
-  strmake(mysql_real_data_home, get_relative_path(DATADIR),
+  strmake(mysql_real_data_home, get_relative_path(MYSQL_DATADIR),
 	  sizeof(mysql_real_data_home)-1);
   mysql_data_home_buff[0]=FN_CURLIB;	// all paths are relative from here
   mysql_data_home_buff[1]=0;

=== modified file 'sql/unireg.h'
--- a/sql/unireg.h	2009-04-14 17:20:13 +0000
+++ b/sql/unireg.h	2009-07-31 19:22:02 +0000
@@ -29,8 +29,8 @@
 #define TEMP_PREFIX	"MY"
 #define LOG_PREFIX	"ML"
 #define PROGDIR		"bin/"
-#ifndef DATADIR
-#define DATADIR		"data/"
+#ifndef MYSQL_DATADIR
+#define MYSQL_DATADIR		"data/"
 #endif
 #ifndef SHAREDIR
 #define SHAREDIR	"share/"


Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20090731192202-4kt1eow79vsjo4lu.bundle
Thread
bzr commit into mysql-5.0-bugteam branch (iggy:2794) Bug#17270Ignacio Galarza31 Jul