Commit 6aa498a2 authored by unknown's avatar unknown

Merge work:/home/bk/mysql

into evoq.home.mwagner.org:/home/mwagner/work/bk/mysql
parents dc0f4733 cf22d655
......@@ -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");
......
......@@ -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
......
......@@ -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
......
......@@ -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) \
......
......@@ -69,8 +69,8 @@ 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
......
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment