From aeddf24a2f100aaef22ec807fce3f11edb9be70b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Jun 2007 14:00:28 +0200 Subject: [PATCH 1/4] configure.in: Added --with-system-type= and --with-machine-type= options, to be able to override the one detected, for --version strings field.cc, field.h, listener.cc: C++ compatibility change for IBM VisualAge 6 and i5/OS configure.in: Added --with-system-type= and --with-machine-type= options, to be able to override the one detected, for --version strings server-tools/instance-manager/listener.cc: C++ compatibility change for IBM VisualAge 6 and i5/OS sql/field.cc: C++ compatibility change for IBM VisualAge 6 and i5/OS sql/field.h: C++ compatibility change for IBM VisualAge 6 and i5/OS --- configure.in | 16 ++++++++++++---- server-tools/instance-manager/listener.cc | 4 +++- sql/field.cc | 1 + sql/field.h | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index e7e9aa58c9b..6cf8dbd4e47 100644 --- a/configure.in +++ b/configure.in @@ -100,14 +100,22 @@ AC_DEFINE_UNQUOTED([NDB_VERSION_STATUS], ["$NDB_VERSION_STATUS"], # Canonicalize the configuration name. -SYSTEM_TYPE="$host_vendor-$host_os" -MACHINE_TYPE="$host_cpu" + +# Check whether --with-system-type or --without-system-type was given. +AC_ARG_WITH(system-type, + [ --with-system-type Set the system type, like "sun-solaris10"], + [SYSTEM_TYPE="$withval"], + [SYSTEM_TYPE="$host_vendor-$host_os"]) +AC_ARG_WITH(machine-type, + [ --with-machine-type Set the machine type, like "powerpc"], + [MACHINE_TYPE="$withval"], + [MACHINE_TYPE="$host_cpu"]) AC_SUBST(SYSTEM_TYPE) AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"], - [Name of system, eg solaris]) + [Name of system, eg sun-solaris]) AC_SUBST(MACHINE_TYPE) AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"], - [Machine type name, eg sun10]) + [Machine type name, eg sparc]) # Detect intel x86 like processor BASE_MACHINE_TYPE=$MACHINE_TYPE diff --git a/server-tools/instance-manager/listener.cc b/server-tools/instance-manager/listener.cc index a055d98656c..a950ecf4ed3 100644 --- a/server-tools/instance-manager/listener.cc +++ b/server-tools/instance-manager/listener.cc @@ -67,7 +67,7 @@ public: ~Listener_thread(); void run(); private: - static const int LISTEN_BACK_LOG_SIZE= 5; /* standard backlog size */ + static const int LISTEN_BACK_LOG_SIZE; ulong total_connection_count; Thread_info thread_info; @@ -80,6 +80,8 @@ private: int create_unix_socket(struct sockaddr_un &unix_socket_address); }; +const int Listener_thread::LISTEN_BACK_LOG_SIZE = 5; /* standard backlog size */ + Listener_thread::Listener_thread(const Listener_thread_args &args) : Listener_thread_args(args.thread_registry, args.options, args.user_map, diff --git a/sql/field.cc b/sql/field.cc index c8c6014b92c..87f1a815e24 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -6267,6 +6267,7 @@ Field *Field_string::new_field(MEM_ROOT *root, struct st_table *new_table, is 2. ****************************************************************************/ +const uint Field_varstring::MAX_SIZE= UINT_MAX16; int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs) { diff --git a/sql/field.h b/sql/field.h index fb6534b7b55..fbf402ab5c3 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1116,7 +1116,7 @@ public: The maximum space available in a Field_varstring, in bytes. See length_bytes. */ - static const uint MAX_SIZE= UINT_MAX16; + static const uint MAX_SIZE; /* Store number of bytes used to store length (1 or 2) */ uint32 length_bytes; Field_varstring(char *ptr_arg, From f8034d36ba5670e72374d61ca4901a71adbd6d9f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Jun 2007 08:58:39 +0200 Subject: [PATCH 2/4] Steal part of fix for bug#25621 from monty for 5.0.44. libmysql/libmysql.c: mysql_server_end() can be called multiple times. --- libmysql/libmysql.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index e426d2c549e..121167763ed 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -168,8 +168,23 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)), } +/* + Free all memory and resources used by the client library + + NOTES + When calling this there should not be any other threads using + the library. + + To make things simpler when used with windows dll's (which calls this + function automaticly), it's safe to call this function multiple times. +*/ + + void STDCALL mysql_server_end() { + if (!mysql_client_init) + return; + #ifdef EMBEDDED_LIBRARY end_embedded_server(); #endif From 3cc57ba65a06e49e975fedf55cf12d2edf2ad646 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 12:51:51 +0100 Subject: [PATCH 3/4] make_binary_distribution.sh: This script incorrectly generates the mysql_install_db file, causing the problems detailed in bug#28585. The automake infrastructure correctly generates the script, so just copy it in place. scripts/make_binary_distribution.sh: This script incorrectly generates the mysql_install_db file, causing the problems detailed in bug#28585. The automake infrastructure correctly generates the script, so just copy it in place. --- scripts/make_binary_distribution.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 77f51c51c19..b0a4f9ec66e 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -314,10 +314,7 @@ fi if [ $BASE_SYSTEM != "netware" ] ; then chmod a+x $BASE/bin/* copyfileto $BASE/bin scripts/* - $BASE/bin/replace \@localstatedir\@ ./data \@bindir\@ ./bin \@scriptdir\@ \ - ./bin \@libexecdir\@ ./bin \@sbindir\@ ./bin \@prefix\@ . \@HOSTNAME\@ \ - @HOSTNAME@ \@pkgdatadir\@ ./support-files \ - < scripts/mysql_install_db.sh > $BASE/scripts/mysql_install_db + copyfileto $BASE/scripts scripts/mysql_install_db $BASE/bin/replace \@prefix\@ /usr/local/mysql \@bindir\@ ./bin \ \@sbindir\@ ./bin \@libexecdir\@ ./bin \ \@MYSQLD_USER\@ @MYSQLD_USER@ \@localstatedir\@ /usr/local/mysql/data \ From cbbd89059604636131cacb7528094050bba932aa Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Jul 2007 15:08:21 +0200 Subject: [PATCH 4/4] revert previous patch --- scripts/make_binary_distribution.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index b0a4f9ec66e..77f51c51c19 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -314,7 +314,10 @@ fi if [ $BASE_SYSTEM != "netware" ] ; then chmod a+x $BASE/bin/* copyfileto $BASE/bin scripts/* - copyfileto $BASE/scripts scripts/mysql_install_db + $BASE/bin/replace \@localstatedir\@ ./data \@bindir\@ ./bin \@scriptdir\@ \ + ./bin \@libexecdir\@ ./bin \@sbindir\@ ./bin \@prefix\@ . \@HOSTNAME\@ \ + @HOSTNAME@ \@pkgdatadir\@ ./support-files \ + < scripts/mysql_install_db.sh > $BASE/scripts/mysql_install_db $BASE/bin/replace \@prefix\@ /usr/local/mysql \@bindir\@ ./bin \ \@sbindir\@ ./bin \@libexecdir\@ ./bin \ \@MYSQLD_USER\@ @MYSQLD_USER@ \@localstatedir\@ /usr/local/mysql/data \