Commit ea46c242 authored by greg@mysql.com[greg]'s avatar greg@mysql.com[greg]

rlyon-5.0.0-alpha.patch

parent 4523a7b1
...@@ -2780,6 +2780,7 @@ void tee_fprintf(FILE *file, const char *fmt, ...) ...@@ -2780,6 +2780,7 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
{ {
va_list args; va_list args;
NETWARE_YIELD
va_start(args, fmt); va_start(args, fmt);
(void) vfprintf(file, fmt, args); (void) vfprintf(file, fmt, args);
#ifdef OS2 #ifdef OS2
...@@ -2793,6 +2794,7 @@ void tee_fprintf(FILE *file, const char *fmt, ...) ...@@ -2793,6 +2794,7 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
void tee_fputs(const char *s, FILE *file) void tee_fputs(const char *s, FILE *file)
{ {
NETWARE_YIELD
fputs(s, file); fputs(s, file);
#ifdef OS2 #ifdef OS2
fflush( file); fflush( file);
...@@ -2804,6 +2806,7 @@ void tee_fputs(const char *s, FILE *file) ...@@ -2804,6 +2806,7 @@ void tee_fputs(const char *s, FILE *file)
void tee_puts(const char *s, FILE *file) void tee_puts(const char *s, FILE *file)
{ {
NETWARE_YIELD
fputs(s, file); fputs(s, file);
fputs("\n", file); fputs("\n", file);
#ifdef OS2 #ifdef OS2
......
...@@ -36,7 +36,7 @@ for i in $AVAILABLE_LANGUAGES ...@@ -36,7 +36,7 @@ for i in $AVAILABLE_LANGUAGES
do do
AVAILABLE_LANGUAGES_ERRORS="$AVAILABLE_LANGUAGES_ERRORS $i/errmsg.sys" AVAILABLE_LANGUAGES_ERRORS="$AVAILABLE_LANGUAGES_ERRORS $i/errmsg.sys"
case $host_os in case $host_os in
netware* | modesto*) netware*)
echo "$i/errmsg.sys: $i/errmsg.txt echo "$i/errmsg.sys: $i/errmsg.txt
\$(top_builddir)/extra/comp_err.linux \$^ $i/errmsg.sys" \ \$(top_builddir)/extra/comp_err.linux \$^ $i/errmsg.sys" \
>> $AVAILABLE_LANGUAGES_ERRORS_RULES >> $AVAILABLE_LANGUAGES_ERRORS_RULES
...@@ -458,7 +458,7 @@ else ...@@ -458,7 +458,7 @@ else
*cygwin*) *cygwin*)
FIND_PROC="$PS -e | grep mysqld | grep \" \$\$PID \" > /dev/null" FIND_PROC="$PS -e | grep mysqld | grep \" \$\$PID \" > /dev/null"
;; ;;
*netware* | *modesto*) *netware*)
FIND_PROC= FIND_PROC=
;; ;;
*) *)
...@@ -1533,7 +1533,7 @@ AC_SUBST(LIBDL) ...@@ -1533,7 +1533,7 @@ AC_SUBST(LIBDL)
# System characteristics # System characteristics
case $SYSTEM_TYPE in case $SYSTEM_TYPE in
*netware* | *modesto*) ;; *netware*) ;;
*) *)
AC_SYS_RESTARTABLE_SYSCALLS AC_SYS_RESTARTABLE_SYSCALLS
;; ;;
...@@ -1563,10 +1563,12 @@ else ...@@ -1563,10 +1563,12 @@ else
fi fi
if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then
DEBUG_CFLAGS="$DEBUG_CFLAGS -DDEBUG -sym internal,codeview4" DEBUG_CFLAGS="-g -DDEBUG -sym internal,codeview4"
DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -DDEBUG -sym internal,codeview4" DEBUG_CXXFLAGS="-g -DDEBUG -sym internal,codeview4"
OPTIMIZE_CFLAGS="$OPTIMIZE_CFLAGS -DNDEBUG" DEBUG_OPTIMIZE_CC="-DDEBUG"
OPTIMIZE_CXXFLAGS="$OPTIMIZE_CXXFLAGS -DNDEBUG" DEBUG_OPTIMIZE_CXX="-DDEBUG"
OPTIMIZE_CFLAGS="-O3 -DNDEBUG"
OPTIMIZE_CXXFLAGS="-O3 -DNDEBUG"
fi fi
AC_ARG_WITH(debug, AC_ARG_WITH(debug,
...@@ -2661,6 +2663,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl ...@@ -2661,6 +2663,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
include/Makefile sql-bench/Makefile tools/Makefile dnl include/Makefile sql-bench/Makefile tools/Makefile dnl
tests/Makefile Docs/Makefile support-files/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl
support-files/MacOSX/Makefile mysql-test/Makefile dnl support-files/MacOSX/Makefile mysql-test/Makefile dnl
netware/Makefile dnl
include/mysql_version.h dnl include/mysql_version.h dnl
, , [ , , [
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
......
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Defines for netware compatible with MySQL */ /* Header for NetWare compatible with MySQL */
#ifndef _config_netware_h
#define _config_netware_h
/* required headers */ /* required headers */
#include <unistd.h> #include <unistd.h>
...@@ -32,6 +35,10 @@ ...@@ -32,6 +35,10 @@
#include <pthread.h> #include <pthread.h>
#include <termios.h> #include <termios.h>
#ifdef __cplusplus
extern "C" {
#endif
/* required adjustments */ /* required adjustments */
#undef HAVE_READDIR_R #undef HAVE_READDIR_R
#undef HAVE_RWLOCK_INIT #undef HAVE_RWLOCK_INIT
...@@ -80,6 +87,15 @@ ...@@ -80,6 +87,15 @@
/* do not use the extended time in LibC sys\stat.h */ /* do not use the extended time in LibC sys\stat.h */
#define _POSIX_SOURCE #define _POSIX_SOURCE
/* Some macros for portability */ /* kernal call on NetWare that will only yield if our time slice is up */
void kYieldIfTimeSliceUp(void);
/* some macros for portability */
#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=(SEC); (ABSTIME).tv_nsec=0; } #define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=(SEC); (ABSTIME).tv_nsec=0; }
#ifdef __cplusplus
}
#endif
#endif /* _config_netware_h */
...@@ -69,6 +69,13 @@ ...@@ -69,6 +69,13 @@
#endif #endif
#endif /* _WIN32... */ #endif /* _WIN32... */
/* extra protection against CPU Hogs on NetWare */
#ifdef __NETWARE__
#define NETWARE_YIELD { kYieldIfTimeSliceUp(); }
#else
#define NETWARE_YIELD { }
#endif
/* /*
The macros below are borrowed from include/linux/compiler.h in the The macros below are borrowed from include/linux/compiler.h in the
Linux kernel. Use them to indicate the likelyhood of the truthfulness Linux kernel. Use them to indicate the likelyhood of the truthfulness
......
...@@ -248,6 +248,11 @@ extern int my_sigwait(const sigset_t *set,int *sig); ...@@ -248,6 +248,11 @@ extern int my_sigwait(const sigset_t *set,int *sig);
#error Requires at least rev 2 of EMX pthreads library. #error Requires at least rev 2 of EMX pthreads library.
#endif #endif
#ifdef __NETWARE__
void my_pthread_exit(void *status);
#define pthread_exit(A) my_pthread_exit(A)
#endif
extern int my_pthread_getprio(pthread_t thread_id); extern int my_pthread_getprio(pthread_t thread_id);
#define pthread_key(T,V) pthread_key_t V #define pthread_key(T,V) pthread_key_t V
......
...@@ -90,6 +90,29 @@ void *my_pthread_getspecific_imp(pthread_key_t key) ...@@ -90,6 +90,29 @@ void *my_pthread_getspecific_imp(pthread_key_t key)
} }
#endif #endif
#ifdef __NETWARE__
/*
don't kill the LibC Reaper thread or the main thread
*/
#include <nks/thread.h>
void my_pthread_exit(void *status)
{
#undef pthread_exit
NXThreadId_t tid = NXThreadGetId();
NXContext_t ctx;
char name[PATH_MAX] = "";
NXThreadGetContext(tid, &ctx);
NXContextGetName(ctx, name, PATH_MAX);
// "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread"
// with a debug build of LibC the reaper can have different names
if (!strindex(name, "\'s"))
{
pthread_exit(status);
}
}
#endif
/* Some functions for RTS threads, AIX, Siemens Unix and UnixWare 7 /* Some functions for RTS threads, AIX, Siemens Unix and UnixWare 7
(and DEC OSF/1 3.2 too) */ (and DEC OSF/1 3.2 too) */
......
#! /bin/sh #! /bin/sh
# debug
#set -x
# stop on errors
set -e
for package in . ./innobase for package in . ./innobase
do do
(cd $package (cd $package
......
#! /bin/sh #! /bin/sh
#debug # debug
#set -x #set -x
# stop on errors
set -e
if test ! -r ./sql/mysqld.cc if test ! -r ./sql/mysqld.cc
then then
echo "you must start from the top source directory" echo "you must start from the top source directory"
......
#! /bin/sh #! /bin/sh
# debug
#set -x
# stop on errors
set -e
path=`dirname $0` path=`dirname $0`
# clean # clean
...@@ -23,7 +29,7 @@ rm -rf Makefile.in.bk ...@@ -23,7 +29,7 @@ rm -rf Makefile.in.bk
make clean bin-dist make clean bin-dist
# mark the build # mark the build
for file in *.tar.gz for file in *.tar.gz *.zip
do do
if (expr "$file" : "mysql-[1-9].*" > /dev/null) if (expr "$file" : "mysql-[1-9].*" > /dev/null)
then then
......
#! /bin/sh #! /bin/sh
#debug # debug
#set -x #set -x
# stop on errors
set -e
if test ! -r ./sql/mysqld.cc if test ! -r ./sql/mysqld.cc
then then
echo "you must start from the top source directory" echo "you must start from the top source directory"
......
#! /bin/sh #! /bin/sh
# debug
#set -x
# stop on errors
set -e
path=`dirname $0` path=`dirname $0`
$path/compile-netware-src
$path/compile-netware-standard $path/compile-netware-standard
$path/compile-netware-debug $path/compile-netware-debug
#$path/compile-netware-max #$path/compile-netware-max
......
#! /bin/sh #! /bin/sh
# debug
#set -x
# stop on errors
set -e
path=`dirname $0` path=`dirname $0`
. $path/compile-netware-START . $path/compile-netware-START
......
#! /bin/sh
# debug
#set -x
# stop on errors
set -e
if test ! -r ./sql/mysqld.cc
then
echo "you must start from the top source directory"
exit 1
fi
path=`dirname $0`
# clean
if test -e "Makefile"; then
make -k clean;
make -k distclean;
fi
# remove other files
rm -f NEW-RPMS/*
rm -f */.deps/*.P
rm -rf Makefile.in.bk
# zip source
files=`pwd | sed -e "s/.*\\\(mysql-.*\)/\1/"`
file=`pwd | sed -e "s/.*\\mysql-\(.*\)/mysql-src-\1-pc-netware-i686/"`
cd ..
if test -e "$file.zip"; then rm -f $file.zip; fi
zip -r $file.zip $files -x \*.zip -x \*.tar.gz
if test -e "./$files/$file.zip"; then mv -f ./$files/$file.zip ./$files/$file.zip.old; fi
mv -f $file.zip ./$files/$file.zip
#! /bin/sh #! /bin/sh
# debug
#set -x
# stop on errors
set -e
path=`dirname $0` path=`dirname $0`
. $path/compile-netware-START . $path/compile-netware-START
suffix="standard" suffix="standard"
extra_configs=" \ extra_configs=" \
--with-innodb --with-innodb \
" "
. $path/compile-netware-END . $path/compile-netware-END
......
#! /bin/sh
# debug
#set -x
# stop on errors
set -e
# repository direcotry
repo_dir=`pwd`
# show usage
show_usage()
{
cat << EOF
usage: cron-patch
EOF
exit 0;
}
echo "starting build..."
# check for bk and repo_dir
bk help > /dev/null
repo_dir=`bk root $repo_dir`
cd $repo_dir
# pull latest code
echo 'y' | bk pull
# determine version
version=`grep -e "AM_INIT_AUTOMAKE(mysql, .*)" < configure.in | sed -e "s/AM_INIT_AUTOMAKE(mysql, \(.*\))/\1/"`
echo "version: $version"
# latest revision
rev=`bk changes -e -n -d':REV:' | head -1`
echo "latest revision: $rev"
# run bootstrap
./netware/BUILD/nwbootstrap --revision=$rev --suffix=$rev --build=all
echo "done"
00 23 * * * (export PATH='/usr/local/bin:/usr/bin:/bin'; export DISPLAY=':0'; cd ~/bk/mysqldoc; echo 'y' | bk pull)
00 00 * * * (export PATH='/usr/local/bin:/usr/bin:/bin'; export DISPLAY=':0'; cd ~/bk/mysql-4.0; ./netware/BUILD/cron-build)
00 04 * * * (export PATH='/usr/local/bin:/usr/bin:/bin'; export DISPLAY=':0'; cd ~/bk/mysql-4.1; ./netware/BUILD/cron-build)
kYieldIfTimeSliceUp
#! /bin/sh #! /bin/sh
# stop on errors
set -e
args=" $*" args=" $*"
wine --debugmsg -all -- mwasmnlm $args wine --debugmsg -all -- mwasmnlm $args
#! /bin/sh #! /bin/sh
# stop on errors
set -e
# mwccnlm is having a hard time understanding "-I./../include" # mwccnlm is having a hard time understanding "-I./../include"
# convert it to "-I../include" # convert it to "-I../include"
args=" "`echo $* | sed -e 's/-I.\/../-I../g'` args=" "`echo $* | sed -e 's/-I.\/../-I../g'`
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
export MYDEV="WINE_BUILD_DIR" export MYDEV="WINE_BUILD_DIR"
export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV/zlib-1.1.4" export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV/zlib-1.1.4"
export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/zlib-1.1.4" export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/mysql-VERSION/netware/BUILD;$MYDEV/zlib-1.1.4"
export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;libz.a" export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;knetware.imp;libz.a"
export WINEPATH="$MYDEV/mw/bin" export WINEPATH="$MYDEV/mw/bin"
...@@ -19,9 +19,9 @@ export AR='mwldnlm' ...@@ -19,9 +19,9 @@ export AR='mwldnlm'
export AR_FLAGS='-type library -o' export AR_FLAGS='-type library -o'
export AS='mwasmnlm' export AS='mwasmnlm'
export CC='mwccnlm -gccincludes' export CC='mwccnlm -gccincludes'
export CFLAGS='-dialect c -proc 686 -relax_pointers' export CFLAGS='-align 8 -proc 686 -relax_pointers -dialect c'
export CXX='mwccnlm -gccincludes' export CXX='mwccnlm -gccincludes'
export CXXFLAGS='-dialect c++ -proc 686 -bool on -wchar_t on -relax_pointers -D_WCHAR_T' export CXXFLAGS='-align 8 -proc 686 -relax_pointers -dialect c++ -bool on -wchar_t on -D_WCHAR_T'
export LD='mwldnlm' export LD='mwldnlm'
export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption' export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption'
export RANLIB=: export RANLIB=:
......
#! /bin/sh #! /bin/sh
# stop on errors
set -e
args=" $*" args=" $*"
wine --debugmsg -all -- mwldnlm $args wine --debugmsg -all -- mwldnlm $args
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
# debug # debug
#set -x #set -x
path=`dirname $0`
# stop on errors # stop on errors
set -e set -e
path=`dirname $0`
# repository direcotry # repository direcotry
repo_dir=`pwd` repo_dir=`pwd`
...@@ -24,6 +24,7 @@ temp_dir="" ...@@ -24,6 +24,7 @@ temp_dir=""
revision="" revision=""
rev="" rev=""
build="" build=""
suffix=""
mwenv="" mwenv=""
# show usage # show usage
...@@ -81,6 +82,7 @@ for arg do ...@@ -81,6 +82,7 @@ for arg do
--wine-build-dir=*) wine_build_dir=`echo "$arg" | sed -e "s;--wine-build-dir=;;"` ;; --wine-build-dir=*) wine_build_dir=`echo "$arg" | sed -e "s;--wine-build-dir=;;"` ;;
--revision=*) revision=`echo "$arg" | sed -e "s;--revision=;;"` ;; --revision=*) revision=`echo "$arg" | sed -e "s;--revision=;;"` ;;
--build=*) build=`echo "$arg" | sed -e "s;--build=;;"` ;; --build=*) build=`echo "$arg" | sed -e "s;--build=;;"` ;;
--suffix=*) suffix=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
--doc-dir=*) doc_dir=`echo "$arg" | sed -e "s;--doc-dir=;;"` ;; --doc-dir=*) doc_dir=`echo "$arg" | sed -e "s;--doc-dir=;;"` ;;
*) show_usage ;; *) show_usage ;;
esac esac
...@@ -111,6 +113,12 @@ echo "version: $version" ...@@ -111,6 +113,12 @@ echo "version: $version"
# build target directory # build target directory
target_dir="$build_dir/mysql-$version" target_dir="$build_dir/mysql-$version"
# add suffix
if test $suffix
then
target_dir="$target_dir-$suffix"
fi
# delete any old target # delete any old target
if test -d $target_dir.old; then rm -rf $target_dir.old; fi if test -d $target_dir.old; then rm -rf $target_dir.old; fi
...@@ -139,10 +147,12 @@ then ...@@ -139,10 +147,12 @@ then
fi fi
# make files writeable # make files writeable
echo "making files writable..."
cd $target_dir cd $target_dir
chmod -R u+rw,g+rw . chmod -R u+rw,g+rw .
# edit the mvenv file # edit the mvenv file
echo "updating the mwenv environment file..."
mwenv="./netware/BUILD/mwenv" mwenv="./netware/BUILD/mwenv"
mv -f $mwenv $mwenv.org mv -f $mwenv $mwenv.org
sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \ sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \
...@@ -150,6 +160,17 @@ sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \ ...@@ -150,6 +160,17 @@ sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \
-e "s;VERSION;$version;g" $mwenv.org > $mwenv -e "s;VERSION;$version;g" $mwenv.org > $mwenv
chmod +rwx $mwenv chmod +rwx $mwenv
#edit the def file versions
echo "updating *.def file versions..."
nlm_version=`echo "$version" | sed -e "s;\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*;\1, \2, \3;"`
for file in ./netware/*.def
do
mv -f $file $file.org
sed -e "s;VERSION.*;VERSION $nlm_version;g" $file.org > $file
rm $file.org
done
# build linux tools # build linux tools
echo "compiling linux tools..." echo "compiling linux tools..."
./netware/BUILD/compile-linux-tools ./netware/BUILD/compile-linux-tools
......
...@@ -14,35 +14,34 @@ ...@@ -14,35 +14,34 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES = -I$(srcdir)/../include -I../include -I.. INCLUDES= -I$(srcdir)/../include -I../include -I..
bin_PROGRAMS = mysqld_safe mysql_install_db mysql_test_run libmysql bin_PROGRAMS= mysqld_safe mysql_install_db mysql_test_run libmysql
mysqld_safe_SOURCES= mysqld_safe.c my_manage.c mysqld_safe_SOURCES= mysqld_safe.c my_manage.c
mysql_install_db_SOURCES= mysql_install_db.c my_manage.c mysql_install_db_SOURCES= mysql_install_db.c my_manage.c
mysql_test_run_SOURCES= mysql_test_run.c my_manage.c mysql_test_run_SOURCES= mysql_test_run.c my_manage.c
libmysql_SOURCES= libmysqlmain.c libmysql_SOURCES= libmysqlmain.c
libmysql_LDADD = ../libmysql/.libs/libmysqlclient.a libmysql_LDADD= ../libmysql/.libs/libmysqlclient.a
netware_build_files = client/mysql.def client/mysqladmin.def \ netware_build_files = client/mysql.def client/mysqladmin.def \
client/mysqlbinlog.def client/mysqlcheck.def \ client/mysqlbinlog.def client/mysqlcheck.def \
client/mysqldump.def client/mysqlimport.def \ client/mysqldump.def client/mysqlimport.def \
client/mysqlshow.def client/mysqltest.def \ client/mysqlshow.def client/mysqltest.def \
extra/mysql_install.def extra/my_print_defaults.def \ extra/mysql_install.def extra/my_print_defaults.def \
extra/perror.def extra/replace.def \ extra/perror.def extra/replace.def \
extra/resolveip.def extra/comp_err.def \ extra/resolveip.def extra/comp_err.def \
isam/isamchk.def \ isam/isamchk.def \
isam/isamlog.def isam/pack_isam.def \ isam/isamlog.def isam/pack_isam.def \
libmysqld/libmysqld.def myisam/myisamchk.def \ libmysqld/libmysqld.def myisam/myisamchk.def \
myisam/myisamlog.def myisam/myisampack.def \ myisam/myisamlog.def myisam/myisampack.def \
sql/mysqld.def sql/mysqld.def
link_sources: link_sources:
set -x; \ set -x; \
for f in $(netware_build_files); do \ for f in $(netware_build_files); do \
rm -f $(srcdir)/../$$f; \ rm -f $(srcdir)/../$$f; \
org=`echo $$f | sed -e 's/.*\/\(.*\)/\1/g'`; \ org=`echo $$f | sed -e 's/.*\/\(.*\)/\1/g'`; \
@LN_CP_F@ $(srcdir)/$$org $(srcdir)/../$$f; \ @LN_CP_F@ $(srcdir)/$$org $(srcdir)/../$$f; \
done; done;
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
...@@ -266,6 +266,7 @@ void start_master() ...@@ -266,6 +266,7 @@ void start_master()
int err, i; int err, i;
char master_out[PATH_MAX]; char master_out[PATH_MAX];
char master_err[PATH_MAX]; char master_err[PATH_MAX];
char temp[PATH_MAX];
// remove old berkeley db log files that can confuse the server // remove old berkeley db log files that can confuse the server
removef("%s/log.*", master_dir); removef("%s/log.*", master_dir);
...@@ -289,6 +290,20 @@ void start_master() ...@@ -289,6 +290,20 @@ void start_master()
if (master_init_script[0] != NULL) if (master_init_script[0] != NULL)
{ {
// run_init_script(master_init_script); // run_init_script(master_init_script);
// TODO: use the scripts
if (strindex(master_init_script, "repair_part2-master.sh") != NULL)
{
FILE *fp;
// create an empty index file
snprintf(temp, PATH_MAX, "%s/test/t1.MYI", master_dir);
fp = fopen(temp, "wb+");
fputs("1", fp);
fclose(fp);
}
} }
// redirection files // redirection files
......
...@@ -73,9 +73,25 @@ if [ $BASE_SYSTEM != "netware" ] ; then ...@@ -73,9 +73,25 @@ if [ $BASE_SYSTEM != "netware" ] ; then
chmod o-rwx $BASE/data $BASE/data/* chmod o-rwx $BASE/data $BASE/data/*
fi fi
for i in ChangeLog COPYING COPYING.LIB README Docs/INSTALL-BINARY \ # Non platform-specific doc files:
MySQLEULA.txt Docs/manual.html Docs/manual.txt Docs/manual_toc.html \ DOC_FILES=" \
LICENSE.doc README.NW Docs/mysqlbug.txt ChangeLog COPYING COPYING.LIB README \
Docs/manual.html Docs/manual.txt Docs/manual_toc.html \
Docs/mysqlbug.txt \
";
# Platform-specific doc files:
if [ $BASE_SYSTEM = "netware" ] ; then
DOC_FILES="$DOC_FILES \
";
# For all other platforms:
else
DOC_FILES="$DOC_FILES \
Docs/INSTALL-BINARY MySQLEULA.txt \
";
fi
for i in $DOC_FILES
do do
if [ -f $i ] if [ -f $i ]
then then
...@@ -83,7 +99,7 @@ do ...@@ -83,7 +99,7 @@ do
fi fi
done done
# Non platform-specific bin dir files: # Non platform-specific bin files:
BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
extra/resolveip$BS extra/my_print_defaults$BS \ extra/resolveip$BS extra/my_print_defaults$BS \
extra/resolve_stack_dump$BS extra/mysql_waitpid$BS \ extra/resolve_stack_dump$BS extra/mysql_waitpid$BS \
...@@ -93,18 +109,18 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \ ...@@ -93,18 +109,18 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
client/mysql$BS client/mysqlshow$BS client/mysqladmin$BS \ client/mysql$BS client/mysqlshow$BS client/mysqladmin$BS \
client/mysqldump$BS client/mysqlimport$BS \ client/mysqldump$BS client/mysqlimport$BS \
client/mysqltest$BS client/mysqlcheck$BS \ client/mysqltest$BS client/mysqlcheck$BS \
client/mysqlbinlog$BS client/mysqlbinlog$BS \
"; ";
# Platform-specific bin dir files: # Platform-specific bin files:
if [ $BASE_SYSTEM = "netware" ] ; then if [ $BASE_SYSTEM = "netware" ] ; then
BIN_FILES="$BIN_FILES \ BIN_FILES="$BIN_FILES \
netware/mysqld_safe$BS netware/mysql_install_db$BS \ netware/mysqld_safe$BS netware/mysql_install_db$BS \
netware/init_db.sql netware/test_db.sql netware/mysql_explain_log$BS \ netware/init_db.sql netware/test_db.sql netware/mysql_explain_log$BS \
netware/mysqlhotcopy$BS netware/libmysql$BS netware/init_secure_db.sql netware/mysqlhotcopy$BS netware/libmysql$BS netware/init_secure_db.sql \
"; ";
# For all other platforms:
else else
# For all other platforms:
BIN_FILES="$BIN_FILES \ BIN_FILES="$BIN_FILES \
client/mysqlmanagerc \ client/mysqlmanagerc \
client/mysqlmanager-pwgen tools/mysqlmanager \ client/mysqlmanager-pwgen tools/mysqlmanager \
...@@ -224,7 +240,9 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_ ...@@ -224,7 +240,9 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_
# Make safe_mysqld a symlink to mysqld_safe for backwards portability # Make safe_mysqld a symlink to mysqld_safe for backwards portability
# To be removed in MySQL 4.1 # To be removed in MySQL 4.1
(cd $BASE/bin ; ln -s mysqld_safe safe_mysqld ) if [ $BASE_SYSTEM != "netware" ] ; then
(cd $BASE/bin ; ln -s mysqld_safe safe_mysqld )
fi
# Clean up if we did this from a bk tree # Clean up if we did this from a bk tree
if [ -d $BASE/sql-bench/SCCS ] ; then if [ -d $BASE/sql-bench/SCCS ] ; then
...@@ -283,29 +301,48 @@ which_1 () ...@@ -283,29 +301,48 @@ which_1 ()
exit 1 exit 1
} }
#
# Create the result tar file
#
tar=`which_1 gnutar gtar`
if test "$?" = "1" -o "$tar" = ""
then
tar=tar
fi
echo "Using $tar to create archive"
cd $TMP cd $TMP
if [ $BASE_SYSTEM = "netware" ] ; then
#
# Create a zip file for NetWare users
#
if test -e "$SOURCE/$NEW_NAME.zip"; then rm $SOURCE/$NEW_NAME.zip; fi
zip -r $SOURCE/$NEW_NAME.zip $NEW_NAME
echo "$NEW_NAME.zip created"
else
#
# Create the result tar file
#
tar=`which_1 gnutar gtar`
if test "$?" = "1" -o "$tar" = ""
then
tar=tar
fi
echo "Using $tar to create archive"
OPT=cvf
if [ x$SILENT = x1 ] ; then
OPT=cf
fi
$tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME
cd $SOURCE
echo "Compressing archive"
gzip -9 $NEW_NAME.tar
echo "$NEW_NAME.tar.gz created"
OPT=cvf
if [ x$SILENT = x1 ] ; then
OPT=cf
fi fi
$tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME
cd $SOURCE
echo "Compressing archive"
gzip -9 $NEW_NAME.tar
echo "Removing temporary directory" echo "Removing temporary directory"
rm -r -f $BASE rm -r -f $BASE
echo "$NEW_NAME.tar.gz created"
...@@ -825,11 +825,12 @@ static void __cdecl kill_server(int sig_ptr) ...@@ -825,11 +825,12 @@ static void __cdecl kill_server(int sig_ptr)
unireg_abort(1); /* purecov: inspected */ unireg_abort(1); /* purecov: inspected */
else else
unireg_end(); unireg_end();
#ifdef __NETWARE__ #ifdef __NETWARE__
pthread_join(select_thread, NULL); // wait for main thread pthread_join(select_thread, NULL); // wait for main thread
#else
pthread_exit(0); /* purecov: deadcode */
#endif /* __NETWARE__ */ #endif /* __NETWARE__ */
pthread_exit(0); /* purecov: deadcode */
#endif /* EMBEDDED_LIBRARY */ #endif /* EMBEDDED_LIBRARY */
RETURN_FROM_KILL_SERVER; RETURN_FROM_KILL_SERVER;
...@@ -887,13 +888,11 @@ void unireg_end(void) ...@@ -887,13 +888,11 @@ void unireg_end(void)
{ {
clean_up(1); clean_up(1);
my_thread_end(); my_thread_end();
#ifndef __NETWARE__ #if defined(SIGNALS_DONT_BREAK_READ) && !defined(__NETWARE__)
#ifdef SIGNALS_DONT_BREAK_READ
exit(0); exit(0);
#else #else
pthread_exit(0); // Exit is in main thread pthread_exit(0); // Exit is in main thread
#endif #endif
#endif /* __NETWARE__ */
} }
......
...@@ -2429,9 +2429,7 @@ err: ...@@ -2429,9 +2429,7 @@ err:
goto slave_begin; goto slave_begin;
#endif #endif
my_thread_end(); my_thread_end();
#ifndef __NETWARE__
pthread_exit(0); pthread_exit(0);
#endif /* __NETWARE__ */
DBUG_RETURN(0); // Can't return anything here DBUG_RETURN(0); // Can't return anything here
} }
...@@ -2573,9 +2571,7 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \ ...@@ -2573,9 +2571,7 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
goto slave_begin; goto slave_begin;
#endif #endif
my_thread_end(); my_thread_end();
#ifndef __NETWARE__
pthread_exit(0); pthread_exit(0);
#endif /* __NETWARE__ */
DBUG_RETURN(0); // Can't return anything here DBUG_RETURN(0); // Can't return anything here
} }
......
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