From b93e09a27edaa30f1852df1d11d1a9b49fcf460a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 18:18:03 +0100 Subject: [PATCH 1/6] configure.in: Corrected calculation of version id, incorrect last two digits if < 10 Keep "sp1" or "a" in MYSQL_NO_DASH_VERSION, to set correct version in RPM spec file Added MYSQL_NUMERIC_VERSION that is like MYSQL_NO_DASH_VERSION before Added clear doc how the different version variables differ SocketServer.cpp: Corrected typo in debug error message ndb/src/common/util/SocketServer.cpp: Corrected typo in debug error message configure.in: Corrected calculation of version id, incorrect last two digits if < 10 Keep "sp1" or "a" in MYSQL_NO_DASH_VERSION, to set correct version in RPM spec file Added MYSQL_NUMERIC_VERSION that is like MYSQL_NO_DASH_VERSION before Added clear doc how the different version variables differ --- configure.in | 16 +++++++++++++--- ndb/src/common/util/SocketServer.cpp | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 1643426f827..a0fe8ac5f8b 100644 --- a/configure.in +++ b/configure.in @@ -26,9 +26,19 @@ NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? # Remember that regexps needs to quote [ and ] since this is run through m4 -MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"` -MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"` -MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/[[^0-9.]]//g; s/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'` +# We take some made up examples +# +# VERSION 5.1.40sp1-alpha 5.0.34a +# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a +# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 +# MYSQL_BASE_VERSION 5.1 5.0 +# MYSQL_VERSION_ID 50140 50034 +# +MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"` +MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"` +MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"` +MYSQL_VERSION_ID=`echo $MYSQL_NUMERIC_VERSION | \ + awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'` # The port should be constant for a LONG time MYSQL_TCP_PORT_DEFAULT=3306 diff --git a/ndb/src/common/util/SocketServer.cpp b/ndb/src/common/util/SocketServer.cpp index 755764c7700..3486567e33d 100644 --- a/ndb/src/common/util/SocketServer.cpp +++ b/ndb/src/common/util/SocketServer.cpp @@ -111,7 +111,7 @@ SocketServer::setup(SocketServer::Service * service, const int on = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on)) == -1) { - DBUG_PRINT("error",("getsockopt() - %d - %s", + DBUG_PRINT("error",("setsockopt() - %d - %s", errno, strerror(errno))); NDB_CLOSE_SOCKET(sock); DBUG_RETURN(false); From 1aaa63aabaef8015c71fc6143b3062e197049707 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 18:36:06 +0100 Subject: [PATCH 2/6] Makefile.am, Info.plist.sh: Use MYSQL_NUMERIC_VERSION, only three numbers separated with dot misc.m4, character_sets.m4, openssl.m4: Removed unneded semicolon config/ac-macros/character_sets.m4: Removed unneded semicolon config/ac-macros/misc.m4: Removed unneded semicolon config/ac-macros/openssl.m4: Removed unneded semicolon support-files/MacOSX/Info.plist.sh: Use MYSQL_NUMERIC_VERSION, only three numbers separated with dot support-files/MacOSX/Makefile.am: Use MYSQL_NUMERIC_VERSION, only three numbers separated with dot --- config/ac-macros/character_sets.m4 | 6 +++--- config/ac-macros/misc.m4 | 2 +- config/ac-macros/openssl.m4 | 4 ++-- support-files/MacOSX/Info.plist.sh | 2 +- support-files/MacOSX/Makefile.am | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/ac-macros/character_sets.m4 b/config/ac-macros/character_sets.m4 index 8c3e8ca73b7..ea2763a1cd4 100644 --- a/config/ac-macros/character_sets.m4 +++ b/config/ac-macros/character_sets.m4 @@ -199,7 +199,7 @@ do ;; *) AC_MSG_ERROR([Charset '$cs' not available. (Available are: $CHARSETS_AVAILABLE). - See the Installation chapter in the Reference Manual.]); + See the Installation chapter in the Reference Manual.]) esac done @@ -380,7 +380,7 @@ case $default_charset in ;; *) AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE). - See the Installation chapter in the Reference Manual.]); + See the Installation chapter in the Reference Manual.]) esac if test "$default_collation" = default; then @@ -405,7 +405,7 @@ else Collation $default_collation is not valid for character set $default_charset. Valid collations are: $default_charset_collations. See the Installation chapter in the Reference Manual. - ]); + ]) fi AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"], diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4 index 9c7b9aeb171..8c3b51ebc5e 100644 --- a/config/ac-macros/misc.m4 +++ b/config/ac-macros/misc.m4 @@ -756,7 +756,7 @@ case $SYSTEM_TYPE in esac if test "$CXX_VERSION" then - AC_MSG_CHECKING("C++ compiler version"); + AC_MSG_CHECKING("C++ compiler version") AC_MSG_RESULT("$CXX $CXX_VERSION") fi AC_SUBST(CXX_VERSION) diff --git a/config/ac-macros/openssl.m4 b/config/ac-macros/openssl.m4 index 3130cdc3437..9de69b8a1b4 100644 --- a/config/ac-macros/openssl.m4 +++ b/config/ac-macros/openssl.m4 @@ -126,11 +126,11 @@ AC_MSG_CHECKING(for OpenSSL) AC_MSG_RESULT(no) if test ! -z "$openssl_includes" then - AC_MSG_ERROR(Can't have --with-openssl-includes without --with-openssl); + AC_MSG_ERROR(Can't have --with-openssl-includes without --with-openssl) fi if test ! -z "$openssl_libs" then - AC_MSG_ERROR(Can't have --with-openssl-libs without --with-openssl); + AC_MSG_ERROR(Can't have --with-openssl-libs without --with-openssl) fi fi AC_SUBST(openssl_libs) diff --git a/support-files/MacOSX/Info.plist.sh b/support-files/MacOSX/Info.plist.sh index fdfb0c7a17c..7df9c5ac710 100644 --- a/support-files/MacOSX/Info.plist.sh +++ b/support-files/MacOSX/Info.plist.sh @@ -9,7 +9,7 @@ CFBundleName MySQL CFBundleShortVersionString - @MYSQL_NO_DASH_VERSION@ + @MYSQL_NUMERIC_VERSION@ IFPkgFlagAllowBackRev IFPkgFlagAuthorizationAction diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am index 85ccb9c126d..3f11107d714 100644 --- a/support-files/MacOSX/Makefile.am +++ b/support-files/MacOSX/Makefile.am @@ -47,7 +47,7 @@ SUFFIXES = .sh @SED@ \ -e 's!@''prefix''@!$(prefix)!g' \ -e 's!@''VERSION''@!@VERSION@!' \ - -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ + -e 's!@''MYSQL_NUMERIC_VERSION''@!@MYSQL_NUMERIC_VERSION@!' \ -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \ $< > $@-t From e45057eace95383456f5067d8097b03245d10809 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 18:43:48 +0100 Subject: [PATCH 3/6] ha_ndbcluster.m4: Use MYSQL_NUMERIC_VERSION, to make sure NDB_VERSION_BUILD is numeric config/ac-macros/ha_ndbcluster.m4: Use MYSQL_NUMERIC_VERSION, to make sure NDB_VERSION_BUILD is numeric --- config/ac-macros/ha_ndbcluster.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4 index 9ea2e9972f7..9df96a7750b 100644 --- a/config/ac-macros/ha_ndbcluster.m4 +++ b/config/ac-macros/ha_ndbcluster.m4 @@ -2,9 +2,9 @@ dnl --------------------------------------------------------------------------- dnl Macro: MYSQL_CHECK_NDBCLUSTER dnl --------------------------------------------------------------------------- -NDB_VERSION_MAJOR=`echo $MYSQL_NO_DASH_VERSION | cut -d. -f1` -NDB_VERSION_MINOR=`echo $MYSQL_NO_DASH_VERSION | cut -d. -f2` -NDB_VERSION_BUILD=`echo $MYSQL_NO_DASH_VERSION | cut -d. -f3` +NDB_VERSION_MAJOR=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f1` +NDB_VERSION_MINOR=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f2` +NDB_VERSION_BUILD=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f3` NDB_VERSION_STATUS=`echo $VERSION | sed 's/^[[-.0-9]]*//'` TEST_NDBCLUSTER="" From ed4578c02e446254a5cd1bf7851ff95677068c54 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 16:17:05 -0500 Subject: [PATCH 4/6] Bug #23839 Multiple declarations of macros - Remove duplicate macro defintions. CMakeLists.txt: Bug #23839 Multiple declarations of macros - Make sure _WIN64 is defined for proper Intellisense functionality. include/config-win.h: Bug #23839 Multiple declarations of macros - Remove extra definitions. Use the my_global.h defines instead. include/my_global.h: Bug #23839 Multiple declarations of macros - Slight change to maintain current definitions for Windows. --- CMakeLists.txt | 8 +++++++ include/config-win.h | 54 -------------------------------------------- include/my_global.h | 11 ++++----- 3 files changed, 13 insertions(+), 60 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27b2bf9b70e..55489da784c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,14 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE") +# This definition is necessary to work around a bug with Intellisense described +# here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper +# debugger functionality. +IF(CMAKE_SIZEOF_VOID_P MATCHES 8) + MESSAGE(STATUS "Detected 64-bit platform.") + ADD_DEFINITIONS("-D_WIN64") +ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 8) + IF(EMBED_MANIFESTS) # Search for the tools (mt, makecat, signtool) necessary for embedding # manifests and signing executables with the MySQL AB authenticode cert. diff --git a/include/config-win.h b/include/config-win.h index 45bfeb5ba26..e5abe580b3f 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -254,60 +254,6 @@ inline double ulonglong2double(ulonglong value) #define STACK_DIRECTION -1 - -/* Optimized store functions for Intel x86 */ - -#ifndef _WIN64 -#define sint2korr(A) (*((int16 *) (A))) -#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ - (((uint32) 255L << 24) | \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0])) : \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0]))) -#define sint4korr(A) (*((long *) (A))) -#define uint2korr(A) (*((uint16 *) (A))) -/* - ATTENTION ! - - Please, note, uint3korr reads 4 bytes (not 3) ! - It means, that you have to provide enough allocated space ! -*/ -#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) -#define uint4korr(A) (*((unsigned long *) (A))) -#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16) +\ - (((uint32) ((uchar) (A)[3])) << 24)) +\ - (((ulonglong) ((uchar) (A)[4])) << 32)) -#define uint8korr(A) (*((ulonglong *) (A))) -#define sint8korr(A) (*((longlong *) (A))) -#define int2store(T,A) *((uint16*) (T))= (uint16) (A) -#define int3store(T,A) { *(T)= (uchar) ((A));\ - *(T+1)=(uchar) (((uint) (A) >> 8));\ - *(T+2)=(uchar) (((A) >> 16)); } -#define int4store(T,A) *((long *) (T))= (long) (A) -#define int5store(T,A) { *(T)= (uchar)((A));\ - *((T)+1)=(uchar) (((A) >> 8));\ - *((T)+2)=(uchar) (((A) >> 16));\ - *((T)+3)=(uchar) (((A) >> 24)); \ - *((T)+4)=(uchar) (((A) >> 32)); } -#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A) - -#define doubleget(V,M) do { *((long *) &V) = *((long*) M); \ - *(((long *) &V)+1) = *(((long*) M)+1); } while(0) -#define doublestore(T,V) do { *((long *) T) = *((long*) &V); \ - *(((long *) T)+1) = *(((long*) &V)+1); } while(0) -#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); } -#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float)) -#define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float)) -#define float8get(V,M) doubleget((V),(M)) -#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) -#define float8store(V,M) doublestore((V),(M)) -#endif /* _WIN64 */ - #define HAVE_PERROR #define HAVE_VFPRINT #define HAVE_RENAME /* Have rename() as function */ diff --git a/include/my_global.h b/include/my_global.h index 08877300d8a..e05100fa288 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1053,7 +1053,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */ */ /* Optimized store functions for Intel x86 */ -#if defined(__i386__) && !defined(_WIN64) +#if defined(__i386__) || (defined(_WIN32) && !defined(_WIN64)) #define sint2korr(A) (*((int16 *) (A))) #define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ (((uint32) 255L << 24) | \ @@ -1065,7 +1065,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */ ((uint32) (uchar) (A)[0]))) #define sint4korr(A) (*((long *) (A))) #define uint2korr(A) (*((uint16 *) (A))) -#ifdef HAVE_purify +#if defined(HAVE_purify) && !defined(_WIN32) #define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\ (((uint32) ((uchar) (A)[1])) << 8) +\ (((uint32) ((uchar) (A)[2])) << 16)) @@ -1077,7 +1077,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */ It means, that you have to provide enough allocated space ! */ #define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) -#endif +#endif /* HAVE_purify && !_WIN32 */ #define uint4korr(A) (*((uint32 *) (A))) #define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ (((uint32) ((uchar) (A)[1])) << 8) +\ @@ -1116,9 +1116,8 @@ do { doubleget_union _tmp; \ #define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V),sizeof(float)) #define floatget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(float)) #define float8store(V,M) doublestore((V),(M)) -#endif /* __i386__ */ +#else -#ifndef sint2korr /* We're here if it's not a IA-32 architecture (Win32 and UNIX IA-32 defines were done before) @@ -1243,7 +1242,7 @@ do { doubleget_union _tmp; \ #define float8store(V,M) doublestore((V),(M)) #endif /* WORDS_BIGENDIAN */ -#endif /* sint2korr */ +#endif /* __i386__ OR _WIN32 AND !_WIN64 */ /* Macro for reading 32-bit integer from network byte order (big-endian) From 61caf4635d07d83b6aa0cddf9661c32dc0bee61a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 23:53:01 -0500 Subject: [PATCH 5/6] Bug #24992 Enabling Shared Memory support on Windows x64 causes client to fail - Mistaken macro defintions cause mysys to read packets in the wrong order. include/my_global.h: Bug #24992 Enabling Shared Memory support on Windows x64 causes client to fail - Use low byte order optimizations for Windows. --- include/my_global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/my_global.h b/include/my_global.h index e05100fa288..f290b690630 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1053,7 +1053,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */ */ /* Optimized store functions for Intel x86 */ -#if defined(__i386__) || (defined(_WIN32) && !defined(_WIN64)) +#if defined(__i386__) || defined(_WIN32) #define sint2korr(A) (*((int16 *) (A))) #define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ (((uint32) 255L << 24) | \ @@ -1242,7 +1242,7 @@ do { doubleget_union _tmp; \ #define float8store(V,M) doublestore((V),(M)) #endif /* WORDS_BIGENDIAN */ -#endif /* __i386__ OR _WIN32 AND !_WIN64 */ +#endif /* __i386__ OR _WIN32 */ /* Macro for reading 32-bit integer from network byte order (big-endian) From 40eef79f9d7a2cafec02de055d4580b945e25a4b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 15:58:56 +0100 Subject: [PATCH 6/6] As result of WL#4204 all charset tests are now disabled. --- mysql-test/suite/funcs_2/t/disabled.def | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 mysql-test/suite/funcs_2/t/disabled.def diff --git a/mysql-test/suite/funcs_2/t/disabled.def b/mysql-test/suite/funcs_2/t/disabled.def new file mode 100644 index 00000000000..c903662e052 --- /dev/null +++ b/mysql-test/suite/funcs_2/t/disabled.def @@ -0,0 +1,6 @@ +# Disabled by hhunger (2008-03-03) due to WL4204 +innodb_charset : Due to bug#20447 +myisam_charset : Due to bug#20477 +memory_charset : Due to bug#20447 +ndb_charset : Due to bug#20447 +