summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-12-16 23:41:45 +0200
committerunknown <monty@donna.mysql.com>2000-12-16 23:41:45 +0200
commit289de3ff9d278a61e28d854b9010cc7967b9dc11 (patch)
treea884910ed118d34b9de837e52be9e458c4b8619d
parent77a3ea5103f73aac2e3c8868abb2c93c8d01184b (diff)
downloadmariadb-git-289de3ff9d278a61e28d854b9010cc7967b9dc11.tar.gz
Fixed error when copying mysqld_multi
Fixes for mysql-test Fixed race condition in SHOW LOGS BUILD/compile-solaris-sparc: cleanup Build-tools/Do-compile: Fixed problem Makefile.am: Merged tests with benchmarks configure.in: Fix for Solaris 2.8 scripts/Makefile.am: Fixed error when copying mysqld_multi scripts/make_binary_distribution.sh: Fixes for mysql-test sql/ha_berkeley.cc: Fixed race condition in SHOW LOGS sql/mysqld.cc: Fixed bug in networking
-rwxr-xr-xBUILD/compile-solaris-sparc2
-rwxr-xr-xBuild-tools/Do-compile2
-rw-r--r--Makefile.am2
-rw-r--r--configure.in18
-rw-r--r--scripts/Makefile.am2
-rw-r--r--scripts/make_binary_distribution.sh6
-rw-r--r--sql/ha_berkeley.cc35
-rw-r--r--sql/mysqld.cc2
8 files changed, 44 insertions, 25 deletions
diff --git a/BUILD/compile-solaris-sparc b/BUILD/compile-solaris-sparc
index 0cfa8a4ecd0..d234fb2ab9c 100755
--- a/BUILD/compile-solaris-sparc
+++ b/BUILD/compile-solaris-sparc
@@ -5,5 +5,5 @@ aclocal; autoheader; aclocal; automake; autoconf
CFLAGS="-O6 -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -fomit-frame-pointer -f
elide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/m
-ysql --with-extra-charsets=complex
+ysql --with-extra-charsets=complex
gmake
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile
index 527cd5becde..d62fe95f1ea 100755
--- a/Build-tools/Do-compile
+++ b/Build-tools/Do-compile
@@ -61,7 +61,7 @@ if ($opt_stage == 0)
log_system("$host/bin/mysqladmin --no-defaults -u root -S $mysql_unix_port -s shutdown");
}
system("touch $host/mysql-fix-for-glob");
- rm_all(<$host/mysql-*>);
+ rm_all(<$host/mysql-3*>);
rm_all("$host/test");
system("mkdir $host") if (! -d $host);
system("mkdir $host/test") if (! -d "$host/test");
diff --git a/Makefile.am b/Makefile.am
index d5924439e7c..cc8a387ca4f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,7 +24,7 @@ EXTRA_DIST = INSTALL-SOURCE README \
SUBDIRS = include @docs_dirs@ @readline_dir@ \
@thread_dirs@ @sql_client_dirs@ \
@sql_server_dirs@ scripts tests man \
- @bench_dirs@ support-files mysql-test
+ @bench_dirs@ support-files
# Relink after clean
CLEANFILES = linked_client_sources linked_server_sources linked_libmysql_sources linked_libmysql_r_sources linked_include_sources
diff --git a/configure.in b/configure.in
index 5cf616d95eb..00f8644f269 100644
--- a/configure.in
+++ b/configure.in
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
-AM_INIT_AUTOMAKE(mysql, 3.23.29-gamma)
+AM_INIT_AUTOMAKE(mysql, 3.23.29a-gamma)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
@@ -637,6 +637,20 @@ case $SYSTEM_TYPE in
CFLAGS="$CFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T"
CXXFLAGS="$CXXFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T"
;;
+ *solaris2.8*)
+ # Solaris 2.8 has a broken /usr/include/widec.h
+ # Make a fixed copy in ./include
+ echo "Fixing broken include files for $SYSTEM_TYPE"
+ echo " - Creating local copy of widec.h"
+ if test ! -d include
+ then
+ mkdir ./include
+ fi
+ builddir=`pwd`
+ sed -e "s|^#if[ ]*!defined(__lint)|#if !defined\(__lint\) \&\& !defined\(getwc\)|" < /usr/include/widec.h > include/widec.h
+ CFLAGS="$CFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T"
+ CXXFLAGS="$CXXFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T"
+ ;;
*solaris2.5.1*)
echo "Enabling getpass() workaround for Solaris 2.5.1"
CFLAGS="$CFLAGS -DHAVE_BROKEN_GETPASS -DSOLARIS -DHAVE_RWLOCK_T";
@@ -1514,7 +1528,7 @@ AC_ARG_WITH(bench,
if test "$with_bench" = "yes"
then
- bench_dirs="sql-bench"
+ bench_dirs="sql-bench mysql-test"
else
bench_dirs=""
fi
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index cced1944d9e..5b3347081c4 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -43,7 +43,7 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \
mysql_find_rows.sh \
mysqlhotcopy.sh \
mysqldumpslow.sh \
- mysqld_multi \
+ mysqld_multi.sh \
safe_mysqld.sh
EXTRA_DIST = $(EXTRA_SCRIPTS) \
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 9c79ecea735..0065fdc6208 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -69,11 +69,11 @@ cp -r -p sql/share/* $BASE/share/mysql
rm -f $BASE/share/mysql/Makefile* $BASE/share/mysql/*/*.OLD
rm -rf $BASE/share/SCCS $BASE/share/*/SCCS
-cp -p mysql-test/mysql-test-run mysql-test/install_test_db $BASE/scripts
-cp -p mysql-test/README $BASE/README
+cp -p mysql-test/mysql-test-run mysql-test/install_test_db $BASE/mysql-test/
+cp -p mysql-test/README $BASE/mysql-test/README
cp -p mysql-test/include/*.inc $BASE/mysql-test/include
cp -p mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
- mysql-test/std_data/*.MRG $BASE/mysql-test/std_data
+ mysql-test/std_data/*.MRG $BASE/mysql-test/std_data
cp -p mysql-test/t/*.test mysql-test/t/*.opt $BASE/mysql-test/t
cp -p mysql-test/r/*.result $BASE/mysql-test/r
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc
index 1a29de32ed4..bd2e4ee9272 100644
--- a/sql/ha_berkeley.cc
+++ b/sql/ha_berkeley.cc
@@ -93,7 +93,6 @@ u_int32_t berkeley_lock_types[]=
{ DB_LOCK_DEFAULT, DB_LOCK_OLDEST, DB_LOCK_RANDOM };
TYPELIB berkeley_lock_typelib= {array_elements(berkeley_lock_names),"",
berkeley_lock_names};
-static MEM_ROOT show_logs_root;
static void berkeley_print_error(const char *db_errpfx, char *buffer);
static byte* bdb_get_key(BDB_SHARE *share,uint *length,
@@ -211,45 +210,51 @@ int berkeley_rollback(THD *thd, void *trans)
DBUG_RETURN(error);
}
-static void *show_logs_alloc(size_t size)
-{
- return alloc_root(&show_logs_root, size);
-}
int berkeley_show_logs(THD *thd)
{
- char **all_logs, **free_logs;
+ char **all_logs, **free_logs, **a, **f;
String *packet= &thd->packet;
- int error;
+ int error=1;
+ MEM_ROOT show_logs_root;
+ MEM_ROOT *old_root=my_pthread_getspecific_ptr(MEM_ROOT*,THR_MALLOC);
DBUG_ENTER("berkeley_show_logs");
init_alloc_root(&show_logs_root, 1024, 1024);
- if ((error= log_archive(db_env, &all_logs, DB_ARCH_ABS|DB_ARCH_LOG, show_logs_alloc)) ||
- (error= log_archive(db_env, &free_logs, DB_ARCH_ABS, show_logs_alloc)))
+ my_pthread_setspecific_ptr(THR_MALLOC,&show_logs_root);
+
+ if ((error= log_archive(db_env, &all_logs, DB_ARCH_ABS | DB_ARCH_LOG,
+ (void* (*)(unsigned int)) sql_alloc)) ||
+ (error= log_archive(db_env, &free_logs, DB_ARCH_ABS,
+ (void* (*)(unsigned int)) sql_alloc)))
{
DBUG_PRINT("error", ("log_archive failed (error %d)", error));
db_env->err(db_env, error, "log_archive: DB_ARCH_ABS");
- DBUG_RETURN(1);
+ goto err;
}
- for (char **a = all_logs, **f = free_logs; *a; ++a)
+ for (a = all_logs, f = free_logs; *a; ++a)
{
packet->length(0);
net_store_data(packet,*a);
net_store_data(packet,"BDB");
- if (f && *f && strcmp(*a, *f) == 0)
+ if (*f && strcmp(*a, *f) == 0)
{
- net_store_data(packet, SHOW_LOG_STATUS_FREE);
++f;
+ net_store_data(packet, SHOW_LOG_STATUS_FREE);
}
else
net_store_data(packet, SHOW_LOG_STATUS_INUSE);
if (my_net_write(&thd->net,(char*) packet->ptr(),packet->length()))
- DBUG_RETURN(1); /* purecov: inspected */
+ goto err;
}
+ error=0;
+
+err:
free_root(&show_logs_root,MYF(0));
- DBUG_RETURN(0);
+ my_pthread_setspecific_ptr(THR_MALLOC,old_root);
+ DBUG_RETURN(error);
}
static void berkeley_print_error(const char *db_errpfx, char *buffer)
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 1f93e6baf67..9c47a57b438 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -635,7 +635,7 @@ void clean_up(void)
static void set_ports()
{
char *env;
- if (!mysql_port)
+ if (!mysql_port && !opt_disable_networking)
{ // Get port if not from commandline
struct servent *serv_ptr;
mysql_port = MYSQL_PORT;