summaryrefslogtreecommitdiff
path: root/netware
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-03-26 18:37:38 +0200
committerunknown <monty@mashka.mysql.fi>2003-03-26 18:37:38 +0200
commit9630bdffddc52d9ecd2e9ccab1c492756f07076d (patch)
tree007e99eab2948fed93bba975a04801b24ba9c92a /netware
parentc8bdced21469ec1777abfea13662becc66944919 (diff)
parent221dfec1a4fb2a7208d9ae88eaa151857e95486c (diff)
downloadmariadb-git-9630bdffddc52d9ecd2e9ccab1c492756f07076d.tar.gz
Merge with 4.0.13
BitKeeper/etc/gone: auto-union BitKeeper/etc/logging_ok: auto-union myisam/sort.c: Auto merged mysql-test/r/group_by.result: Auto merged mysql-test/r/join_outer.result: Auto merged mysql-test/r/order_by.result: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/r/type_ranges.result: Auto merged mysql-test/r/update.result: Auto merged mysql-test/t/bdb-crash.test: Auto merged mysql-test/t/group_by.test: Auto merged mysql-test/t/join_outer.test: Auto merged mysql-test/t/order_by.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/type_blob.test: Auto merged mysql-test/t/type_decimal.test: Auto merged mysql-test/t/type_ranges.test: Auto merged mysql-test/t/update.test: Auto merged sql-bench/crash-me.sh: Auto merged client/mysql.cc: Keep old code
Diffstat (limited to 'netware')
-rw-r--r--netware/BUILD/create-patch56
-rwxr-xr-xnetware/BUILD/mwenv10
-rwxr-xr-xnetware/BUILD/nwbootstrap2
-rw-r--r--netware/Makefile.am7
-rw-r--r--netware/comp_err.def10
-rw-r--r--netware/isamchk.def1
-rw-r--r--netware/isamlog.def3
-rw-r--r--netware/libmysql.def1
-rw-r--r--netware/my_manage.c219
-rw-r--r--netware/my_manage.h24
-rw-r--r--netware/my_print_defaults.def1
-rw-r--r--netware/myisamchk.def1
-rw-r--r--netware/myisamlog.def1
-rw-r--r--netware/myisampack.def1
-rw-r--r--netware/mysql.def1
-rw-r--r--netware/mysql_install.def1
-rw-r--r--netware/mysql_install_db.c57
-rw-r--r--netware/mysql_install_db.def1
-rw-r--r--netware/mysql_test_run.c212
-rw-r--r--netware/mysql_test_run.def1
-rw-r--r--netware/mysqladmin.def1
-rw-r--r--netware/mysqlbinlog.def1
-rw-r--r--netware/mysqlcheck.def1
-rw-r--r--netware/mysqld.def2
-rw-r--r--netware/mysqld_safe.c98
-rw-r--r--netware/mysqld_safe.def2
-rw-r--r--netware/mysqldump.def1
-rw-r--r--netware/mysqlimport.def1
-rw-r--r--netware/mysqlshow.def1
-rw-r--r--netware/mysqltest.def1
-rw-r--r--netware/pack_isam.def3
-rw-r--r--netware/perror.def1
-rw-r--r--netware/replace.def1
-rw-r--r--netware/resolveip.def1
34 files changed, 413 insertions, 312 deletions
diff --git a/netware/BUILD/create-patch b/netware/BUILD/create-patch
new file mode 100644
index 00000000000..711eabf2d89
--- /dev/null
+++ b/netware/BUILD/create-patch
@@ -0,0 +1,56 @@
+#! /bin/sh
+
+# debug
+#set -x
+
+# stop on errors
+set -e
+
+# repository direcotry
+repo_dir=`pwd`
+
+# show usage
+show_usage()
+{
+ cat << EOF
+
+usage: create-patch
+
+Creates a patch file between the latest revision of the current tree
+and the latest revision not create by \$BK_USER.
+
+EOF
+ exit 0;
+}
+
+if test $1 || test -z $BK_USER
+then
+ show_usage
+fi
+
+echo "starting patch..."
+
+echo "user: $BK_USER"
+
+# check for bk and repo_dir
+bk help > /dev/null
+repo_dir=`bk root $repo_dir`
+cd $repo_dir
+
+# determine version
+version=`grep -e "AM_INIT_AUTOMAKE(mysql, .*)" < configure.in | sed -e "s/AM_INIT_AUTOMAKE(mysql, \(.*\))/\1/"`
+echo "version: $version"
+
+# user revision
+user_rev=`bk changes -e -n -d':REV:' | head -1`
+echo "latest revision: $user_rev"
+
+# tree revision
+tree_rev=`bk changes -e -n -d':REV:' -U$BK_USER | head -1`
+echo "latest non-$BK_USER revision: $tree_rev"
+
+# create patch
+patch="$repo_dir/../$BK_USER-$version.patch"
+echo "creating \"$patch\"..."
+bk export -tpatch -r$tree_rev..$user_rev > $patch
+
diff --git a/netware/BUILD/mwenv b/netware/BUILD/mwenv
index d2b64409c88..26794c3f77f 100755
--- a/netware/BUILD/mwenv
+++ b/netware/BUILD/mwenv
@@ -1,9 +1,9 @@
#! /bin/sh
-# WINE_BUILD_DIR, BUILD_DIR, and VERSION must be changed before compiling
+# WINE_BUILD_DIR, BUILD_DIR, and VERSION must be correct before compiling
# This values are normally changed by the nwbootstrap script
-# the default for WINE_BUILD_DIR is "F:/mydev"
+# the default is "F:/mydev"
export MYDEV="WINE_BUILD_DIR"
export MWCNWx86Includes="$MYDEV/libc/include"
@@ -12,16 +12,16 @@ export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib"
export WINEPATH="$MYDEV/mw/bin"
-# the default for BUILD_DIR is "$HOME/mydev"
+# the default added path is "$HOME/mydev/mysql-x.x-x/netware/BUILD"
export PATH="$PATH:BUILD_DIR/mysql-VERSION/netware/BUILD"
export AR='mwldnlm'
export AR_FLAGS='-type library -o'
export AS='mwasmnlm'
export CC='mwccnlm -gccincludes'
-export CFLAGS='-dialect c -proc 686 -bool on -relax_pointers -DUSE_OLD_FUNCTIONS'
+export CFLAGS='-dialect c -proc 686 -relax_pointers'
export CXX='mwccnlm -gccincludes'
-export CXXFLAGS='-dialect c++ -proc 686 -bool on -relax_pointers'
+export CXXFLAGS='-dialect c++ -proc 686 -bool on -wchar_t on -relax_pointers -D_WCHAR_T'
export LD='mwldnlm'
export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption'
export RANLIB=:
diff --git a/netware/BUILD/nwbootstrap b/netware/BUILD/nwbootstrap
index a8ed956811e..002e19c8e49 100755
--- a/netware/BUILD/nwbootstrap
+++ b/netware/BUILD/nwbootstrap
@@ -129,7 +129,7 @@ else
fi
echo "creating ChangeLog..."
-bk changes -v -r$rev > $target_dir/ChangeLog
+bk changes -v -r$rev..$revision > $target_dir/ChangeLog
# add the latest manual
if test -d $doc_dir
diff --git a/netware/Makefile.am b/netware/Makefile.am
index 5933340febb..801d144b968 100644
--- a/netware/Makefile.am
+++ b/netware/Makefile.am
@@ -28,12 +28,13 @@ netware_build_files = client/mysql.def client/mysqladmin.def \
client/mysqlshow.def client/mysqltest.def \
extra/mysql_install.def extra/my_print_defaults.def \
extra/perror.def extra/replace.def \
- extra/resolveip.def isam/isamchk.def \
+ extra/resolveip.def extra/comp_err.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 sql/mysqld.xdc
-
+ sql/mysqld.def
+
link_sources:
set -x; \
for f in $(netware_build_files); do \
diff --git a/netware/comp_err.def b/netware/comp_err.def
new file mode 100644
index 00000000000..d694c07174a
--- /dev/null
+++ b/netware/comp_err.def
@@ -0,0 +1,10 @@
+#------------------------------------------------------------------------------
+# MySQL Error File Compiler
+#------------------------------------------------------------------------------
+MODULE libc.nlm
+COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
+DESCRIPTION "MySQL Error File Compiler"
+VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
+#DEBUG
+
diff --git a/netware/isamchk.def b/netware/isamchk.def
index a724340066a..8d756466609 100644
--- a/netware/isamchk.def
+++ b/netware/isamchk.def
@@ -6,5 +6,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL ISAM Table Check Tool"
VERSION 4, 0
STACKSIZE 65536
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/isamlog.def b/netware/isamlog.def
index 3f74d17f284..bb8312066ef 100644
--- a/netware/isamlog.def
+++ b/netware/isamlog.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Log Tool"
VERSION 4, 0
-DEBUG
+XDCDATA ../netware/mysql.xdc
+#DEBUG
diff --git a/netware/libmysql.def b/netware/libmysql.def
index f2ab1f0f21a..7804c4468a5 100644
--- a/netware/libmysql.def
+++ b/netware/libmysql.def
@@ -7,4 +7,5 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL Client Library"
VERSION 4, 0
AUTOUNLOAD
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/my_manage.c b/netware/my_manage.c
index 25147b16674..490438b0485 100644
--- a/netware/my_manage.c
+++ b/netware/my_manage.c
@@ -21,7 +21,7 @@
#include <dirent.h>
#include <string.h>
#include <screen.h>
-#include <nks/vm.h>
+#include <proc.h>
#include <ctype.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -54,18 +54,16 @@
Init an argument list.
******************************************************************************/
-void _init_args(arg_list *al)
+void init_args(arg_list_t *al)
{
- int i;
+ ASSERT(al != NULL);
- *al = malloc(sizeof(arg_list_t));
+ al->argc = 0;
+ al->size = ARG_BUF;
+ al->argv = malloc(al->size * sizeof(char *));
+ ASSERT(al->argv != NULL);
- (*al)->argc = 0;
-
- for(i = 0; i < ARG_MAX; i++)
- {
- (*al)->argv[i] = NULL;
- }
+ return;
}
/******************************************************************************
@@ -75,49 +73,66 @@ void _init_args(arg_list *al)
Add an argument to a list.
******************************************************************************/
-void add_arg(arg_list al, char *format, ...)
+void add_arg(arg_list_t *al, char *format, ...)
{
va_list ap;
+ char temp[PATH_MAX];
ASSERT(al != NULL);
- ASSERT(al->argc < ARG_MAX);
- al->argv[al->argc] = malloc(PATH_MAX);
-
- ASSERT(al->argv[al->argc] != NULL);
+ // increase size
+ if (al->argc >= al->size)
+ {
+ al->size += ARG_BUF;
+ al->argv = realloc(al->argv, al->size * sizeof(char *));
+ ASSERT(al->argv != NULL);
+ }
- va_start(ap, format);
+ if (format)
+ {
+ va_start(ap, format);
+ vsprintf(temp, format, ap);
+ va_end(ap);
- vsprintf(al->argv[al->argc], format, ap);
+ al->argv[al->argc] = malloc(strlen(temp)+1);
+ ASSERT(al->argv[al->argc] != NULL);
+ strcpy(al->argv[al->argc], temp);
- va_end(ap);
+ ++(al->argc);
+ }
+ else
+ {
+ al->argv[al->argc] = NULL;
+ }
- ++(al->argc);
+ return;
}
/******************************************************************************
- _free_args()
+ free_args()
Free an argument list.
******************************************************************************/
-void _free_args(arg_list *al)
+void free_args(arg_list_t *al)
{
int i;
ASSERT(al != NULL);
- ASSERT(*al != NULL);
- for(i = 0; i < (*al)->argc; i++)
+ for(i = 0; i < al->argc; i++)
{
- ASSERT((*al)->argv[i] != NULL);
- free((*al)->argv[i]);
- (*al)->argv[i] = NULL;
+ ASSERT(al->argv[i] != NULL);
+ free(al->argv[i]);
+ al->argv[i] = NULL;
}
- free(*al);
- *al = NULL;
+ free(al->argv);
+ al->argc = 0;
+ al->argv = NULL;
+
+ return;
}
/******************************************************************************
@@ -167,7 +182,7 @@ int sleep_until_file_exists(char *pid_file)
******************************************************************************/
int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
{
- arg_list al;
+ arg_list_t al;
int err, i;
char mysqladmin_file[PATH_MAX];
char trash[PATH_MAX];
@@ -177,27 +192,27 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
snprintf(trash, PATH_MAX, "/tmp/trash.out");
// args
- init_args(al);
- add_arg(al, "%s", mysqladmin_file);
- add_arg(al, "--no-defaults");
- add_arg(al, "--port=%u", port);
- add_arg(al, "--user=%s", user);
- add_arg(al, "--password=%s", password);
- add_arg(al, "--silent");
- add_arg(al, "-O");
- add_arg(al, "connect_timeout=10");
- add_arg(al, "-w");
- add_arg(al, "--host=localhost");
- add_arg(al, "ping");
+ init_args(&al);
+ add_arg(&al, "%s", mysqladmin_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--port=%u", port);
+ add_arg(&al, "--user=%s", user);
+ add_arg(&al, "--password=%s", password);
+ add_arg(&al, "--silent");
+ add_arg(&al, "-O");
+ add_arg(&al, "connect_timeout=10");
+ add_arg(&al, "-w");
+ add_arg(&al, "--host=localhost");
+ add_arg(&al, "ping");
// NetWare does not support the connect timeout in the TCP/IP stack
// -- we will try the ping multiple times
for(i = 0; (i < TRY_MAX)
- && (err = spawn(mysqladmin_file, al, TRUE, NULL,
+ && (err = spawn(mysqladmin_file, &al, TRUE, NULL,
trash, NULL)); i++) sleep(1);
// free args
- free_args(al);
+ free_args(&al);
return err;
}
@@ -206,71 +221,53 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
spawn()
- Spawn the given file with the given arguments.
+ Spawn the given path with the given arguments.
******************************************************************************/
-int spawn(char *file, arg_list al, int join, char *input,
+int spawn(char *path, arg_list_t *al, int join, char *input,
char *output, char *error)
{
- NXNameSpec_t name;
- NXExecEnvSpec_t env;
- NXVmId_t vm, ignore;
- int result;
-
- // name
- name.ssType = NX_OBJ_FILE;
- name.ssPathCtx = 0;
- name.ssPath = file;
-
- // env
- env.esArgc = al->argc;
- env.esArgv = al->argv;
- env.esEnv = NULL;
-
- env.esStdin.ssPathCtx = 0;
- env.esStdout.ssPathCtx = 0;
- env.esStderr.ssPathCtx = 0;
-
- if (input == NULL)
- {
- env.esStdin.ssType = NX_OBJ_DEFAULT;
- env.esStdin.ssPath = NULL;
- }
- else
- {
- env.esStdin.ssType = NX_OBJ_FILE;
- env.esStdin.ssPath = input;
- }
-
- if (output == NULL)
- {
- env.esStdout.ssType = NX_OBJ_DEFAULT;
- env.esStdout.ssPath = NULL;
- }
- else
- {
- env.esStdout.ssType = NX_OBJ_FILE;
- env.esStdout.ssPath = output;
- }
-
- if (error == NULL)
+ pid_t pid;
+ int result = 0;
+ wiring_t wiring = { FD_UNUSED, FD_UNUSED, FD_UNUSED };
+ unsigned long flags = PROC_CURRENT_SPACE | PROC_INHERIT_CWD;
+
+ // open wiring
+ if (input)
+ wiring.infd = open(input, O_RDONLY);
+
+ if (output)
+ wiring.outfd = open(output, O_WRONLY | O_CREAT | O_TRUNC);
+
+ if (error)
+ wiring.errfd = open(error, O_WRONLY | O_CREAT | O_TRUNC);
+
+ // procve requires a NULL
+ add_arg(al, NULL);
+
+ // go
+ pid = procve(path, flags, NULL, &wiring, NULL, NULL, 0,
+ NULL, (const char **)al->argv);
+
+ if (pid == -1)
{
- env.esStderr.ssType = NX_OBJ_DEFAULT;
- env.esStderr.ssPath = NULL;
+ result = -1;
}
- else
+ else if (join)
{
- env.esStderr.ssType = NX_OBJ_FILE;
- env.esStderr.ssPath = error;
+ waitpid(pid, &result, 0);
}
- result = NXVmSpawn(&name, &env, NX_VM_SAME_ADDRSPACE | NX_VM_INHERIT_ENV, &vm);
-
- if (!result && join)
- {
- NXVmJoin(vm, &ignore, &result);
- }
-
+ // close wiring
+ if (wiring.infd != -1)
+ close(wiring.infd);
+
+ if (wiring.outfd != -1)
+ close(wiring.outfd);
+
+ if (wiring.errfd != -1)
+ close(wiring.errfd);
+
return result;
}
@@ -284,7 +281,7 @@ int spawn(char *file, arg_list al, int join, char *input,
int stop_server(char *bin_dir, char *user, char *password, int port,
char *pid_file)
{
- arg_list al;
+ arg_list_t al;
int err, i, argc = 0;
char mysqladmin_file[PATH_MAX];
char trash[PATH_MAX];
@@ -294,18 +291,18 @@ int stop_server(char *bin_dir, char *user, char *password, int port,
snprintf(trash, PATH_MAX, "/tmp/trash.out");
// args
- init_args(al);
- add_arg(al, "%s", mysqladmin_file);
- add_arg(al, "--no-defaults");
- add_arg(al, "--port=%u", port);
- add_arg(al, "--user=%s", user);
- add_arg(al, "--password=%s", password);
- add_arg(al, "-O");
- add_arg(al, "shutdown_timeout=20");
- add_arg(al, "shutdown");
+ init_args(&al);
+ add_arg(&al, "%s", mysqladmin_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--port=%u", port);
+ add_arg(&al, "--user=%s", user);
+ add_arg(&al, "--password=%s", password);
+ add_arg(&al, "-O");
+ add_arg(&al, "shutdown_timeout=20");
+ add_arg(&al, "shutdown");
// spawn
- if ((err = spawn(mysqladmin_file, al, TRUE, NULL,
+ if ((err = spawn(mysqladmin_file, &al, TRUE, NULL,
trash, NULL)) == 0)
{
sleep_until_file_deleted(pid_file);
@@ -324,7 +321,7 @@ int stop_server(char *bin_dir, char *user, char *password, int port,
}
// free args
- free_args(al);
+ free_args(&al);
return err;
}
diff --git a/netware/my_manage.h b/netware/my_manage.h
index 92ed66ea865..b19662c4ee9 100644
--- a/netware/my_manage.h
+++ b/netware/my_manage.h
@@ -34,12 +34,9 @@
******************************************************************************/
-#define ARG_MAX 50
+#define ARG_BUF 10
#define TRY_MAX 5
-#define init_args(al) _init_args(&al);
-#define free_args(al) _free_args(&al);
-
/******************************************************************************
structures
@@ -50,9 +47,11 @@ typedef struct
{
int argc;
- char *argv[ARG_MAX];
+ char **argv;
+
+ size_t size;
-} arg_list_t, * arg_list;
+} arg_list_t;
/******************************************************************************
@@ -66,18 +65,23 @@ typedef struct
******************************************************************************/
-void _init_args(arg_list *);
-void add_arg(arg_list, char *, ...);
-void _free_args(arg_list *);
+void init_args(arg_list_t *);
+void add_arg(arg_list_t *, char *, ...);
+void free_args(arg_list_t *);
+
int sleep_until_file_exists(char *);
int sleep_until_file_deleted(char *);
int wait_for_server_start(char *, char *, char *, int);
-int spawn(char *, arg_list, int, char *, char *, char *);
+
+int spawn(char *, arg_list_t *, int, char *, char *, char *);
+
int stop_server(char *, char *, char *, int, char *);
pid_t get_server_pid(char *);
void kill_server(pid_t pid);
+
void del_tree(char *);
int removef(char *, ...);
+
void get_basedir(char *, char *);
#endif /* _MY_MANAGE */
diff --git a/netware/my_print_defaults.def b/netware/my_print_defaults.def
index 7f474c50469..49f167341ae 100644
--- a/netware/my_print_defaults.def
+++ b/netware/my_print_defaults.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Print Defaults Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisamchk.def b/netware/myisamchk.def
index 5a57866c1ee..2222a1317e1 100644
--- a/netware/myisamchk.def
+++ b/netware/myisamchk.def
@@ -6,5 +6,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL MyISAM Table Check Tool"
VERSION 4, 0
STACKSIZE 65536
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisamlog.def b/netware/myisamlog.def
index c3bbee38d16..bfa673e12be 100644
--- a/netware/myisamlog.def
+++ b/netware/myisamlog.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Log Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisampack.def b/netware/myisampack.def
index ae025e5f84d..72403d2591e 100644
--- a/netware/myisampack.def
+++ b/netware/myisampack.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Pack Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql.def b/netware/mysql.def
index a5e3ae21369..9b4424ed4fb 100644
--- a/netware/mysql.def
+++ b/netware/mysql.def
@@ -7,5 +7,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL Monitor"
VERSION 4, 0
MULTIPLE
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql_install.def b/netware/mysql_install.def
index 2c2819ec6af..87fc76919f9 100644
--- a/netware/mysql_install.def
+++ b/netware/mysql_install.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Install Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql_install_db.c b/netware/mysql_install_db.c
index 128f07dc2bc..b4060bfdb7e 100644
--- a/netware/mysql_install_db.c
+++ b/netware/mysql_install_db.c
@@ -24,6 +24,7 @@
#include <strings.h>
#include <getopt.h>
#include <screen.h>
+#include <errno.h>
#include "my_config.h"
#include "my_manage.h"
@@ -51,7 +52,7 @@ char default_option[PATH_MAX];
void start_defaults(int, char*[]);
void finish_defaults();
-void read_defaults(arg_list);
+void read_defaults(arg_list_t *);
void parse_args(int, char*[]);
void get_options(int, char*[]);
void create_paths();
@@ -151,9 +152,9 @@ void finish_defaults()
Read the defaults.
******************************************************************************/
-void read_defaults(arg_list pal)
+void read_defaults(arg_list_t *pal)
{
- arg_list al;
+ arg_list_t al;
char defaults_file[PATH_MAX];
char mydefaults[PATH_MAX];
char line[PATH_MAX];
@@ -167,15 +168,15 @@ void read_defaults(arg_list pal)
snprintf(mydefaults, PATH_MAX, "%s/bin/my_print_defaults", basedir);
// args
- init_args(al);
- add_arg(al, mydefaults);
- if (default_option[0]) add_arg(al, default_option);
- add_arg(al, "mysqld");
- add_arg(al, "mysql_install_db");
+ init_args(&al);
+ add_arg(&al, mydefaults);
+ if (default_option[0]) add_arg(&al, default_option);
+ add_arg(&al, "mysqld");
+ add_arg(&al, "mysql_install_db");
- spawn(mydefaults, al, TRUE, NULL, defaults_file, NULL);
+ spawn(mydefaults, &al, TRUE, NULL, defaults_file, NULL);
- free_args(al);
+ free_args(&al);
// gather defaults
if((fp = fopen(defaults_file, "r")) != NULL)
@@ -267,17 +268,17 @@ void parse_args(int argc, char *argv[])
******************************************************************************/
void get_options(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
// start defaults
start_defaults(argc, argv);
// default file arguments
- init_args(al);
- add_arg(al, "dummy");
- read_defaults(al);
- parse_args(al->argc, al->argv);
- free_args(al);
+ init_args(&al);
+ add_arg(&al, "ignore");
+ read_defaults(&al);
+ parse_args(al.argc, al.argv);
+ free_args(&al);
// command-line arguments
parse_args(argc, argv);
@@ -323,7 +324,7 @@ void create_paths()
******************************************************************************/
int mysql_install_db(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
int i, j, err;
char skip;
@@ -336,8 +337,8 @@ int mysql_install_db(int argc, char *argv[])
};
// args
- init_args(al);
- add_arg(al, "%s", mysqld);
+ init_args(&al);
+ add_arg(&al, "%s", mysqld);
// parent args
for(i = 1; i < argc; i++)
@@ -354,19 +355,19 @@ int mysql_install_db(int argc, char *argv[])
}
}
- if (!skip) add_arg(al, "%s", argv[i]);
+ if (!skip) add_arg(&al, "%s", argv[i]);
}
- add_arg(al, "--bootstrap");
- add_arg(al, "--skip-grant-tables");
- add_arg(al, "--skip-innodb");
- add_arg(al, "--skip-bdb");
+ add_arg(&al, "--bootstrap");
+ add_arg(&al, "--skip-grant-tables");
+ add_arg(&al, "--skip-innodb");
+ add_arg(&al, "--skip-bdb");
// spawn mysqld
- err = spawn(mysqld, al, TRUE, sql_file, out_log, err_log);
+ err = spawn(mysqld, &al, TRUE, sql_file, out_log, err_log);
// free args
- free_args(al);
+ free_args(&al);
return err;
}
@@ -384,6 +385,9 @@ int main(int argc, char **argv)
// check for an autoclose option
if (!autoclose) setscreenmode(SCR_NO_MODE);
+ // header
+ printf("MySQL Server %s, for %s (%s)\n\n", VERSION, SYSTEM_TYPE, MACHINE_TYPE);
+
// create paths
create_paths();
@@ -391,6 +395,7 @@ int main(int argc, char **argv)
if (mysql_install_db(argc, argv))
{
printf("ERROR - The database creation failed!\n");
+ printf(" %s\n", strerror(errno));
printf("See the following log for more infomration:\n");
printf("\t%s\n\n", err_log);
exit(-1);
diff --git a/netware/mysql_install_db.def b/netware/mysql_install_db.def
index c813e80d768..4653638b5ad 100644
--- a/netware/mysql_install_db.def
+++ b/netware/mysql_install_db.def
@@ -6,5 +6,6 @@ SCREENNAME "MySQL Install"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Initial Database Installer"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql_test_run.c b/netware/mysql_test_run.c
index f19cee32e92..ff629546793 100644
--- a/netware/mysql_test_run.c
+++ b/netware/mysql_test_run.c
@@ -28,6 +28,7 @@
#include <unistd.h>
#include <fcntl.h>
+#include "my_config.h"
#include "my_manage.h"
/******************************************************************************
@@ -178,7 +179,7 @@ void report_stats()
******************************************************************************/
void install_db(char *datadir)
{
- arg_list al;
+ arg_list_t al;
int err, i;
char input[PATH_MAX];
char output[PATH_MAX];
@@ -190,23 +191,23 @@ void install_db(char *datadir)
snprintf(error, PATH_MAX, "%s/install.err", datadir);
// args
- init_args(al);
- add_arg(al, mysqld_file);
- 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");
+ init_args(&al);
+ add_arg(&al, mysqld_file);
+ 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)
+ if ((err = spawn(mysqld_file, &al, TRUE, input, output, error)) != 0)
{
die("Unable to create database.");
}
// free args
- free_args(al);
+ free_args(&al);
}
/******************************************************************************
@@ -261,7 +262,7 @@ void mysql_install_db()
******************************************************************************/
void start_master()
{
- arg_list al;
+ arg_list_t al;
int err, i;
char master_out[PATH_MAX];
char master_err[PATH_MAX];
@@ -297,32 +298,32 @@ void start_master()
mysql_test_dir, restarts);
// 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, "--server-id=1");
- add_arg(al, "--basedir=%s", base_dir);
- add_arg(al, "--port=%u", master_port);
- add_arg(al, "--local-infile");
- add_arg(al, "--core");
- add_arg(al, "--datadir=%s", master_dir);
- add_arg(al, "--pid-file=%s", master_pid);
- add_arg(al, "--character-sets-dir=%s", char_dir);
- add_arg(al, "--tmpdir=%s", mysql_tmp_dir);
- add_arg(al, "--language=%s", lang_dir);
+ init_args(&al);
+ add_arg(&al, "%s", mysqld_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--log-bin=master-bin");
+ add_arg(&al, "--server-id=1");
+ add_arg(&al, "--basedir=%s", base_dir);
+ add_arg(&al, "--port=%u", master_port);
+ add_arg(&al, "--local-infile");
+ add_arg(&al, "--core");
+ add_arg(&al, "--datadir=%s", master_dir);
+ add_arg(&al, "--pid-file=%s", master_pid);
+ add_arg(&al, "--character-sets-dir=%s", char_dir);
+ add_arg(&al, "--tmpdir=%s", mysql_tmp_dir);
+ add_arg(&al, "--language=%s", lang_dir);
// $MASTER_40_ARGS
- add_arg(al, "--rpl-recovery-rank=1");
- add_arg(al, "--init-rpl-role=master");
+ 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");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=256K");
- add_arg(al, "-O");
- add_arg(al, "max_heap_table_size=1M");
+ add_arg(&al, "-O");
+ add_arg(&al, "key_buffer_size=1M");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=256K");
+ add_arg(&al, "-O");
+ add_arg(&al, "max_heap_table_size=1M");
// $EXTRA_MASTER_OPT
if (master_opt[0] != NULL)
@@ -333,7 +334,7 @@ void start_master()
while(p)
{
- add_arg(al, "%s", p);
+ add_arg(&al, "%s", p);
p = (char *)strtok(NULL, " \t");
}
@@ -343,7 +344,7 @@ void start_master()
remove(master_pid);
// spawn
- if ((err = spawn(mysqld_file, al, FALSE, NULL, master_out, master_err)) == 0)
+ if ((err = spawn(mysqld_file, &al, FALSE, NULL, master_out, master_err)) == 0)
{
sleep_until_file_exists(master_pid);
@@ -362,7 +363,7 @@ void start_master()
}
// free_args
- free_args(al);
+ free_args(&al);
}
/******************************************************************************
@@ -374,7 +375,7 @@ void start_master()
******************************************************************************/
void start_slave()
{
- arg_list al;
+ arg_list_t al;
int err, i;
char slave_out[PATH_MAX];
char slave_err[PATH_MAX];
@@ -444,34 +445,34 @@ void start_slave()
mysql_test_dir, restarts);
// args
- init_args(al);
- add_arg(al, "%s", mysqld_file);
- add_arg(al, "--no-defaults");
- add_arg(al, "--log-bin=slave-bin");
- add_arg(al, "--relay_log=slave-relay-bin");
- add_arg(al, "--basedir=%s", base_dir);
- add_arg(al, "--port=%u", slave_port);
- add_arg(al, "--datadir=%s", slave_dir);
- add_arg(al, "--pid-file=%s", slave_pid);
- add_arg(al, "--character-sets-dir=%s", char_dir);
- 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");
- add_arg(al, "--skip-innodb");
- add_arg(al, "--skip-slave-start");
- add_arg(al, "--slave-load-tmpdir=../../var/tmp");
-
- add_arg(al, "--report-user=%s", user);
- add_arg(al, "--report-host=127.0.0.1");
- add_arg(al, "--report-port=%u", slave_port);
-
- add_arg(al, "--master-retry-count=10");
- add_arg(al, "-O");
- add_arg(al, "slave_net_timeout=10");
+ init_args(&al);
+ add_arg(&al, "%s", mysqld_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--log-bin=slave-bin");
+ add_arg(&al, "--relay_log=slave-relay-bin");
+ add_arg(&al, "--basedir=%s", base_dir);
+ add_arg(&al, "--port=%u", slave_port);
+ add_arg(&al, "--datadir=%s", slave_dir);
+ add_arg(&al, "--pid-file=%s", slave_pid);
+ add_arg(&al, "--character-sets-dir=%s", char_dir);
+ 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");
+ add_arg(&al, "--skip-innodb");
+ add_arg(&al, "--skip-slave-start");
+ add_arg(&al, "--slave-load-tmpdir=../../var/tmp");
+
+ add_arg(&al, "--report-user=%s", user);
+ add_arg(&al, "--report-host=127.0.0.1");
+ add_arg(&al, "--report-port=%u", slave_port);
+
+ add_arg(&al, "--master-retry-count=10");
+ add_arg(&al, "-O");
+ add_arg(&al, "slave_net_timeout=10");
// slave master info
if (slave_master_info[0] != NULL)
@@ -482,29 +483,29 @@ void start_slave()
while(p)
{
- add_arg(al, "%s", p);
+ add_arg(&al, "%s", p);
p = (char *)strtok(NULL, " \t");
}
}
else
{
- add_arg(al, "--master-user=%s", user);
- add_arg(al, "--master-password=%s", password);
- add_arg(al, "--master-host=127.0.0.1");
- add_arg(al, "--master-port=%u", master_port);
- add_arg(al, "--master-connect-retry=1");
- add_arg(al, "--server-id=2");
- add_arg(al, "--rpl-recovery-rank=2");
+ add_arg(&al, "--master-user=%s", user);
+ add_arg(&al, "--master-password=%s", password);
+ add_arg(&al, "--master-host=127.0.0.1");
+ add_arg(&al, "--master-port=%u", master_port);
+ add_arg(&al, "--master-connect-retry=1");
+ add_arg(&al, "--server-id=2");
+ add_arg(&al, "--rpl-recovery-rank=2");
}
// small server
- add_arg(al, "-O");
- add_arg(al, "key_buffer_size=1M");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=256K");
- add_arg(al, "-O");
- add_arg(al, "max_heap_table_size=1M");
+ add_arg(&al, "-O");
+ add_arg(&al, "key_buffer_size=1M");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=256K");
+ add_arg(&al, "-O");
+ add_arg(&al, "max_heap_table_size=1M");
// opt args
if (slave_opt[0] != NULL)
@@ -515,7 +516,7 @@ void start_slave()
while(p)
{
- add_arg(al, "%s", p);
+ add_arg(&al, "%s", p);
p = (char *)strtok(NULL, " \t");
}
@@ -525,7 +526,7 @@ void start_slave()
remove(slave_pid);
// spawn
- if ((err = spawn(mysqld_file, al, FALSE, NULL, slave_out, slave_err)) == 0)
+ if ((err = spawn(mysqld_file, &al, FALSE, NULL, slave_out, slave_err)) == 0)
{
sleep_until_file_exists(slave_pid);
@@ -544,7 +545,7 @@ void start_slave()
}
// free args
- free_args(al);
+ free_args(&al);
}
/******************************************************************************
@@ -749,7 +750,7 @@ void run_test(char *test)
char out_file[PATH_MAX];
char err_file[PATH_MAX];
int err;
- arg_list al;
+ arg_list_t al;
NXTime_t start, stop;
// skip slave?
@@ -812,25 +813,25 @@ void run_test(char *test)
log("%-46s ", test);
// args
- init_args(al);
- add_arg(al, "%s", mysqltest_file);
- add_arg(al, "--no-defaults");
- add_arg(al, "--port=%u", master_port);
- add_arg(al, "--database=%s", db);
- add_arg(al, "--user=%s", user);
- add_arg(al, "--password=%s", password);
- add_arg(al, "--silent");
- add_arg(al, "--basedir=%s/", mysql_test_dir);
- add_arg(al, "--host=127.0.0.1");
- add_arg(al, "-v");
- add_arg(al, "-R");
- add_arg(al, "%s", result_file);
+ init_args(&al);
+ add_arg(&al, "%s", mysqltest_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--port=%u", master_port);
+ add_arg(&al, "--database=%s", db);
+ add_arg(&al, "--user=%s", user);
+ add_arg(&al, "--password=%s", password);
+ add_arg(&al, "--silent");
+ add_arg(&al, "--basedir=%s/", mysql_test_dir);
+ add_arg(&al, "--host=127.0.0.1");
+ add_arg(&al, "-v");
+ add_arg(&al, "-R");
+ add_arg(&al, "%s", result_file);
// start timer
NXGetTime(NX_SINCE_BOOT, NX_USECONDS, &start);
// spawn
- err = spawn(mysqltest_file, al, TRUE, test_file, out_file, err_file);
+ err = spawn(mysqltest_file, &al, TRUE, test_file, out_file, err_file);
// stop timer
NXGetTime(NX_SINCE_BOOT, NX_USECONDS, &stop);
@@ -840,7 +841,7 @@ void run_test(char *test)
total_time += elapsed;
// free args
- free_args(al);
+ free_args(&al);
if (err == 0)
{
@@ -1055,9 +1056,6 @@ void setup(char *file)
// enviornment
setenv("MYSQL_TEST_DIR", mysql_test_dir, 1);
-
- // install test databases
- mysql_install_db();
}
/******************************************************************************
@@ -1067,11 +1065,17 @@ void setup(char *file)
******************************************************************************/
int main(int argc, char **argv)
{
- log("Initializing Tests...\n");
-
// setup
setup(argv[0]);
+ // header
+ log("MySQL Server %s, for %s (%s)\n\n", VERSION, SYSTEM_TYPE, MACHINE_TYPE);
+
+ log("Initializing Tests...\n");
+
+ // install test databases
+ mysql_install_db();
+
log("Starting Tests...\n");
log("\n");
diff --git a/netware/mysql_test_run.def b/netware/mysql_test_run.def
index 7cca2e1dea6..b34f62a1f91 100644
--- a/netware/mysql_test_run.def
+++ b/netware/mysql_test_run.def
@@ -7,4 +7,5 @@ SCREENNAME "MySQL Test Run"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Run"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqladmin.def b/netware/mysqladmin.def
index 02ea42a2343..0ace36992b1 100644
--- a/netware/mysqladmin.def
+++ b/netware/mysqladmin.def
@@ -6,5 +6,6 @@ SCREENNAME "MySQL Admin"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Admin Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlbinlog.def b/netware/mysqlbinlog.def
index b62ce4a578f..74d8e168b00 100644
--- a/netware/mysqlbinlog.def
+++ b/netware/mysqlbinlog.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Binary Log Dump Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlcheck.def b/netware/mysqlcheck.def
index ae554bc6a06..6e476556ffe 100644
--- a/netware/mysqlcheck.def
+++ b/netware/mysqlcheck.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Check Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqld.def b/netware/mysqld.def
index d2ee41955ba..6856aefe56c 100644
--- a/netware/mysqld.def
+++ b/netware/mysqld.def
@@ -2,11 +2,11 @@
# MySQL Server
#------------------------------------------------------------------------------
MODULE libc.nlm
-XDCDATA mysqld.xdc
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Database Server"
VERSION 4, 0
MULTIPLE
STACKSIZE 65536
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c
index 1ab90775e02..845797e0022 100644
--- a/netware/mysqld_safe.c
+++ b/netware/mysqld_safe.c
@@ -60,7 +60,7 @@ void vlog(char *, va_list);
void log(char *, ...);
void start_defaults(int, char*[]);
void finish_defaults();
-void read_defaults(arg_list);
+void read_defaults(arg_list_t *);
void parse_args(int, char*[]);
void get_options(int, char*[]);
void check_data_vol();
@@ -249,9 +249,9 @@ void finish_defaults()
Read the defaults.
******************************************************************************/
-void read_defaults(arg_list pal)
+void read_defaults(arg_list_t *pal)
{
- arg_list al;
+ arg_list_t al;
char defaults_file[PATH_MAX];
char mydefaults[PATH_MAX];
char line[PATH_MAX];
@@ -265,17 +265,17 @@ void read_defaults(arg_list pal)
snprintf(mydefaults, PATH_MAX, "%s/bin/my_print_defaults", basedir);
// args
- init_args(al);
- add_arg(al, mydefaults);
- if (default_option[0]) add_arg(al, default_option);
- add_arg(al, "mysqld");
- add_arg(al, "server");
- add_arg(al, "mysqld_safe");
- add_arg(al, "safe_mysqld");
+ init_args(&al);
+ add_arg(&al, mydefaults);
+ if (default_option[0]) add_arg(&al, default_option);
+ add_arg(&al, "mysqld");
+ add_arg(&al, "server");
+ add_arg(&al, "mysqld_safe");
+ add_arg(&al, "safe_mysqld");
- spawn(mydefaults, al, TRUE, NULL, defaults_file, NULL);
+ spawn(mydefaults, &al, TRUE, NULL, defaults_file, NULL);
- free_args(al);
+ free_args(&al);
// gather defaults
if((fp = fopen(defaults_file, "r")) != NULL)
@@ -405,17 +405,17 @@ void parse_args(int argc, char *argv[])
******************************************************************************/
void get_options(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
// start defaults
start_defaults(argc, argv);
// default file arguments
- init_args(al);
- add_arg(al, "ignore");
- read_defaults(al);
- parse_args(al->argc, al->argv);
- free_args(al);
+ init_args(&al);
+ add_arg(&al, "ignore");
+ read_defaults(&al);
+ parse_args(al.argc, al.argv);
+ free_args(&al);
// command-line arguments
parse_args(argc, argv);
@@ -504,7 +504,7 @@ void check_setup()
******************************************************************************/
void check_tables()
{
- arg_list al;
+ arg_list_t al;
char mycheck[PATH_MAX];
char table[PATH_MAX];
char db[PATH_MAX];
@@ -549,21 +549,21 @@ void check_tables()
snprintf(mycheck, PATH_MAX, "%s/bin/myisamchk", basedir);
// args
- init_args(al);
- add_arg(al, mycheck);
- add_arg(al, "--silent");
- add_arg(al, "--force");
- add_arg(al, "--fast");
- add_arg(al, "--medium-check");
- add_arg(al, "-O");
- add_arg(al, "key_buffer=64M");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=64M");
- add_arg(al, table);
-
- spawn(mycheck, al, TRUE, NULL, NULL, NULL);
-
- free_args(al);
+ init_args(&al);
+ add_arg(&al, mycheck);
+ add_arg(&al, "--silent");
+ add_arg(&al, "--force");
+ add_arg(&al, "--fast");
+ add_arg(&al, "--medium-check");
+ add_arg(&al, "-O");
+ add_arg(&al, "key_buffer=64M");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=64M");
+ add_arg(&al, table);
+
+ spawn(mycheck, &al, TRUE, NULL, NULL, NULL);
+
+ free_args(&al);
}
else if (strindex(table, ".ism"))
{
@@ -573,17 +573,17 @@ void check_tables()
snprintf(mycheck, PATH_MAX, "%s/bin/isamchk", basedir);
// args
- init_args(al);
- add_arg(al, mycheck);
- add_arg(al, "--silent");
- add_arg(al, "--force");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=64M");
- add_arg(al, table);
+ init_args(&al);
+ add_arg(&al, mycheck);
+ add_arg(&al, "--silent");
+ add_arg(&al, "--force");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=64M");
+ add_arg(&al, table);
- spawn(mycheck, al, TRUE, NULL, NULL, NULL);
+ spawn(mycheck, &al, TRUE, NULL, NULL, NULL);
- free_args(al);
+ free_args(&al);
}
}
}
@@ -599,7 +599,7 @@ void check_tables()
******************************************************************************/
void mysql_start(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
int i, j, err;
struct stat info;
time_t cal;
@@ -619,8 +619,8 @@ void mysql_start(int argc, char *argv[])
};
// args
- init_args(al);
- add_arg(al, "%s", mysqld);
+ init_args(&al);
+ add_arg(&al, "%s", mysqld);
// parent args
for(i = 1; i < argc; i++)
@@ -637,7 +637,7 @@ void mysql_start(int argc, char *argv[])
}
}
- if (!skip) add_arg(al, "%s", argv[i]);
+ if (!skip) add_arg(&al, "%s", argv[i]);
}
// spawn
@@ -653,7 +653,7 @@ void mysql_start(int argc, char *argv[])
log("mysql started : %s\n", stamp);
// spawn mysqld
- spawn(mysqld, al, TRUE, NULL, NULL, err_log);
+ spawn(mysqld, &al, TRUE, NULL, NULL, err_log);
}
while (!stat(pid_file, &info));
@@ -664,7 +664,7 @@ void mysql_start(int argc, char *argv[])
log("mysql stopped : %s\n\n", stamp);
// free args
- free_args(al);
+ free_args(&al);
}
/******************************************************************************
diff --git a/netware/mysqld_safe.def b/netware/mysqld_safe.def
index 36a8c1cd89e..9080ef783c9 100644
--- a/netware/mysqld_safe.def
+++ b/netware/mysqld_safe.def
@@ -6,5 +6,7 @@ SCREENNAME "MySQL Database Server"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Database Server Monitor"
VERSION 4, 0
+MULTIPLE
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqldump.def b/netware/mysqldump.def
index 763097a338c..f267b60ff77 100644
--- a/netware/mysqldump.def
+++ b/netware/mysqldump.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Dump Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlimport.def b/netware/mysqlimport.def
index 990e704b73d..69e9f6eada5 100644
--- a/netware/mysqlimport.def
+++ b/netware/mysqlimport.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Import Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlshow.def b/netware/mysqlshow.def
index 2849def8109..2b41386f643 100644
--- a/netware/mysqlshow.def
+++ b/netware/mysqlshow.def
@@ -6,5 +6,6 @@ SCREENNAME "MySQL Show"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Show Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqltest.def b/netware/mysqltest.def
index c4fadf141c6..d98f6436a4a 100644
--- a/netware/mysqltest.def
+++ b/netware/mysqltest.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Case Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/pack_isam.def b/netware/pack_isam.def
index 0e077be6f00..f0f5a7e328a 100644
--- a/netware/pack_isam.def
+++ b/netware/pack_isam.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Pack Tool"
VERSION 4, 0
-DEBUG
+XDCDATA ../netware/mysql.xdc
+#DEBUG
diff --git a/netware/perror.def b/netware/perror.def
index 08725a515ef..f1d23715f55 100644
--- a/netware/perror.def
+++ b/netware/perror.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Error Code Description Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/replace.def b/netware/replace.def
index b639d40f58b..b55690152b9 100644
--- a/netware/replace.def
+++ b/netware/replace.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Text Replacement Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/resolveip.def b/netware/resolveip.def
index fc6ee0fa313..10b99304e22 100644
--- a/netware/resolveip.def
+++ b/netware/resolveip.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL IP/Hostname Resolve Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG