Commit 6c7b1b2f authored by greg@mysql.com's avatar greg@mysql.com

Changes from Novell for various NetWare-only files, post-4.0.12

parent 4aee752c
...@@ -22,17 +22,13 @@ ...@@ -22,17 +22,13 @@
#include <errno.h> #include <errno.h>
#include <screen.h> #include <screen.h>
#include <limits.h> #include <limits.h>
#include <nks/synch.h>
#include <nks/thread.h>
#include <signal.h> #include <signal.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <nks/errno.h>
#include <sys/types.h> #include <sys/types.h>
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
#include <nks/time.h>
#include <pthread.h> #include <pthread.h>
#include <termios.h> #include <termios.h>
...@@ -48,6 +44,9 @@ ...@@ -48,6 +44,9 @@
#define HAVE_PTHREAD_YIELD_ZERO_ARG 1 #define HAVE_PTHREAD_YIELD_ZERO_ARG 1
#define HAVE_BROKEN_REALPATH 1 #define HAVE_BROKEN_REALPATH 1
/* include the old function apis */
#define USE_OLD_FUNCTIONS 1
/* no case sensitivity */ /* no case sensitivity */
#define FN_NO_CASE_SENCE 1 #define FN_NO_CASE_SENCE 1
......
#! /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
#! /bin/sh #! /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 # 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 MYDEV="WINE_BUILD_DIR"
export MWCNWx86Includes="$MYDEV/libc/include" export MWCNWx86Includes="$MYDEV/libc/include"
...@@ -12,16 +12,16 @@ export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib" ...@@ -12,16 +12,16 @@ export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib"
export WINEPATH="$MYDEV/mw/bin" 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 PATH="$PATH:BUILD_DIR/mysql-VERSION/netware/BUILD"
export AR='mwldnlm' 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 -bool on -relax_pointers -DUSE_OLD_FUNCTIONS' export CFLAGS='-dialect c -proc 686 -relax_pointers'
export CXX='mwccnlm -gccincludes' 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 LD='mwldnlm'
export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption' export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption'
export RANLIB=: export RANLIB=:
......
...@@ -129,7 +129,7 @@ else ...@@ -129,7 +129,7 @@ else
fi fi
echo "creating ChangeLog..." echo "creating ChangeLog..."
bk changes -v -r$rev > $target_dir/ChangeLog bk changes -v -r$rev..$revision > $target_dir/ChangeLog
# add the latest manual # add the latest manual
if test -d $doc_dir if test -d $doc_dir
......
...@@ -28,11 +28,12 @@ netware_build_files = client/mysql.def client/mysqladmin.def \ ...@@ -28,11 +28,12 @@ netware_build_files = client/mysql.def client/mysqladmin.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 isam/isamchk.def \ extra/resolveip.def extra/comp_err.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.xdc sql/mysqld.def
link_sources: link_sources:
set -x; \ set -x; \
......
#------------------------------------------------------------------------------
# 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
...@@ -6,5 +6,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved ...@@ -6,5 +6,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL ISAM Table Check Tool" DESCRIPTION "MySQL ISAM Table Check Tool"
VERSION 4, 0 VERSION 4, 0
STACKSIZE 65536 STACKSIZE 65536
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Log Tool" DESCRIPTION "MySQL ISAM Table Log Tool"
VERSION 4, 0 VERSION 4, 0
DEBUG XDCDATA ../netware/mysql.xdc
#DEBUG
...@@ -7,4 +7,5 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved ...@@ -7,4 +7,5 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL Client Library" DESCRIPTION "MySQL Client Library"
VERSION 4, 0 VERSION 4, 0
AUTOUNLOAD AUTOUNLOAD
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <dirent.h> #include <dirent.h>
#include <string.h> #include <string.h>
#include <screen.h> #include <screen.h>
#include <nks/vm.h> #include <proc.h>
#include <ctype.h> #include <ctype.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
...@@ -54,18 +54,16 @@ ...@@ -54,18 +54,16 @@
Init an argument list. 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->argc = 0;
al->size = ARG_BUF;
al->argv = malloc(al->size * sizeof(char *));
ASSERT(al->argv != NULL);
for(i = 0; i < ARG_MAX; i++) return;
{
(*al)->argv[i] = NULL;
}
} }
/****************************************************************************** /******************************************************************************
...@@ -75,49 +73,66 @@ void _init_args(arg_list *al) ...@@ -75,49 +73,66 @@ void _init_args(arg_list *al)
Add an argument to a list. 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; va_list ap;
char temp[PATH_MAX];
ASSERT(al != NULL); 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);
}
if (format)
{
va_start(ap, format); va_start(ap, format);
vsprintf(temp, format, ap);
vsprintf(al->argv[al->argc], format, ap);
va_end(ap); va_end(ap);
al->argv[al->argc] = malloc(strlen(temp)+1);
ASSERT(al->argv[al->argc] != NULL);
strcpy(al->argv[al->argc], temp);
++(al->argc); ++(al->argc);
}
else
{
al->argv[al->argc] = NULL;
}
return;
} }
/****************************************************************************** /******************************************************************************
_free_args() free_args()
Free an argument list. Free an argument list.
******************************************************************************/ ******************************************************************************/
void _free_args(arg_list *al) void free_args(arg_list_t *al)
{ {
int i; int i;
ASSERT(al != NULL); 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); ASSERT(al->argv[i] != NULL);
free((*al)->argv[i]); free(al->argv[i]);
(*al)->argv[i] = NULL; al->argv[i] = NULL;
} }
free(*al); free(al->argv);
*al = NULL; al->argc = 0;
al->argv = NULL;
return;
} }
/****************************************************************************** /******************************************************************************
...@@ -167,7 +182,7 @@ int sleep_until_file_exists(char *pid_file) ...@@ -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) int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
{ {
arg_list al; arg_list_t al;
int err, i; int err, i;
char mysqladmin_file[PATH_MAX]; char mysqladmin_file[PATH_MAX];
char trash[PATH_MAX]; char trash[PATH_MAX];
...@@ -177,27 +192,27 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port) ...@@ -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"); snprintf(trash, PATH_MAX, "/tmp/trash.out");
// args // args
init_args(al); init_args(&al);
add_arg(al, "%s", mysqladmin_file); add_arg(&al, "%s", mysqladmin_file);
add_arg(al, "--no-defaults"); add_arg(&al, "--no-defaults");
add_arg(al, "--port=%u", port); add_arg(&al, "--port=%u", port);
add_arg(al, "--user=%s", user); add_arg(&al, "--user=%s", user);
add_arg(al, "--password=%s", password); add_arg(&al, "--password=%s", password);
add_arg(al, "--silent"); add_arg(&al, "--silent");
add_arg(al, "-O"); add_arg(&al, "-O");
add_arg(al, "connect_timeout=10"); add_arg(&al, "connect_timeout=10");
add_arg(al, "-w"); add_arg(&al, "-w");
add_arg(al, "--host=localhost"); add_arg(&al, "--host=localhost");
add_arg(al, "ping"); add_arg(&al, "ping");
// NetWare does not support the connect timeout in the TCP/IP stack // NetWare does not support the connect timeout in the TCP/IP stack
// -- we will try the ping multiple times // -- we will try the ping multiple times
for(i = 0; (i < TRY_MAX) 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); trash, NULL)); i++) sleep(1);
// free args // free args
free_args(al); free_args(&al);
return err; return err;
} }
...@@ -206,70 +221,52 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port) ...@@ -206,70 +221,52 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
spawn() 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) char *output, char *error)
{ {
NXNameSpec_t name; pid_t pid;
NXExecEnvSpec_t env; int result = 0;
NXVmId_t vm, ignore; wiring_t wiring = { FD_UNUSED, FD_UNUSED, FD_UNUSED };
int result; unsigned long flags = PROC_CURRENT_SPACE | PROC_INHERIT_CWD;
// 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) // open wiring
{ if (input)
env.esStdout.ssType = NX_OBJ_DEFAULT; wiring.infd = open(input, O_RDONLY);
env.esStdout.ssPath = NULL;
} if (output)
else wiring.outfd = open(output, O_WRONLY | O_CREAT | O_TRUNC);
{
env.esStdout.ssType = NX_OBJ_FILE; if (error)
env.esStdout.ssPath = output; wiring.errfd = open(error, O_WRONLY | O_CREAT | O_TRUNC);
}
// procve requires a NULL
add_arg(al, NULL);
if (error == 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; result = -1;
env.esStderr.ssPath = NULL;
} }
else else if (join)
{ {
env.esStderr.ssType = NX_OBJ_FILE; waitpid(pid, &result, 0);
env.esStderr.ssPath = error;
} }
result = NXVmSpawn(&name, &env, NX_VM_SAME_ADDRSPACE | NX_VM_INHERIT_ENV, &vm); // close wiring
if (wiring.infd != -1)
close(wiring.infd);
if (!result && join) if (wiring.outfd != -1)
{ close(wiring.outfd);
NXVmJoin(vm, &ignore, &result);
} if (wiring.errfd != -1)
close(wiring.errfd);
return result; return result;
} }
...@@ -284,7 +281,7 @@ int spawn(char *file, arg_list al, int join, char *input, ...@@ -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, int stop_server(char *bin_dir, char *user, char *password, int port,
char *pid_file) char *pid_file)
{ {
arg_list al; arg_list_t al;
int err, i, argc = 0; int err, i, argc = 0;
char mysqladmin_file[PATH_MAX]; char mysqladmin_file[PATH_MAX];
char trash[PATH_MAX]; char trash[PATH_MAX];
...@@ -294,18 +291,18 @@ int stop_server(char *bin_dir, char *user, char *password, int port, ...@@ -294,18 +291,18 @@ int stop_server(char *bin_dir, char *user, char *password, int port,
snprintf(trash, PATH_MAX, "/tmp/trash.out"); snprintf(trash, PATH_MAX, "/tmp/trash.out");
// args // args
init_args(al); init_args(&al);
add_arg(al, "%s", mysqladmin_file); add_arg(&al, "%s", mysqladmin_file);
add_arg(al, "--no-defaults"); add_arg(&al, "--no-defaults");
add_arg(al, "--port=%u", port); add_arg(&al, "--port=%u", port);
add_arg(al, "--user=%s", user); add_arg(&al, "--user=%s", user);
add_arg(al, "--password=%s", password); add_arg(&al, "--password=%s", password);
add_arg(al, "-O"); add_arg(&al, "-O");
add_arg(al, "shutdown_timeout=20"); add_arg(&al, "shutdown_timeout=20");
add_arg(al, "shutdown"); add_arg(&al, "shutdown");
// spawn // spawn
if ((err = spawn(mysqladmin_file, al, TRUE, NULL, if ((err = spawn(mysqladmin_file, &al, TRUE, NULL,
trash, NULL)) == 0) trash, NULL)) == 0)
{ {
sleep_until_file_deleted(pid_file); sleep_until_file_deleted(pid_file);
...@@ -324,7 +321,7 @@ int stop_server(char *bin_dir, char *user, char *password, int port, ...@@ -324,7 +321,7 @@ int stop_server(char *bin_dir, char *user, char *password, int port,
} }
// free args // free args
free_args(al); free_args(&al);
return err; return err;
} }
......
...@@ -34,12 +34,9 @@ ...@@ -34,12 +34,9 @@
******************************************************************************/ ******************************************************************************/
#define ARG_MAX 50 #define ARG_BUF 10
#define TRY_MAX 5 #define TRY_MAX 5
#define init_args(al) _init_args(&al);
#define free_args(al) _free_args(&al);
/****************************************************************************** /******************************************************************************
structures structures
...@@ -50,9 +47,11 @@ typedef struct ...@@ -50,9 +47,11 @@ typedef struct
{ {
int argc; 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 ...@@ -66,18 +65,23 @@ typedef struct
******************************************************************************/ ******************************************************************************/
void _init_args(arg_list *); void init_args(arg_list_t *);
void add_arg(arg_list, char *, ...); void add_arg(arg_list_t *, char *, ...);
void _free_args(arg_list *); void free_args(arg_list_t *);
int sleep_until_file_exists(char *); int sleep_until_file_exists(char *);
int sleep_until_file_deleted(char *); int sleep_until_file_deleted(char *);
int wait_for_server_start(char *, char *, char *, int); 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 *); int stop_server(char *, char *, char *, int, char *);
pid_t get_server_pid(char *); pid_t get_server_pid(char *);
void kill_server(pid_t pid); void kill_server(pid_t pid);
void del_tree(char *); void del_tree(char *);
int removef(char *, ...); int removef(char *, ...);
void get_basedir(char *, char *); void get_basedir(char *, char *);
#endif /* _MY_MANAGE */ #endif /* _MY_MANAGE */
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Print Defaults Tool" DESCRIPTION "MySQL Print Defaults Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -6,5 +6,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved ...@@ -6,5 +6,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL MyISAM Table Check Tool" DESCRIPTION "MySQL MyISAM Table Check Tool"
VERSION 4, 0 VERSION 4, 0
STACKSIZE 65536 STACKSIZE 65536
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Log Tool" DESCRIPTION "MySQL MyISAM Table Log Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Pack Tool" DESCRIPTION "MySQL MyISAM Table Pack Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -7,5 +7,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved ...@@ -7,5 +7,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL Monitor" DESCRIPTION "MySQL Monitor"
VERSION 4, 0 VERSION 4, 0
MULTIPLE MULTIPLE
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Install Tool" DESCRIPTION "MySQL Install Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <strings.h> #include <strings.h>
#include <getopt.h> #include <getopt.h>
#include <screen.h> #include <screen.h>
#include <errno.h>
#include "my_config.h" #include "my_config.h"
#include "my_manage.h" #include "my_manage.h"
...@@ -51,7 +52,7 @@ char default_option[PATH_MAX]; ...@@ -51,7 +52,7 @@ char default_option[PATH_MAX];
void start_defaults(int, char*[]); void start_defaults(int, char*[]);
void finish_defaults(); void finish_defaults();
void read_defaults(arg_list); void read_defaults(arg_list_t *);
void parse_args(int, char*[]); void parse_args(int, char*[]);
void get_options(int, char*[]); void get_options(int, char*[]);
void create_paths(); void create_paths();
...@@ -151,9 +152,9 @@ void finish_defaults() ...@@ -151,9 +152,9 @@ void finish_defaults()
Read the 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 defaults_file[PATH_MAX];
char mydefaults[PATH_MAX]; char mydefaults[PATH_MAX];
char line[PATH_MAX]; char line[PATH_MAX];
...@@ -167,15 +168,15 @@ void read_defaults(arg_list pal) ...@@ -167,15 +168,15 @@ void read_defaults(arg_list pal)
snprintf(mydefaults, PATH_MAX, "%s/bin/my_print_defaults", basedir); snprintf(mydefaults, PATH_MAX, "%s/bin/my_print_defaults", basedir);
// args // args
init_args(al); init_args(&al);
add_arg(al, mydefaults); add_arg(&al, mydefaults);
if (default_option[0]) add_arg(al, default_option); if (default_option[0]) add_arg(&al, default_option);
add_arg(al, "mysqld"); add_arg(&al, "mysqld");
add_arg(al, "mysql_install_db"); 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 // gather defaults
if((fp = fopen(defaults_file, "r")) != NULL) if((fp = fopen(defaults_file, "r")) != NULL)
...@@ -267,17 +268,17 @@ void parse_args(int argc, char *argv[]) ...@@ -267,17 +268,17 @@ void parse_args(int argc, char *argv[])
******************************************************************************/ ******************************************************************************/
void get_options(int argc, char *argv[]) void get_options(int argc, char *argv[])
{ {
arg_list al; arg_list_t al;
// start defaults // start defaults
start_defaults(argc, argv); start_defaults(argc, argv);
// default file arguments // default file arguments
init_args(al); init_args(&al);
add_arg(al, "dummy"); add_arg(&al, "ignore");
read_defaults(al); read_defaults(&al);
parse_args(al->argc, al->argv); parse_args(al.argc, al.argv);
free_args(al); free_args(&al);
// command-line arguments // command-line arguments
parse_args(argc, argv); parse_args(argc, argv);
...@@ -323,7 +324,7 @@ void create_paths() ...@@ -323,7 +324,7 @@ void create_paths()
******************************************************************************/ ******************************************************************************/
int mysql_install_db(int argc, char *argv[]) int mysql_install_db(int argc, char *argv[])
{ {
arg_list al; arg_list_t al;
int i, j, err; int i, j, err;
char skip; char skip;
...@@ -336,8 +337,8 @@ int mysql_install_db(int argc, char *argv[]) ...@@ -336,8 +337,8 @@ int mysql_install_db(int argc, char *argv[])
}; };
// args // args
init_args(al); init_args(&al);
add_arg(al, "%s", mysqld); add_arg(&al, "%s", mysqld);
// parent args // parent args
for(i = 1; i < argc; i++) for(i = 1; i < argc; i++)
...@@ -354,19 +355,19 @@ int mysql_install_db(int argc, char *argv[]) ...@@ -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, "--bootstrap");
add_arg(al, "--skip-grant-tables"); add_arg(&al, "--skip-grant-tables");
add_arg(al, "--skip-innodb"); add_arg(&al, "--skip-innodb");
add_arg(al, "--skip-bdb"); add_arg(&al, "--skip-bdb");
// spawn mysqld // 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
free_args(al); free_args(&al);
return err; return err;
} }
...@@ -384,6 +385,9 @@ int main(int argc, char **argv) ...@@ -384,6 +385,9 @@ int main(int argc, char **argv)
// check for an autoclose option // check for an autoclose option
if (!autoclose) setscreenmode(SCR_NO_MODE); 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
create_paths(); create_paths();
...@@ -391,6 +395,7 @@ int main(int argc, char **argv) ...@@ -391,6 +395,7 @@ int main(int argc, char **argv)
if (mysql_install_db(argc, argv)) if (mysql_install_db(argc, argv))
{ {
printf("ERROR - The database creation failed!\n"); printf("ERROR - The database creation failed!\n");
printf(" %s\n", strerror(errno));
printf("See the following log for more infomration:\n"); printf("See the following log for more infomration:\n");
printf("\t%s\n\n", err_log); printf("\t%s\n\n", err_log);
exit(-1); exit(-1);
......
...@@ -6,5 +6,6 @@ SCREENNAME "MySQL Install" ...@@ -6,5 +6,6 @@ SCREENNAME "MySQL Install"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Initial Database Installer" DESCRIPTION "MySQL Initial Database Installer"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
This diff is collapsed.
...@@ -7,4 +7,5 @@ SCREENNAME "MySQL Test Run" ...@@ -7,4 +7,5 @@ SCREENNAME "MySQL Test Run"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Run" DESCRIPTION "MySQL Test Run"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -6,5 +6,6 @@ SCREENNAME "MySQL Admin" ...@@ -6,5 +6,6 @@ SCREENNAME "MySQL Admin"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Admin Tool" DESCRIPTION "MySQL Admin Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Binary Log Dump Tool" DESCRIPTION "MySQL Binary Log Dump Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Check Tool" DESCRIPTION "MySQL Check Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
# MySQL Server # MySQL Server
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
XDCDATA mysqld.xdc
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Database Server" DESCRIPTION "MySQL Database Server"
VERSION 4, 0 VERSION 4, 0
MULTIPLE MULTIPLE
STACKSIZE 65536 STACKSIZE 65536
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -6,5 +6,7 @@ SCREENNAME "MySQL Database Server" ...@@ -6,5 +6,7 @@ SCREENNAME "MySQL Database Server"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Database Server Monitor" DESCRIPTION "MySQL Database Server Monitor"
VERSION 4, 0 VERSION 4, 0
MULTIPLE
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Dump Tool" DESCRIPTION "MySQL Dump Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Import Tool" DESCRIPTION "MySQL Import Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -6,5 +6,6 @@ SCREENNAME "MySQL Show" ...@@ -6,5 +6,6 @@ SCREENNAME "MySQL Show"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Show Tool" DESCRIPTION "MySQL Show Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Case Tool" DESCRIPTION "MySQL Test Case Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Pack Tool" DESCRIPTION "MySQL ISAM Table Pack Tool"
VERSION 4, 0 VERSION 4, 0
DEBUG XDCDATA ../netware/mysql.xdc
#DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Error Code Description Tool" DESCRIPTION "MySQL Error Code Description Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Text Replacement Tool" DESCRIPTION "MySQL Text Replacement Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
...@@ -5,5 +5,6 @@ MODULE libc.nlm ...@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL IP/Hostname Resolve Tool" DESCRIPTION "MySQL IP/Hostname Resolve Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
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