summaryrefslogtreecommitdiff
path: root/netware
diff options
context:
space:
mode:
authorunknown <greg@mysql.com>2004-01-12 21:15:49 -0100
committerunknown <greg@mysql.com>2004-01-12 21:15:49 -0100
commita6198674c4bb872883a95f60456aba79843c0870 (patch)
treef9394fa52c3895fbdaf17e26a28ffbb1ec5842f4 /netware
parent001205fd0d8c729dd410e650c33c7297db41f64e (diff)
downloadmariadb-git-a6198674c4bb872883a95f60456aba79843c0870.tar.gz
Checked and applied Novell-supplied patches inside the netware directory only.
netware/BUILD/compile-linux-tools: Need to run make on sql_yacc.cc. netware/BUILD/compile-netware-END: Use .zip package. netware/BUILD/compile-netware-all: Add compile-netware-src. netware/BUILD/compile-netware-standard: Need backslash to avoid error. netware/BUILD/mwenv: Add additional include, library paths, -dialect and -map flags for CW. netware/BUILD/nwbootstrap: Additional status messages, update versions in .def files. netware/Makefile.am: Cosmetic change, add @openssl_libs@ in case of OpenSSL feature usage. netware/isamchk.def: Add SCREENNAME to allow interaction. netware/my_manage.c: Take out unused args to mysqladmin. netware/myisamchk.def: Add SCREENNAME to allow interaction. netware/myisamlog.def: Add SCREENNAME to allow interaction. netware/myisampack.def: Add SCREENNAME to allow interaction. netware/mysql_test_run.c: Multiple changes to help test suite. netware/mysqlbinlog.def: Add SCREENNAME to allow interaction. netware/mysqlcheck.def: Add SCREENNAME to allow interaction. netware/mysqld_safe.c: Make error message more accurate/descriptive. netware/mysqldump.def: Add SCREENNAME to allow interaction. netware/mysqlimport.def: Add SCREENNAME to allow interaction.
Diffstat (limited to 'netware')
-rwxr-xr-xnetware/BUILD/compile-linux-tools5
-rwxr-xr-xnetware/BUILD/compile-netware-END4
-rwxr-xr-xnetware/BUILD/compile-netware-all1
-rwxr-xr-xnetware/BUILD/compile-netware-standard2
-rwxr-xr-xnetware/BUILD/mwenv12
-rwxr-xr-xnetware/BUILD/nwbootstrap15
-rw-r--r--netware/Makefile.am8
-rw-r--r--netware/isamchk.def1
-rw-r--r--netware/my_manage.c8
-rw-r--r--netware/myisamchk.def1
-rw-r--r--netware/myisamlog.def1
-rw-r--r--netware/myisampack.def1
-rw-r--r--netware/mysql_test_run.c191
-rw-r--r--netware/mysqlbinlog.def1
-rw-r--r--netware/mysqlcheck.def1
-rw-r--r--netware/mysqld_safe.c4
-rw-r--r--netware/mysqldump.def1
-rw-r--r--netware/mysqlimport.def1
18 files changed, 185 insertions, 73 deletions
diff --git a/netware/BUILD/compile-linux-tools b/netware/BUILD/compile-linux-tools
index 3590a900338..886f866d674 100755
--- a/netware/BUILD/compile-linux-tools
+++ b/netware/BUILD/compile-linux-tools
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/sh
# debug
#set -x
@@ -46,6 +46,9 @@ make clean config.h
(cd sql; make gen_lex_hash)
(cd strings; make conf_to_src)
+# so the file will be linked
+(cd sql; make sql_yacc.cc)
+
# copying required linux tools
cp extra/comp_err extra/comp_err.linux
cp libmysql/conf_to_src libmysql/conf_to_src.linux
diff --git a/netware/BUILD/compile-netware-END b/netware/BUILD/compile-netware-END
index e0097484500..2bd59f97114 100755
--- a/netware/BUILD/compile-netware-END
+++ b/netware/BUILD/compile-netware-END
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/sh
# debug
#set -x
@@ -29,7 +29,7 @@ rm -rf Makefile.in.bk
make clean bin-dist
# mark the build
-for file in *.tar.gz
+for file in *.tar.gz *.zip
do
if (expr "$file" : "mysql-[1-9].*" > /dev/null)
then
diff --git a/netware/BUILD/compile-netware-all b/netware/BUILD/compile-netware-all
index 35d275f3b42..6baff699e94 100755
--- a/netware/BUILD/compile-netware-all
+++ b/netware/BUILD/compile-netware-all
@@ -8,6 +8,7 @@ set -e
path=`dirname $0`
+$path/compile-netware-src
$path/compile-netware-standard
$path/compile-netware-debug
#$path/compile-netware-max
diff --git a/netware/BUILD/compile-netware-standard b/netware/BUILD/compile-netware-standard
index 12cae1f024e..45f5021862c 100755
--- a/netware/BUILD/compile-netware-standard
+++ b/netware/BUILD/compile-netware-standard
@@ -13,7 +13,7 @@ path=`dirname $0`
suffix="standard"
extra_configs=" \
- --with-innodb
+ --with-innodb \
"
. $path/compile-netware-END
diff --git a/netware/BUILD/mwenv b/netware/BUILD/mwenv
index 26794c3f77f..c16ada6552a 100755
--- a/netware/BUILD/mwenv
+++ b/netware/BUILD/mwenv
@@ -6,9 +6,9 @@
# the default is "F:/mydev"
export MYDEV="WINE_BUILD_DIR"
-export MWCNWx86Includes="$MYDEV/libc/include"
-export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib"
-export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib"
+export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV"
+export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/mysql-VERSION/netware/BUILD"
+export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;knetware.imp"
export WINEPATH="$MYDEV/mw/bin"
@@ -19,11 +19,11 @@ export AR='mwldnlm'
export AR_FLAGS='-type library -o'
export AS='mwasmnlm'
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 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 LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption'
+export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -map -flags pseudopreemption'
export RANLIB=:
export STRIP=:
diff --git a/netware/BUILD/nwbootstrap b/netware/BUILD/nwbootstrap
index 5d068e4e4de..f54775bf054 100755
--- a/netware/BUILD/nwbootstrap
+++ b/netware/BUILD/nwbootstrap
@@ -11,7 +11,7 @@ path=`dirname $0`
# repository direcotry
repo_dir=`pwd`
-# build direcotry
+# build directory
build_dir="$HOME/mydev"
wine_build_dir="F:/mydev"
@@ -147,10 +147,12 @@ then
fi
# make files writeable
+echo "making files writable..."
cd $target_dir
chmod -R u+rw,g+rw .
# edit the mvenv file
+echo "updating the mwenv environment file..."
mwenv="./netware/BUILD/mwenv"
mv -f $mwenv $mwenv.org
sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \
@@ -158,6 +160,17 @@ sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \
-e "s;VERSION;$version;g" $mwenv.org > $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
echo "compiling linux tools..."
./netware/BUILD/compile-linux-tools
diff --git a/netware/Makefile.am b/netware/Makefile.am
index 801d144b968..0f5e862c579 100644
--- a/netware/Makefile.am
+++ b/netware/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (c) 2002 Novell, Inc. All Rights Reserved.
+# Copyright (c) 2002 Novell, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ mysqld_safe_SOURCES= mysqld_safe.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
libmysql_SOURCES= libmysqlmain.c
-libmysql_LDADD = ../libmysql/.libs/libmysqlclient.a
+libmysql_LDADD = ../libmysql/.libs/libmysqlclient.a @openssl_libs@
netware_build_files = client/mysql.def client/mysqladmin.def \
client/mysqlbinlog.def client/mysqlcheck.def \
@@ -29,12 +29,12 @@ netware_build_files = client/mysql.def client/mysqladmin.def \
extra/mysql_install.def extra/my_print_defaults.def \
extra/perror.def extra/replace.def \
extra/resolveip.def extra/comp_err.def \
- isam/isamchk.def \
+ isam/isamchk.def \
isam/isamlog.def isam/pack_isam.def \
libmysqld/libmysqld.def myisam/myisamchk.def \
myisam/myisamlog.def myisam/myisampack.def \
sql/mysqld.def
-
+
link_sources:
set -x; \
for f in $(netware_build_files); do \
diff --git a/netware/isamchk.def b/netware/isamchk.def
index 8d756466609..69e8ac0405b 100644
--- a/netware/isamchk.def
+++ b/netware/isamchk.def
@@ -2,6 +2,7 @@
# ISAM Check
#------------------------------------------------------------------------------
MODULE libc.nlm
+SCREENNAME "MySQL ISAM Table Check Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Check Tool"
VERSION 4, 0
diff --git a/netware/my_manage.c b/netware/my_manage.c
index 490438b0485..1c1e75990b4 100644
--- a/netware/my_manage.c
+++ b/netware/my_manage.c
@@ -157,7 +157,7 @@ int sleep_until_file_deleted(char *pid_file)
/******************************************************************************
sleep_until_file_exists()
-
+
Sleep until the given file exists.
******************************************************************************/
@@ -199,9 +199,13 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
add_arg(&al, "--user=%s", user);
add_arg(&al, "--password=%s", password);
add_arg(&al, "--silent");
+
+ /** Not supported on NetWare
add_arg(&al, "-O");
add_arg(&al, "connect_timeout=10");
add_arg(&al, "-w");
+ **/
+
add_arg(&al, "--host=localhost");
add_arg(&al, "ping");
@@ -210,7 +214,7 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
for(i = 0; (i < TRY_MAX)
&& (err = spawn(mysqladmin_file, &al, TRUE, NULL,
trash, NULL)); i++) sleep(1);
-
+
// free args
free_args(&al);
diff --git a/netware/myisamchk.def b/netware/myisamchk.def
index 2222a1317e1..cdfe186058f 100644
--- a/netware/myisamchk.def
+++ b/netware/myisamchk.def
@@ -2,6 +2,7 @@
# MyISAM Check
#------------------------------------------------------------------------------
MODULE libc.nlm
+SCREENNAME "MySQL MyISAM Table Check Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Check Tool"
VERSION 4, 0
diff --git a/netware/myisamlog.def b/netware/myisamlog.def
index bfa673e12be..5c4cbb23361 100644
--- a/netware/myisamlog.def
+++ b/netware/myisamlog.def
@@ -2,6 +2,7 @@
# MyISAM Log
#------------------------------------------------------------------------------
MODULE libc.nlm
+SCREENNAME "MySQL MyISAM Table Log Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Log Tool"
VERSION 4, 0
diff --git a/netware/myisampack.def b/netware/myisampack.def
index 72403d2591e..9111538c2c0 100644
--- a/netware/myisampack.def
+++ b/netware/myisampack.def
@@ -2,6 +2,7 @@
# MyISAM Pack
#------------------------------------------------------------------------------
MODULE libc.nlm
+SCREENNAME "MySQL MyISAM Table Pack Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Pack Tool"
VERSION 4, 0
diff --git a/netware/mysql_test_run.c b/netware/mysql_test_run.c
index ff629546793..e1a07baca6c 100644
--- a/netware/mysql_test_run.c
+++ b/netware/mysql_test_run.c
@@ -7,7 +7,7 @@
(at your option) any later version.
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -27,6 +27,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
+#include <sys/mode.h>
#include "my_config.h"
#include "my_manage.h"
@@ -94,6 +95,13 @@ char slave_master_info[PATH_MAX] = "";
char master_init_script[PATH_MAX] = "";
char slave_init_script[PATH_MAX] = "";
+// OpenSSL
+char ca_cert[PATH_MAX];
+char server_cert[PATH_MAX];
+char server_key[PATH_MAX];
+char client_cert[PATH_MAX];
+char client_key[PATH_MAX];
+
int total_skip = 0;
int total_pass = 0;
int total_fail = 0;
@@ -101,6 +109,7 @@ int total_test = 0;
double total_time = 0;
+int use_openssl = FALSE;
int master_running = FALSE;
int slave_running = FALSE;
int skip_slave = TRUE;
@@ -184,7 +193,7 @@ void install_db(char *datadir)
char input[PATH_MAX];
char output[PATH_MAX];
char error[PATH_MAX];
-
+
// input file
snprintf(input, PATH_MAX, "%s/bin/init_db.sql", base_dir);
snprintf(output, PATH_MAX, "%s/install.out", datadir);
@@ -193,13 +202,14 @@ void install_db(char *datadir)
// args
init_args(&al);
add_arg(&al, mysqld_file);
+ add_arg(&al, "--no-defaults");
add_arg(&al, "--bootstrap");
add_arg(&al, "--skip-grant-tables");
add_arg(&al, "--basedir=%s", base_dir);
add_arg(&al, "--datadir=%s", datadir);
add_arg(&al, "--skip-innodb");
add_arg(&al, "--skip-bdb");
-
+
// spawn
if ((err = spawn(mysqld_file, &al, TRUE, input, output, error)) != 0)
{
@@ -266,15 +276,16 @@ void start_master()
int err, i;
char master_out[PATH_MAX];
char master_err[PATH_MAX];
-
+ char temp[PATH_MAX], temp2[PATH_MAX];
+
// remove old berkeley db log files that can confuse the server
removef("%s/log.*", master_dir);
-
+
// remove stale binary logs
- removef("%s/*-bin.*", master_dir);
+ removef("%s/var/log/*-bin.*", mysql_test_dir);
// remove stale binary logs
- removef("%s/*.index", master_dir);
+ removef("%s/var/log/*.index", mysql_test_dir);
// remove master.info file
removef("%s/master.info", master_dir);
@@ -284,11 +295,26 @@ void start_master()
// remove relay-log.info file
removef("%s/relay-log.info", master_dir);
-
+
// init script
if (master_init_script[0] != NULL)
{
// 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
@@ -296,12 +322,17 @@ void start_master()
mysql_test_dir, restarts);
snprintf(master_err, PATH_MAX, "%s/var/run/master%u.err",
mysql_test_dir, restarts);
-
+
+ snprintf(temp2,PATH_MAX,"%s/var",mysql_test_dir);
+ mkdir(temp2,0);
+ snprintf(temp2,PATH_MAX,"%s/var/log",mysql_test_dir);
+ mkdir(temp2,0);
+
// args
init_args(&al);
add_arg(&al, "%s", mysqld_file);
add_arg(&al, "--no-defaults");
- add_arg(&al, "--log-bin=master-bin");
+ add_arg(&al, "--log-bin=%s/var/log/master-bin",mysql_test_dir);
add_arg(&al, "--server-id=1");
add_arg(&al, "--basedir=%s", base_dir);
add_arg(&al, "--port=%u", master_port);
@@ -312,11 +343,18 @@ void start_master()
add_arg(&al, "--character-sets-dir=%s", char_dir);
add_arg(&al, "--tmpdir=%s", mysql_tmp_dir);
add_arg(&al, "--language=%s", lang_dir);
-
+
+ if (use_openssl)
+ {
+ add_arg(&al, "--ssl-ca=%s", ca_cert);
+ add_arg(&al, "--ssl-cert=%s", server_cert);
+ add_arg(&al, "--ssl-key=%s", server_key);
+ }
+
// $MASTER_40_ARGS
add_arg(&al, "--rpl-recovery-rank=1");
add_arg(&al, "--init-rpl-role=master");
-
+
// $SMALL_SERVER
add_arg(&al, "-O");
add_arg(&al, "key_buffer_size=1M");
@@ -329,17 +367,24 @@ void start_master()
if (master_opt[0] != NULL)
{
char *p;
+ char *temp;
p = (char *)strtok(master_opt, " \t");
- while(p)
+ if ((temp = strstr(p, "timezone")) == NULL)
{
- add_arg(&al, "%s", p);
-
- p = (char *)strtok(NULL, " \t");
+ while(p)
+ {
+ add_arg(&al, "%s", p);
+ p = (char *)strtok(NULL, " \t");
+ }
+ }
+ else
+ {
+ //do nothing
}
}
-
+
// remove the pid file if it exists
remove(master_pid);
@@ -347,7 +392,7 @@ void start_master()
if ((err = spawn(mysqld_file, &al, FALSE, NULL, master_out, master_err)) == 0)
{
sleep_until_file_exists(master_pid);
-
+
if ((err = wait_for_server_start(bin_dir, user, password, master_port)) == 0)
{
master_running = TRUE;
@@ -361,7 +406,7 @@ void start_master()
{
log_error("Unable to start master server.");
}
-
+
// free_args
free_args(&al);
}
@@ -409,7 +454,7 @@ void start_slave()
{
// create empty master.info file
snprintf(temp, PATH_MAX, "%s/master.info", slave_dir);
- close(open(temp, O_WRONLY | O_CREAT));
+ close(open(temp, O_WRONLY | O_CREAT,S_IRWXU|S_IRWXG|S_IRWXO));
}
else if (strindex(slave_init_script, "rpl000017-slave.sh") != NULL)
{
@@ -434,7 +479,7 @@ void start_slave()
{
// create empty master.info file
snprintf(temp, PATH_MAX, "%s/master.info", slave_dir);
- close(open(temp, O_WRONLY | O_CREAT));
+ close(open(temp, O_WRONLY | O_CREAT,S_IRWXU|S_IRWXG|S_IRWXO));
}
}
@@ -458,7 +503,7 @@ void start_slave()
add_arg(&al, "--core");
add_arg(&al, "--tmpdir=%s", mysql_tmp_dir);
add_arg(&al, "--language=%s", lang_dir);
-
+
add_arg(&al, "--exit-info=256");
add_arg(&al, "--log-slave-updates");
add_arg(&al, "--init-rpl-role=slave");
@@ -474,6 +519,13 @@ void start_slave()
add_arg(&al, "-O");
add_arg(&al, "slave_net_timeout=10");
+ if (use_openssl)
+ {
+ add_arg(&al, "--ssl-ca=%s", ca_cert);
+ add_arg(&al, "--ssl-cert=%s", server_cert);
+ add_arg(&al, "--ssl-key=%s", server_key);
+ }
+
// slave master info
if (slave_master_info[0] != NULL)
{
@@ -557,10 +609,11 @@ void start_slave()
******************************************************************************/
void mysql_start()
{
+ log_info("Starting the MySQL server(s): %u", ++restarts);
start_master();
start_slave();
-
+
// activate the test screen
ActivateScreen(getscreenhandle());
}
@@ -568,17 +621,17 @@ void mysql_start()
/******************************************************************************
stop_slave()
-
+
Stop the slave server.
******************************************************************************/
void stop_slave()
{
int err;
-
+
// running?
if (!slave_running) return;
-
+
// stop
if ((err = stop_server(bin_dir, user, password, slave_port, slave_pid)) == 0)
{
@@ -593,17 +646,17 @@ void stop_slave()
/******************************************************************************
stop_master()
-
+
Stop the master server.
******************************************************************************/
void stop_master()
{
int err;
-
+
// running?
if (!master_running) return;
-
+
if ((err = stop_server(bin_dir, user, password, master_port, master_pid)) == 0)
{
master_running = FALSE;
@@ -617,16 +670,17 @@ void stop_master()
/******************************************************************************
mysql_stop()
-
+
Stop the mysql servers.
******************************************************************************/
void mysql_stop()
{
+ log_info("Stopping the MySQL server(s)...");
stop_master();
stop_slave();
-
+
// activate the test screen
ActivateScreen(getscreenhandle());
}
@@ -634,13 +688,12 @@ void mysql_stop()
/******************************************************************************
mysql_restart()
-
+
Restart the mysql servers.
******************************************************************************/
void mysql_restart()
{
- log_info("Restarting the MySQL server(s): %u", ++restarts);
mysql_stop();
@@ -650,7 +703,7 @@ void mysql_restart()
/******************************************************************************
read_option()
-
+
Read the option file.
******************************************************************************/
@@ -660,10 +713,10 @@ int read_option(char *opt_file, char *opt)
int result;
char *p;
char buf[PATH_MAX];
-
+
// copy current option
strncpy(buf, opt, PATH_MAX);
-
+
// open options file
fd = open(opt_file, O_RDONLY);
@@ -771,14 +824,19 @@ void run_test(char *test)
if (stat(test_file, &info))
{
snprintf(test_file, PATH_MAX, "%s/%s%s", test_dir, test, TEST_SUFFIX);
+ if(access(test_file,0))
+ {
+ printf("Invalid test name %s, %s file not found\n",test,test_file);
+ return;
+ }
}
-
+
snprintf(result_file, PATH_MAX, "%s/%s%s", result_dir, test, NW_RESULT_SUFFIX);
if (stat(result_file, &info))
{
snprintf(result_file, PATH_MAX, "%s/%s%s", result_dir, test, RESULT_SUFFIX);
}
-
+
// init scripts
snprintf(master_init_script, PATH_MAX, "%s/%s-master.sh", test_dir, test);
if (stat(master_init_script, &info))
@@ -826,7 +884,14 @@ void run_test(char *test)
add_arg(&al, "-v");
add_arg(&al, "-R");
add_arg(&al, "%s", result_file);
-
+
+ if (use_openssl)
+ {
+ add_arg(&al, "--ssl-ca=%s", ca_cert);
+ add_arg(&al, "--ssl-cert=%s", client_cert);
+ add_arg(&al, "--ssl-key=%s", client_key);
+ }
+
// start timer
NXGetTime(NX_SINCE_BOOT, NX_USECONDS, &start);
@@ -915,7 +980,7 @@ void vlog(char *format, va_list ap)
void log(char *format, ...)
{
va_list ap;
-
+
va_start(ap, format);
vlog(format, ap);
@@ -1009,8 +1074,10 @@ void die(char *msg)
void setup(char *file)
{
char temp[PATH_MAX];
+ char mysqldump_load[PATH_MAX*2],mysqlbinlog_load[PATH_MAX*2];
+
char *p;
-
+
// set the timezone for the timestamp test
setenv("TZ", "GMT-3", TRUE);
@@ -1023,7 +1090,7 @@ void setup(char *file)
*p = NULL;
strcpy(base_dir, temp);
}
-
+
// setup paths
snprintf(bin_dir, PATH_MAX, "%s/bin", base_dir);
snprintf(mysql_test_dir, PATH_MAX, "%s/mysql-test", base_dir);
@@ -1034,7 +1101,18 @@ void setup(char *file)
snprintf(slave_dir, PATH_MAX, "%s/var/slave-data", mysql_test_dir);
snprintf(lang_dir, PATH_MAX, "%s/share/english", base_dir);
snprintf(char_dir, PATH_MAX, "%s/share/charsets", base_dir);
-
+
+#ifdef HAVE_OPENSSL
+ use_openssl = TRUE;
+#endif // HAVE_OPENSSL
+
+ // OpenSSL paths
+ snprintf(ca_cert, PATH_MAX, "%s/SSL/cacert.pem", base_dir);
+ snprintf(server_cert, PATH_MAX, "%s/SSL/server-cert.pem", base_dir);
+ snprintf(server_key, PATH_MAX, "%s/SSL/server-key.pem", base_dir);
+ snprintf(client_cert, PATH_MAX, "%s/SSL/client-cert.pem", base_dir);
+ snprintf(client_key, PATH_MAX, "%s/SSL/client-key.pem", base_dir);
+
// setup files
snprintf(mysqld_file, PATH_MAX, "%s/mysqld", bin_dir);
snprintf(mysqltest_file, PATH_MAX, "%s/mysqltest", bin_dir);
@@ -1048,14 +1126,19 @@ void setup(char *file)
{
log_errno("Unable to create log file.");
}
-
+
// prepare skip test list
while((p = strchr(skip_test, ',')) != NULL) *p = ' ';
strcpy(temp, strlwr(skip_test));
snprintf(skip_test, PATH_MAX, " %s ", temp);
-
- // enviornment
+
+ snprintf(mysqlbinlog_load,PATH_MAX*2,"%s/mysqlbinlog --no-defaults --local-load=%s",bin_dir,mysql_tmp_dir);
+ snprintf(mysqldump_load,PATH_MAX*2,"%s/mysqldump --no-defaults -uroot --port=%d",bin_dir,master_port);
+ // environment
setenv("MYSQL_TEST_DIR", mysql_test_dir, 1);
+ setenv("MYSQL_DUMP", mysqldump_load, 1);
+ setenv("MYSQL_BINLOG", mysqlbinlog_load, 1);
+ setenv("MASTER_MYPORT", "9306", 1);
}
/******************************************************************************
@@ -1087,7 +1170,7 @@ int main(int argc, char **argv)
int i;
// single test
- single_test = TRUE;
+ single_test = TRUE;
for (i = 1; i < argc; i++)
{
@@ -1131,21 +1214,21 @@ int main(int argc, char **argv)
closedir(dir);
}
-
- log(DASH);
- log("\n");
-
- log("Ending Tests...\n");
// stop server
mysql_stop();
+ log(DASH);
+ log("\n");
+
+ log("Ending Tests...\n");
+
// report stats
report_stats();
-
+
// close log
if (log_fd) fclose(log_fd);
-
+
// keep results up
pressanykey();
diff --git a/netware/mysqlbinlog.def b/netware/mysqlbinlog.def
index 74d8e168b00..89677b4a353 100644
--- a/netware/mysqlbinlog.def
+++ b/netware/mysqlbinlog.def
@@ -2,6 +2,7 @@
# MySQL Binary Log
#------------------------------------------------------------------------------
MODULE libc.nlm
+SCREENNAME "MySQL Binary Log Dump Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Binary Log Dump Tool"
VERSION 4, 0
diff --git a/netware/mysqlcheck.def b/netware/mysqlcheck.def
index 6e476556ffe..8820e9aae8e 100644
--- a/netware/mysqlcheck.def
+++ b/netware/mysqlcheck.def
@@ -2,6 +2,7 @@
# MySQL Client
#------------------------------------------------------------------------------
MODULE libc.nlm
+SCREENNAME "MySQL Check Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Check Tool"
VERSION 4, 0
diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c
index 845797e0022..a815497ac0f 100644
--- a/netware/mysqld_safe.c
+++ b/netware/mysqld_safe.c
@@ -456,10 +456,10 @@ void check_data_vol()
// retrieve information
netware_vol_info_from_name(&vol, buff);
-
+
if ((vol.flags & VOL_NSS_PRESENT) == 0)
{
- log("Error: The data directory is not on an NSS volume!\n\n");
+ log("Error: Either the data directory does not exist or is not on an NSS volume!\n\n");
exit(-1);
}
}
diff --git a/netware/mysqldump.def b/netware/mysqldump.def
index f267b60ff77..901c9b262dc 100644
--- a/netware/mysqldump.def
+++ b/netware/mysqldump.def
@@ -2,6 +2,7 @@
# MySQL Admin
#------------------------------------------------------------------------------
MODULE libc.nlm
+SCREENNAME "MySQL Dump Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Dump Tool"
VERSION 4, 0
diff --git a/netware/mysqlimport.def b/netware/mysqlimport.def
index 69e9f6eada5..d6f7fcb6bbd 100644
--- a/netware/mysqlimport.def
+++ b/netware/mysqlimport.def
@@ -2,6 +2,7 @@
# MySQL Client
#------------------------------------------------------------------------------
MODULE libc.nlm
+SCREENNAME "MySQL Import"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Import Tool"
VERSION 4, 0