summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--client/client_priv.h2
-rw-r--r--client/mysql.cc56
-rw-r--r--client/mysql_upgrade.c7
-rw-r--r--client/mysqladmin.cc12
-rw-r--r--client/mysqlbinlog.cc12
-rw-r--r--client/mysqlcheck.c12
-rw-r--r--client/mysqldump.c14
-rw-r--r--client/mysqlimport.c12
-rw-r--r--client/mysqlshow.c13
-rw-r--r--client/mysqlslap.c8
-rw-r--r--client/mysqltest.cc5
-rw-r--r--config/ac-macros/misc.m432
-rw-r--r--configure.in272
-rw-r--r--extra/my_print_defaults.c5
-rw-r--r--extra/mysql_waitpid.c14
-rw-r--r--extra/perror.c6
-rw-r--r--extra/resolve_stack_dump.c4
-rw-r--r--extra/resolveip.c3
-rw-r--r--extra/yassl/include/yassl_int.hpp3
-rw-r--r--extra/yassl/src/socket_wrapper.cpp2
-rw-r--r--extra/yassl/taocrypt/src/random.cpp61
-rw-r--r--extra/yassl/testsuite/test.hpp9
-rw-r--r--include/Makefile.am4
-rw-r--r--include/config-netware.h161
-rw-r--r--include/help_end.h26
-rw-r--r--include/help_start.h28
-rw-r--r--include/my_global.h38
-rw-r--r--include/my_net.h2
-rw-r--r--include/my_pthread.h11
-rw-r--r--include/my_stacktrace.h2
-rw-r--r--include/my_sys.h7
-rw-r--r--include/mysql.h8
-rw-r--r--libmysql/get_password.c14
-rw-r--r--libmysql/libmysql.c12
-rw-r--r--libmysqld/Makefile.am21
-rw-r--r--mysql-test/lib/v1/mtr_misc.pl1
-rwxr-xr-xmysql-test/lib/v1/mysql-test-run.pl8
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/ndb_log_update_as_write_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/ndb_log_updated_only_basic.test2
-rw-r--r--mysys/Makefile.am2
-rw-r--r--mysys/default.c12
-rw-r--r--mysys/mf_path.c3
-rw-r--r--mysys/mf_tempdir.c4
-rw-r--r--mysys/mf_tempfile.c11
-rw-r--r--mysys/my_clock.c4
-rw-r--r--mysys/my_copy.c2
-rw-r--r--mysys/my_getopt.c4
-rw-r--r--mysys/my_getsystime.c8
-rw-r--r--mysys/my_init.c65
-rw-r--r--mysys/my_lock.c55
-rw-r--r--mysys/my_mess.c6
-rw-r--r--mysys/my_netware.c150
-rw-r--r--mysys/my_pthread.c28
-rw-r--r--mysys/my_rdtsc.c38
-rw-r--r--mysys/my_redel.c6
-rw-r--r--mysys/my_rename.c2
-rw-r--r--mysys/my_sleep.c4
-rwxr-xr-xnetware/BUILD/apply-patch41
-rwxr-xr-xnetware/BUILD/compile-AUTOTOOLS26
-rwxr-xr-xnetware/BUILD/compile-linux-tools67
-rwxr-xr-xnetware/BUILD/compile-netware-END52
-rwxr-xr-xnetware/BUILD/compile-netware-START26
-rwxr-xr-xnetware/BUILD/compile-netware-all15
-rwxr-xr-xnetware/BUILD/compile-netware-debug21
-rwxr-xr-xnetware/BUILD/compile-netware-max23
-rwxr-xr-xnetware/BUILD/compile-netware-max-debug23
-rwxr-xr-xnetware/BUILD/compile-netware-src35
-rwxr-xr-xnetware/BUILD/compile-netware-standard23
-rwxr-xr-xnetware/BUILD/create-patch56
-rwxr-xr-xnetware/BUILD/cron-build46
-rwxr-xr-xnetware/BUILD/crontab4
-rw-r--r--netware/BUILD/knetware.imp2
-rwxr-xr-xnetware/BUILD/mwasmnlm11
-rwxr-xr-xnetware/BUILD/mwccnlm16
-rwxr-xr-xnetware/BUILD/mwenv75
-rwxr-xr-xnetware/BUILD/mwldnlm18
-rwxr-xr-xnetware/BUILD/nwbuild86
-rw-r--r--netware/BUILD/openssl.imp9
-rwxr-xr-xnetware/BUILD/save-patch56
-rw-r--r--netware/Makefile.am117
-rw-r--r--netware/comp_err.def11
-rw-r--r--netware/install_test_db.ncf1
-rw-r--r--netware/libmysql.def12
-rw-r--r--netware/libmysqlmain.c38
-rw-r--r--netware/my_manage.c475
-rw-r--r--netware/my_manage.h118
-rw-r--r--netware/my_print_defaults.def11
-rw-r--r--netware/myisam_ftdump.def12
-rw-r--r--netware/myisamchk.def12
-rw-r--r--netware/myisamlog.def12
-rw-r--r--netware/myisampack.def12
-rw-r--r--netware/mysql.def13
-rw-r--r--netware/mysql.xdcbin128 -> 0 bytes
-rw-r--r--netware/mysql_client_test.def10
-rw-r--r--netware/mysql_fix_privilege_tables.pl227
-rw-r--r--netware/mysql_install_db.c447
-rw-r--r--netware/mysql_install_db.def12
-rw-r--r--netware/mysql_secure_installation.pl218
-rw-r--r--netware/mysql_test_run.c1415
-rw-r--r--netware/mysql_test_run.def11
-rw-r--r--netware/mysql_upgrade.def11
-rw-r--r--netware/mysql_waitpid.def12
-rw-r--r--netware/mysqladmin.def12
-rw-r--r--netware/mysqlbinlog.def12
-rw-r--r--netware/mysqlcheck.def12
-rw-r--r--netware/mysqld.def12
-rw-r--r--netware/mysqld_safe.c726
-rw-r--r--netware/mysqld_safe.def13
-rw-r--r--netware/mysqldump.def12
-rw-r--r--netware/mysqlimport.def12
-rw-r--r--netware/mysqlshow.def12
-rw-r--r--netware/mysqlslap.def11
-rw-r--r--netware/mysqltest.def11
-rw-r--r--netware/perror.def11
-rw-r--r--netware/replace.def11
-rw-r--r--netware/resolve_stack_dump.def12
-rw-r--r--netware/resolveip.def11
-rw-r--r--netware/static_init_db.sql34
-rw-r--r--scripts/make_binary_distribution.sh397
-rw-r--r--scripts/mysqlhotcopy.sh20
-rw-r--r--sql-common/client.c8
-rw-r--r--sql/Makefile.am3
-rw-r--r--sql/my_lock.c78
-rw-r--r--sql/mysqld.cc390
-rw-r--r--sql/net_serv.cc3
-rw-r--r--sql/sql_bitmap.h9
-rw-r--r--sql/sql_connect.cc4
-rw-r--r--sql/sql_load.cc2
-rw-r--r--sql/sys_vars.cc2
-rw-r--r--sql/tztime.cc5
-rw-r--r--storage/innobase/handler/ha_innodb.cc19
-rw-r--r--storage/innobase/include/os0file.h6
-rw-r--r--storage/innobase/include/srv0start.h4
-rw-r--r--storage/innobase/include/univ.i2
-rw-r--r--storage/innobase/include/ut0dbg.h46
-rw-r--r--storage/innobase/os/os0file.c10
-rw-r--r--storage/innobase/os/os0proc.c4
-rw-r--r--storage/innobase/os/os0thread.c12
-rw-r--r--storage/innobase/srv/srv0start.c26
-rw-r--r--storage/innobase/ut/ut0dbg.c27
-rw-r--r--storage/innobase/ut/ut0mem.c6
-rw-r--r--storage/myisam/mi_test3.c14
-rw-r--r--storage/myisam/myisam_ftdump.c3
-rw-r--r--storage/myisam/myisamchk.c17
-rw-r--r--storage/myisam/myisamlog.c2
-rw-r--r--storage/myisam/myisampack.c14
-rw-r--r--storage/ndb/src/mgmclient/main.cpp2
-rw-r--r--storage/ndb/src/mgmsrv/main.cpp2
-rw-r--r--strings/ctype-simple.c13
-rw-r--r--strings/my_strtoll10.c11
-rw-r--r--vio/test-ssl.c2
-rw-r--r--vio/viossl.c30
-rw-r--r--vio/viosslfactories.c34
155 files changed, 298 insertions, 7111 deletions
diff --git a/Makefile.am b/Makefile.am
index 91174568026..297e923905e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,7 @@ SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
@pstack_dir@ libservices \
@sql_union_dirs@ unittest \
@sql_server@ @man_dirs@ tests \
- netware @libmysqld_dirs@ \
+ @libmysqld_dirs@ \
mysql-test support-files sql-bench \
win \
cmake
@@ -36,7 +36,7 @@ DIST_SUBDIRS = . include Docs zlib \
pstack libservices \
strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
vio sql man tests \
- netware libmysqld \
+ libmysqld \
mysql-test support-files sql-bench \
win \
cmake \
diff --git a/client/client_priv.h b/client/client_priv.h
index b0991c0134f..e7911fc31f7 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -60,7 +60,7 @@ enum options_client
OPT_IMPORT_USE_THREADS,
OPT_MYSQL_NUMBER_OF_QUERY,
OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
- OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA,
+ OPT_TZ_UTC, OPT_CREATE_SLAP_SCHEMA,
OPT_MYSQLDUMP_SLAVE_APPLY,
OPT_MYSQLDUMP_SLAVE_DATA,
OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT,
diff --git a/client/mysql.cc b/client/mysql.cc
index d64bd8f686a..a31c503b9a2 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -91,7 +91,7 @@ extern "C" {
#undef bcmp // Fix problem with new readline
#if defined(__WIN__)
#include <conio.h>
-#elif !defined(__NETWARE__)
+#else
#include <readline/readline.h>
#define HAVE_READLINE
#endif
@@ -109,7 +109,7 @@ extern "C" {
#define cmp_database(cs,A,B) strcmp((A),(B))
#endif
-#if !defined(__WIN__) && !defined(__NETWARE__) && !defined(THREAD)
+#if !defined(__WIN__) && !defined(THREAD)
#define USE_POPEN
#endif
@@ -1365,10 +1365,6 @@ static struct my_option my_long_options[] =
0, 0, 0, 0, 0},
{"help", 'I', "Synonym for -?", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
0, 0, 0, 0, 0},
-#ifdef __NETWARE__
- {"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"auto-rehash", OPT_AUTO_REHASH,
"Enable automatic rehashing. One doesn't need to use 'rehash' to get table "
"and field completion, but startup and reconnecting may take a longer time. "
@@ -1582,11 +1578,6 @@ static struct my_option my_long_options[] =
static void usage(int version)
{
- /* Divert all help information on NetWare to logger screen. */
-#ifdef __NETWARE__
-#define printf consoleprintf
-#endif
-
#if defined(USE_LIBEDIT_INTERFACE)
const char* readline= "";
#else
@@ -1609,10 +1600,6 @@ static void usage(int version)
my_print_help(my_long_options);
print_defaults("my", load_default_groups);
my_print_variables(my_long_options);
- NETWARE_SET_SCREEN_MODE(1);
-#ifdef __NETWARE__
-#undef printf
-#endif
}
@@ -1621,11 +1608,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch(optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
case OPT_CHARSETS_DIR:
strmake(mysql_charsets_dir, argument, sizeof(mysql_charsets_dir) - 1);
charsets_dir = mysql_charsets_dir;
@@ -1851,10 +1833,6 @@ static int get_options(int argc, char **argv)
static int read_and_execute(bool interactive)
{
-#if defined(__NETWARE__)
- char linebuffer[254];
- String buffer;
-#endif
#if defined(__WIN__)
String tmpbuf;
String buffer;
@@ -1900,18 +1878,8 @@ static int read_and_execute(bool interactive)
if (opt_outfile && glob_buffer.is_empty())
fflush(OUTFILE);
-#if defined(__WIN__) || defined(__NETWARE__)
+#if defined(__WIN__)
tee_fputs(prompt, stdout);
-#if defined(__NETWARE__)
- line=fgets(linebuffer, sizeof(linebuffer)-1, stdin);
- /* Remove the '\n' */
- if (line)
- {
- char *p = strrchr(line, '\n');
- if (p != NULL)
- *p = '\0';
- }
-#else
if (!tmpbuf.is_alloced())
tmpbuf.alloc(65535);
tmpbuf.length(0);
@@ -1932,12 +1900,11 @@ static int read_and_execute(bool interactive)
*/
if (line)
line= buffer.c_ptr();
-#endif /* __NETWARE__ */
#else
if (opt_outfile)
fputs(prompt, OUTFILE);
line= readline(prompt);
-#endif /* defined(__WIN__) || defined(__NETWARE__) */
+#endif /* defined(__WIN__) */
/*
When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS
@@ -1985,10 +1952,8 @@ static int read_and_execute(bool interactive)
}
}
-#if defined(__WIN__) || defined(__NETWARE__)
- buffer.free();
-#endif
#if defined(__WIN__)
+ buffer.free();
tmpbuf.free();
#endif
@@ -3945,8 +3910,6 @@ static int
com_quit(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{
- /* let the screen auto close on a normal shutdown */
- NETWARE_SET_SCREEN_MODE(SCR_AUTOCLOSE_ON_EXIT);
status.exit_status=0;
return 1;
}
@@ -4664,7 +4627,6 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
{
va_list args;
- NETWARE_YIELD;
va_start(args, fmt);
(void) vfprintf(file, fmt, args);
va_end(args);
@@ -4680,7 +4642,6 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
void tee_fputs(const char *s, FILE *file)
{
- NETWARE_YIELD;
fputs(s, file);
if (opt_outfile)
fputs(s, OUTFILE);
@@ -4689,7 +4650,6 @@ void tee_fputs(const char *s, FILE *file)
void tee_puts(const char *s, FILE *file)
{
- NETWARE_YIELD;
fputs(s, file);
fputc('\n', file);
if (opt_outfile)
@@ -4706,7 +4666,7 @@ void tee_putc(int c, FILE *file)
putc(c, OUTFILE);
}
-#if defined(__WIN__) || defined(__NETWARE__)
+#if defined(__WIN__)
#include <time.h>
#else
#include <sys/times.h>
@@ -4718,8 +4678,8 @@ void tee_putc(int c, FILE *file)
static ulong start_timer(void)
{
-#if defined(__WIN__) || defined(__NETWARE__)
- return clock();
+#if defined(__WIN__)
+ return clock();
#else
struct tms tms_tmp;
return times(&tms_tmp);
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 0ad44f3d20d..20436200c7e 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -57,8 +57,6 @@ static my_bool not_used; /* Can't use GET_BOOL without a value pointer */
static my_bool opt_write_binlog;
-#include <help_start.h>
-
static struct my_option my_long_options[]=
{
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
@@ -139,8 +137,6 @@ static struct my_option my_long_options[]=
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
-#include <help_end.h>
-
static void free_used_memory(void)
{
@@ -809,9 +805,6 @@ int main(int argc, char **argv)
char self_name[FN_REFLEN];
MY_INIT(argv[0]);
-#ifdef __NETWARE__
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
-#endif
#if __WIN__
if (GetModuleFileName(NULL, self_name, FN_REFLEN) == 0)
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index bf0dec01d2f..69381b749a1 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -116,10 +116,6 @@ static TYPELIB command_typelib=
static struct my_option my_long_options[] =
{
-#ifdef __NETWARE__
- {"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"count", 'c',
"Number of iterations to make. This works with -i (--sleep) only.",
&nr_iterations, &nr_iterations, 0, GET_UINT,
@@ -222,11 +218,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int error = 0;
switch(optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
case 'c':
opt_count_iterations= 1;
break;
@@ -1068,13 +1059,11 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
return 0;
}
-#include <help_start.h>
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s on %s\n",my_progname,ADMIN_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
- NETWARE_SET_SCREEN_MODE(1);
}
@@ -1118,7 +1107,6 @@ static void usage(void)
version Get version info from server");
}
-#include <help_end.h>
static int drop_db(MYSQL *mysql, const char *db)
{
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index a7875d63aa2..f491485b77a 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1002,10 +1002,6 @@ static struct my_option my_long_options[] =
{
{"help", '?', "Display this help and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef __NETWARE__
- {"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"base64-output", OPT_BASE64_OUTPUT_MODE,
/* 'unspec' is not mentioned because it is just a placeholder. */
"Determine when the output statements should be base64-encoded BINLOG "
@@ -1233,12 +1229,10 @@ static void cleanup()
mysql_close(mysql);
}
-#include <help_start.h>
static void print_version()
{
printf("%s Ver 3.3 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
- NETWARE_SET_SCREEN_MODE(1);
}
@@ -1280,7 +1274,6 @@ static my_time_t convert_str_to_timestamp(const char* str)
my_system_gmt_sec(&l_time, &dummy_my_timezone, &dummy_in_dst_time_gap);
}
-#include <help_end.h>
extern "C" my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
@@ -1288,11 +1281,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
{
bool tty_password=0;
switch (optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
#ifndef DBUG_OFF
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 2c9c563e17f..025f6c2bd2b 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -62,10 +62,6 @@ static struct my_option my_long_options[] =
"Instead of issuing one query for each table, use one query per database, naming all tables in the database in a comma-separated list.",
&opt_all_in_1, &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
-#ifdef __NETWARE__
- {"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"auto-repair", OPT_AUTO_REPAIR,
"If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.",
&opt_auto_repair, &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
@@ -208,13 +204,11 @@ static uint fixed_name_length(const char *name);
static char *fix_table_name(char *dest, char *src);
int what_to_do = 0;
-#include <help_start.h>
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n", my_progname, CHECK_VERSION,
MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
- NETWARE_SET_SCREEN_MODE(1);
} /* print_version */
@@ -245,18 +239,12 @@ static void usage(void)
my_print_variables(my_long_options);
} /* usage */
-#include <help_end.h>
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch(optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
case 'a':
what_to_do = DO_ANALYZE;
break;
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 6d294153c54..e1f4f0e518d 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -212,10 +212,6 @@ static struct my_option my_long_options[] =
"Adds 'STOP SLAVE' prior to 'CHANGE MASTER' and 'START SLAVE' to bottom of dump.",
&opt_slave_apply, &opt_slave_apply, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
-#ifdef __NETWARE__
- {"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir,
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -531,7 +527,6 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables)
static int dump_tablespaces_for_databases(char** databases);
static int dump_tablespaces(char* ts_where);
-#include <help_start.h>
/*
Print the supplied message if in verbose mode
@@ -575,7 +570,6 @@ static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
- NETWARE_SET_SCREEN_MODE(1);
} /* print_version */
@@ -585,7 +579,6 @@ static void short_usage_sub(void)
printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n",
my_progname);
printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname);
- NETWARE_SET_SCREEN_MODE(1);
}
@@ -608,8 +601,6 @@ static void short_usage(void)
printf("For more options, use %s --help\n", my_progname);
}
-#include <help_end.h>
-
static void write_header(FILE *sql_file, char *db_name)
{
@@ -728,11 +719,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch (optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; /* Don't require password */
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index fdb521b9cf8..3d71e437e40 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -67,10 +67,6 @@ static char *shared_memory_base_name=0;
static struct my_option my_long_options[] =
{
-#ifdef __NETWARE__
- {"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir,
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -184,13 +180,11 @@ static struct my_option my_long_options[] =
static const char *load_default_groups[]= { "mysqlimport","client",0 };
-#include <help_start.h>
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n" ,my_progname,
IMPORT_VERSION, MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
- NETWARE_SET_SCREEN_MODE(1);
}
@@ -212,18 +206,12 @@ file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n");
my_print_variables(my_long_options);
}
-#include <help_end.h>
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch(optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; /* Don't require password */
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index 76f9048e09e..0b9f42acfe8 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -160,10 +160,6 @@ int main(int argc, char **argv)
static struct my_option my_long_options[] =
{
-#ifdef __NETWARE__
- {"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"character-sets-dir", 'c', "Directory for character set files.",
&charsets_dir, &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0,
0, 0, 0, 0, 0},
@@ -240,14 +236,11 @@ static struct my_option my_long_options[] =
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
-
-#include <help_start.h>
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,SHOW_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
- NETWARE_SET_SCREEN_MODE(1);
}
@@ -270,18 +263,12 @@ are shown.");
my_print_variables(my_long_options);
}
-#include <help_end.h>
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch(optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
case 'v':
opt_verbose++;
break;
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index e411b096d68..e605e2d522c 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -676,8 +676,6 @@ static struct my_option my_long_options[] =
};
-#include <help_start.h>
-
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname, SLAP_VERSION,
@@ -696,7 +694,6 @@ static void usage(void)
my_print_help(my_long_options);
}
-#include <help_end.h>
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
@@ -704,11 +701,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
{
DBUG_ENTER("get_one_option");
switch(optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
case 'v':
verbose++;
break;
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 9845a3ec060..9e28183c735 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -3707,7 +3707,6 @@ void do_send_quit(struct st_command *command)
void do_change_user(struct st_command *command)
{
MYSQL *mysql = &cur_con->mysql;
- /* static keyword to make the NetWare compiler happy. */
static DYNAMIC_STRING ds_user, ds_passwd, ds_db;
const struct command_arg change_user_args[] = {
{ "user", ARG_STRING, FALSE, &ds_user, "User to connect as" },
@@ -6006,8 +6005,6 @@ static struct my_option my_long_options[] =
};
-#include <help_start.h>
-
void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,MTEST_VERSION,
@@ -6026,8 +6023,6 @@ void usage()
my_print_variables(my_long_options);
}
-#include <help_end.h>
-
/*
Read arguments for embedded server and put them into
diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4
index 996ac62e025..89de1e5f8fa 100644
--- a/config/ac-macros/misc.m4
+++ b/config/ac-macros/misc.m4
@@ -617,25 +617,19 @@ fi
AC_DEFUN([MYSQL_CHECK_CXX_VERSION], [
-case $SYSTEM_TYPE in
- *netware*)
- CXX_VERSION=`$CXX -version | grep -i version`
- ;;
- *)
- CXX_VERSION=`$CXX --version | sed 1q`
- if test $? -ne "0" -o -z "$CXX_VERSION"
- then
- CXX_VERSION=`$CXX -V 2>&1|sed 1q` # trying harder for Sun and SGI
- fi
- if test $? -ne "0" -o -z "$CXX_VERSION"
- then
- CXX_VERSION=`$CXX -v 2>&1|sed 1q` # even harder for Alpha
- fi
- if test $? -ne "0" -o -z "$CXX_VERSION"
- then
- CXX_VERSION=""
- fi
-esac
+CXX_VERSION=`$CXX --version | sed 1q`
+if test $? -ne "0" -o -z "$CXX_VERSION"
+then
+ CXX_VERSION=`$CXX -V 2>&1|sed 1q` # trying harder for Sun and SGI
+fi
+if test $? -ne "0" -o -z "$CXX_VERSION"
+then
+ CXX_VERSION=`$CXX -v 2>&1|sed 1q` # even harder for Alpha
+fi
+if test $? -ne "0" -o -z "$CXX_VERSION"
+then
+ CXX_VERSION=""
+fi
if test "$CXX_VERSION"
then
AC_MSG_CHECKING("C++ compiler version")
diff --git a/configure.in b/configure.in
index 4dbf858232a..88ce1a1379f 100644
--- a/configure.in
+++ b/configure.in
@@ -226,14 +226,7 @@ AC_PROG_CXX
AC_PROG_CPP
# Print version of CC and CXX compiler (if they support --version)
-case $SYSTEM_TYPE in
- *netware*)
-CC_VERSION=`$CC -version | grep -i version`
- ;;
- *)
CC_VERSION=`$CC --version | sed 1q`
- ;;
-esac
if test $? -eq "0"
then
AC_MSG_CHECKING("C Compiler version")
@@ -458,15 +451,10 @@ dnl Find paths to some shell programs
AC_PATH_PROG(LN, ln, ln)
# This must be able to take a -f flag like normal unix ln.
AC_PATH_PROG(LN_CP_F, ln, ln)
-case $SYSTEM_TYPE in
- *netware*) ;;
- *)
- # If ln -f does not exists use -s (AFS systems)
- if test -n "$LN_CP_F"; then
- LN_CP_F="$LN_CP_F -s"
- fi
- ;;
-esac
+# If ln -f does not exists use -s (AFS systems)
+if test -n "$LN_CP_F"; then
+ LN_CP_F="$LN_CP_F -s"
+fi
AC_PATH_PROG(MV, mv, mv)
AC_PATH_PROG(RM, rm, rm)
@@ -550,9 +538,6 @@ else
*cygwin*)
FIND_PROC="$PS -e | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
;;
- *netware*)
- FIND_PROC=
- ;;
*)
AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual.])
esac
@@ -1354,98 +1339,6 @@ dnl Is this the right match for DEC OSF on alpha?
# fix to handle include of <stdint.h> correctly on OSF1 with cxx compiler
CXXFLAGS="$CXXFLAGS -I/usr/include/cxx -I/usr/include/cxx_cname -I/usr/include -I/usr/include.dtk"
;;
- *netware*)
- # No need for curses library so set it to null
- with_named_curses=""
-
- # No thread library - in LibC
- with_named_thread=""
-
- #
- # Edit Makefile.in files.
- #
- echo -n "configuring Makefile.in files for NetWare... "
- for file in sql/Makefile.in extra/Makefile.in client/Makefile.in
- do
- # echo "#### $file ####"
- filedir="`dirname $file`"
- filebase="`basename $file`"
- filesed=$filedir/$filebase.sed
- #
- # Backup and always use original file
- #
- if test -f $file.bk
- then
- cp -fp $file.bk $file
- else
- cp -fp $file $file.bk
- fi
- case $file in
- sql/Makefile.in)
- # Use gen_lex_hash.linux instead of gen_lex_hash
- # Add library dependencies to mysqld_DEPENDENCIES
- lib_DEPENDENCIES="\$(pstack_libs) \$(openssl_libs) \$(yassl_libs)"
- cat > $filesed << EOF
-s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux,
-s%\(mysqld_DEPENDENCIES = \)%\1$lib_DEPENDENCIES %
-EOF
- ;;
- extra/Makefile.in)
- cat > $filesed << EOF
-s,\(extra/comp_err\)\$(EXEEXT),\1.linux,
-EOF
- ;;
- libmysql/Makefile.in)
- cat > $filesed << EOF
-s,libyassl.la,.libs/libyassl.a,
-s,libtaocrypt.la,.libs/libtaocrypt.a,
-EOF
- ;;
- libmysql_r/Makefile.in)
- cat > $filesed << EOF
-s,libyassl.la,.libs/libyassl.a,
-s,libtaocrypt.la,.libs/libtaocrypt.a,
-EOF
- ;;
- client/Makefile.in)
- #
- cat > $filesed << EOF
-s,libmysqlclient.la,.libs/libmysqlclient.a,
-EOF
- ;;
- esac
- if `sed -f $filesed $file > $file.nw`;\
- then
- mv -f $file.nw $file
- rm -f $filesed
- else
- exit 1
- fi
- # wait for file system changes to complete
- sleep 1
- done
- echo "done"
-
- #
- # Make sure the following files are writable.
- #
- # When the files are retrieved from some source code control systems they are read-only.
- #
- echo -n "making sure specific build files are writable... "
- for file in \
- Docs/manual.chm \
- Docs/mysql.info \
- Docs/INSTALL-BINARY \
- INSTALL-SOURCE \
- COPYING
- do
- if test -e $file; then
- chmod +w $file
- fi
- done
- echo "done"
-
- ;;
esac
@@ -1818,12 +1711,7 @@ esac
# System characteristics
-case $SYSTEM_TYPE in
- *netware*) ;;
- *)
AC_SYS_RESTARTABLE_SYSCALLS
- ;;
-esac
# Build optimized or debug version ?
# First check for gcc and g++
@@ -1863,17 +1751,6 @@ else
esac
fi
-case $SYSTEM_TYPE in
- *netware*)
- DEBUG_CFLAGS="-g -DDEBUG -sym internal,codeview4"
- DEBUG_CXXFLAGS="-g -DDEBUG -sym internal,codeview4"
- DEBUG_OPTIMIZE_CC="-DDEBUG"
- DEBUG_OPTIMIZE_CXX="-DDEBUG"
- OPTIMIZE_CFLAGS="-O3 -DNDEBUG"
- OPTIMIZE_CXXFLAGS="-O3 -DNDEBUG"
- ;;
-esac
-
# If the user specified CFLAGS, we won't add any optimizations
if test -n "$SAVE_CFLAGS"
then
@@ -2221,18 +2098,13 @@ MYSQL_TZNAME
# Do the c++ compiler have a bool type
MYSQL_CXX_BOOL
# Check some common bugs with gcc 2.8.# on sparc
-case $SYSTEM_TYPE in
- *netware*) ;;
- *)
- MYSQL_CHECK_LONGLONG_TO_FLOAT
- if test "$ac_cv_conv_longlong_to_float" != "yes"
- then
- AC_MSG_ERROR([Your compiler cannot convert a longlong value to a float!
- If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try
- again])
- fi
- ;;
-esac
+MYSQL_CHECK_LONGLONG_TO_FLOAT
+if test "$ac_cv_conv_longlong_to_float" != "yes"
+then
+ AC_MSG_ERROR([Your compiler cannot convert a longlong value to a float!
+ If you are using gcc 2.8.# you should upgrade to egcs 1.0.3
+ or newer and try again])
+fi
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
AC_CHECK_TYPES([u_int32_t])
@@ -2930,66 +2802,58 @@ readline_h_ln_cmd=""
readline_link=""
want_to_use_readline="no"
-case $SYSTEM_TYPE in
- *netware*)
- # For NetWare, do not need readline
- echo "Skipping readline"
- ;;
- *)
- if [test "$with_libedit" = "yes"] || [test "$with_libedit" = "undefined"] && [test "$with_readline" = "undefined"]
+if [test "$with_libedit" = "yes"] || [test "$with_libedit" = "undefined"] && [test "$with_readline" = "undefined"]
+then
+ readline_topdir="cmd-line-utils"
+ readline_basedir="libedit"
+ readline_dir="$readline_topdir/$readline_basedir"
+ readline_link="\$(top_builddir)/cmd-line-utils/libedit/libedit.a"
+ readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/libedit/readline readline"
+ compile_libedit=yes
+ AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, 1)
+ AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE, 1)
+elif test "$with_readline" = "yes"
+then
+ readline_topdir="cmd-line-utils"
+ readline_basedir="readline"
+ readline_dir="$readline_topdir/$readline_basedir"
+ readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a"
+ readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline"
+ compile_readline=yes
+ want_to_use_readline="yes"
+ AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
+else
+ # Use system readline library
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ MYSQL_CHECK_LIBEDIT_INTERFACE
+ MYSQL_CHECK_NEW_RL_INTERFACE
+ MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY
+ AC_LANG_RESTORE
+ if [test "$mysql_cv_new_rl_interface" = "yes"] && [test -d "$srcdir/cmd-line-utils/readline"]
then
- readline_topdir="cmd-line-utils"
- readline_basedir="libedit"
- readline_dir="$readline_topdir/$readline_basedir"
- readline_link="\$(top_builddir)/cmd-line-utils/libedit/libedit.a"
- readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/libedit/readline readline"
- compile_libedit=yes
- AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, 1)
- AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE, 1)
- elif test "$with_readline" = "yes"
+ # Use the new readline interface, but only if the package includes a bundled libreadline
+ # this way we avoid linking commercial source with GPL readline
+ readline_link="-lreadline"
+ want_to_use_readline="yes"
+ elif [test "$mysql_cv_libedit_interface" = "yes"]
then
- readline_topdir="cmd-line-utils"
- readline_basedir="readline"
- readline_dir="$readline_topdir/$readline_basedir"
- readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a"
- readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline"
- compile_readline=yes
- want_to_use_readline="yes"
- AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
+ # Use libedit
+ readline_link="-ledit"
else
- # Use system readline library
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- MYSQL_CHECK_LIBEDIT_INTERFACE
- MYSQL_CHECK_NEW_RL_INTERFACE
- MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY
- AC_LANG_RESTORE
- if [test "$mysql_cv_new_rl_interface" = "yes"] && [test -d "$srcdir/cmd-line-utils/readline"]
- then
- # Use the new readline interface, but only if the package includes a bundled libreadline
- # this way we avoid linking commercial source with GPL readline
- readline_link="-lreadline"
- want_to_use_readline="yes"
- elif [test "$mysql_cv_libedit_interface" = "yes"]
- then
- # Use libedit
- readline_link="-ledit"
- else
- AC_MSG_ERROR([Could not find system readline or libedit libraries
- Use --with-readline or --with-libedit to use the bundled
- versions of libedit or readline])
- fi
+ AC_MSG_ERROR([Could not find system readline or libedit libraries
+ Use --with-readline or --with-libedit to use the bundled
+ versions of libedit or readline])
fi
+fi
- # if there is no readline, but we want to build with readline, we fail
- if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/cmd-line-utils/readline"]
- then
- AC_MSG_ERROR([This commercially licensed MySQL source package can't
- be built with libreadline. Please use --with-libedit to use
- the bundled version of libedit instead.])
- fi
- ;;
-esac
+# if there is no readline, but we want to build with readline, we fail
+if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/cmd-line-utils/readline"]
+then
+ AC_MSG_ERROR([This commercially licensed MySQL source package can't
+ be built with libreadline. Please use --with-libedit to use
+ the bundled version of libedit instead.])
+fi
AC_SUBST(readline_dir)
AC_SUBST(readline_topdir)
@@ -3079,15 +2943,6 @@ AC_SUBST(NON_THREADED_LIBS)
AC_SUBST(STATIC_NSS_FLAGS)
AC_SUBST(sql_client_dirs)
-# If configuring for NetWare, build the netware directory
-netware_dir=
-if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null
-then
- netware_dir="netware"
-fi
-AC_SUBST(netware_dir)
-AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware")
-
if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"
then
AC_DEFINE([THREAD], [1],
@@ -3145,14 +3000,6 @@ AC_SUBST(CC)
AC_SUBST(GXX)
# Set configuration options for make_binary_distribution
-case $SYSTEM_TYPE in
- *netware*)
- MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
- ;;
- *)
- : # no change for other platforms yet
- ;;
-esac
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
#--------------------------------------------------------------------
@@ -3225,8 +3072,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
cmd-line-utils/Makefile cmd-line-utils/libedit/Makefile dnl
libmysqld/Makefile libmysqld/examples/Makefile dnl
mysql-test/Makefile mysql-test/lib/My/SafeProcess/Makefile dnl
- netware/Makefile sql-bench/Makefile dnl
- include/mysql_version.h plugin/Makefile win/Makefile
+ sql-bench/Makefile include/mysql_version.h plugin/Makefile win/Makefile dnl
cmake/Makefile
)
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index 81416df2922..89fd4104c6f 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -89,9 +89,6 @@ static struct my_option my_long_options[] =
};
-
-#include <help_start.h>
-
static void usage(my_bool version)
{
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
@@ -107,8 +104,6 @@ static void usage(my_bool version)
printf("\nExample usage:\n%s --defaults-file=example.cnf client mysql\n", my_progname);
}
-#include <help_end.h>
-
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
diff --git a/extra/mysql_waitpid.c b/extra/mysql_waitpid.c
index e5c06ac9857..d5c9f2f42ae 100644
--- a/extra/mysql_waitpid.c
+++ b/extra/mysql_waitpid.c
@@ -15,8 +15,6 @@
/* Wait until a program dies */
-#ifndef __NETWARE__
-
#include <my_global.h>
#include <m_string.h>
#include <my_sys.h>
@@ -103,15 +101,3 @@ void usage(void)
my_print_help(my_long_options);
exit(-1);
}
-
-#else
-
-#include <stdio.h>
-
-main()
-{
- fprintf(stderr,"This tool has not been ported to NetWare\n");
- return 0;
-}
-
-#endif /* __NETWARE__ */
diff --git a/extra/perror.c b/extra/perror.c
index be9a47d63a4..382805c5dfd 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -102,8 +102,6 @@ static HA_ERRORS ha_errlist[]=
};
-#include <help_start.h>
-
static void print_version(void)
{
printf("%s Ver %s, for %s (%s)\n",my_progname,PERROR_VERSION,
@@ -122,8 +120,6 @@ static void usage(void)
my_print_variables(my_long_options);
}
-#include <help_end.h>
-
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
@@ -281,7 +277,7 @@ int main(int argc,char *argv[])
#endif
{
/*
- On some system, like NETWARE, strerror(unknown_error) returns a
+ On some system, like Linux, strerror(unknown_error) returns a
string 'Unknown Error'. To avoid printing it we try to find the
error string by asking for an impossible big error message.
diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c
index 4faca1653b2..432a207f424 100644
--- a/extra/resolve_stack_dump.c
+++ b/extra/resolve_stack_dump.c
@@ -65,8 +65,6 @@ static struct my_option my_long_options[] =
static void verify_sort();
-#include <help_start.h>
-
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION,
@@ -90,8 +88,6 @@ The numeric-dump-file should contain a numeric stack trace from mysqld.\n\
If the numeric-dump-file is not given, the stack trace is read from stdin.\n");
}
-#include <help_end.h>
-
static void die(const char* fmt, ...)
{
diff --git a/extra/resolveip.c b/extra/resolveip.c
index 90fda977848..094dfecae59 100644
--- a/extra/resolveip.c
+++ b/extra/resolveip.c
@@ -155,11 +155,8 @@ int main(int argc, char **argv)
else
{
printf ("Host name of %s is %s", ip,hpaddr->h_name);
-#ifndef __NETWARE__
- /* this information is not available on NetWare */
for (q = hpaddr->h_aliases; *q != 0; q++)
(void) printf(", %s", *q);
-#endif /* __NETWARE__ */
puts("");
}
}
diff --git a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp
index 1e761f559e2..1cc4200d10c 100644
--- a/extra/yassl/include/yassl_int.hpp
+++ b/extra/yassl/include/yassl_int.hpp
@@ -34,9 +34,8 @@
#include "openssl/ssl.h" // ASN1_STRING and DH
// Check if _POSIX_THREADS should be forced
-#if !defined(_POSIX_THREADS) && (defined(__NETWARE__) || defined(__hpux))
+#if !defined(_POSIX_THREADS) && defined(__hpux)
// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
-// Netware supports pthreads but does not announce it
#define _POSIX_THREADS
#endif
diff --git a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp
index eee5d47377f..cebbd9c5529 100644
--- a/extra/yassl/src/socket_wrapper.cpp
+++ b/extra/yassl/src/socket_wrapper.cpp
@@ -37,7 +37,7 @@
#include <fcntl.h>
#endif // _WIN32
-#if defined(__sun) || defined(__SCO_VERSION__) || defined(__NETWARE__)
+#if defined(__sun) || defined(__SCO_VERSION__)
#include <sys/filio.h>
#endif
diff --git a/extra/yassl/taocrypt/src/random.cpp b/extra/yassl/taocrypt/src/random.cpp
index 2bbc0a85e8b..729421fc71d 100644
--- a/extra/yassl/taocrypt/src/random.cpp
+++ b/extra/yassl/taocrypt/src/random.cpp
@@ -92,67 +92,6 @@ void OS_Seed::GenerateSeed(byte* output, word32 sz)
}
-#elif defined(__NETWARE__)
-
-/* The OS_Seed implementation for Netware */
-
-#include <nks/thread.h>
-#include <nks/plat.h>
-
-// Loop on high resulution Read Time Stamp Counter
-static void NetwareSeed(byte* output, word32 sz)
-{
- word32 tscResult;
-
- for (word32 i = 0; i < sz; i += sizeof(tscResult)) {
- #if defined(__GNUC__)
- asm volatile("rdtsc" : "=A" (tscResult));
- #else
- #ifdef __MWERKS__
- asm {
- #else
- __asm {
- #endif
- rdtsc
- mov tscResult, eax
- }
- #endif
-
- memcpy(output, &tscResult, sizeof(tscResult));
- output += sizeof(tscResult);
-
- NXThreadYield(); // induce more variance
- }
-}
-
-
-OS_Seed::OS_Seed()
-{
-}
-
-
-OS_Seed::~OS_Seed()
-{
-}
-
-
-void OS_Seed::GenerateSeed(byte* output, word32 sz)
-{
- /*
- Try to use NXSeedRandom as it will generate a strong
- seed using the onboard 82802 chip
-
- As it's not always supported, fallback to default
- implementation if an error is returned
- */
-
- if (NXSeedRandom(sz, output) != 0)
- {
- NetwareSeed(output, sz);
- }
-}
-
-
#else
/* The default OS_Seed implementation */
diff --git a/extra/yassl/testsuite/test.hpp b/extra/yassl/testsuite/test.hpp
index c921f8f9c69..31fad36aaba 100644
--- a/extra/yassl/testsuite/test.hpp
+++ b/extra/yassl/testsuite/test.hpp
@@ -32,8 +32,7 @@
#endif /* _WIN32 */
-#if !defined(_SOCKLEN_T) && \
- (defined(_WIN32) || defined(__NETWARE__) || defined(__APPLE__))
+#if !defined(_SOCKLEN_T) && (defined(_WIN32) || defined(__APPLE__))
typedef int socklen_t;
#endif
@@ -42,18 +41,14 @@
#if defined(__hpux)
// HPUX uses int* for third parameter to accept
typedef int* ACCEPT_THIRD_T;
-#elif defined(__NETWARE__)
-// NetWare uses size_t* for third parameter to accept
- typedef size_t* ACCEPT_THIRD_T;
#else
typedef socklen_t* ACCEPT_THIRD_T;
#endif
// Check if _POSIX_THREADS should be forced
-#if !defined(_POSIX_THREADS) && (defined(__NETWARE__) || defined(__hpux))
+#if !defined(_POSIX_THREADS) && defined(__hpux)
// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
-// Netware supports pthreads but does not announce it
#define _POSIX_THREADS
#endif
diff --git a/include/Makefile.am b/include/Makefile.am
index e610a8e325c..3357772e7c9 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -33,10 +33,10 @@ pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
m_ctype.h my_attribute.h $(HEADERS_GEN_CONFIGURE) \
$(HEADERS_GEN_MAKE) probes_mysql.h probes_mysql_nodtrace.h
-noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.h \
+noinst_HEADERS = config-win.h lf.h my_bit.h \
heap.h my_bitmap.h my_uctype.h password.h \
myisam.h myisampack.h myisammrg.h ft_global.h\
- mysys_err.h my_base.h help_start.h help_end.h \
+ mysys_err.h my_base.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h sha2.h \
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
diff --git a/include/config-netware.h b/include/config-netware.h
deleted file mode 100644
index a4465ea177a..00000000000
--- a/include/config-netware.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
- 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
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- 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.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-/* Header for NetWare compatible with MySQL */
-
-#ifndef _config_netware_h
-#define _config_netware_h
-
-#define __event_h__
-#define _EVENT_H_
-/*
- These two #define(s) are needed as both libc of NetWare and MySQL have
- files named event.h which causes compilation errors.
-*/
-
-
-/* required headers */
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <screen.h>
-#include <limits.h>
-#include <signal.h>
-#include <errno.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <time.h>
-#include <sys/time.h>
-#include <pthread.h>
-#include <termios.h>
-
-#undef _EVENT_H_
-/*
- This #undef exists here because both libc of NetWare and MySQL have
- files named event.h which causes compilation errors.
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* required adjustments */
-#undef HAVE_READDIR_R
-#undef HAVE_RWLOCK_INIT
-#undef HAVE_SCHED_H
-#undef HAVE_SYS_MMAN_H
-#undef HAVE_SYNCH_H
-#undef HAVE_MMAP
-#undef HAVE_RINT
-
-#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
-#define HAVE_PTHREAD_SIGMASK 1
-#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
-#define HAVE_BROKEN_REALPATH 1
-
-/* changes made to make use of LibC-June-2004 for building purpose */
-#undef HAVE_POSIX_SIGNALS
-#undef HAVE_PTHREAD_ATTR_SETSCOPE
-#undef HAVE_ALLOC_A
-#undef HAVE_FINITE
-#undef HAVE_GETPWNAM
-#undef HAVE_GETPWUID
-#undef HAVE_READLINK
-#undef HAVE_STPCPY
-/* changes end */
-
-/* Changes made to make use of LibC-June-2005 for building purpose */
-#undef HAVE_GETPASS
-#undef HAVE_GETRLIMIT
-#undef HAVE_GETRUSAGE
-#undef HAVE_INITGROUPS
-/* Changes end - LibC-June-2005 */
-
-/* no libc crypt() function */
-#ifdef HAVE_OPENSSL
- #define HAVE_CRYPT 1
-#else
- #undef HAVE_CRYPT
-#endif /* HAVE_OPENSSL */
-
-/* Netware has an ancient zlib */
-#undef HAVE_COMPRESS
-#define HAVE_COMPRESS
-#undef HAVE_ARCHIVE_DB
-
-/* include the old function apis */
-#define USE_OLD_FUNCTIONS 1
-
-/* no case sensitivity */
-#define FN_NO_CASE_SENSE 1
-
-/* the thread alarm is not used */
-#define DONT_USE_THR_ALARM 1
-
-/* signals do not interrupt sockets */
-#define SIGNALS_DONT_BREAK_READ 1
-
-/* signal by closing the sockets */
-#define SIGNAL_WITH_VIO_CLOSE 1
-
-/* On NetWare, stack grows towards lower address */
-#define STACK_DIRECTION -1
-
-/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
-#define NW_THD_STACKSIZE 65536
-
-/* On NetWare, to fix the problem with the deletion of open files */
-#define CANT_DELETE_OPEN_FILES 1
-
-#define FN_LIBCHAR '\\'
-#define FN_ROOTDIR "\\"
-#define FN_DEVCHAR ':'
-
-/* default directory information */
-#define DEFAULT_MYSQL_HOME "sys:/mysql"
-#define PACKAGE "mysql"
-#define DEFAULT_BASEDIR "sys:/"
-#define SHAREDIR "share/"
-#define DEFAULT_CHARSET_HOME "sys:/mysql/"
-#define MYSQL_DATADIR "data/"
-
-/* 64-bit file system calls */
-#define SIZEOF_OFF_T 8
-#define off_t off64_t
-#define chsize chsize64
-#define ftruncate ftruncate64
-#define lseek lseek64
-#define pread pread64
-#define pwrite pwrite64
-#define tell tell64
-
-/* do not use the extended time in LibC sys\stat.h */
-#define _POSIX_SOURCE
-
-/* Some macros for portability */
-
-#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; }
-
-/* extra protection against CPU Hogs on NetWare */
-#define NETWARE_YIELD pthread_yield()
-/* Screen mode for help texts */
-#define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _config_netware_h */
diff --git a/include/help_end.h b/include/help_end.h
deleted file mode 100644
index 92953efe35a..00000000000
--- a/include/help_end.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef HELP_END_INCLUDED
-#define HELP_END_INCLUDED
-
-/* Copyright (C) 2004-2005 MySQL AB
-
- 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
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- 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.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-
-#ifdef __NETWARE__
-#undef printf
-#undef puts
-#undef fputs
-#undef fputc
-#undef putchar
-#endif
-#endif /* HELP_END_INCLUDED */
diff --git a/include/help_start.h b/include/help_start.h
deleted file mode 100644
index 414f7ec93a0..00000000000
--- a/include/help_start.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef HELP_START_INCLUDED
-#define HELP_START_INCLUDED
-
-/* Copyright (C) 2004-2005 MySQL AB
-
- 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
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- 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.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-
-/* Divert all help information on NetWare to logger screen. */
-
-#ifdef __NETWARE__
-#define printf consoleprintf
-#define puts(s) consoleprintf("%s\n",s)
-#define fputs(s,f) puts(s)
-#define fputc(s,f) consoleprintf("%c", s)
-#define putchar(s) consoleprintf("%c", s)
-#endif
-#endif /* HELP_START_INCLUDED */
diff --git a/include/my_global.h b/include/my_global.h
index 5e99c579bfd..f3e6ae1633a 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -82,20 +82,7 @@
#define CPP_UNNAMED_NS_END }
#endif
-#if defined(_WIN32)
#include <my_config.h>
-#elif defined(__NETWARE__)
-#include <my_config.h>
-#include <config-netware.h>
-#if defined(__cplusplus) && defined(inline)
-#undef inline /* fix configure problem */
-#endif
-#else
-#include <my_config.h>
-#if defined(__cplusplus) && defined(inline)
-#undef inline /* fix configure problem */
-#endif
-#endif /* _WIN32... */
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
#define HAVE_PSI_INTERFACE
@@ -108,12 +95,6 @@
#define IF_WIN(A,B) B
#endif
-#ifdef __NETWARE__
-#define IF_NETWARE(A,B) A
-#else
-#define IF_NETWARE(A,B) B
-#endif
-
#ifndef DBUG_OFF
#define IF_DBUG(A,B) A
#else
@@ -143,12 +124,6 @@
#define HAVE_EXTERNAL_CLIENT
#endif
-/* Some defines to avoid ifdefs in the code */
-#ifndef NETWARE_YIELD
-#define NETWARE_YIELD
-#define NETWARE_SET_SCREEN_MODE(A)
-#endif
-
#if defined (_WIN32)
/*
off_t is 32 bit long. We do not use C runtime functions
@@ -1677,25 +1652,12 @@ do { doubleget_union _tmp; \
#endif
-#ifndef __NETWARE__
/*
* Include standard definitions of operator new and delete.
*/
#ifdef __cplusplus
#include <new>
#endif
-#else
-/*
- * Define placement versions of operator new and operator delete since
- * we don't have <new> when building for Netware.
- */
-#ifdef __cplusplus
-inline void *operator new(size_t, void *ptr) { return ptr; }
-inline void *operator new[](size_t, void *ptr) { return ptr; }
-inline void operator delete(void*, void*) { /* Do nothing */ }
-inline void operator delete[](void*, void*) { /* Do nothing */ }
-#endif
-#endif
/* Length of decimal number represented by INT32. */
#define MY_INT32_NUM_DECIMAL_DIGITS 11
diff --git a/include/my_net.h b/include/my_net.h
index 8617f180431..1b8425984ae 100644
--- a/include/my_net.h
+++ b/include/my_net.h
@@ -46,7 +46,7 @@ C_MODE_START
#include <sys/ioctl.h>
#endif
-#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__NETWARE__)
+#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES)
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
diff --git a/include/my_pthread.h b/include/my_pthread.h
index ea37f6e6b92..e5ffa0db3bb 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -195,11 +195,6 @@ int pthread_cancel(pthread_t thread);
#include <synch.h>
#endif
-#ifdef __NETWARE__
-void my_pthread_exit(void *status);
-#define pthread_exit(A) my_pthread_exit(A)
-#endif
-
#define pthread_key(T,V) pthread_key_t V
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
@@ -356,7 +351,7 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res);
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
#undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
-#elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
+#else /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
#define HAVE_PTHREAD_KILL
#endif
@@ -461,10 +456,6 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
/* safe_mutex adds checking to mutex for easier debugging */
-#if defined(__NETWARE__) && !defined(SAFE_MUTEX_DETECT_DESTROY)
-#define SAFE_MUTEX_DETECT_DESTROY
-#endif
-
typedef struct st_safe_mutex_t
{
pthread_mutex_t global,mutex;
diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h
index 9250fd4579e..78e3dbca577 100644
--- a/include/my_stacktrace.h
+++ b/include/my_stacktrace.h
@@ -32,9 +32,7 @@
#define HAVE_STACKTRACE 1
#endif
-#if !defined(__NETWARE__)
#define HAVE_WRITE_CORE
-#endif
#if HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS && \
HAVE_CXXABI_H && HAVE_ABI_CXA_DEMANGLE && \
diff --git a/include/my_sys.h b/include/my_sys.h
index 64b20753567..fb78242a3b5 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -913,10 +913,7 @@ extern int my_getncpus();
#define MAP_FAILED ((void *)-1)
#define MS_SYNC 0x0000
-#ifndef __NETWARE__
#define HAVE_MMAP
-#endif
-
void *my_mmap(void *, size_t, int, int, int, my_off_t);
int my_munmap(void *, size_t);
#endif
@@ -981,10 +978,6 @@ void my_security_attr_free(SECURITY_ATTRIBUTES *sa);
char* my_cgets(char *string, size_t clen, size_t* plen);
#endif
-#ifdef __NETWARE__
-void netware_reg_user(const char *ip, const char *user,
- const char *application);
-#endif
#include <mysql/psi/psi.h>
diff --git a/include/mysql.h b/include/mysql.h
index 452b4374cf7..7eef91cf55a 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -79,10 +79,6 @@ extern char *mysql_unix_port;
#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
-#ifdef __NETWARE__
-#pragma pack(push, 8) /* 8 byte alignment */
-#endif
-
#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
#define IS_BLOB(n) ((n) & BLOB_FLAG)
@@ -746,10 +742,6 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
0, arg, length, 1, stmt)
-#ifdef __NETWARE__
-#pragma pack(pop) /* restore alignment */
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/libmysql/get_password.c b/libmysql/get_password.c
index cbe5fce6949..56514a8d864 100644
--- a/libmysql/get_password.c
+++ b/libmysql/get_password.c
@@ -36,7 +36,7 @@
#include <pwd.h>
#endif /* HAVE_PWD_H */
#else /* ! HAVE_GETPASS */
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
#include <sys/ioctl.h>
#ifdef HAVE_TERMIOS_H /* For tty-password */
#include <termios.h>
@@ -55,9 +55,7 @@
#include <asm/termiobits.h>
#endif
#else
-#ifndef __NETWARE__
#include <conio.h>
-#endif /* __NETWARE__ */
#endif /* __WIN__ */
#endif /* HAVE_GETPASS */
@@ -65,16 +63,8 @@
#define getpass(A) getpassphrase(A)
#endif
-#if defined( __WIN__) || defined(__NETWARE__)
+#if defined(__WIN__)
/* were just going to fake it here and get input from the keyboard */
-
-#ifdef __NETWARE__
-#undef _getch
-#undef _cputs
-#define _getch getcharacter
-#define _cputs(A) putstring(A)
-#endif
-
char *get_tty_password(const char *opt_message)
{
char to[80];
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index b69c27731dd..68813937fb6 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -165,7 +165,7 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
mysql_unix_port = env;
}
mysql_debug(NullS);
-#if defined(SIGPIPE) && !defined(__WIN__) && !defined(__NETWARE__)
+#if defined(SIGPIPE) && !defined(__WIN__)
(void) signal(SIGPIPE, SIG_IGN);
#endif
#ifdef EMBEDDED_LIBRARY
@@ -479,15 +479,7 @@ struct passwd *getpwuid(uid_t);
char* getlogin(void);
#endif
-#if defined(__NETWARE__)
-/* Default to value of USER on NetWare, if unset use "UNKNOWN_USER" */
-void read_user_name(char *name)
-{
- char *str=getenv("USER");
- strmake(name, str ? str : "UNKNOWN_USER", USERNAME_LENGTH);
-}
-
-#elif !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__)
+#if !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__)
void read_user_name(char *name)
{
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index 3519c6e2541..91b0c4c17bb 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -157,27 +157,6 @@ if DARWIN_MWCC
mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` $(storageobjects)
else
-rm -f libmysqld.a
- if test "$(host_os)" = "netware" ; \
- then \
- $(libmysqld_a_AR) libmysqld.a $(INC_LIB) libmysqld_int.a $(storageobjects); \
- else \
- current_dir=`pwd`; \
- rm -rf tmp; mkdir tmp; \
- (for arc in $(INC_LIB) ./libmysqld_int.a; do \
- arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \
- artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \
- for F in `$(AR) t $$arc | grep -v SYMDEF`; do \
- if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \
- mkdir $$artmp; cd $$artmp > /dev/null; \
- $(AR) x ../../$$arc; \
- cd $$current_dir > /dev/null; \
- ls $$artmp/* | grep -v SYMDEF; \
- continue 2; fi; done; \
- done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \
- $(AR) r libmysqld.a $(storageobjects); \
- $(RANLIB) libmysqld.a ; \
- rm -rf tmp; \
- fi
endif
## XXX: any time the client interface changes, we'll need to bump
diff --git a/mysql-test/lib/v1/mtr_misc.pl b/mysql-test/lib/v1/mtr_misc.pl
index 0173e8b8572..da2395a8a95 100644
--- a/mysql-test/lib/v1/mtr_misc.pl
+++ b/mysql-test/lib/v1/mtr_misc.pl
@@ -141,7 +141,6 @@ sub mtr_exe_maybe_exists (@) {
my @path= @_;
map {$_.= ".exe"} @path if $::glob_win32;
- map {$_.= ".nlm"} @path if $::glob_netware;
foreach my $path ( @path )
{
if($::glob_win32)
diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl
index 8a5edfbd762..489db060e99 100755
--- a/mysql-test/lib/v1/mysql-test-run.pl
+++ b/mysql-test/lib/v1/mysql-test-run.pl
@@ -76,7 +76,6 @@ $| = 1; # Automatically flush STDOUT
our $glob_win32_perl= ($^O eq "MSWin32"); # ActiveState Win32 Perl
our $glob_cygwin_perl= ($^O eq "cygwin"); # Cygwin Perl
our $glob_win32= ($glob_win32_perl or $glob_cygwin_perl);
-our $glob_netware= ($^O eq "NetWare"); # NetWare
require "lib/v1/mtr_cases.pl";
require "lib/v1/mtr_im.pl";
@@ -3125,11 +3124,8 @@ sub install_db ($$) {
$path_vardir_trace, $type);
}
- if ( ! $glob_netware )
- {
- mtr_add_arg($args, "--lc-messages-dir=%s", $path_language);
- mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
- }
+ mtr_add_arg($args, "--lc-messages-dir=%s", $path_language);
+ mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
# If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
# configure --disable-grant-options), mysqld will not recognize the
diff --git a/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test b/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
index 7de63332844..636309a3088 100644
--- a/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
@@ -77,7 +77,6 @@ SELECT @@global.innodb_fast_shutdown;
SET @@global.innodb_fast_shutdown = 1;
SELECT @@global.innodb_fast_shutdown;
## A value of 2 is used to just flush logs and then shutdown cold.
-## Not supported on Netware
SET @@global.innodb_fast_shutdown = 2;
SELECT @@global.innodb_fast_shutdown;
diff --git a/mysql-test/suite/sys_vars/t/ndb_log_update_as_write_basic.test b/mysql-test/suite/sys_vars/t/ndb_log_update_as_write_basic.test
index 0b9d3ada158..e616a807a38 100644
--- a/mysql-test/suite/sys_vars/t/ndb_log_update_as_write_basic.test
+++ b/mysql-test/suite/sys_vars/t/ndb_log_update_as_write_basic.test
@@ -120,7 +120,7 @@ SELECT @@global.ndb_log_update_as_write;
#SELECT @@global.ndb_log_update_as_write;
#SET @@global.ndb_log_update_as_write = 1;
#SELECT @@global.ndb_log_update_as_write;
-## a value of 2 is used to just flush logs and then shutdown cold. Not supported on Netware
+## a value of 2 is used to just flush logs and then shutdown cold.
#SET @@global.ndb_log_update_as_write = 2;
#SELECT @@global.ndb_log_update_as_write;
diff --git a/mysql-test/suite/sys_vars/t/ndb_log_updated_only_basic.test b/mysql-test/suite/sys_vars/t/ndb_log_updated_only_basic.test
index 85b76cc88a4..c00ecf2e2fa 100644
--- a/mysql-test/suite/sys_vars/t/ndb_log_updated_only_basic.test
+++ b/mysql-test/suite/sys_vars/t/ndb_log_updated_only_basic.test
@@ -120,7 +120,7 @@ SELECT @@global.ndb_log_updated_only;
#SELECT @@global.ndb_log_updated_only;
#SET @@global.ndb_log_updated_only = 1;
#SELECT @@global.ndb_log_updated_only;
-## a value of 2 is used to just flush logs and then shutdown cold. Not supported on Netware
+## a value of 2 is used to just flush logs and then shutdown cold.
#SET @@global.ndb_log_updated_only = 2;
#SELECT @@global.ndb_log_updated_only;
diff --git a/mysys/Makefile.am b/mysys/Makefile.am
index f4fab89d5a5..a9e3f16c548 100644
--- a/mysys/Makefile.am
+++ b/mysys/Makefile.am
@@ -51,7 +51,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
my_net.c my_port.c my_sleep.c \
charset.c charset-def.c my_bitmap.c my_bit.c md5.c \
my_gethostbyname.c rijndael.c my_aes.c sha1.c \
- my_handler.c my_netware.c my_largepage.c \
+ my_handler.c my_largepage.c \
my_memmem.c stacktrace.c \
my_windac.c my_access.c base64.c my_libwrap.c \
my_rdtsc.c
diff --git a/mysys/default.c b/mysys/default.c
index fc119bb3283..8002a1a0307 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -118,7 +118,6 @@ static int search_default_file_with_ext(Process_option_func func,
- Windows: GetWindowsDirectory()
- Windows: C:/
- Windows: Directory above where the executable is located
- - Netware: sys:/etc/
- Unix: /etc/
- Unix: /etc/mysql/
- Unix: --sysconfdir=<path> (compile-time option)
@@ -708,7 +707,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
strmov(name,config_file);
}
fn_format(name,name,"","",4);
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
{
MY_STAT stat_info;
if (!my_stat(name,&stat_info,MYF(0)))
@@ -954,7 +953,6 @@ static char *remove_end_comment(char *ptr)
return ptr;
}
-#include <help_start.h>
void my_print_default_files(const char *conf_file)
{
@@ -1034,8 +1032,6 @@ void print_defaults(const char *conf_file, const char **groups)
--defaults-extra-file=# Read this file after the global files are read.");
}
-#include <help_end.h>
-
static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs)
{
@@ -1150,10 +1146,6 @@ static const char **init_default_directories(MEM_ROOT *alloc)
errors += add_directory(alloc, fname_buffer, dirs);
}
-#elif defined(__NETWARE__)
-
- errors += add_directory(alloc, "sys:/etc/", dirs);
-
#else
errors += add_directory(alloc, "/etc/", dirs);
@@ -1172,7 +1164,7 @@ static const char **init_default_directories(MEM_ROOT *alloc)
/* Placeholder for --defaults-extra-file=<path> */
errors += add_directory(alloc, "", dirs);
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
errors += add_directory(alloc, "~/", dirs);
#endif
diff --git a/mysys/mf_path.c b/mysys/mf_path.c
index d51cac732f5..92cb62e6827 100644
--- a/mysys/mf_path.c
+++ b/mysys/mf_path.c
@@ -78,9 +78,6 @@ char * my_path(char * to, const char *progname,
#define F_OK 0
#define PATH_SEP ';'
#define PROGRAM_EXTENSION ".exe"
-#elif defined(__NETWARE__)
-#define PATH_SEP ';'
-#define PROGRAM_EXTENSION ".nlm"
#else
#define PATH_SEP ':'
#endif
diff --git a/mysys/mf_tempdir.c b/mysys/mf_tempdir.c
index 1c6c01cef9f..c84987cfc96 100644
--- a/mysys/mf_tempdir.c
+++ b/mysys/mf_tempdir.c
@@ -16,7 +16,7 @@
#include "mysys_priv.h"
#include <m_string.h>
-#if defined( __WIN__) || defined(__NETWARE__)
+#if defined(__WIN__)
#define DELIM ';'
#else
#define DELIM ':'
@@ -36,7 +36,7 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist)
{
/* Get default temporary directory */
pathlist=getenv("TMPDIR"); /* Use this if possible */
-#if defined( __WIN__) || defined(__NETWARE__)
+#if defined(__WIN__)
if (!pathlist)
pathlist=getenv("TEMP");
if (!pathlist)
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index 40016210de4..b5933dcc317 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -109,7 +109,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
(*free)(res);
file=my_create(to, 0, mode | O_EXCL | O_NOFOLLOW, MyFlags);
}
-#elif defined(HAVE_MKSTEMP) && !defined(__NETWARE__)
+#elif defined(HAVE_MKSTEMP)
{
char prefix_buff[30];
uint pfx_len;
@@ -143,9 +143,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
}
#elif defined(HAVE_TEMPNAM)
{
-#if !defined(__NETWARE__)
extern char **environ;
-#endif
char *res,**old_env,*temp_env[1];
if (dir && !dir[0])
@@ -154,14 +152,14 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
to[1]= 0;
dir=to;
}
-#if !defined(__NETWARE__)
+
old_env= (char**) environ;
if (dir)
{ /* Don't use TMPDIR if dir is given */
environ=(const char**) temp_env;
temp_env[0]=0;
}
-#endif
+
if ((res=tempnam((char*) dir, (char*) prefix)))
{
strmake(to,res,FN_REFLEN-1);
@@ -176,9 +174,8 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
{
DBUG_PRINT("error",("Got error: %d from tempnam",errno));
}
-#if !defined(__NETWARE__)
+
environ=(const char**) old_env;
-#endif
}
#else
#error No implementation found for create_temp_file
diff --git a/mysys/my_clock.c b/mysys/my_clock.c
index d17f26ed316..da04feb462f 100644
--- a/mysys/my_clock.c
+++ b/mysys/my_clock.c
@@ -15,14 +15,14 @@
#include "my_global.h"
-#if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__NETWARE__)
+#if !defined(_MSC_VER) && !defined(__BORLANDC__)
#include "mysys_priv.h"
#include <sys/times.h>
#endif
long my_clock(void)
{
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
struct tms tmsbuf;
(void) times(&tmsbuf);
return (tmsbuf.tms_utime + tmsbuf.tms_stime);
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index d38507c111a..a6811694fe1 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -103,7 +103,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
DBUG_RETURN(0); /* File copyed but not stat */
res= chmod(to, stat_buff.st_mode & 07777); /* Copy modes */
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
res= chown(to, stat_buff.st_uid,stat_buff.st_gid); /* Copy ownership */
#endif
#if !defined(VMS) && !defined(__ZTC__)
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index f51dd7befd5..807e07d4f06 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -1147,8 +1147,6 @@ static uint print_name(const struct my_option *optp)
Print help for all options and variables.
*/
-#include <help_start.h>
-
void my_print_help(const struct my_option *options)
{
uint col, name_space= 22, comment_space= 57;
@@ -1330,5 +1328,3 @@ void my_print_variables(const struct my_option *options)
}
}
}
-
-#include <help_end.h>
diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c
index ea12f73fe3d..cc5d1b83efb 100644
--- a/mysys/my_getsystime.c
+++ b/mysys/my_getsystime.c
@@ -25,10 +25,6 @@
#include "mysys_priv.h"
#include "my_static.h"
-#ifdef __NETWARE__
-#include <nks/time.h>
-#endif
-
ulonglong my_getsystime()
{
#ifdef HAVE_CLOCK_GETTIME
@@ -45,10 +41,6 @@ ulonglong my_getsystime()
query_performance_frequency) + query_performance_offset);
}
return 0;
-#elif defined(__NETWARE__)
- NXTime_t tm;
- NXGetTime(NX_SINCE_1970, NX_NSECONDS, &tm);
- return (ulonglong)tm/100;
#else
/* TODO: check for other possibilities for hi-res timestamping */
struct timeval tv;
diff --git a/mysys/my_init.c b/mysys/my_init.c
index 41a2efe0b90..06f4fa2b6a5 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -36,11 +36,6 @@ static my_bool win32_init_tcp_ip();
#else
#define my_win_init()
#endif
-#ifdef __NETWARE__
-static void netware_init();
-#else
-#define netware_init()
-#endif
my_bool my_init_done= 0;
/** True if @c my_basic_init() has been called. */
@@ -109,7 +104,6 @@ my_bool my_basic_init(void)
#if defined(THREAD) && defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX)
fastmutex_global_init(); /* Must be called early */
#endif
- netware_init();
#ifdef THREAD
#if defined(HAVE_PTHREAD_INIT)
pthread_init(); /* Must be called before DBUG_ENTER */
@@ -150,7 +144,7 @@ my_bool my_init(void)
#ifdef THREAD
if (my_thread_global_init())
return 1;
-#if !defined( __WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
sigfillset(&my_signals); /* signals blocked by mf_brkhant */
#endif
#endif /* THREAD */
@@ -239,9 +233,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals,
rus.ru_nvcsw, rus.ru_nivcsw);
#endif
-#if defined(__NETWARE__) && !defined(__WIN__)
- fprintf(info_file,"\nRun time: %.1f\n",(double) clock()/CLOCKS_PER_SEC);
-#endif
#if defined(__WIN__) && defined(_MSC_VER)
_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR );
@@ -524,60 +515,6 @@ static my_bool win32_init_tcp_ip()
}
#endif /* __WIN__ */
-
-#ifdef __NETWARE__
-/*
- Basic initialisation for netware
-*/
-
-static void netware_init()
-{
- char cwd[PATH_MAX], *name;
-
- DBUG_ENTER("netware_init");
-
- /* init only if we are not a client library */
- if (my_progname)
- {
-#if SUPPORTED_BY_LIBC /* Removed until supported in Libc */
- struct termios tp;
- /* Disable control characters */
- tcgetattr(STDIN_FILENO, &tp);
- tp.c_cc[VINTR] = _POSIX_VDISABLE;
- tp.c_cc[VEOF] = _POSIX_VDISABLE;
- tp.c_cc[VSUSP] = _POSIX_VDISABLE;
- tcsetattr(STDIN_FILENO, TCSANOW, &tp);
-#endif /* SUPPORTED_BY_LIBC */
-
- /* With stdout redirection */
- if (!isatty(STDOUT_FILENO))
- {
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT); /* auto close the screen */
- }
- else
- {
- setscreenmode(SCR_NO_MODE); /* keep the screen up */
- }
-
- /* Parse program name and change to base format */
- name= (char*) my_progname;
- for (; *name; name++)
- {
- if (*name == '\\')
- {
- *name = '/';
- }
- else
- {
- *name = tolower(*name);
- }
- }
- }
-
- DBUG_VOID_RETURN;
-}
-#endif /* __NETWARE__ */
-
#ifdef HAVE_PSI_INTERFACE
#if !defined(HAVE_PREAD) && !defined(_WIN32)
diff --git a/mysys/my_lock.c b/mysys/my_lock.c
index 1436c845286..8a28c7390c4 100644
--- a/mysys/my_lock.c
+++ b/mysys/my_lock.c
@@ -22,9 +22,6 @@
#undef NO_ALARM_LOOP
#endif
#include <my_alarm.h>
-#ifdef __NETWARE__
-#include <nks/fsio.h>
-#endif
#ifdef _WIN32
#define WIN_LOCK_INFINITE -1
@@ -145,9 +142,6 @@ int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
int value;
ALARM_VARIABLES;
#endif
-#ifdef __NETWARE__
- int nxErrno;
-#endif
DBUG_ENTER("my_lock");
DBUG_PRINT("my",("fd: %d Op: %d start: %ld Length: %ld MyFlags: %d",
@@ -158,47 +152,7 @@ int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
if (my_disable_locking)
DBUG_RETURN(0);
-#if defined(__NETWARE__)
- {
- NXSOffset_t nxLength = length;
- unsigned long nxLockFlags = 0;
-
- if (length == F_TO_EOF)
- {
- /* EOF is interpreted as a very large length. */
- nxLength = 0x7FFFFFFFFFFFFFFF;
- }
-
- if (locktype == F_UNLCK)
- {
- /* The lock flags are currently ignored by NKS. */
- if (!(nxErrno= NXFileRangeUnlock(fd, 0L, start, nxLength)))
- DBUG_RETURN(0);
- }
- else
- {
- if (locktype == F_RDLCK)
- {
- /* A read lock is mapped to a shared lock. */
- nxLockFlags = NX_RANGE_LOCK_SHARED;
- }
- else
- {
- /* A write lock is mapped to an exclusive lock. */
- nxLockFlags = NX_RANGE_LOCK_EXCL;
- }
-
- if (MyFlags & MY_DONT_WAIT)
- {
- /* Don't block on the lock. */
- nxLockFlags |= NX_RANGE_LOCK_TRYLOCK;
- }
-
- if (!(nxErrno= NXFileRangeLock(fd, nxLockFlags, start, nxLength)))
- DBUG_RETURN(0);
- }
- }
-#elif defined(_WIN32)
+#if defined(_WIN32)
{
int timeout_sec;
if (MyFlags & MY_DONT_WAIT)
@@ -257,12 +211,9 @@ int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
#endif /* HAVE_FCNTL */
#endif /* HAVE_LOCKING */
-#ifdef __NETWARE__
- my_errno = nxErrno;
-#else
- /* We got an error. We don't want EACCES errors */
+ /* We got an error. We don't want EACCES errors */
my_errno=(errno == EACCES) ? EAGAIN : errno ? errno : -1;
-#endif
+
if (MyFlags & MY_WME)
{
if (locktype == F_UNLCK)
diff --git a/mysys/my_mess.c b/mysys/my_mess.c
index 0ec97525ae8..513afe39054 100644
--- a/mysys/my_mess.c
+++ b/mysys/my_mess.c
@@ -22,11 +22,7 @@ void my_message_stderr(uint error __attribute__((unused)),
DBUG_PRINT("enter",("message: %s",str));
(void) fflush(stdout);
if (MyFlags & ME_BELL)
-#ifdef __NETWARE__
- ringbell(); /* Bell */
-#else
- (void) fputc('\007',stderr); /* Bell */
-#endif /* __NETWARE__ */
+ (void) fputc('\007', stderr);
if (my_progname)
{
(void)fputs(my_progname,stderr); (void)fputs(": ",stderr);
diff --git a/mysys/my_netware.c b/mysys/my_netware.c
deleted file mode 100644
index 5b5c39c0ac0..00000000000
--- a/mysys/my_netware.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* Copyright (C) 2003 MySQL AB
-
- 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
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- 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.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-/*
- Functions specific to netware
-*/
-
-#include <mysys_priv.h>
-#ifdef __NETWARE__
- #include <string.h>
- #include <library.h>
-
-/*
- PMUserLicenseRequest is an API exported by the polimgr.nlm
- (loaded by the NetWare OS when it comes up) for use by other
- NLM-based NetWare products/services.
- PMUserLicenseRequest provides a couple of functions:
- 1) it will optionally request a User license or ensure that
- one already exists for the specified User in userInfo
- 2) it utilizes the NetWare usage metering service to
- record usage information about your product/service.
-*/
-
-long PMMeteredUsageRequest
-(
- /*
- NDS distinguished name or IP address or ??. asciiz string, e.g.
- ".CN=Admin.O=this.T=MYTREE."
- */
- char *userInfo,
- long infoType, /* see defined values */
- /*
- string used to identify the calling service, used to index the
- metered info e.g. "iPrint"
- */
- char *serviceID,
- char tranAddrType, /* type of address that follows */
- char *tranAddr, /* ptr to a 10-byte array */
- long flags, /* see defined values */
- /* NLS error code, if any. NULL input is okay */
- long *licRequestErrCode,
- /* meter service error code, if any. NULL input is okay */
- long *storeMeterInfoErrCode,
- /*
- error code from NLSMeter if
- storeMeterInfoErrCode == PM_LICREQ_NLSMETERERROR.
- NULL input is okay
- */
- long *NLSMeterErrCode
-);
-
-typedef long(*PMUR)(const char*, long, const char*, char,
- const char*, long, long*, long*, long*);
-
-/* infoType */
-/* indicates that the info in the userInfo param is an NDS user */
-#define PM_USERINFO_TYPE_NDS 1
-/* indicates that the info in the userInfo param is NOT an NDS user */
-#define PM_USERINFO_TYPE_ADDRESS 2
-
-/* Flags */
-
-/*
- Tells the service that it should not check to see if the NDS user
- contained in the userInfo param has a NetWare User License - just
- record metering information; this is ignored if infoType !=
- PM_USERINFO_TYPE_NDS
-*/
-
-#define PM_FLAGS_METER_ONLY 0x0000001
-
-/*
- Indicates that the values in the userInfo and serviceID parameters
- are unicode strings, so that the metering service bypasses
- converting these to unicode (again)
-*/
-#define PM_LICREQ_ALREADY_UNICODE 0x0000002
-/*
- Useful only if infoType is PM_USERINFO_TYPE_NDS - indicates a "no
- stop" policy of the calling service
-*/
-#define PM_LICREQ_ALWAYS_METER 0x0000004
-
-
-/*
- net Address Types - system-defined types of net addresses that can
- be used in the tranAddrType field
-*/
-
-#define NLS_TRAN_TYPE_IPX 0x00000001 /* An IPX address */
-#define NLS_TRAN_TYPE_IP 0x00000008 /* An IP address */
-#define NLS_ADDR_TYPE_MAC 0x000000F1 /* a MAC address */
-
-/*
- Net Address Sizes - lengths that correspond to the tranAddrType
- field (just fyi)
-*/
-#define NLS_IPX_ADDR_SIZE 10 /* the size of an IPX address */
-#define NLS_IP_ADDR_SIZE 4 /* the size of an IP address */
-#define NLS_MAC_ADDR_SIZE 6 /* the size of a MAC address */
-
-
-void netware_reg_user(const char *ip, const char *user,
- const char *application)
-{
- PMUR usage_request;
- long licRequestErrCode = 0;
- long storeMeterInfoErrCode = 0;
- long nlsMeterErrCode = 0;
-
- /* import the symbol */
- usage_request= ((PMUR)ImportPublicObject(getnlmhandle(),
- "PMMeteredUsageRequest"));
- if (usage_request != NULL)
- {
- unsigned long iaddr;
- char addr[NLS_IPX_ADDR_SIZE];
-
- /* create address */
- iaddr = htonl(inet_addr(ip));
- bzero(addr, NLS_IPX_ADDR_SIZE);
- memcpy(addr, &iaddr, NLS_IP_ADDR_SIZE);
-
- /* call to NLS */
- usage_request(user,
- PM_USERINFO_TYPE_ADDRESS,
- application,
- NLS_TRAN_TYPE_IP,
- addr,
- PM_FLAGS_METER_ONLY,
- &licRequestErrCode,
- &storeMeterInfoErrCode,
- &nlsMeterErrCode);
- /* release symbol */
- UnImportPublicObject(getnlmhandle(), "PMMeteredUsageRequest");
- }
-}
-#endif /* __NETWARE__ */
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 3019e4bc5c1..270d13928e3 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -45,34 +45,6 @@ void *my_pthread_getspecific_imp(pthread_key_t key)
}
#endif
-#ifdef __NETWARE__
-/*
- Don't kill the LibC Reaper thread or the main thread
-*/
-#include <nks/thread.h>
-#undef pthread_exit
-void my_pthread_exit(void *status)
-{
- NXThreadId_t tid;
- NXContext_t ctx;
- char name[NX_MAX_OBJECT_NAME_LEN+1] = "";
-
- tid= NXThreadGetId();
- if (tid == NX_INVALID_THREAD_ID || !tid)
- return;
- if (NXThreadGetContext(tid, &ctx) ||
- NXContextGetName(ctx, name, sizeof(name)-1))
- return;
-
- /*
- "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread"
- with a debug build of LibC the reaper can have different names
- */
- if (!strindex(name, "\'s"))
- pthread_exit(status);
-}
-#endif
-
/*
Some functions for RTS threads, AIX, Siemens Unix and UnixWare 7
(and DEC OSF/1 3.2 too)
diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c
index 073663e3d96..c8ef38efbdc 100644
--- a/mysys/my_rdtsc.c
+++ b/mysys/my_rdtsc.c
@@ -86,10 +86,6 @@
#include <sys/times.h> /* for times */
#endif
-#if defined(__NETWARE__)
-#include <nks/time.h> /* for NXGetTime */
-#endif
-
#if defined(__INTEL_COMPILER) && defined(__ia64__) && defined(HAVE_IA64INTRIN_H)
#include <ia64intrin.h> /* for __GetReg */
#endif
@@ -265,12 +261,6 @@ ulonglong my_timer_nanoseconds(void)
clock_gettime(CLOCK_REALTIME, &tp);
return (ulonglong) tp.tv_sec * 1000000000 + (ulonglong) tp.tv_nsec;
}
-#elif defined(__NETWARE__)
- {
- NXTime_t tm;
- NXGetTime(NX_SINCE_1970, NX_NSECONDS, &tm);
- return (ulonglong) tm;
- }
#elif defined(__APPLE__) && defined(__MACH__)
{
ulonglong tm;
@@ -322,12 +312,6 @@ ulonglong my_timer_microseconds(void)
QueryPerformanceCounter(&t_cnt);
return (ulonglong) t_cnt.QuadPart;
}
-#elif defined(__NETWARE__)
- {
- NXTime_t tm;
- NXGetTime(NX_SINCE_1970, NX_USECONDS, &tm);
- return (ulonglong) tm;
- }
#else
return 0;
#endif
@@ -354,12 +338,6 @@ ulonglong my_timer_milliseconds(void)
GetSystemTimeAsFileTime( &ft );
return ((ulonglong)ft.dwLowDateTime +
(((ulonglong)ft.dwHighDateTime) << 32))/10000;
-#elif defined(__NETWARE__)
- {
- NXTime_t tm;
- NXGetTime(NX_SINCE_1970, NX_MSECONDS, &tm);
- return (ulonglong)tm;
- }
#else
return 0;
#endif
@@ -378,12 +356,6 @@ ulonglong my_timer_ticks(void)
struct tms times_buf;
return (ulonglong) times(&times_buf);
}
-#elif defined(__NETWARE__)
- {
- NXTime_t tm;
- NXGetTime(NX_SINCE_BOOT, NX_TICKS, &tm);
- return (ulonglong) tm;
- }
#elif defined(_WIN32)
return (ulonglong) GetTickCount();
#else
@@ -583,8 +555,6 @@ void my_timer_init(MY_TIMER_INFO *mti)
mti->nanoseconds.routine= MY_TIMER_ROUTINE_GETHRTIME;
#elif defined(HAVE_CLOCK_GETTIME)
mti->nanoseconds.routine= MY_TIMER_ROUTINE_CLOCK_GETTIME;
-#elif defined(__NETWARE__)
- mti->nanoseconds.routine= MY_TIMER_ROUTINE_NXGETTIME;
#elif defined(__APPLE__) && defined(__MACH__)
mti->nanoseconds.routine= MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME;
#else
@@ -614,8 +584,6 @@ void my_timer_init(MY_TIMER_INFO *mti)
mti->microseconds.routine= MY_TIMER_ROUTINE_QUERYPERFORMANCECOUNTER;
}
}
-#elif defined(__NETWARE__)
- mti->microseconds.routine= MY_TIMER_ROUTINE_NXGETTIME;
#else
mti->microseconds.routine= 0;
#endif
@@ -633,8 +601,6 @@ void my_timer_init(MY_TIMER_INFO *mti)
mti->milliseconds.routine= MY_TIMER_ROUTINE_FTIME;
#elif defined(_WIN32)
mti->milliseconds.routine= MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME;
-#elif defined(__NETWARE__)
- mti->milliseconds.routine= MY_TIMER_ROUTINE_NXGETTIME;
#elif defined(HAVE_TIME)
mti->milliseconds.routine= MY_TIMER_ROUTINE_TIME;
#else
@@ -652,8 +618,6 @@ void my_timer_init(MY_TIMER_INFO *mti)
mti->ticks.frequency= 100; /* permanent assumption */
#if defined(HAVE_SYS_TIMES_H) && defined(HAVE_TIMES)
mti->ticks.routine= MY_TIMER_ROUTINE_TIMES;
-#elif defined(__NETWARE__)
- mti->ticks.routine= MY_TIMER_ROUTINE_NXGETTIME;
#elif defined(_WIN32)
mti->ticks.routine= MY_TIMER_ROUTINE_GETTICKCOUNT;
#else
@@ -998,7 +962,7 @@ void my_timer_init(MY_TIMER_INFO *mti)
We tested with AIX, Solaris (x86 + Sparc), Linux (x86 +
Itanium), Windows, 64-bit Windows, QNX, FreeBSD, HPUX,
- Irix, Mac. We didn't test with NetWare or SCO.
+ Irix, Mac. We didn't test with SCO.
*/
diff --git a/mysys/my_redel.c b/mysys/my_redel.c
index 77040870048..515e5cab1eb 100644
--- a/mysys/my_redel.c
+++ b/mysys/my_redel.c
@@ -76,7 +76,7 @@ end:
int my_copystat(const char *from, const char *to, int MyFlags)
{
struct stat statbuf;
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
int res;
#endif
@@ -91,14 +91,14 @@ int my_copystat(const char *from, const char *to, int MyFlags)
return 1;
(void) chmod(to, statbuf.st_mode & 07777); /* Copy modes */
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
if (statbuf.st_nlink > 1 && MyFlags & MY_LINK_WARNING)
{
if (MyFlags & MY_LINK_WARNING)
my_error(EE_LINK_WARNING,MYF(ME_BELL+ME_WAITTANG),from,statbuf.st_nlink);
}
res= chown(to, statbuf.st_uid, statbuf.st_gid); /* Copy ownership */
-#endif /* !__WIN__ && !__NETWARE__ */
+#endif /* !__WIN__ */
#ifndef VMS
#ifndef __ZTC__
diff --git a/mysys/my_rename.c b/mysys/my_rename.c
index 39e6056a9e4..1a4e7b2b409 100644
--- a/mysys/my_rename.c
+++ b/mysys/my_rename.c
@@ -44,7 +44,7 @@ int my_rename(const char *from, const char *to, myf MyFlags)
}
#endif
#if defined(HAVE_RENAME)
-#if defined(__WIN__) || defined(__NETWARE__)
+#if defined(__WIN__)
/*
On windows we can't rename over an existing file:
Remove any conflicting files:
diff --git a/mysys/my_sleep.c b/mysys/my_sleep.c
index 87170e4af41..6d1bdd5dc55 100644
--- a/mysys/my_sleep.c
+++ b/mysys/my_sleep.c
@@ -20,9 +20,7 @@
void my_sleep(ulong m_seconds)
{
-#ifdef __NETWARE__
- delay(m_seconds/1000+1);
-#elif defined(__WIN__)
+#if defined(__WIN__)
Sleep(m_seconds/1000+1); /* Sleep() has millisecond arg */
#elif defined(HAVE_SELECT)
struct timeval t;
diff --git a/netware/BUILD/apply-patch b/netware/BUILD/apply-patch
deleted file mode 100755
index 3fe5a077f9a..00000000000
--- a/netware/BUILD/apply-patch
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-# repository directory
-repo_dir=`pwd`
-
-# show usage
-show_usage()
-{
- cat << EOF
-
-usage: apply-patch
-
-Imports netware/current-changes.patch so that current changes
-for the platform are present on the local repository.
-
-Use from the root directory of the repository, with BitKeeper
-installed.
-
-EOF
- exit 0;
-}
-
-if test $1 || test -z $BK_USER
-then
- show_usage
-fi
-
-echo "starting patch..."
-
-echo "user: $BK_USER"
-
-# import patch
-# Note: In future this should be changed to check whether
-# the repo already has this patch
-bk import -tpatch $repo_dir/netware/current-changes.patch $repo_dir
diff --git a/netware/BUILD/compile-AUTOTOOLS b/netware/BUILD/compile-AUTOTOOLS
deleted file mode 100755
index c93fb1b1b28..00000000000
--- a/netware/BUILD/compile-AUTOTOOLS
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-sed -e "s/^DIST_COMMON/#DIST_COMMON/g" storage/ndb/Makefile.am > storage/ndb/Makefile.am.$$
-mv storage/ndb/Makefile.am.$$ storage/ndb/Makefile.am
-
-# for package in . ./storage/innobase
-for package in .
-do
- (cd $package
- rm -rf config.cache autom4te.cache
- aclocal
- autoheader
- libtoolize --force
- aclocal
-# automake --verbose --add-missing --force-missing
- automake --add-missing --force-missing
- autoconf)
-done
-
-#rm -rf ./bdb/build_unix/config.cache ./bdb/dist/autom4te.cache
-#(cd ./bdb/dist && sh s_all)
diff --git a/netware/BUILD/compile-linux-tools b/netware/BUILD/compile-linux-tools
deleted file mode 100755
index 6a6abd32639..00000000000
--- a/netware/BUILD/compile-linux-tools
+++ /dev/null
@@ -1,67 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-if test ! -r ./sql/mysqld.cc
-then
- echo "you must start from the top source directory"
- exit 1
-fi
-
-path=`dirname $0`
-
-# clean
-if test -e "Makefile"; then make -k clean; fi
-
-# remove files
-rm -f */.deps/*.P
-rm -f */*.linux
-
-# run autotools
-. $path/compile-AUTOTOOLS
-
-# configure
-./configure --without-innodb --without-docs
-
-# build tools only
-make clean
-make
-
-# Create mysql_version.h which was deleted my previous step
-./config.status include/mysql_version.h
-
-(cd dbug; make libdbug.a)
-(cd strings; make libmystrings.a)
-(cd mysys; make libmysys.a)
-(cd storage/heap; make libheap.a)
-(cd vio; make libvio.a)
-(cd regex; make libregex.a)
-(cd storage/myisam; make libmyisam.a)
-(cd storage/myisammrg; make libmyisammrg.a)
-(cd extra; make comp_err)
-(cd libmysql; make conf_to_src)
-(cd libmysql_r; make conf_to_src)
-# so the file will be linked
-(cd sql; make sql_yacc.cc)
-(cd sql; make gen_lex_hash)
-(cd strings; make conf_to_src)
-
-# so the file will be linked
-(cd sql; make sql_yacc.cc)
-
-# we need initilizing SQL files.
-(cd netware; make test_db.sql init_db.sql)
-
-# copying required linux tools
-cp extra/comp_err extra/comp_err.linux
-cp libmysql/conf_to_src libmysql/conf_to_src.linux
-#cp libmysql_r/conf_to_src libmysql_r/conf_to_src.linux
-cp sql/gen_lex_hash sql/gen_lex_hash.linux
-cp strings/conf_to_src strings/conf_to_src.linux
-
-# Delete mysql_version.h
-rm -f include/mysql_version.h
diff --git a/netware/BUILD/compile-netware-END b/netware/BUILD/compile-netware-END
deleted file mode 100755
index bf712f09162..00000000000
--- a/netware/BUILD/compile-netware-END
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-path=`dirname $0`
-
-# clean
-if test -e "Makefile"; then make -k clean; fi
-
-# remove files
-rm -f */.deps/*.P
-rm -rf Makefile.in.bk
-
-# Setup Metrowerks environment
-. $path/mwenv
-
-# Temporary hack to allow building from source dist
-if [ ! "$USER"=pushbuild ]
-then
- # Run autotools(use BUILD/autorun.sh)
- echo "Running autotools again(BUILD/autorun.sh)"
- . BUILD/autorun.sh
-fi
-
-# configure
-./configure $base_configs $extra_configs
-
-# Ensure a clean tree
-make clean
-
-# Link NetWare specific .def files into their proper locations
-# in the source tree
-( cd netware && make link_sources )
-
-# Now, do the real build
-make bin-dist
-
-# mark the build
-for file in *.tar.gz *.zip
-do
- if (expr "$file" : "mysql-[1-9].*" > /dev/null)
- then
- new_file=`echo $file | sed -e "s/mysql-/mysql-$suffix-/"`
- if test -e "$new_file"; then mv -f $new_file $new_file.old; fi
- mv $file $new_file
- fi
-done
-
diff --git a/netware/BUILD/compile-netware-START b/netware/BUILD/compile-netware-START
deleted file mode 100755
index 414d577130e..00000000000
--- a/netware/BUILD/compile-netware-START
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-if test ! -r ./sql/mysqld.cc
-then
- echo "you must start from the top source directory"
- exit 1
-fi
-
-path=`dirname $0`
-
-# stop on errors
-set -e
-
-base_configs=" \
- --host=i686-pc-netware \
- --enable-local-infile \
- --with-extra-charsets=all \
- --prefix=N:/mysql \
- --without-man \
- "
diff --git a/netware/BUILD/compile-netware-all b/netware/BUILD/compile-netware-all
deleted file mode 100755
index dbe64e8f97e..00000000000
--- a/netware/BUILD/compile-netware-all
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-path=`dirname $0`
-
-$path/compile-netware-src
-$path/compile-netware-standard
-$path/compile-netware-debug
-$path/compile-netware-max
-$path/compile-netware-max-debug
diff --git a/netware/BUILD/compile-netware-debug b/netware/BUILD/compile-netware-debug
deleted file mode 100755
index e44d64e3074..00000000000
--- a/netware/BUILD/compile-netware-debug
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-path=`dirname $0`
-. $path/compile-netware-START
-
-suffix="debug"
-
-extra_configs=" \
- --with-innodb \
- --with-debug=full \
- "
-
-. $path/compile-netware-END
-
-
diff --git a/netware/BUILD/compile-netware-max b/netware/BUILD/compile-netware-max
deleted file mode 100755
index d8278a4e915..00000000000
--- a/netware/BUILD/compile-netware-max
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-
-path=`dirname $0`
-. $path/compile-netware-START
-
-suffix="max"
-
-extra_configs=" \
- --with-innodb \
- --with-embedded-server \
- --with-ssl \
- "
-
-. $path/compile-netware-END
-
-
diff --git a/netware/BUILD/compile-netware-max-debug b/netware/BUILD/compile-netware-max-debug
deleted file mode 100755
index de1b5dd17cc..00000000000
--- a/netware/BUILD/compile-netware-max-debug
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-path=`dirname $0`
-. $path/compile-netware-START
-
-suffix="max-debug"
-
-extra_configs=" \
- --with-innodb \
- --with-debug=full \
- --with-embedded-server \
- --with-ssl \
- "
-
-. $path/compile-netware-END
-
-
diff --git a/netware/BUILD/compile-netware-src b/netware/BUILD/compile-netware-src
deleted file mode 100755
index f4e8a53ffea..00000000000
--- a/netware/BUILD/compile-netware-src
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-if test ! -r ./sql/mysqld.cc
-then
- echo "you must start from the top source directory"
- exit 1
-fi
-
-path=`dirname $0`
-
-# clean
-if test -e "Makefile"; then
- make -k clean;
- make -k distclean;
-fi
-
-# remove other files
-rm -f */.deps/*.P
-rm -rf Makefile.in.bk
-
-# zip source
-files=`pwd | sed -e "s/.*\\\(mysql-.*\)/\1/"`
-file=`pwd | sed -e "s/.*\\mysql-\(.*\)/mysql-src-\1-pc-netware-i686/"`
-cd ..
-if test -e "$file.zip"; then rm -f $file.zip; fi
-zip -r $file.zip $files -x \*.zip -x \*.tar.gz
-if test -e "./$files/$file.zip"; then mv -f ./$files/$file.zip ./$files/$file.zip.old; fi
-mv -f $file.zip ./$files/$file.zip
-
diff --git a/netware/BUILD/compile-netware-standard b/netware/BUILD/compile-netware-standard
deleted file mode 100755
index 76a776a1da3..00000000000
--- a/netware/BUILD/compile-netware-standard
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-
-path=`dirname $0`
-. $path/compile-netware-START
-
-suffix="standard"
-
-extra_configs=" \
- --with-innodb \
- --enable-thread-safe-client \
- --with-archive-storage-engine \
- "
-
-. $path/compile-netware-END
-
-
diff --git a/netware/BUILD/create-patch b/netware/BUILD/create-patch
deleted file mode 100755
index 711eabf2d89..00000000000
--- a/netware/BUILD/create-patch
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /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/cron-build b/netware/BUILD/cron-build
deleted file mode 100755
index 26ccde28e2a..00000000000
--- a/netware/BUILD/cron-build
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-# repository direcotry
-repo_dir=`pwd`
-
-# show usage
-show_usage()
-{
- cat << EOF
-
-usage: cron-patch
-
-EOF
- exit 0;
-}
-
-echo "starting build..."
-
-# check for bk and repo_dir
-bk help > /dev/null
-repo_dir=`bk root $repo_dir`
-cd $repo_dir
-
-# pull latest code
-echo 'y' | bk pull
-
-# determine version
-version=`grep -e "AM_INIT_AUTOMAKE(mysql, .*)" < configure.in | sed -e "s/AM_INIT_AUTOMAKE(mysql, \(.*\))/\1/"`
-echo "version: $version"
-
-# latest revision
-rev=`bk changes -e -n -d':REV:' | head -1`
-echo "latest revision: $rev"
-
-# run bootstrap
-./netware/BUILD/nwbootstrap --revision=$rev --suffix=$rev --build=all
-
-echo "done"
-
-
diff --git a/netware/BUILD/crontab b/netware/BUILD/crontab
deleted file mode 100755
index 0097f8acaaf..00000000000
--- a/netware/BUILD/crontab
+++ /dev/null
@@ -1,4 +0,0 @@
-00 23 * * * (export PATH='/usr/local/bin:/usr/bin:/bin'; export DISPLAY=':0'; cd ~/bk/mysqldoc; echo 'y' | bk pull)
-00 00 * * * (export PATH='/usr/local/bin:/usr/bin:/bin'; export DISPLAY=':0'; cd ~/bk/mysql-4.0; ./netware/BUILD/cron-build)
-00 04 * * * (export PATH='/usr/local/bin:/usr/bin:/bin'; export DISPLAY=':0'; cd ~/bk/mysql-4.1; ./netware/BUILD/cron-build)
-
diff --git a/netware/BUILD/knetware.imp b/netware/BUILD/knetware.imp
deleted file mode 100644
index d9a9372b34f..00000000000
--- a/netware/BUILD/knetware.imp
+++ /dev/null
@@ -1,2 +0,0 @@
-kYieldIfTimeSliceUp
-
diff --git a/netware/BUILD/mwasmnlm b/netware/BUILD/mwasmnlm
deleted file mode 100755
index 11fc2bc3842..00000000000
--- a/netware/BUILD/mwasmnlm
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-
-# stop on errors
-set -e
-
-args=" $*"
-
-# NOTE: Option 'pipefail' is not standard sh
-set -o pipefail
-wine --debugmsg -all -- mwasmnlm $args | \
-perl -pe 's/\r//g; s/^\e.*\e(\[J|>)?//; s/[[^:print:]]//g'
diff --git a/netware/BUILD/mwccnlm b/netware/BUILD/mwccnlm
deleted file mode 100755
index 030d87288f2..00000000000
--- a/netware/BUILD/mwccnlm
+++ /dev/null
@@ -1,16 +0,0 @@
-#! /bin/sh
-
-# stop on errors
-set -e
-
-# mwccnlm is having a hard time understanding:
-# * "-I./../include", convert it to "-I../include"
-# * "-I.../..", convert it to "-I../../"
-args=" "`echo $* | sed \
--e 's/-I.\/../-I../g' \
--e 's/\(-I[.\/]*.\) /\1\/ /g'`
-
-# NOTE: Option 'pipefail' is not standard sh
-set -o pipefail
-wine --debugmsg -all -- mwccnlm $args | \
-perl -pe 's/\r//g; s/^\e.*\e(\[J|>)?//; s/[[^:print:]]//g'
diff --git a/netware/BUILD/mwenv b/netware/BUILD/mwenv
deleted file mode 100755
index 44497c48917..00000000000
--- a/netware/BUILD/mwenv
+++ /dev/null
@@ -1,75 +0,0 @@
-#! /bin/sh
-
-if test ! -r ./sql/mysqld.cc
-then
- echo "you must start from the top source directory"
- exit 1
-fi
-
-# The base path(in wineformat) where compilers, includes and
-# libraries are installed
-if test -z "$MYDEV"
-then
- # the default is "F:/mydev"
- export MYDEV="F:/mydev"
-fi
-echo "MYDEV: $MYDEV"
-
-# Get current dir
-BUILD_DIR=`pwd`
-echo "BUILD_DIR: $BUILD_DIR"
-
-# Get current dir in wine format
-base=`echo $MYDEV |sed 's/\/.*//'`
-base_unix_part=`winepath -- -u $base/`
-WINE_BUILD_DIR=`echo "$BUILD_DIR" | sed 's_'$base_unix_part'/__'`
-WINE_BUILD_DIR="$base/$WINE_BUILD_DIR"
-echo "WINE_BUILD_DIR: $WINE_BUILD_DIR"
-
-# Look for libc, MySQL 5.1.x uses libc-2006 by default
-libc_dir="$MYDEV/libc-2006"
-if [ ! -d `winepath $libc_dir` ]
-then
- # The libcdir didn't exist, set default
- libc_dir="$MYDEV/libc"
-fi
-echo "Using libc in $libc_dir";
-
-export MWCNWx86Includes="$libc_dir/include;$MYDEV/fs64/headers;$MYDEV/zlib-1.2.3;$WINE_BUILD_DIR/include;$MYDEV"
-export MWNWx86Libraries="$libc_dir/imports;$MYDEV/mw/lib;$MYDEV/fs64/imports;$MYDEV/zlib-1.2.3;$MYDEV/openssl;$WINE_BUILD_DIR/netware/BUILD"
-export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;libz.a;neb.imp;zPublics.imp;knetware.imp"
-
-export WINEPATH="$MYDEV/mw/bin"
-
-# the default added path is "$BUILD_DIR/netware/BUILD"
-export PATH="$PATH:$BUILD_DIR/netware/BUILD"
-
-export AR='mwldnlm'
-export AR_FLAGS='-type library -o'
-export AS='mwasmnlm'
-export CC='mwccnlm -gccincludes'
-export CFLAGS='-enum int -align 8 -proc 686 -relax_pointers -dialect c'
-export CXX='mwccnlm -gccincludes'
-export CXXFLAGS='-enum int -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 -map -flags pseudopreemption'
-export RANLIB=:
-export STRIP=:
-
-#
-# Check that TERM has been set to avoid problem "Error opening
-# terminal: unknown" when the script is executed using non interactive ssh
-#
-if test -z "$TERM" -o "$TERM"=dumb
-then
- export TERM=linux
-fi
-
-# Temporary hack to allow building from source dist
-if [ "$USER"=pushbuild ]
-then
- export ARFLAGS=$AR_FLAGS
-fi
-
-# Print all env. variables
-export
diff --git a/netware/BUILD/mwldnlm b/netware/BUILD/mwldnlm
deleted file mode 100755
index b1822827b59..00000000000
--- a/netware/BUILD/mwldnlm
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh
-
-# stop on errors
-set -e
-
-# If libtool passes "x" as the first argument to this script
-# it's an indication that libtool is trying to unpack .la's
-# so they can be added to a new library
-# This step does not work on Netware and we avoid it by
-# replacing the .la library with the path to the .a library
-# in Makefile.in
-
-args=" $*"
-
-# NOTE: Option 'pipefail' is not standard sh
-set -o pipefail
-wine --debugmsg -all -- mwldnlm $args | \
-perl -pe 's/\r//g; s/^\e.*\e(\[J|>)?//; s/[[^:print:]]//g'
diff --git a/netware/BUILD/nwbuild b/netware/BUILD/nwbuild
deleted file mode 100755
index d431f70add8..00000000000
--- a/netware/BUILD/nwbuild
+++ /dev/null
@@ -1,86 +0,0 @@
-#! /bin/sh
-
-# This script builds a Netware binary from a MySQL source tarball
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-# init
-build=""
-
-# show usage
-show_usage()
-{
- cat << EOF
-
-usage: nwbuild [options]
-
-Build Netware binary from source .tar.gz
-
-options:
-
---build=<opt> Build the binary distributions for NetWare,
- where <opt> is "standard", "debug", or "all"
- (default is to not build a binary distribution)
-
---help Show this help information
-
-Examples:
-
- ./netware/BUILD/nwbuild --build=debug
- ./netware/BUILD/nwbuild --build=standard
-
-EOF
-}
-
-# parse arguments
-for arg do
- case "$arg" in
- --build=*) build=`echo "$arg" | sed -e "s;--build=;;"` ;;
- --help) show_usage; exit 0 ;;
- *) show_usage >&2; exit 1 ;;
- esac
-done
-
-# determine version
-version=`grep -e "AM_INIT_AUTOMAKE(mysql, .*)" < configure.in | sed -e "s/AM_INIT_AUTOMAKE(mysql, \(.*\))/\1/"`
-echo "version: $version"
-
-# make files writeable
-echo "making files writable..."
-chmod -R u+rw,g+rw .
-
-# edit the def file versions
-nlm_version=`echo "$version" | sed -e "s;\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*;\1, \2, \3;"`
-echo "updating *.def file versions to $nlm_version..."
-
-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
-
-# create the libmysql.imp file in netware folder from libmysql/libmysql.def
-# file
-echo "generating libmysql.imp file..."
-awk 'BEGIN{x=0;} END{printf("\n");} x==1 {printf(" %s",$1); x++; next} x>1 {printf(",\n %s", $1);next} /EXPORTS/{x=1}' libmysql/libmysql.def > netware/libmysql.imp
-# build linux tools
-echo "compiling linux tools..."
-./netware/BUILD/compile-linux-tools
-test -f ./netware/init_db.sql # this must exist
-test -f ./netware/test_db.sql # this must exist
-
-# compile
-if test $build
-then
- echo "compiling $build..."
- ./netware/BUILD/compile-netware-$build
-else
- echo "Preparation complete. Use ./netware/BUILD/compile-netware-* to build MySQL."
-fi
-
-echo "done"
diff --git a/netware/BUILD/openssl.imp b/netware/BUILD/openssl.imp
deleted file mode 100644
index 8972ff5d58c..00000000000
--- a/netware/BUILD/openssl.imp
+++ /dev/null
@@ -1,9 +0,0 @@
-WS2_32_shutdown
-WS2_32_closesocket
-WSASetLastError
-WS2_32_recv
-WSASetLastError
-WS2_32_send
-WSAGetLastError
-GetProcessSwitchCount
-RunningProcess
diff --git a/netware/BUILD/save-patch b/netware/BUILD/save-patch
deleted file mode 100755
index 9f9979ace5b..00000000000
--- a/netware/BUILD/save-patch
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-
-# debug
-#set -x
-
-# stop on errors
-set -e
-
-# repository directory
-repo_dir=`pwd`
-
-# show usage
-show_usage()
-{
- cat << EOF
-
-usage: save-patch
-
-Creates a patch file between the latest revision of the current tree
-and the latest revision not created by \$BK_USER and places it in
-the tree as netware/current-changes.patch
-
-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/netware/current-changes.patch"
-echo "creating \"$patch\"..."
-bk export -tpatch -r$tree_rev..$user_rev -xnetware/current-changes.patch > $patch
diff --git a/netware/Makefile.am b/netware/Makefile.am
deleted file mode 100644
index f537022495b..00000000000
--- a/netware/Makefile.am
+++ /dev/null
@@ -1,117 +0,0 @@
-# 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
-# the Free Software Foundation; either version 2 of the License, or
-# (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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-if HAVE_NETWARE
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I..
-LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
- ../dbug/libdbug.a ../strings/libmystrings.a
-bin_PROGRAMS = mysqld_safe mysql_install_db mysql_test_run libmysql
-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 \
- @openssl_libs@ @yassl_libs@
-
-netware_build_files = client/mysql.def client/mysqladmin.def \
- client/mysqlbinlog.def client/mysqlcheck.def \
- client/mysqldump.def client/mysqlimport.def \
- client/mysqlshow.def client/mysqltest.def \
- client/mysqlslap.def client/mysql_upgrade.def \
- sql/mysqld.def extra/mysql_waitpid.def \
- tests/mysql_client_test.def \
- extra/my_print_defaults.def \
- extra/perror.def extra/replace.def \
- extra/resolveip.def extra/comp_err.def \
- extra/resolve_stack_dump.def \
- libmysqld/libmysqld.def \
- storage/myisam/myisamchk.def \
- storage/myisam/myisamlog.def \
- storage/myisam/myisampack.def \
- storage/myisam/myisam_ftdump.def
-
-BUILT_SOURCES = link_sources init_db.sql test_db.sql
-CLEANFILES = $(BUILT_SOURCES)
-
-all: $(BUILT_SOURCES)
-
-link_sources:
- for f in $(netware_build_files); do \
- rm -f ../$$f; \
- org=`basename $$f`; \
- @LN_CP_F@ $(srcdir)/$$org ../$$f; \
- done
- echo timestamp > link_sources
-
-else
-
-BUILT_SOURCES = libmysql.imp init_db.sql test_db.sql
-DISTCLEANFILES = libmysql.imp
-CLEANFILES = init_db.sql test_db.sql
-
-# Create the libmysql.imp from libmysql/libmysql.def
-libmysql.imp: $(top_srcdir)/libmysql/libmysql.def
- $(AWK) 'BEGIN{x=0;} \
- END{printf("\n");} \
- x==1 {printf(" %s",$$1); x++; next} \
- x>1 {printf(",\n %s", $$1); next} \
- /EXPORTS/{x=1}' $(top_srcdir)/libmysql/libmysql.def > libmysql.imp
-
-EXTRA_DIST= $(BUILT_SOURCES) comp_err.def install_test_db.ncf \
- libmysql.def \
- libmysqlmain.c my_manage.c my_manage.h \
- my_print_defaults.def myisam_ftdump.def myisamchk.def \
- myisamlog.def myisampack.def mysql.def mysql.xdc \
- mysql_fix_privilege_tables.pl \
- mysql_install_db.c mysql_install_db.def \
- mysql_secure_installation.pl mysql_test_run.c \
- mysql_test_run.def mysql_waitpid.def mysqladmin.def \
- mysqlbinlog.def mysqlcheck.def mysqld.def \
- mysqld_safe.c mysqld_safe.def mysqldump.def mysqlimport.def \
- mysqlshow.def mysqltest.def mysqlslap.def mysql_upgrade.def \
- perror.def \
- mysql_client_test.def \
- replace.def resolve_stack_dump.def resolveip.def \
- static_init_db.sql init_db.sql test_db.sql \
- BUILD/apply-patch BUILD/compile-AUTOTOOLS \
- BUILD/compile-linux-tools BUILD/compile-netware-END \
- BUILD/compile-netware-START BUILD/compile-netware-all\
- BUILD/compile-netware-debug BUILD/compile-netware-max \
- BUILD/compile-netware-max-debug BUILD/compile-netware-src \
- BUILD/compile-netware-standard BUILD/create-patch \
- BUILD/cron-build BUILD/crontab BUILD/knetware.imp \
- BUILD/mwasmnlm BUILD/mwccnlm BUILD/mwenv BUILD/mwldnlm \
- BUILD/nwbuild BUILD/openssl.imp BUILD/save-patch
-
-endif
-
-
-# Build init_db.sql from the files that contain
-# the system tables for this version of MySQL plus any commands
-init_db.sql: $(top_srcdir)/scripts/mysql_system_tables.sql \
- $(top_srcdir)/scripts/mysql_system_tables_data.sql
- @echo "Building $@";
- @echo "CREATE DATABASE mysql;" > $@;
- @echo "CREATE DATABASE test;" >> $@;
- @echo "use mysql;" >> $@;
- @cat $(top_srcdir)/scripts/mysql_system_tables.sql >> $@;
-
-# Build test_db.sql from init_db.sql plus
-# some test data
-test_db.sql: init_db.sql $(top_srcdir)/scripts/mysql_test_data_timezone.sql
- @echo "Building $@";
- @cat init_db.sql \
- $(top_srcdir)/scripts/mysql_test_data_timezone.sql > $@;
diff --git a/netware/comp_err.def b/netware/comp_err.def
deleted file mode 100644
index f5b18bbdb9a..00000000000
--- a/netware/comp_err.def
+++ /dev/null
@@ -1,11 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Error File Compiler
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Error File Compiler"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/install_test_db.ncf b/netware/install_test_db.ncf
deleted file mode 100644
index 06befc5d9bd..00000000000
--- a/netware/install_test_db.ncf
+++ /dev/null
@@ -1 +0,0 @@
-# This functionality is handled by mysql-test-run.nlm on NetWare
diff --git a/netware/libmysql.def b/netware/libmysql.def
deleted file mode 100644
index d9d4c752612..00000000000
--- a/netware/libmysql.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Client
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-EXPORT @libmysql.imp
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Client Library"
-VERSION 4, 0
-AUTOUNLOAD
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
diff --git a/netware/libmysqlmain.c b/netware/libmysqlmain.c
deleted file mode 100644
index 2b6ea9b7e27..00000000000
--- a/netware/libmysqlmain.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- 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
- the Free Software Foundation; either version 2 of the License, or
- (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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "my_global.h"
-
-void init_available_charsets(void);
-
-/* this function is required so that global memory is allocated against this
-library nlm, and not against a paticular client */
-int _NonAppStart(void *NLMHandle, void *errorScreen, const char *commandLine,
- const char *loadDirPath, size_t uninitializedDataLength,
- void *NLMFileHandle, int (*readRoutineP)( int conn, void *fileHandle,
- size_t offset, size_t nbytes, size_t *bytesRead, void *buffer ),
- size_t customDataOffset, size_t customDataSize, int messageCount,
- const char **messages)
-{
- mysql_server_init(0, NULL, NULL);
-
- init_available_charsets();
-
- return 0;
-}
-
diff --git a/netware/my_manage.c b/netware/my_manage.c
deleted file mode 100644
index 5f59e46374f..00000000000
--- a/netware/my_manage.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/*
- Copyright (c) 2003 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
- the Free Software Foundation; either version 2 of the License, or
- (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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include <stdio.h>
-#include <errno.h>
-#include <dirent.h>
-#include <string.h>
-#include <screen.h>
-#include <proc.h>
-#include <ctype.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <assert.h>
-
-#include "my_manage.h"
-
-/******************************************************************************
-
- macros
-
-******************************************************************************/
-
-/******************************************************************************
-
- global variables
-
-******************************************************************************/
-
-/******************************************************************************
-
- functions
-
-******************************************************************************/
-
-/******************************************************************************
-
- init_args()
-
- Init an argument list.
-
-******************************************************************************/
-void init_args(arg_list_t *al)
-{
- ASSERT(al != NULL);
-
- al->argc = 0;
- al->size = ARG_BUF;
- al->argv = malloc(al->size * sizeof(char *));
- ASSERT(al->argv != NULL);
-
- return;
-}
-
-/******************************************************************************
-
- add_arg()
-
- Add an argument to a list.
-
-******************************************************************************/
-void add_arg(arg_list_t *al, const char *format, ...)
-{
- va_list ap;
- char temp[PATH_MAX];
-
- ASSERT(al != 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);
- vsprintf(temp, format, 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);
- }
- else
- {
- al->argv[al->argc] = NULL;
- }
-
- return;
-}
-
-/******************************************************************************
-
- free_args()
-
- Free an argument list.
-
-******************************************************************************/
-void free_args(arg_list_t *al)
-{
- int i;
-
- ASSERT(al != NULL);
-
- for(i = 0; i < al->argc; i++)
- {
- ASSERT(al->argv[i] != NULL);
- free(al->argv[i]);
- al->argv[i] = NULL;
- }
-
- free(al->argv);
- al->argc = 0;
- al->argv = NULL;
-
- return;
-}
-
-/******************************************************************************
-
- sleep_until_file_deleted()
-
- Sleep until the given file is no longer found.
-
-******************************************************************************/
-int sleep_until_file_deleted(char *pid_file)
-{
- struct stat buf;
- int i, err;
-
- for(i = 0; (i < TRY_MAX) && (err = !stat(pid_file, &buf)); i++) sleep(1);
-
- if (err != 0) err = errno;
-
- return err;
-}
-
-/******************************************************************************
-
- sleep_until_file_exists()
-
- Sleep until the given file exists.
-
-******************************************************************************/
-int sleep_until_file_exists(char *pid_file)
-{
- struct stat buf;
- int i, err;
-
- for(i = 0; (i < TRY_MAX) && (err = stat(pid_file, &buf)); i++) sleep(1);
-
- if (err != 0) err = errno;
-
- return err;
-}
-
-/******************************************************************************
-
- wait_for_server_start()
-
- Wait for the server on the given port to start.
-
-******************************************************************************/
-int wait_for_server_start(char *bin_dir, char *user, char *password, int port,char *tmp_dir)
-{
- arg_list_t al;
- int err, i;
- char mysqladmin_file[PATH_MAX];
- char trash[PATH_MAX];
-
- // mysqladmin file
- snprintf(mysqladmin_file, PATH_MAX, "%s/mysqladmin", bin_dir);
- snprintf(trash, PATH_MAX, "%s/trash.out",tmp_dir);
-
- // 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");
-
-#ifdef NOT_USED
- add_arg(&al, "--connect_timeout=10");
- add_arg(&al, "-w");
-#endif
-
- 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,
- trash, NULL)); i++) sleep(1);
-
- // free args
- free_args(&al);
-
- return err;
-}
-
-/******************************************************************************
-
- spawn()
-
- Spawn the given path with the given arguments.
-
-******************************************************************************/
-int spawn(char *path, arg_list_t *al, int join, char *input,
- char *output, char *error)
-{
- 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)
- {
- result = -1;
- }
- else if (join)
- {
- waitpid(pid, &result, 0);
- }
-
- // 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;
-}
-
-/******************************************************************************
-
- stop_server()
-
- Stop the server with the given port and pid file.
-
-******************************************************************************/
-int stop_server(char *bin_dir, char *user, char *password, int port,
- char *pid_file,char *tmp_dir)
-{
- arg_list_t al;
- int err, i, argc = 0;
- char mysqladmin_file[PATH_MAX];
- char trash[PATH_MAX];
-
- // mysqladmin file
- snprintf(mysqladmin_file, PATH_MAX, "%s/mysqladmin", bin_dir);
- snprintf(trash, PATH_MAX, "%s/trash.out",tmp_dir);
-
- // 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, "--shutdown_timeout=20");
- add_arg(&al, "shutdown");
-
- // spawn
- if ((err = spawn(mysqladmin_file, &al, TRUE, NULL,
- trash, NULL)) == 0)
- {
- sleep_until_file_deleted(pid_file);
- }
- else
- {
- pid_t pid = get_server_pid(pid_file);
-
- // shutdown failed - kill server
- kill_server(pid);
-
- sleep(TRY_MAX);
-
- // remove pid file if possible
- err = remove(pid_file);
- }
-
- // free args
- free_args(&al);
-
- return err;
-}
-
-/******************************************************************************
-
- get_server_pid()
-
- Get the VM id with the given pid file.
-
-******************************************************************************/
-pid_t get_server_pid(char *pid_file)
-{
- char buf[PATH_MAX];
- int fd, err;
- char *p;
- pid_t id;
-
- // discover id
- fd = open(pid_file, O_RDONLY);
-
- err = read(fd, buf, PATH_MAX);
-
- close(fd);
-
- if (err > 0)
- {
- // terminate string
- if ((p = strchr(buf, '\n')) != NULL)
- {
- *p = NULL;
-
- // check for a '\r'
- if ((p = strchr(buf, '\r')) != NULL)
- {
- *p = NULL;
- }
- }
- else
- {
- buf[err] = NULL;
- }
-
- id = strtol(buf, NULL, 0);
- }
-
- return id;
-}
-
-/******************************************************************************
-
- kill_server()
-
- Force a kill of the server with the given pid.
-
-******************************************************************************/
-void kill_server(pid_t pid)
-{
- if (pid > 0)
- {
- // destroy vm
- NXVmDestroy(pid);
- }
-}
-
-/******************************************************************************
-
- del_tree()
-
- Delete the directory and subdirectories.
-
-******************************************************************************/
-void del_tree(char *dir)
-{
- DIR *parent = opendir(dir);
- DIR *entry;
- char temp[PATH_MAX];
-
- if (parent == NULL)
- {
- return;
- }
-
- while((entry = readdir(parent)) != NULL)
- {
- // create long name
- snprintf(temp, PATH_MAX, "%s/%s", dir, entry->d_name);
-
- if (entry->d_name[0] == '.')
- {
- // Skip
- }
- else if (S_ISDIR(entry->d_type))
- {
- // delete subdirectory
- del_tree(temp);
- }
- else
- {
- // remove file
- remove(temp);
- }
- }
-
- // remove directory
- rmdir(dir);
-}
-
-/******************************************************************************
-
- removef()
-
-******************************************************************************/
-int removef(const char *format, ...)
-{
- va_list ap;
- char path[PATH_MAX];
-
- va_start(ap, format);
-
- vsnprintf(path, PATH_MAX, format, ap);
-
- va_end(ap);
-
- return remove(path);
-}
-
-/******************************************************************************
-
- get_basedir()
-
-******************************************************************************/
-void get_basedir(char *argv0, char *basedir)
-{
- char temp[PATH_MAX];
- char *p;
-
- ASSERT(argv0 != NULL);
- ASSERT(basedir != NULL);
-
- strcpy(temp, strlwr(argv0));
- while((p = strchr(temp, '\\')) != NULL) *p = '/';
-
- if ((p = strindex(temp, "/bin/")) != NULL)
- {
- *p = NULL;
- strcpy(basedir, temp);
- }
-}
diff --git a/netware/my_manage.h b/netware/my_manage.h
deleted file mode 100644
index 360f2f104be..00000000000
--- a/netware/my_manage.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- 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
- the Free Software Foundation; either version 2 of the License, or
- (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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#ifndef _MY_MANAGE
-#define _MY_MANAGE
-
-/******************************************************************************
-
- includes
-
-******************************************************************************/
-
-#include <stdlib.h>
-#ifndef __WIN__
-#include <unistd.h>
-#endif
-
-/******************************************************************************
-
- macros
-
-******************************************************************************/
-#ifdef __WIN__
-#define PATH_MAX _MAX_PATH
-#define NAME_MAX _MAX_FNAME
-#define kill(A,B) TerminateProcess((HANDLE)A,0)
-#define NOT_NEED_PID 0
-#define MASTER_PID 1
-#define SLAVE_PID 2
-#define mysqld_timeout 60000
-
-intptr_t master_server;
-intptr_t slave_server;
-int pid_mode;
-bool run_server;
-char win_args[1024];
-bool skip_first_param;
-#endif
-
-
-#define ARG_BUF 10
-#define TRY_MAX 5
-#define NULL (char) 0
-
-#ifdef __NETWARE__
-#define strstr(A,B) strindex(A,B)
-#endif
-
-
-/******************************************************************************
-
- structures
-
-******************************************************************************/
-
-typedef struct
-{
-
- int argc;
- char **argv;
-
- size_t size;
-
-} arg_list_t;
-
-
-typedef int pid_t;
-/******************************************************************************
-
- global variables
-
-******************************************************************************/
-
-/******************************************************************************
-
- prototypes
-
-******************************************************************************/
-
-void init_args(arg_list_t *);
-void add_arg(arg_list_t *, const 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,char *);
-
-int spawn(char *, arg_list_t *, int, char *, char *, char *);
-
-int stop_server(char *, char *, char *, int, char *,char *);
-pid_t get_server_pid(char *);
-void kill_server(pid_t pid);
-
-void del_tree(char *);
-int removef(const char *, ...);
-
-void get_basedir(char *, char *);
-
-char mysqladmin_file[PATH_MAX];
-
-#endif /* _MY_MANAGE */
-
-
diff --git a/netware/my_print_defaults.def b/netware/my_print_defaults.def
deleted file mode 100644
index acba6c81b49..00000000000
--- a/netware/my_print_defaults.def
+++ /dev/null
@@ -1,11 +0,0 @@
-#------------------------------------------------------------------------------
-# My Print Defaults
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Print Defaults Tool"
-VERSION 5, 0, 17
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/myisam_ftdump.def b/netware/myisam_ftdump.def
deleted file mode 100644
index f2b4890a54d..00000000000
--- a/netware/myisam_ftdump.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL MyISAM Dump Tool
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL MyISAM Table Dump Tool"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL MyISAM Table Dump Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/myisamchk.def b/netware/myisamchk.def
deleted file mode 100644
index 71fb66d0ed1..00000000000
--- a/netware/myisamchk.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MyISAM Check
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL MyISAM Table Check Tool[scrollable]"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL MyISAM Table Check Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/myisamlog.def b/netware/myisamlog.def
deleted file mode 100644
index 1924ba2192b..00000000000
--- a/netware/myisamlog.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MyISAM Log
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL MyISAM Table Log Tool"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL MyISAM Table Log Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/myisampack.def b/netware/myisampack.def
deleted file mode 100644
index 39fd1b34100..00000000000
--- a/netware/myisampack.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MyISAM Pack
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL MyISAM Table Pack Tool"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL MyISAM Table Pack Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysql.def b/netware/mysql.def
deleted file mode 100644
index 4e44f4882d1..00000000000
--- a/netware/mysql.def
+++ /dev/null
@@ -1,13 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Client
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Monitor[scrollable]"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Monitor"
-VERSION 4, 0
-STACKSIZE 131072
-MULTIPLE
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysql.xdc b/netware/mysql.xdc
deleted file mode 100644
index a6c430f7314..00000000000
--- a/netware/mysql.xdc
+++ /dev/null
Binary files differ
diff --git a/netware/mysql_client_test.def b/netware/mysql_client_test.def
deleted file mode 100644
index 9a6f63ec4d7..00000000000
--- a/netware/mysql_client_test.def
+++ /dev/null
@@ -1,10 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Test
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Client Test"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
diff --git a/netware/mysql_fix_privilege_tables.pl b/netware/mysql_fix_privilege_tables.pl
deleted file mode 100644
index e40b4158e1c..00000000000
--- a/netware/mysql_fix_privilege_tables.pl
+++ /dev/null
@@ -1,227 +0,0 @@
-#-----------------------------------------------------------------------------
-# Copyright (C) 2002 MySQL AB
-#
-# 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
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# 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.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#-----------------------------------------------------------------------------
-
-#-----------------------------------------------------------------------------
-# This notice applies to changes, created by or for Novell, Inc.,
-# to preexisting works for which notices appear elsewhere in this file.
-
-# Copyright (c) 2003 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
-# the Free Software Foundation; either version 2 of the License, or
-# (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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#-----------------------------------------------------------------------------
-
-#use strict;
-use Mysql;
-
-print "MySQL Fix Privilege Tables Script\n\n";
-
-print "NOTE: This script updates your privilege tables to the lastest\n";
-print " specifications!\n\n";
-
-#-----------------------------------------------------------------------------
-# get the current root password
-#-----------------------------------------------------------------------------
-
-print "In order to log into MySQL to update it, we'll need the current\n";
-print "password for the root user. If you've just installed MySQL, and\n";
-print "you haven't set the root password yet, the password will be blank,\n";
-print "so you should just press enter here.\n\n";
-
-print "Enter the current password for root: ";
-my $password = <STDIN>;
-chomp $password;
-print "\n";
-
-my $conn = Mysql->connect("localhost", "mysql", "root", $password)
- || die "Unable to connect to MySQL.";
-
-print "OK, successfully used the password, moving on...\n\n";
-
-
-#-----------------------------------------------------------------------------
-# MySQL 4.0.2
-#-----------------------------------------------------------------------------
-
-#-- Detect whether or not we had the Grant_priv column
-print "Fixing privileges for old tables...\n";
-$conn->query("SET \@hadGrantPriv:=0;");
-$conn->query("SELECT \@hadGrantPriv:=1 FROM user WHERE Grant_priv LIKE '%';");
-
-#--- Fix privileges for old tables
-$conn->query("UPDATE user SET Grant_priv=File_priv,References_priv=Create_priv,Index_priv=Create_priv,Alter_priv=Create_priv WHERE \@hadGrantPriv = 0;");
-$conn->query("UPDATE db SET References_priv=Create_priv,Index_priv=Create_priv,Alter_priv=Create_priv WHERE \@hadGrantPriv = 0;");
-$conn->query("UPDATE host SET References_priv=Create_priv,Index_priv=Create_priv,Alter_priv=Create_priv WHERE \@hadGrantPriv = 0;");
-
-
-# Detect whether we had Show_db_priv
-$conn->query("SET \@hadShowDbPriv:=0;");
-$conn->query("SELECT \@hadShowDbPriv:=1 FROM user WHERE Show_db_priv LIKE '%';");
-
-print "Adding new fields used by MySQL 4.0.2 to the privilege tables...\n";
-print "NOTE: You can ignore any Duplicate column errors.\n";
-$conn->query(" \
-ALTER TABLE user \
-ADD Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER alter_priv, \
-ADD Super_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Show_db_priv, \
-ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Super_priv, \
-ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Create_tmp_table_priv, \
-ADD Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Lock_tables_priv, \
-ADD Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Execute_priv, \
-ADD Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Repl_slave_priv; \
-") && $conn->query(" \
-UPDATE user SET show_db_priv=select_priv, super_priv=process_priv, execute_priv=process_priv, create_tmp_table_priv='Y', Lock_tables_priv='Y', Repl_slave_priv=file_priv, Repl_client_priv=file_priv where user<>''AND \@hadShowDbPriv = 0; \
-");
-
-#-- The above statement converts privileges so that users have similar privileges as before
-
-#-----------------------------------------------------------------------------
-# MySQL 4.0 Limitations
-#-----------------------------------------------------------------------------
-
-print "Adding new fields used by MySQL 4.0 security limitations...\n";
-
-$conn->query(" \
-ALTER TABLE user \
-ADD max_questions int(11) NOT NULL AFTER x509_subject, \
-ADD max_updates int(11) unsigned NOT NULL AFTER max_questions, \
-ADD max_connections int(11) unsigned NOT NULL AFTER max_updates; \
-");
-
-#-- Change the password column to suite the new password hashing used
-#-- in 4.1.1 onward
-$conn->query("ALTER TABLE user change Password Password char(41) binary not null;");
-
-#-- The second alter changes ssl_type to new 4.0.2 format
-#-- Adding columns needed by GRANT .. REQUIRE (openssl)"
-print "Adding new fields to use in ssl authentication...\n";
-
-$conn->query(" \
-ALTER TABLE user \
-ADD ssl_type enum('','ANY','X509', 'SPECIFIED') NOT NULL, \
-ADD ssl_cipher BLOB NOT NULL, \
-ADD x509_issuer BLOB NOT NULL, \
-ADD x509_subject BLOB NOT NULL; \
-");
-
-#-----------------------------------------------------------------------------
-# MySQL 4.0 DB and Host privs
-#-----------------------------------------------------------------------------
-
-print "Adding new fields used by MySQL 4.0 locking and temporary table security...\n";
-
-$conn->query(" \
-ALTER TABLE db \
-ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, \
-ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL; \
-");
-
-$conn->query(" \
-ALTER TABLE host \
-ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, \
-ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL; \
-");
-
-#
-# Change the Table_name column to be of char(64) which was char(60) by mistake till now.
-#
-$conn->query("alter table tables_priv change Table_name Table_name char(64) binary DEFAULT '' NOT NULL;");
-
-
-#
-# Create some possible missing tables
-#
-print "Adding online help tables...\n";
-
-$conn->query(" \
-CREATE TABLE IF NOT EXISTS help_topic ( \
-help_topic_id int unsigned not null, \
-name varchar(64) not null, \
-help_category_id smallint unsigned not null, \
-description text not null, \
-example text not null, \
-url varchar(128) not null, \
-primary key (help_topic_id), unique index (name) \
-) comment='help topics'; \
-");
-
-$conn->query(" \
-CREATE TABLE IF NOT EXISTS help_category ( \
-help_category_id smallint unsigned not null, \
-name varchar(64) not null, \
-parent_category_id smallint unsigned null, \
-url varchar(128) not null, \
-primary key (help_category_id), \
-unique index (name) \
-) comment='help categories'; \
-");
-
-$conn->query(" \
-CREATE TABLE IF NOT EXISTS help_relation ( \
-help_topic_id int unsigned not null references help_topic, \
-help_keyword_id int unsigned not null references help_keyword, \
-primary key (help_keyword_id, help_topic_id) \
-) comment='keyword-topic relation'; \
-");
-
-$conn->query(" \
-CREATE TABLE IF NOT EXISTS help_keyword ( \
-help_keyword_id int unsigned not null, \
-name varchar(64) not null, \
-primary key (help_keyword_id), \
-unique index (name) \
-) comment='help keywords'; \
-");
-
-
-#
-# Filling the help tables with contents.
-#
-print "Filling online help tables with contents...\n";
-# Generate the path for "fill_help_tables.sql" file which is in different folder.
-$fill_help_table=$0;
-$fill_help_table =~ s/scripts[\\\/]mysql_fix_privilege_tables.pl/share\\fill_help_tables.sql/;
-
-#read all content from the sql file which contains recordsfor help tables.
-open(fileIN,$fill_help_table) or die("Cannot open $fill_help_table: $!");
-@logData = <fileIN>;
-close(fileIN);
-foreach $line (@logData) {
-# if the line is not empty, insert a record in the table.
- if( ! ($line =~ /^\s*$/) ) {
- $conn->query("$line");
- }
-}
-
-#-----------------------------------------------------------------------------
-# done
-#-----------------------------------------------------------------------------
-
-print "\n\nAll done!\n\n";
-
-print "Thanks for using MySQL!\n\n";
diff --git a/netware/mysql_install_db.c b/netware/mysql_install_db.c
deleted file mode 100644
index 98852c89825..00000000000
--- a/netware/mysql_install_db.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- 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
- the Free Software Foundation; either version 2 of the License, or
- (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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <netdb.h>
-#include <sys/stat.h>
-#include <monitor.h>
-#include <strings.h>
-#include <getopt.h>
-#include <screen.h>
-#include <errno.h>
-
-#include "my_config.h"
-#include "my_manage.h"
-
-/******************************************************************************
-
- global variables
-
-******************************************************************************/
-char autoclose;
-char basedir[PATH_MAX];
-char datadir[PATH_MAX];
-char err_log[PATH_MAX];
-char out_log[PATH_MAX];
-char mysqld[PATH_MAX];
-char hostname[PATH_MAX];
-char sql_file[PATH_MAX];
-char default_option[PATH_MAX];
-
-/******************************************************************************
-
- prototypes
-
-******************************************************************************/
-
-void start_defaults(int, char*[]);
-void finish_defaults();
-void read_defaults(arg_list_t *);
-void parse_args(int, char*[]);
-void get_options(int, char*[]);
-void create_paths();
-int mysql_install_db(int argc, char *argv[]);
-
-/******************************************************************************
-
- functions
-
-******************************************************************************/
-
-/******************************************************************************
-
- start_defaults()
-
- Start setting the defaults.
-
-******************************************************************************/
-void start_defaults(int argc, char *argv[])
-{
- struct stat buf;
- int i;
-
- // default options
- static char *default_options[] =
- {
- "--no-defaults",
- "--defaults-file=",
- "--defaults-extra-file=",
- NULL
- };
-
- // autoclose
- autoclose = FALSE;
-
- // basedir
- get_basedir(argv[0], basedir);
-
- // hostname
- if (gethostname(hostname,PATH_MAX) < 0)
- {
- // default
- strcpy(hostname,"mysql");
- }
-
- // default option
- default_option[0] = NULL;
- for (i=0; (argc > 1) && default_options[i]; i++)
- {
- if(!strnicmp(argv[1], default_options[i], strlen(default_options[i])))
- {
- strncpy(default_option, argv[1], PATH_MAX);
- break;
- }
- }
-
- // set after basedir is established
- datadir[0] = NULL;
- err_log[0] = NULL;
- out_log[0] = NULL;
- mysqld[0] = NULL;
- sql_file[0] = NULL;
-}
-
-/******************************************************************************
-
- finish_defaults()
-
- Finish setting the defaults.
-
-******************************************************************************/
-void finish_defaults()
-{
- struct stat buf;
- int i;
-
- // datadir
- if (!datadir[0]) snprintf(datadir, PATH_MAX, "%s/data", basedir);
-
- // err-log
- if (!err_log[0]) snprintf(err_log, PATH_MAX, "%s/%s.err", datadir, hostname);
-
- // out-log
- if (!out_log[0]) snprintf(out_log, PATH_MAX, "%s/%s.out", datadir, hostname);
-
- // sql-file
- if (!sql_file[0]) snprintf(sql_file, PATH_MAX, "%s/bin/init_db.sql", basedir);
-
- // mysqld
- if (!mysqld[0]) snprintf(mysqld, PATH_MAX, "%s/bin/mysqld", basedir);
-}
-
-/******************************************************************************
-
- read_defaults()
-
- Read the defaults.
-
-******************************************************************************/
-void read_defaults(arg_list_t *pal)
-{
- arg_list_t al;
- char defaults_file[PATH_MAX];
- char mydefaults[PATH_MAX];
- char line[PATH_MAX];
- FILE *fp;
-
- // defaults output file
- snprintf(defaults_file, PATH_MAX, "%s/bin/defaults.out", basedir);
- remove(defaults_file);
-
- // mysqladmin file
- 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");
-
- spawn(mydefaults, &al, TRUE, NULL, defaults_file, NULL);
-
- free_args(&al);
-
- // gather defaults
- if((fp = fopen(defaults_file, "r")) != NULL)
- {
- while(fgets(line, PATH_MAX, fp))
- {
- char *p;
-
- // remove end-of-line character
- if ((p = strrchr(line, '\n')) != NULL) *p = '\0';
-
- // add the option as an argument
- add_arg(pal, line);
- }
-
- fclose(fp);
- }
-
- // remove file
- remove(defaults_file);
-}
-
-/******************************************************************************
-
- parse_args()
-
- Get the options.
-
-******************************************************************************/
-void parse_args(int argc, char *argv[])
-{
- int index = 0;
- int c;
-
- // parse options
- enum opts
- {
- OPT_BASEDIR = 0xFF,
- OPT_DATADIR,
- OPT_SQL_FILE
- };
-
- static struct option options[] =
- {
- {"autoclose", no_argument, &autoclose, TRUE},
- {"basedir", required_argument, 0, OPT_BASEDIR},
- {"datadir", required_argument, 0, OPT_DATADIR},
- {"sql-file", required_argument, 0, OPT_SQL_FILE},
- {0, 0, 0, 0}
- };
-
- // we have to reset getopt_long because we use it multiple times
- optind = 1;
-
- // turn off error reporting
- opterr = 0;
-
- while ((c = getopt_long(argc, argv, "b:h:", options, &index)) >= 0)
- {
- switch (c)
- {
- case OPT_BASEDIR:
- case 'b':
- strcpy(basedir, optarg);
- break;
-
- case OPT_DATADIR:
- case 'h':
- strcpy(datadir, optarg);
- break;
-
- case OPT_SQL_FILE:
- strcpy(sql_file, optarg);
- break;
-
- default:
- // ignore
- break;
- }
- }
-}
-
-/******************************************************************************
-
- get_options()
-
- Get the options.
-
-******************************************************************************/
-void get_options(int argc, char *argv[])
-{
- 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);
-
- // command-line arguments
- parse_args(argc, argv);
-
- // finish defaults
- finish_defaults();
-}
-
-/******************************************************************************
-
- create_paths()
-
- Create database paths.
-
-******************************************************************************/
-void create_paths()
-{
- struct stat info;
- char temp[PATH_MAX];
-
- // check for tables
- snprintf(temp, PATH_MAX, "%s/mysql/host.frm", datadir);
- if (!stat(temp, &info))
- {
- printf("A database already exists in the directory:\n");
- printf("\t%s\n\n", datadir);
- exit(-1);
- }
-
- // data directory
- if (stat(datadir, &info))
- {
- mkdir(datadir, 0);
- }
-}
-
-/******************************************************************************
-
- mysql_install_db()
-
- Install the database.
-
-******************************************************************************/
-int mysql_install_db(int argc, char *argv[])
-{
- arg_list_t al;
- int i, j, err;
- char skip;
- struct stat info;
-
- // private options
- static char *private_options[] =
- {
- "--autoclose",
- "--sql-file=",
- NULL
- };
-
- // args
- init_args(&al);
- add_arg(&al, "%s", mysqld);
-
- // parent args
- for(i = 1; i < argc; i++)
- {
- skip = FALSE;
-
- // skip private arguments
- for (j=0; private_options[j]; j++)
- {
- if(!strnicmp(argv[i], private_options[j], strlen(private_options[j])))
- {
- skip = TRUE;
- break;
- }
- }
-
- if (!skip) add_arg(&al, "%s", argv[i]);
- }
-
- add_arg(&al, "--bootstrap");
- add_arg(&al, "--skip-grant-tables");
- add_arg(&al, "--skip-innodb");
-
- if ((err = stat(sql_file, &info)) != 0)
- {
- printf("ERROR - %s:\n", strerror(errno));
- printf("\t%s\n\n", sql_file);
- // free args
- free_args(&al);
- exit(-1);
- }
-
- if ((err = stat(sql_file, &info)) != 0)
- {
- printf("ERROR - %s:\n", strerror(errno));
- printf("\t%s\n\n", sql_file);
- // free args
- free_args(&al);
- exit(-1);
- }
-
- // spawn mysqld
- err = spawn(mysqld, &al, TRUE, sql_file, out_log, err_log);
-
- // free args
- free_args(&al);
-
- return err;
-}
-
-/******************************************************************************
-
- main()
-
-******************************************************************************/
-int main(int argc, char **argv)
-{
- // get options
- get_options(argc, 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();
-
- // install the database
- if (mysql_install_db(argc, argv))
- {
- printf("ERROR - Failed to create the database!\n");
- printf(" %s\n", strerror(errno));
- printf("See the following log for more information:\n");
- printf("\t%s\n\n", err_log);
- exit(-1);
- }
-
- // status
- printf("Initial database successfully created in the directory:\n");
- printf("\t%s\n", datadir);
-
- // info
- printf("\nPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !\n");
-
- printf("\nThis is done with:\n");
- printf("\tmysqladmin -u root password 'new-password'\n");
-
- printf("\nSee the manual for more instructions.\n");
-
- printf("\nYou can start the MySQL daemon with:\n");
- printf("\tmysqld_safe\n");
-
- printf("\nPlease report any problems with:\n");
- printf("\t/mysql/mysqlbug.txt\n");
-
- printf("\nThe latest information about MySQL is available on the web at\n");
- printf("\thttp://www.mysql.com\n");
-
- printf("\nSupport MySQL by buying support at http://shop.mysql.com\n\n");
-
- return 0;
-}
diff --git a/netware/mysql_install_db.def b/netware/mysql_install_db.def
deleted file mode 100644
index e3dc57fe44c..00000000000
--- a/netware/mysql_install_db.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Install DB
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Install"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Initial Database Installer"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysql_secure_installation.pl b/netware/mysql_secure_installation.pl
deleted file mode 100644
index 8550f0e6d6e..00000000000
--- a/netware/mysql_secure_installation.pl
+++ /dev/null
@@ -1,218 +0,0 @@
-#-----------------------------------------------------------------------------
-# Copyright (C) 2002 MySQL AB and Jeremy Cole
-#
-# 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
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# 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.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#-----------------------------------------------------------------------------
-
-#-----------------------------------------------------------------------------
-# This notice applies to changes, created by or for Novell, Inc.,
-# to preexisting works for which notices appear elsewhere in this file.
-
-# Copyright (c) 2003 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
-# the Free Software Foundation; either version 2 of the License, or
-# (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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#-----------------------------------------------------------------------------
-
-use strict;
-use Mysql;
-
-print "MySQL Secure Installation Script\n\n";
-
-print "NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL\n";
-print " SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!\n\n";
-
-#-----------------------------------------------------------------------------
-# get the current root password
-#-----------------------------------------------------------------------------
-
-print "In order to log into MySQL to secure it, we'll need the current\n";
-print "password for the root user. If you've just installed MySQL, and\n";
-print "you haven't set the root password yet, the password will be blank,\n";
-print "so you should just press enter here.\n\n";
-
-print "Enter the current password for root: ";
-my $password = <STDIN>;
-chomp $password;
-print "\n";
-
-my $conn = Mysql->connect("localhost", "mysql", "root", $password)
- || die "Unable to connect to MySQL.";
-
-print "OK, successfully used the password, moving on...\n\n";
-
-#-----------------------------------------------------------------------------
-# set the root password
-#-----------------------------------------------------------------------------
-
-unless ($password)
-{
- print "Setting the root password ensures that no one can log into MySQL\n";
- print "using the root user without the proper authorization.\n\n";
-
- print "Set root password (Y/N)? ";
- my $reply = <STDIN>;
- chomp $reply;
- print "\n";
-
- if ($reply =~ /Y/i)
- {
- print "New password for root: ";
- my $pass1 = <STDIN>;
- chomp $pass1;
- print "\n";
-
- print "Re-enter new password for root: ";
- my $pass2 = <STDIN>;
- chomp $pass2;
- print "\n";
-
- unless ($pass1 eq $pass2) { die "Sorry, the passwords do not match."; }
-
- unless ($pass1) { die "Sorry, you can't use an empty password here."; }
-
- $conn->query("SET PASSWORD FOR root\@localhost=PASSWORD('$pass1')")
- || die "Unable to set password.";
-
- print "OK, successfully set the password, moving on...\n\n";
- }
- else
- {
- print "WARNING, the password is not set, moving on...\n\n";
- }
-}
-
-#-----------------------------------------------------------------------------
-# remove anonymous users
-#-----------------------------------------------------------------------------
-
-print "By default, a MySQL installation has anonymous users, allowing anyone\n";
-print "to log into MySQL without having to have a user account created for\n";
-print "them. This is intended only for testing, and to make the installation\n";
-print "go a bit smoother. You should remove them before moving into a\n";
-print "production environment.\n\n";
-
-print "Remove anonymous users (Y/N)? ";
-my $reply = <STDIN>;
-chomp $reply;
-print "\n";
-
-if ($reply =~ /Y/i)
-{
- $conn->query("DELETE FROM mysql.user WHERE user=''")
- || die "Unable to remove anonymous users.";
-
- print "OK, successfully removed anonymous users, moving on...\n\n";
-}
-else
-{
- print "WARNING, the anonymous users have not been removed, moving on...\n\n";
-}
-
-#-----------------------------------------------------------------------------
-# disallow remote root login
-#-----------------------------------------------------------------------------
-
-print "Normally, root should only be allowed to connect from 'localhost'. This\n";
-print "ensures that someone cannot guess at the root password from the network.\n\n";
-
-print "Disallow remote root login (Y/N)? ";
-my $reply = <STDIN>;
-chomp $reply;
-print "\n";
-
-if ($reply =~ /Y/i)
-{
- $conn->query("DELETE FROM mysql.user WHERE user='root' AND host!='localhost'")
- || die "Unable to disallow remote root login.";
-
- print "OK, successfully disallowed remote root login, moving on...\n\n";
-}
-else
-{
- print "WARNING, remote root login has not been disallowed, moving on...\n\n";
-}
-
-#-----------------------------------------------------------------------------
-# remove test database
-#-----------------------------------------------------------------------------
-
-print "By default, MySQL comes with a database named 'test' that anyone can\n";
-print "access. This is intended only for testing, and should be removed\n";
-print "before moving into a production environment.\n\n";
-
-print "Remove the test database (Y/N)? ";
-my $reply = <STDIN>;
-chomp $reply;
-print "\n";
-
-if ($reply =~ /Y/i)
-{
- $conn->query("DROP DATABASE IF EXISTS test")
- || die "Unable to remove test database.";
-
- $conn->query("DELETE FROM mysql.db WHERE db='test' OR db='test\\_%'")
- || die "Unable to remove access to the test database.";
-
- print "OK, successfully removed the test database, moving on...\n\n";
-}
-else
-{
- print "WARNING, the test database has not been removed, moving on...\n\n";
-}
-
-#-----------------------------------------------------------------------------
-# reload privilege tables
-#-----------------------------------------------------------------------------
-
-print "Reloading the privilege tables will ensure that all changes made so far\n";
-print "will take effect immediately.\n\n";
-
-print "Reload privilege tables (Y/N)? ";
-my $reply = <STDIN>;
-chomp $reply;
-print "\n";
-
-if ($reply =~ /Y/i)
-{
- $conn->query("FLUSH PRIVILEGES")
- || die "Unable to reload privilege tables.";
-
- print "OK, successfully reloaded privilege tables, moving on...\n\n";
-}
-else
-{
- print "WARNING, the privilege tables have not been reloaded, moving on...\n\n";
-}
-
-#-----------------------------------------------------------------------------
-# done
-#-----------------------------------------------------------------------------
-
-print "\n\nAll done! If you've completed all of the above steps, your MySQL\n";
-print "installation should now be secure.\n\n";
-
-print "Thanks for using MySQL!\n\n";
-
diff --git a/netware/mysql_test_run.c b/netware/mysql_test_run.c
deleted file mode 100644
index 5fa92b325b6..00000000000
--- a/netware/mysql_test_run.c
+++ /dev/null
@@ -1,1415 +0,0 @@
-/*
- Copyright (c) 2002, 2003 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
- the Free Software Foundation; either version 2 of the License, or
- (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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include <my_global.h>
-#include <m_string.h>
-#include <dirent.h>
-#include <screen.h>
-#include <nks/vm.h>
-#include <ctype.h>
-#include <sys/stat.h>
-#include <sys/mode.h>
-#include "my_manage.h"
-#include "mysql_version.h"
-#ifdef __NETWARE__
-#define strindex(a,b) ((char*)strindex(a,b))
-#define strstr(a,b) ((char*)strstr(a,b))
-#endif
-
-/******************************************************************************
-
- macros
-
-******************************************************************************/
-
-#define HEADER "TEST ELAPSED RESULT \n"
-#define DASH "------------------------------------------------------------------------\n"
-
-#define NW_TEST_SUFFIX ".nw-test"
-#define NW_RESULT_SUFFIX ".nw-result"
-#define TEST_SUFFIX ".test"
-#define RESULT_SUFFIX ".result"
-#define REJECT_SUFFIX ".reject"
-#define OUT_SUFFIX ".out"
-#define ERR_SUFFIX ".err"
-
-#define TEST_PASS "[ pass ]"
-#define TEST_SKIP "[ skip ]"
-#define TEST_FAIL "[ fail ]"
-#define TEST_BAD "[ bad ]"
-#define TEST_IGNORE "[ignore]"
-
-/******************************************************************************
-
- global variables
-
-******************************************************************************/
-
-char base_dir[PATH_MAX] = "sys:/mysql";
-char db[PATH_MAX] = "test";
-char user[PATH_MAX] = "root";
-char password[PATH_MAX] = "";
-
-int master_port = 9306;
-int slave_port = 9307;
-
-// comma delimited list of tests to skip or empty string
-char skip_test[PATH_MAX] = " lowercase_table3 , system_mysql_db_fix ";
-char ignore_test[PATH_MAX] = "";
-
-char bin_dir[PATH_MAX];
-char mysql_test_dir[PATH_MAX];
-char test_dir[PATH_MAX];
-char mysql_tmp_dir[PATH_MAX];
-char result_dir[PATH_MAX];
-char master_dir[PATH_MAX];
-char slave_dir[PATH_MAX];
-char lang_dir[PATH_MAX];
-char char_dir[PATH_MAX];
-
-char mysqladmin_file[PATH_MAX];
-char mysqld_file[PATH_MAX];
-char mysqltest_file[PATH_MAX];
-char master_pid[PATH_MAX];
-char slave_pid[PATH_MAX];
-
-char master_opt[PATH_MAX] = "";
-char slave_opt[PATH_MAX] = "";
-
-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;
-int total_test = 0;
-
-int total_ignore = 0;
-double total_time = 0;
-
-int use_openssl = FALSE;
-int master_running = FALSE;
-int slave_running = FALSE;
-int skip_slave = TRUE;
-int single_test = TRUE;
-
-int restarts = 0;
-
-FILE *log_fd = NULL;
-
-/******************************************************************************
-
- functions
-
-******************************************************************************/
-
-/******************************************************************************
-
- prototypes
-
-******************************************************************************/
-
-void report_stats();
-void install_db(char *);
-void mysql_install_db();
-void start_master();
-void start_slave();
-void mysql_start();
-void stop_slave();
-void stop_master();
-void mysql_stop();
-void mysql_restart();
-int read_option(char *, char *);
-void run_test(char *);
-void setup(char *);
-void vlog(char *, va_list);
-void log_msg(char *, ...);
-void log_info(char *, ...);
-void log_error(char *, ...);
-void log_errno(char *, ...);
-void die(char *);
-char *str_tok(char *string, const char *delim);
-
-/******************************************************************************
-
- report_stats()
-
- Report the gathered statistics.
-
-******************************************************************************/
-void report_stats()
-{
- if (total_fail == 0)
- {
- log_msg("\nAll %d test(s) were successful.\n", total_test);
- }
- else
- {
- double percent = ((double)total_pass / total_test) * 100;
-
- log_msg("\nFailed %u/%u test(s), %.02f%% successful.\n",
- total_fail, total_test, percent);
- log_msg("\nThe .out and .err files in %s may give you some\n", result_dir);
- log_msg("hint of what went wrong.\n");
- log_msg("\nIf you want to report this error, please first read the documentation\n");
- log_msg("at: http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html\n");
- }
-
- log_msg("\n%.02f total minutes elapsed in the test cases\n\n", total_time / 60);
-}
-
-/******************************************************************************
-
- install_db()
-
- Install the a database.
-
-******************************************************************************/
-void install_db(char *datadir)
-{
- arg_list_t al;
- int err, i;
- char input[PATH_MAX];
- char output[PATH_MAX];
- char error[PATH_MAX];
-
- // input file
- snprintf(input, PATH_MAX, "%s/bin/test_db.sql", base_dir);
- snprintf(output, PATH_MAX, "%s/install.out", datadir);
- snprintf(error, PATH_MAX, "%s/install.err", 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");
-
- // spawn
- if ((err = spawn(mysqld_file, &al, TRUE, input, output, error)) != 0)
- {
- die("Unable to create database.");
- }
-
- // free args
- free_args(&al);
-}
-
-/******************************************************************************
-
- mysql_install_db()
-
- Install the test databases.
-
-******************************************************************************/
-void mysql_install_db()
-{
- char temp[PATH_MAX];
-
- // var directory
- snprintf(temp, PATH_MAX, "%s/var", mysql_test_dir);
-
- // clean up old direcotry
- del_tree(temp);
-
- // create var directory
- mkdir(temp, S_IRWXU);
-
- // create subdirectories
- log_msg("Creating test-suite folders...\n");
- snprintf(temp, PATH_MAX, "%s/var/run", mysql_test_dir);
- mkdir(temp, S_IRWXU);
- snprintf(temp, PATH_MAX, "%s/var/tmp", mysql_test_dir);
- mkdir(temp, S_IRWXU);
- snprintf(temp, PATH_MAX, "%s/var/master-data", mysql_test_dir);
- mkdir(temp, S_IRWXU);
- snprintf(temp, PATH_MAX, "%s/var/master-data/mysql", mysql_test_dir);
- mkdir(temp, S_IRWXU);
- snprintf(temp, PATH_MAX, "%s/var/master-data/test", mysql_test_dir);
- mkdir(temp, S_IRWXU);
- snprintf(temp, PATH_MAX, "%s/var/slave-data", mysql_test_dir);
- mkdir(temp, S_IRWXU);
- snprintf(temp, PATH_MAX, "%s/var/slave-data/mysql", mysql_test_dir);
- mkdir(temp, S_IRWXU);
- snprintf(temp, PATH_MAX, "%s/var/slave-data/test", mysql_test_dir);
- mkdir(temp, S_IRWXU);
-
- // install databases
- log_msg("Creating test databases for master... \n");
- install_db(master_dir);
- log_msg("Creating test databases for slave... \n");
- install_db(slave_dir);
-}
-
-/******************************************************************************
-
- start_master()
-
- Start the master server.
-
-******************************************************************************/
-void start_master()
-{
- arg_list_t al;
- 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/var/log/*-bin.*", mysql_test_dir);
-
- // remove stale binary logs
- removef("%s/var/log/*.index", mysql_test_dir);
-
- // remove master.info file
- removef("%s/master.info", master_dir);
-
- // remove relay files
- removef("%s/var/log/*relay*", mysql_test_dir);
-
- // 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
- snprintf(master_out, PATH_MAX, "%s/var/run/master%u.out",
- 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=%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);
- 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);
- add_arg(&al, "--log-bin-trust-function-creators");
- add_arg(&al, "--log-slow-queries");
- add_arg(&al, "--log-queries-not-using-indexes");
-#ifdef DEBUG //only for debug builds
- add_arg(&al, "--debug");
-#endif
-
- 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, "--key_buffer_size=1M");
- add_arg(&al, "--sort_buffer=256K");
- add_arg(&al, "--max_heap_table_size=1M");
-
- // $EXTRA_MASTER_OPT
- if (master_opt[0] != NULL)
- {
- char *p;
-
- p = (char *)str_tok(master_opt, " \t");
- if (!strstr(master_opt, "timezone"))
- {
- while (p)
- {
- add_arg(&al, "%s", p);
- p = (char *)str_tok(NULL, " \t");
- }
- }
- }
-
- // remove the pid file if it exists
- remove(master_pid);
-
- // spawn
- 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,
- mysql_tmp_dir)) == 0)
- {
- master_running = TRUE;
- }
- else
- {
- log_error("The master server went down early.");
- }
- }
- else
- {
- log_error("Unable to start master server.");
- }
-
- // free_args
- free_args(&al);
-}
-
-/******************************************************************************
-
- start_slave()
-
- Start the slave server.
-
-******************************************************************************/
-void start_slave()
-{
- arg_list_t al;
- int err, i;
- char slave_out[PATH_MAX];
- char slave_err[PATH_MAX];
- char temp[PATH_MAX];
-
- // skip?
- if (skip_slave) return;
-
- // remove stale binary logs
- removef("%s/*-bin.*", slave_dir);
-
- // remove stale binary logs
- removef("%s/*.index", slave_dir);
-
- // remove master.info file
- removef("%s/master.info", slave_dir);
-
- // remove relay files
- removef("%s/var/log/*relay*", mysql_test_dir);
-
- // remove relay-log.info file
- removef("%s/relay-log.info", slave_dir);
-
- // init script
- if (slave_init_script[0] != NULL)
- {
- // run_init_script(slave_init_script);
-
- // TODO: use the scripts
- if (strindex(slave_init_script, "rpl000016-slave.sh") != NULL)
- {
- // create empty master.info file
- snprintf(temp, PATH_MAX, "%s/master.info", slave_dir);
- close(open(temp, O_WRONLY | O_CREAT,S_IRWXU|S_IRWXG|S_IRWXO));
- }
- else if (strindex(slave_init_script, "rpl000017-slave.sh") != NULL)
- {
- FILE *fp;
-
- // create a master.info file
- snprintf(temp, PATH_MAX, "%s/master.info", slave_dir);
- fp = fopen(temp, "wb+");
-
- fputs("master-bin.000001\n", fp);
- fputs("4\n", fp);
- fputs("127.0.0.1\n", fp);
- fputs("replicate\n", fp);
- fputs("aaaaaaaaaaaaaaab\n", fp);
- fputs("9306\n", fp);
- fputs("1\n", fp);
- fputs("0\n", fp);
-
- fclose(fp);
- }
- else if (strindex(slave_init_script, "rpl_rotate_logs-slave.sh") != NULL)
- {
- // create empty master.info file
- snprintf(temp, PATH_MAX, "%s/master.info", slave_dir);
- close(open(temp, O_WRONLY | O_CREAT,S_IRWXU|S_IRWXG|S_IRWXO));
- }
- }
-
- // redirection files
- snprintf(slave_out, PATH_MAX, "%s/var/run/slave%u.out",
- mysql_test_dir, restarts);
- snprintf(slave_err, PATH_MAX, "%s/var/run/slave%u.err",
- 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, "--slave_net_timeout=10");
- add_arg(&al, "--log-bin-trust-function-creators");
- add_arg(&al, "--log-slow-queries");
- add_arg(&al, "--log-queries-not-using-indexes");
-#ifdef DEBUG //only for debug builds
- add_arg(&al, "--debug");
-#endif
-
- 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)
- {
- char *p;
-
- p = (char *)str_tok(slave_master_info, " \t");
-
- while(p)
- {
- add_arg(&al, "%s", p);
-
- p = (char *)str_tok(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");
- }
-
- // small server
- add_arg(&al, "--key_buffer_size=1M");
- add_arg(&al, "--sort_buffer=256K");
- add_arg(&al, "--max_heap_table_size=1M");
-
- // opt args
- if (slave_opt[0] != NULL)
- {
- char *p;
-
- p = (char *)str_tok(slave_opt, " \t");
-
- while(p)
- {
- add_arg(&al, "%s", p);
-
- p = (char *)str_tok(NULL, " \t");
- }
- }
-
- // remove the pid file if it exists
- remove(slave_pid);
-
- // spawn
- if ((err = spawn(mysqld_file, &al, FALSE, NULL, slave_out, slave_err)) == 0)
- {
- sleep_until_file_exists(slave_pid);
-
- if ((err = wait_for_server_start(bin_dir, user, password, slave_port,
- mysql_tmp_dir)) == 0)
- {
- slave_running = TRUE;
-
- }
- else
- {
- log_error("The slave server went down early.");
-
- }
- }
- else
- {
- log_error("Unable to start slave server.");
-
- }
-
- // free args
- free_args(&al);
-}
-
-/******************************************************************************
-
- mysql_start()
-
- Start the mysql servers.
-
-******************************************************************************/
-void mysql_start()
-{
- log_info("Starting the MySQL server(s): %u", ++restarts);
- start_master();
-
- start_slave();
-
- // activate the test screen
- ActivateScreen(getscreenhandle());
-}
-
-/******************************************************************************
-
- 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,
- mysql_tmp_dir)) == 0)
- {
- slave_running = FALSE;
- }
- else
- {
- log_error("Unable to stop slave server.");
- }
-}
-
-/******************************************************************************
-
- 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,
- mysql_tmp_dir)) == 0)
- {
- master_running = FALSE;
- }
- else
- {
- log_error("Unable to stop master server.");
- }
-}
-
-/******************************************************************************
-
- 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());
-}
-
-/******************************************************************************
-
- mysql_restart()
-
- Restart the mysql servers.
-
-******************************************************************************/
-void mysql_restart()
-{
- log_info("Restarting the MySQL server(s): %u", ++restarts);
-
- mysql_stop();
-
- mysql_start();
-}
-
-/******************************************************************************
-
- read_option()
-
- Read the option file.
-
-******************************************************************************/
-int read_option(char *opt_file, char *opt)
-{
- int fd, err;
- 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);
-
- err = read(fd, opt, PATH_MAX);
-
- close(fd);
-
- if (err > 0)
- {
- // terminate string
- if ((p = strchr(opt, '\n')) != NULL)
- {
- *p = NULL;
-
- // check for a '\r'
- if ((p = strchr(opt, '\r')) != NULL)
- {
- *p = NULL;
- }
- }
- else
- {
- opt[err] = NULL;
- }
-
- // check for $MYSQL_TEST_DIR
- if ((p = strstr(opt, "$MYSQL_TEST_DIR")) != NULL)
- {
- char temp[PATH_MAX];
-
- *p = NULL;
-
- strcpy(temp, p + strlen("$MYSQL_TEST_DIR"));
-
- strcat(opt, mysql_test_dir);
-
- strcat(opt, temp);
- }
- // Check for double backslash and replace it with single bakslash
- if ((p = strstr(opt, "\\\\")) != NULL)
- {
- /* bmove is guranteed to work byte by byte */
- bmove(p, p+1, strlen(p+1));
- }
- }
- else
- {
- // clear option
- *opt = NULL;
- }
-
- // compare current option with previous
- return strcmp(opt, buf);
-}
-
-/******************************************************************************
-
- run_test()
-
- Run the given test case.
-
-******************************************************************************/
-void run_test(char *test)
-{
- char temp[PATH_MAX];
- char *rstr;
- double elapsed = 0;
- int skip = FALSE, ignore=FALSE;
- int restart = FALSE;
- int flag = FALSE;
- struct stat info;
-
- // skip tests in the skip list
- snprintf(temp, PATH_MAX, " %s ", test);
- skip = (strindex(skip_test, temp) != NULL);
- if (skip == FALSE)
- ignore = (strindex(ignore_test, temp) != NULL);
-
- if (ignore)
- {
- // show test
- log_msg("%-46s ", test);
-
- // ignore
- rstr = TEST_IGNORE;
- ++total_ignore;
- }
- else if (!skip) // skip test?
- {
- char test_file[PATH_MAX];
- char master_opt_file[PATH_MAX];
- char slave_opt_file[PATH_MAX];
- char slave_master_info_file[PATH_MAX];
- char result_file[PATH_MAX];
- char reject_file[PATH_MAX];
- char out_file[PATH_MAX];
- char err_file[PATH_MAX];
- int err;
- arg_list_t al;
- NXTime_t start, stop;
-
- // skip slave?
- flag = skip_slave;
- skip_slave = (strncmp(test, "rpl", 3) != 0);
- if (flag != skip_slave) restart = TRUE;
-
- // create files
- snprintf(master_opt_file, PATH_MAX, "%s/%s-master.opt", test_dir, test);
- snprintf(slave_opt_file, PATH_MAX, "%s/%s-slave.opt", test_dir, test);
- snprintf(slave_master_info_file, PATH_MAX, "%s/%s.slave-mi", test_dir, test);
- snprintf(reject_file, PATH_MAX, "%s/%s%s", result_dir, test, REJECT_SUFFIX);
- snprintf(out_file, PATH_MAX, "%s/%s%s", result_dir, test, OUT_SUFFIX);
- snprintf(err_file, PATH_MAX, "%s/%s%s", result_dir, test, ERR_SUFFIX);
-
- // netware specific files
- snprintf(test_file, PATH_MAX, "%s/%s%s", test_dir, test, NW_TEST_SUFFIX);
- 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))
- master_init_script[0] = NULL;
- else
- restart = TRUE;
-
- snprintf(slave_init_script, PATH_MAX, "%s/%s-slave.sh", test_dir, test);
- if (stat(slave_init_script, &info))
- slave_init_script[0] = NULL;
- else
- restart = TRUE;
-
- // read options
- if (read_option(master_opt_file, master_opt)) restart = TRUE;
- if (read_option(slave_opt_file, slave_opt)) restart = TRUE;
- if (read_option(slave_master_info_file, slave_master_info)) restart = TRUE;
-
- // cleanup previous run
- remove(reject_file);
- remove(out_file);
- remove(err_file);
-
- // start or restart?
- if (!master_running) mysql_start();
- else if (restart) mysql_restart();
-
- // let the system stabalize
- sleep(1);
-
- // show test
- log_msg("%-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);
-
- 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);
-
- // spawn
- err = spawn(mysqltest_file, &al, TRUE, test_file, out_file, err_file);
-
- // stop timer
- NXGetTime(NX_SINCE_BOOT, NX_USECONDS, &stop);
-
- // calculate
- elapsed = ((double)(stop - start)) / NX_USECONDS;
- total_time += elapsed;
-
- // free args
- free_args(&al);
-
- if (err == 0)
- {
- // pass
- rstr = TEST_PASS;
- ++total_pass;
-
- // increment total
- ++total_test;
- }
- else if (err == 62)
- {
- // skip
- rstr = TEST_SKIP;
- ++total_skip;
- }
- else if (err == 1)
- {
- // fail
- rstr = TEST_FAIL;
- ++total_fail;
-
- // increment total
- ++total_test;
- }
- else
- {
- rstr = TEST_BAD;
- }
- }
- else // early skips
- {
- // show test
- log_msg("%-46s ", test);
-
- // skip
- rstr = TEST_SKIP;
- ++total_skip;
- }
-
- // result
- log_msg("%10.06f %-14s\n", elapsed, rstr);
-}
-
-/******************************************************************************
-
- vlog()
-
- Log the message.
-
-******************************************************************************/
-void vlog(char *format, va_list ap)
-{
- vfprintf(stdout, format, ap);
- fflush(stdout);
-
- if (log_fd)
- {
- vfprintf(log_fd, format, ap);
- fflush(log_fd);
- }
-}
-
-/******************************************************************************
-
- log()
-
- Log the message.
-
-******************************************************************************/
-void log_msg(char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
-
- vlog(format, ap);
-
- va_end(ap);
-}
-
-/******************************************************************************
-
- log_info()
-
- Log the given information.
-
-******************************************************************************/
-void log_info(char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
-
- log_msg("-- INFO : ");
- vlog(format, ap);
- log_msg("\n");
-
- va_end(ap);
-}
-
-/******************************************************************************
-
- log_error()
-
- Log the given error.
-
-******************************************************************************/
-void log_error(char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
-
- log_msg("-- ERROR: ");
- vlog(format, ap);
- log_msg("\n");
-
- va_end(ap);
-}
-
-/******************************************************************************
-
- log_errno()
-
- Log the given error and errno.
-
-******************************************************************************/
-void log_errno(char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
-
- log_msg("-- ERROR: (%003u) ", errno);
- vlog(format, ap);
- log_msg("\n");
-
- va_end(ap);
-}
-
-/******************************************************************************
-
- die()
-
- Exit the application.
-
-******************************************************************************/
-void die(char *msg)
-{
- log_error(msg);
-
- pressanykey();
-
- exit(-1);
-}
-
-/******************************************************************************
-
- setup()
-
- Setup the mysql test enviornment.
-
-******************************************************************************/
-void setup(char *file)
-{
- char temp[PATH_MAX];
- char file_path[PATH_MAX*2];
- char *p;
-
- // set the timezone for the timestamp test
- setenv("TZ", "GMT-3", TRUE);
-
- // find base dir
- strcpy(temp, strlwr(file));
- while((p = strchr(temp, '\\')) != NULL) *p = '/';
-
- if ((p = strindex(temp, "/mysql-test/")) != NULL)
- {
- *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);
- snprintf(test_dir, PATH_MAX, "%s/t", mysql_test_dir);
- snprintf(mysql_tmp_dir, PATH_MAX, "%s/var/tmp", mysql_test_dir);
- snprintf(result_dir, PATH_MAX, "%s/r", mysql_test_dir);
- snprintf(master_dir, PATH_MAX, "%s/var/master-data", mysql_test_dir);
- 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);
- snprintf(mysqladmin_file, PATH_MAX, "%s/mysqladmin", bin_dir);
- snprintf(master_pid, PATH_MAX, "%s/var/run/master.pid", mysql_test_dir);
- snprintf(slave_pid, PATH_MAX, "%s/var/run/slave.pid", mysql_test_dir);
-
- // create log file
- snprintf(temp, PATH_MAX, "%s/mysql-test-run.log", mysql_test_dir);
- if ((log_fd = fopen(temp, "w+")) == NULL)
- {
- 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);
-
- // environment
- setenv("MYSQL_TEST_DIR", mysql_test_dir, 1);
- snprintf(file_path, PATH_MAX*2, "%s/mysqldump --no-defaults -u root --port=%u", bin_dir, master_port);
- setenv("MYSQL_DUMP", file_path, 1);
- snprintf(file_path, PATH_MAX*2, "%s/mysqlbinlog --no-defaults --local-load=%s", bin_dir, mysql_tmp_dir);
- setenv("MYSQL_BINLOG", file_path, 1);
- setenv("MASTER_MYPORT", "9306", 1);
- setenv("SLAVE_MYPORT", "9307", 1);
- snprintf(file_path, PATH_MAX*2, "%d", MYSQL_PORT);
- setenv("MYSQL_TCP_PORT", file_path, 1);
- snprintf(file_path, PATH_MAX*2, "%s/mysql_client_test --no-defaults --testcase--user=root --port=%u ", bin_dir, master_port);
- setenv("MYSQL_CLIENT_TEST",file_path,1);
- snprintf(file_path, PATH_MAX*2, "%s/mysql --no-defaults --user=root --port=%u ", bin_dir, master_port);
- setenv("MYSQL",file_path,1);
- snprintf(file_path, PATH_MAX*2, "%s/mysqlshow --no-defaults --user=root --port=%u", bin_dir, master_port);
- setenv("MYSQL_SHOW",file_path,1);
- snprintf(file_path, PATH_MAX*2, "%s/mysqlcheck --no-defaults -uroot --port=%u", bin_dir, master_port);
- setenv("MYSQL_CHECK",file_path,1);
-
-}
-
-/******************************************************************************
-
- main()
-
-******************************************************************************/
-int main(int argc, char **argv)
-{
- int is_ignore_list= 0, autoclose= 0, individual_execution= 0;
- // setup
- setup(argv[0]);
-
- /* The --ignore option is comma saperated list of test cases to skip and
- should be very first command line option to the test suite.
-
- The usage is now:
- mysql_test_run --ignore=test1,test2 test3 test4
- where test1 and test2 are test cases to ignore
- and test3 and test4 are test cases to run.
- */
- if (argc >= 2 && !strnicmp(argv[1], "--ignore=", sizeof("--ignore=")-1))
- {
- char *temp, *token;
- temp= strdup(strchr(argv[1],'=') + 1);
- for (token=str_tok(temp, ","); token != NULL; token=str_tok(NULL, ","))
- {
- if (strlen(ignore_test) + strlen(token) + 2 <= PATH_MAX-1)
- sprintf(ignore_test+strlen(ignore_test), " %s ", token);
- else
- {
- free(temp);
- die("ignore list too long.");
- }
- }
- free(temp);
- is_ignore_list = 1;
- }
- // header
- log_msg("MySQL Server %s, for %s (%s)\n\n", VERSION, SYSTEM_TYPE, MACHINE_TYPE);
-
- log_msg("Initializing Tests...\n");
-
- // install test databases
- mysql_install_db();
-
- log_msg("Starting Tests...\n");
-
- log_msg("\n");
- log_msg(HEADER);
- log_msg(DASH);
-
- if ( argc > 1 + is_ignore_list )
- {
- int i;
-
- for (i = 1 + is_ignore_list; i < argc; i++)
- {
- if (!strncasecmp(argv[i], "--autoclose", 11))
- {
- autoclose= 1;
- continue;
- }
- // single test
- single_test= TRUE;
- individual_execution= 1;
-
- // run given test
- run_test(argv[i]);
- }
- }
- if (!individual_execution)
- {
- // run all tests
- DIR *dir = opendir(test_dir);
- DIR *entry;
- char test[NAME_MAX];
- char *p;
-
- // single test
- single_test = FALSE;
-
- if (dir == NULL)
- {
- die("Unable to open tests directory.");
- }
-
- while((entry = readdir(dir)) != NULL)
- {
- if (!S_ISDIR(entry->d_type))
- {
- strcpy(test, strlwr(entry->d_name));
-
- // find the test suffix
- if ((p = strindex(test, TEST_SUFFIX)) != NULL)
- {
- // null terminate at the suffix
- *p = '\0';
-
- // run test
- run_test(test);
- }
- }
- }
-
- closedir(dir);
- }
-
- // stop server
- mysql_stop();
-
- log_msg(DASH);
- log_msg("\n");
-
- log_msg("Ending Tests...\n");
-
- // report stats
- report_stats();
-
- // close log
- if (log_fd) fclose(log_fd);
-
- // keep results up
- if (!autoclose)
- pressanykey();
-
- return 0;
-}
-
-/*
- Synopsis:
- This function breaks the string into a sequence of tokens. The difference
- between this function and strtok is that it respects the quoted string i.e.
- it skips any delimiter character within the quoted part of the string.
- It return tokens by eliminating quote character. It modifies the input string
- passed. It will work with whitespace delimeter but may not work properly with
- other delimeter. If the delimeter will contain any quote character, then
- function will not tokenize and will return null string.
- e.g. if input string is
- --init-slave="set global max_connections=500" --skip-external-locking
- then the output will two string i.e.
- --init-slave=set global max_connections=500
- --skip-external-locking
-
-Arguments:
- string: input string
- delim: set of delimiter character
-Output:
- return the null terminated token of NULL.
-*/
-
-
-char *str_tok(char *string, const char *delim)
-{
- char *token; /* current token received from strtok */
- char *qt_token; /* token delimeted by the matching pair of quote */
- /*
- if there are any quote chars found in the token then this variable
- will hold the concatenated string to return to the caller
- */
- char *ptr_token=NULL;
- /* pointer to the quote character in the token from strtok */
- char *ptr_quote=NULL;
-
- /* See if the delimeter contains any quote character */
- if (strchr(delim,'\'') || strchr(delim,'\"'))
- return NULL;
-
- /* repeate till we are getting some token from strtok */
- while ((token = (char*)strtok(string, delim) ) != NULL)
- {
- /*
- make the input string NULL so that next time onward strtok can
- be called with NULL input string.
- */
- string = NULL;
-
- /* check if the current token contain double quote character*/
- if ((ptr_quote = (char*)strchr(token,'\"')) != NULL)
- {
- /*
- get the matching the matching double quote in the remaining
- input string
- */
- qt_token = (char*)strtok(NULL,"\"");
- }
- /* check if the current token contain single quote character*/
- else if ((ptr_quote = (char*)strchr(token,'\'')) != NULL)
- {
- /*
- get the matching the matching single quote in the remaining
- input string
- */
- qt_token = (char*)strtok(NULL,"\'");
- }
-
- /*
- if the current token does not contains any quote character then
- return to the caller.
- */
- if (ptr_quote == NULL)
- {
- /*
- if there is any earlier token i.e. ptr_token then append the
- current token in it and return it else return the current
- token directly
- */
- return ptr_token ? strcat(ptr_token,token) : token;
- }
-
- /*
- remove the quote character i.e. make NULL so that the token will
- be devided in two part and later both part can be concatenated
- and hence quote will be removed
- */
- *ptr_quote= 0;
-
- /* check if ptr_token has been initialized or not */
- if (ptr_token == NULL)
- {
- /* initialize the ptr_token with current token */
- ptr_token= token;
- /* copy entire string between matching pair of quote*/
- sprintf(ptr_token+strlen(ptr_token),"%s %s", ptr_quote+1, qt_token);
- }
- else
- {
- /*
- copy the current token and entire string between matching pair
- of quote
- */
- sprintf(ptr_token+strlen(ptr_token),"%s%s %s", token, ptr_quote+1,
- qt_token );
- }
- }
-
- /* return the concatenated token */
- return ptr_token;
-}
diff --git a/netware/mysql_test_run.def b/netware/mysql_test_run.def
deleted file mode 100644
index c8afd305978..00000000000
--- a/netware/mysql_test_run.def
+++ /dev/null
@@ -1,11 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Test Run
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Test Run"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Test Run"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
diff --git a/netware/mysql_upgrade.def b/netware/mysql_upgrade.def
deleted file mode 100644
index 7b5718ffb1b..00000000000
--- a/netware/mysql_upgrade.def
+++ /dev/null
@@ -1,11 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Admin
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Upgrade Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysql_waitpid.def b/netware/mysql_waitpid.def
deleted file mode 100644
index 6e9cc76f139..00000000000
--- a/netware/mysql_waitpid.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# Wait for a Program to Terminate
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-#SCREENNAME "MySQL Tool - Wait for a Program to Terminate"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Tool - Wait for a Program to Terminate"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqladmin.def b/netware/mysqladmin.def
deleted file mode 100644
index 03f15dfdd08..00000000000
--- a/netware/mysqladmin.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Admin
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Admin[scrollable]"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Admin Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqlbinlog.def b/netware/mysqlbinlog.def
deleted file mode 100644
index 88024acc318..00000000000
--- a/netware/mysqlbinlog.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Binary Log
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Binary Log Dump Tool[scrollable]"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Binary Log Dump Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqlcheck.def b/netware/mysqlcheck.def
deleted file mode 100644
index b9028c237d1..00000000000
--- a/netware/mysqlcheck.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Client
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Check Tool[scrollable]"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Check Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqld.def b/netware/mysqld.def
deleted file mode 100644
index bb7b8129983..00000000000
--- a/netware/mysqld.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Server
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Database Server"
-VERSION 4, 0
-MULTIPLE
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c
deleted file mode 100644
index 2a4268d63ef..00000000000
--- a/netware/mysqld_safe.c
+++ /dev/null
@@ -1,726 +0,0 @@
-/*
- Copyright (c) 2003 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
- the Free Software Foundation; either version 2 of the License, or
- (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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <netdb.h>
-#include <sys/stat.h>
-#include <monitor.h>
-#include <strings.h>
-#include <getopt.h>
-#include <screen.h>
-#include <dirent.h>
-
-#include "my_config.h"
-#include "my_manage.h"
-#include "mysql_version.h"
-
-/******************************************************************************
-
- global variables
-
-******************************************************************************/
-char autoclose;
-char basedir[PATH_MAX];
-char checktables;
-char datadir[PATH_MAX];
-char pid_file[PATH_MAX];
-char address[PATH_MAX];
-char port[PATH_MAX];
-char err_log[PATH_MAX];
-char safe_log[PATH_MAX];
-char mysqld[PATH_MAX];
-char hostname[PATH_MAX];
-char default_option[PATH_MAX];
-
-FILE *log_fd= NULL;
-
-/******************************************************************************
-
- prototypes
-
-******************************************************************************/
-
-void usage(void);
-void vlog(char *, va_list);
-void log(char *, ...);
-void start_defaults(int, char *[]);
-void finish_defaults();
-void read_defaults(arg_list_t *);
-void parse_args(int, char *[]);
-void get_options(int, char *[]);
-void check_data_vol();
-void check_setup();
-void check_tables();
-void mysql_start(int, char *[]);
-
-/******************************************************************************
-
- functions
-
-******************************************************************************/
-
-/******************************************************************************
-
- usage()
-
- Show usage.
-
-******************************************************************************/
-void usage(void)
-{
- // keep the screen up
- setscreenmode(SCR_NO_MODE);
-
- puts("\
-\n\
-usage: mysqld_safe [options]\n\
-\n\
-Program to start the MySQL daemon and restart it if it dies unexpectedly.\n\
-All options, besides those listed below, are passed on to the MySQL daemon.\n\
-\n\
-options:\n\
-\n\
---autoclose Automatically close the mysqld_safe screen.\n\
-\n\
---check-tables Check the tables before starting the MySQL daemon.\n\
-\n\
---err-log=<file> Send the MySQL daemon error output to <file>.\n\
-\n\
---help Show this help information.\n\
-\n\
---mysqld=<file> Use the <file> MySQL daemon.\n\
-\n\
- ");
-
- exit(-1);
-}
-
-/******************************************************************************
-
- vlog()
-
- Log the message.
-
-******************************************************************************/
-void vlog(char *format, va_list ap)
-{
- vfprintf(stdout, format, ap);
- fflush(stdout);
-
- if (log_fd)
- {
- vfprintf(log_fd, format, ap);
- fflush(log_fd);
- }
-}
-
-/******************************************************************************
-
- log()
-
- Log the message.
-
-******************************************************************************/
-void log(char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
-
- vlog(format, ap);
-
- va_end(ap);
-}
-
-/******************************************************************************
-
- start_defaults()
-
- Start setting the defaults.
-
-******************************************************************************/
-void start_defaults(int argc, char *argv[])
-{
- struct stat buf;
- int i;
-
- // default options
- static char *default_options[]=
- {
- "--no-defaults",
- "--defaults-file=",
- "--defaults-extra-file=",
- NULL
- };
-
- // autoclose
- autoclose= FALSE;
-
- // basedir
- get_basedir(argv[0], basedir);
-
- // check-tables
- checktables= FALSE;
-
- // hostname
- if (gethostname(hostname, PATH_MAX) < 0)
- {
- // default
- strcpy(hostname, "mysql");
- }
-
- // address
- snprintf(address, PATH_MAX, "0.0.0.0");
-
- // port
- snprintf(port, PATH_MAX, "%d", MYSQL_PORT);
-
- // default option
- default_option[0]= NULL;
- for (i= 0; (argc > 1) && default_options[i]; i++)
- {
- if (!strnicmp(argv[1], default_options[i], strlen(default_options[i])))
- {
- strncpy(default_option, argv[1], PATH_MAX);
- break;
- }
- }
-
- // set after basedir is established
- datadir[0]= NULL;
- pid_file[0]= NULL;
- err_log[0]= NULL;
- safe_log[0]= NULL;
- mysqld[0]= NULL;
-}
-
-/******************************************************************************
-
- finish_defaults()
-
- Finish settig the defaults.
-
-******************************************************************************/
-void finish_defaults()
-{
- struct stat buf;
- int i;
-
- // datadir
- if (!datadir[0])
- snprintf(datadir, PATH_MAX, "%s/data", basedir);
-
- // pid-file
- if (!pid_file[0])
- snprintf(pid_file, PATH_MAX, "%s/%s.pid", datadir, hostname);
-
- // err-log
- if (!err_log[0])
- snprintf(err_log, PATH_MAX, "%s/%s.err", datadir, hostname);
-
- // safe-log
- if (!safe_log[0])
- snprintf(safe_log, PATH_MAX, "%s/%s.safe", datadir, hostname);
-
- // mysqld
- if (!mysqld[0])
- snprintf(mysqld, PATH_MAX, "%s/bin/mysqld-max", basedir);
-
- if (stat(mysqld, &buf))
- {
- snprintf(mysqld, PATH_MAX, "%s/bin/mysqld", basedir);
- }
-}
-
-/******************************************************************************
-
- read_defaults()
-
- Read the defaults.
-
-******************************************************************************/
-void read_defaults(arg_list_t *pal)
-{
- arg_list_t al;
- char defaults_file[PATH_MAX];
- char mydefaults[PATH_MAX];
- char line[PATH_MAX];
- FILE *fp;
-
- // defaults output file
- snprintf(defaults_file, PATH_MAX, "%s/bin/defaults.out", basedir);
- remove(defaults_file);
-
- // mysqladmin file
- 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");
-
- spawn(mydefaults, &al, TRUE, NULL, defaults_file, NULL);
-
- free_args(&al);
-
- // gather defaults
- if ((fp= fopen(defaults_file, "r")) != NULL)
- {
- while (fgets(line, PATH_MAX, fp))
- {
- char *p;
-
- // remove end-of-line character
- if ((p= strrchr(line, '\n')) != NULL)
- *p= '\0';
-
- // add the option as an argument
- add_arg(pal, line);
- }
-
- fclose(fp);
- }
-
- // remove file
- remove(defaults_file);
-}
-
-/******************************************************************************
-
- parse_args()
-
- Get the options.
-
-******************************************************************************/
-void parse_args(int argc, char *argv[])
-{
- int index= 0;
- int c;
-
- // parse options
- enum opts
- {
- OPT_BASEDIR= 0xFF,
- OPT_DATADIR,
- OPT_PID_FILE,
- OPT_BIND_ADDRESS,
- OPT_PORT,
- OPT_ERR_LOG,
- OPT_SAFE_LOG,
- OPT_MYSQLD,
- OPT_HELP
- };
-
- static struct option options[]=
- {
- {"autoclose", no_argument, &autoclose, TRUE},
- {"basedir", required_argument, 0, OPT_BASEDIR},
- {"check-tables", no_argument, &checktables, TRUE},
- {"datadir", required_argument, 0, OPT_DATADIR},
- {"pid-file", required_argument, 0, OPT_PID_FILE},
- {"bind-address", required_argument, 0, OPT_BIND_ADDRESS},
- {"port", required_argument, 0, OPT_PORT},
- {"err-log", required_argument, 0, OPT_ERR_LOG},
- {"safe-log", required_argument, 0, OPT_SAFE_LOG},
- {"mysqld", required_argument, 0, OPT_MYSQLD},
- {"help", no_argument, 0, OPT_HELP},
- {0, 0, 0, 0}
- };
-
- // we have to reset getopt_long because we use it multiple times
- optind= 1;
-
- // turn off error reporting
- opterr= 0;
-
- while ((c= getopt_long(argc, argv, "b:h:P:", options, &index)) >= 0)
- {
- switch (c) {
- case OPT_BASEDIR:
- case 'b':
- strcpy(basedir, optarg);
- break;
-
- case OPT_DATADIR:
- case 'h':
- strcpy(datadir, optarg);
- break;
-
- case OPT_PID_FILE:
- strcpy(pid_file, optarg);
- break;
-
- case OPT_BIND_ADDRESS:
- strcpy(address, optarg);
- break;
-
- case OPT_PORT:
- case 'P':
- strcpy(port, optarg);
- break;
-
- case OPT_ERR_LOG:
- strcpy(err_log, optarg);
- break;
-
- case OPT_SAFE_LOG:
- strcpy(safe_log, optarg);
- break;
-
- case OPT_MYSQLD:
- strcpy(mysqld, optarg);
- break;
-
- case OPT_HELP:
- usage();
- break;
-
- default:
- // ignore
- break;
- }
- }
-}
-
-
-/******************************************************************************
-
-
-
-/******************************************************************************
-
- get_options()
-
- Get the options.
-
-******************************************************************************/
-void get_options(int argc, char *argv[])
-{
- 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);
-
- // command-line arguments
- parse_args(argc, argv);
-
- // finish defaults
- finish_defaults();
-}
-
-/******************************************************************************
-
- check_data_vol()
-
- Check the database volume.
-
-******************************************************************************/
-void check_data_vol()
-{
- // warn if the data is on a Traditional volume
- struct volume_info vol;
- char buff[PATH_MAX];
- char *p;
-
- // clear struct
- memset(&vol, 0, sizeof(vol));
-
- // find volume name
- strcpy(buff, datadir);
- if (p= strchr(buff, ':'))
- {
- // terminate after volume name
- *p= 0;
- }
- else
- {
- // assume SYS volume
- strcpy(buff, "SYS");
- }
-
- // retrieve information
- netware_vol_info_from_name(&vol, buff);
-
- if ((vol.flags & VOL_NSS_PRESENT) == 0)
- {
- log("Error: Either the data directory does not exist or is not on an NSS volume!\n\n");
- exit(-1);
- }
-}
-
-/******************************************************************************
-
- check_setup()
-
- Check the current setup.
-
-******************************************************************************/
-void check_setup()
-{
- struct stat info;
- char temp[PATH_MAX];
-
- // remove any current pid_file
- if (!stat(pid_file, &info) && (remove(pid_file) < 0))
- {
- log("ERROR: Unable to remove current pid file!\n\n");
- exit(-1);
- }
-
- // check the data volume
- check_data_vol();
-
- // check for a database
- snprintf(temp, PATH_MAX, "%s/mysql/host.frm", datadir);
- if (stat(temp, &info))
- {
- log("ERROR: No database found in the data directory!\n\n");
- exit(-1);
- }
-}
-
-/******************************************************************************
-
- check_tables()
-
- Check the database tables.
-
-******************************************************************************/
-void check_tables()
-{
- arg_list_t al;
- char mycheck[PATH_MAX];
- char table[PATH_MAX];
- char db[PATH_MAX];
- DIR *datadir_entry, *db_entry, *table_entry;
-
- // status
- log("checking tables...\n");
-
- // list databases
- if ((datadir_entry= opendir(datadir)) == NULL)
- {
- return;
- }
-
- while ((db_entry= readdir(datadir_entry)) != NULL)
- {
- if (db_entry->d_name[0] == '.')
- {
- // Skip
- }
- else if (S_ISDIR(db_entry->d_type))
- {
- // create long db name
- snprintf(db, PATH_MAX, "%s/%s", datadir, db_entry->d_name);
-
- // list tables
- if ((db_entry= opendir(db)) == NULL)
- {
- continue;
- }
-
- while ((table_entry= readdir(db_entry)) != NULL)
- {
- // create long table name
- snprintf(table, PATH_MAX, "%s/%s", db, strlwr(table_entry->d_name));
-
- if (strindex(table, ".myi"))
- {
- // ** myisamchk
-
- // mysqladmin file
- 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, "--key_buffer=64M");
- 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"))
- {
- // ** isamchk
-
- // mysqladmin file
- 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, "--sort_buffer=64M");
- add_arg(&al, table);
-
- spawn(mycheck, &al, TRUE, NULL, NULL, NULL);
-
- free_args(&al);
- }
- }
- }
- }
-}
-
-/******************************************************************************
-
- mysql_start()
-
- Start the mysql server.
-
-******************************************************************************/
-void mysql_start(int argc, char *argv[])
-{
- arg_list_t al;
- int i, j, err;
- struct stat info;
- time_t cal;
- struct tm lt;
- char stamp[PATH_MAX];
- char skip;
-
- // private options
- static char *private_options[]=
- {
- "--autoclose",
- "--check-tables",
- "--help",
- "--err-log=",
- "--mysqld=",
- NULL
- };
-
- // args
- init_args(&al);
- add_arg(&al, "%s", mysqld);
-
- // parent args
- for (i= 1; i < argc; i++)
- {
- skip= FALSE;
-
- // skip private arguments
- for (j= 0; private_options[j]; j++)
- {
- if (!strnicmp(argv[i], private_options[j], strlen(private_options[j])))
- {
- skip= TRUE;
- break;
- }
- }
-
- if (!skip)
- {
- add_arg(&al, "%s", argv[i]);
- }
- }
- // spawn
- do
- {
- // check the database tables
- if (checktables)
- check_tables();
-
- // status
- time(&cal);
- localtime_r(&cal, &lt);
- strftime(stamp, PATH_MAX, "%d %b %Y %H:%M:%S", &lt);
- log("mysql started : %s\n", stamp);
-
- // spawn mysqld
- spawn(mysqld, &al, TRUE, NULL, NULL, err_log);
- }
- while (!stat(pid_file, &info));
-
- // status
- time(&cal);
- localtime_r(&cal, &lt);
- strftime(stamp, PATH_MAX, "%d %b %Y %H:%M:%S", &lt);
- log("mysql stopped : %s\n\n", stamp);
-
- // free args
- free_args(&al);
-}
-
-/******************************************************************************
-
- main()
-
-******************************************************************************/
-int main(int argc, char **argv)
-{
- char temp[PATH_MAX];
-
- // get the options
- get_options(argc, argv);
-
- // keep the screen up
- if (!autoclose)
- setscreenmode(SCR_NO_MODE);
-
- // create log file
- log_fd= fopen(safe_log, "w+");
-
- // header
- log("MySQL Server %s, for %s (%s)\n\n", VERSION, SYSTEM_TYPE, MACHINE_TYPE);
-
- // status
- log("address : %s\n", address);
- log("port : %s\n", port);
- log("daemon : %s\n", mysqld);
- log("base directory : %s\n", basedir);
- log("data directory : %s\n", datadir);
- log("pid file : %s\n", pid_file);
- log("error file : %s\n", err_log);
- log("log file : %s\n", safe_log);
- log("\n");
-
- // check setup
- check_setup();
-
- // start the MySQL server
- mysql_start(argc, argv);
-
- // close log file
- if (log_fd)
- fclose(log_fd);
-
- return 0;
-}
diff --git a/netware/mysqld_safe.def b/netware/mysqld_safe.def
deleted file mode 100644
index 5c436cc97ca..00000000000
--- a/netware/mysqld_safe.def
+++ /dev/null
@@ -1,13 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQLd Safe
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Database Server"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Database Server Monitor"
-VERSION 4, 0
-STACKSIZE 131072
-MULTIPLE
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqldump.def b/netware/mysqldump.def
deleted file mode 100644
index 2e745492cf3..00000000000
--- a/netware/mysqldump.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Admin
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Dump Tool[scrollable]"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Dump Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqlimport.def b/netware/mysqlimport.def
deleted file mode 100644
index 5db6b940ce7..00000000000
--- a/netware/mysqlimport.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Client
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Import[scrollable]"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Import Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqlshow.def b/netware/mysqlshow.def
deleted file mode 100644
index 386cb98c091..00000000000
--- a/netware/mysqlshow.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Show
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Show[scrollable]"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Show Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqlslap.def b/netware/mysqlslap.def
deleted file mode 100644
index be10f9db192..00000000000
--- a/netware/mysqlslap.def
+++ /dev/null
@@ -1,11 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Slap
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-SCREENNAME "MySQL Slap[scrollable]"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Slap Tool"
-VERSION 4, 0
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/mysqltest.def b/netware/mysqltest.def
deleted file mode 100644
index f0ee5f7e6a4..00000000000
--- a/netware/mysqltest.def
+++ /dev/null
@@ -1,11 +0,0 @@
-#------------------------------------------------------------------------------
-# MySQL Admin
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Test Case Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/perror.def b/netware/perror.def
deleted file mode 100644
index fc95de3476a..00000000000
--- a/netware/perror.def
+++ /dev/null
@@ -1,11 +0,0 @@
-#------------------------------------------------------------------------------
-# PERROR
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Error Code Description Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/replace.def b/netware/replace.def
deleted file mode 100644
index 7feccdbff41..00000000000
--- a/netware/replace.def
+++ /dev/null
@@ -1,11 +0,0 @@
-#------------------------------------------------------------------------------
-# Replace
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Text Replacement Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/resolve_stack_dump.def b/netware/resolve_stack_dump.def
deleted file mode 100644
index 20098c1b4e0..00000000000
--- a/netware/resolve_stack_dump.def
+++ /dev/null
@@ -1,12 +0,0 @@
-#------------------------------------------------------------------------------
-# Resolve Stack Dump
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-#SCREENNAME "MySQL Stack Dump Resolve Tool"
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL Stack Dump Resolve Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/resolveip.def b/netware/resolveip.def
deleted file mode 100644
index 1962d61be53..00000000000
--- a/netware/resolveip.def
+++ /dev/null
@@ -1,11 +0,0 @@
-#------------------------------------------------------------------------------
-# Resolve IP
-#------------------------------------------------------------------------------
-MODULE libc.nlm
-COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
-DESCRIPTION "MySQL IP/Hostname Resolve Tool"
-VERSION 4, 0
-STACKSIZE 131072
-XDCDATA ../netware/mysql.xdc
-#DEBUG
-
diff --git a/netware/static_init_db.sql b/netware/static_init_db.sql
deleted file mode 100644
index e9fb92f4a97..00000000000
--- a/netware/static_init_db.sql
+++ /dev/null
@@ -1,34 +0,0 @@
-CREATE DATABASE mysql;
-CREATE DATABASE test;
-
-USE mysql;
-
-CREATE TABLE db (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL, References_priv enum('N','Y') DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User)) comment='Database privileges';
-
-INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
-INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
-
-CREATE TABLE host (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL, References_priv enum('N','Y') DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db)) comment='Host privileges; Merged with database privileges';
-
-CREATE TABLE user (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') DEFAULT 'N' NOT NULL, File_priv enum('N','Y') DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL, References_priv enum('N','Y') DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User)) comment='Users and global privileges';
-
-INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
-INSERT INTO user VALUES ('','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
-
-INSERT INTO user (host,user) values ('localhost','');
-INSERT INTO user (host,user) values ('','');
-
-CREATE TABLE func (name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') NOT NULL, PRIMARY KEY (name)) comment='User defined functions';
-
-CREATE TABLE tables_priv (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp(14), Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor)) comment='Table privileges';
-
-CREATE TABLE columns_priv (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp(14), Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name)) comment='Column privileges';
-
-
-CREATE TABLE help_topic (help_topic_id int unsigned NOT NULL, name varchar(64) NOT NULL, help_category_id smallint unsigned NOT NULL, description text NOT NULL, example text NOT NULL, url varchar(128) NOT NULL, primary key (help_topic_id), unique index (name))comment='help topics';
-
-CREATE TABLE help_category (help_category_id smallint unsigned NOT NULL, name varchar(64) NOT NULL, parent_category_id smallint unsigned null, url varchar(128) NOT NULL, primary key (help_category_id), unique index (name)) comment='help categories';
-
-CREATE TABLE help_keyword (help_keyword_id int unsigned NOT NULL, name varchar(64) NOT NULL, primary key (help_keyword_id), unique index (name)) comment='help keywords';
-
-CREATE TABLE help_relation (help_topic_id int unsigned NOT NULL references help_topic, help_keyword_id int unsigned NOT NULL references help_keyword, primary key (help_keyword_id, help_topic_id)) comment='keyword-topic relation';
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index aed758da620..951699317fd 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -162,10 +162,6 @@ fi
# Print the platform name for build logs
echo "PLATFORM NAME: $PLATFORM"
-case $PLATFORM in
- *netware*) BASE_SYSTEM="netware" ;;
-esac
-
# Change the distribution to a long descriptive name
# For the cluster product, concentrate on the second part
VERSION_NAME=@VERSION@
@@ -226,318 +222,121 @@ fi
#
##############################################################################
-if [ x"$BASE_SYSTEM" != x"netware" ] ; then
-
- # ----------------------------------------------------------------------
- # Terminate on any base level error
- # ----------------------------------------------------------------------
- set -e
-
- # ----------------------------------------------------------------------
- # Really ugly, one script, "mysql_install_db", needs prefix set to ".",
- # i.e. makes access relative the current directory. This matches
- # the documentation, so better not change this. And for another script,
- # "mysql.server", we make some relative, others not.
- # ----------------------------------------------------------------------
-
- cd scripts
- rm -f mysql_install_db
- @MAKE@ mysql_install_db \
- prefix=. \
- bindir=./bin \
- sbindir=./bin \
- scriptdir=./bin \
- libexecdir=./bin \
- pkgdatadir=./share \
- localstatedir=./data
- cd ..
-
- cd support-files
- rm -f mysql.server
- @MAKE@ mysql.server \
- bindir=./bin \
- sbindir=./bin \
- scriptdir=./bin \
- libexecdir=./bin \
- pkgdatadir=@pkgdatadir@
- cd ..
-
- # ----------------------------------------------------------------------
- # Do a install that we later are to pack. Use the same paths as in
- # the build for the relevant directories.
- # ----------------------------------------------------------------------
- @MAKE@ DESTDIR=$BASE install \
- pkglibdir=@pkglibdir@ \
- pkgincludedir=@pkgincludedir@ \
- pkgdatadir=@pkgdatadir@ \
- pkgplugindir=@pkgplugindir@ \
- pkgsuppdir=@pkgsuppdir@ \
- mandir=@mandir@ \
- infodir=@infodir@
-
- # ----------------------------------------------------------------------
- # Rename top directory, and set DEST to the new directory
- # ----------------------------------------------------------------------
- mv $BASE@prefix@ $BASE/$NEW_NAME
- DEST=$BASE/$NEW_NAME
-
- # ----------------------------------------------------------------------
- # If we compiled with gcc, copy libgcc.a to the dist as libmygcc.a
- # ----------------------------------------------------------------------
- if [ x"@GXX@" = x"yes" ] ; then
- gcclib=`@CC@ @CFLAGS@ --print-libgcc-file 2>/dev/null` || true
- if [ -z "$gcclib" ] ; then
- echo "Warning: Compiler doesn't tell libgcc.a!"
- elif [ -f "$gcclib" ] ; then
- $CP $gcclib $DEST/lib/libmygcc.a
- else
- echo "Warning: Compiler result '$gcclib' not found / no file!"
- fi
- fi
-
- # If requested, add a malloc library .so into pkglibdir for use
- # by mysqld_safe
- if [ -n "$MALLOC_LIB" ]; then
- cp "$MALLOC_LIB" "$DEST/lib/"
- fi
-
- # FIXME let this script be in "bin/", where it is in the RPMs?
- # http://dev.mysql.com/doc/refman/5.1/en/mysql-install-db-problems.html
- mkdir $DEST/scripts
- mv $DEST/bin/mysql_install_db $DEST/scripts/
-
- # Note, no legacy "safe_mysqld" link to "mysqld_safe" in 5.1
+# ----------------------------------------------------------------------
+# Terminate on any base level error
+# ----------------------------------------------------------------------
+set -e
- # Copy readme and license files
- cp README Docs/INSTALL-BINARY $DEST/
- if [ -f COPYING -a -f EXCEPTIONS-CLIENT ] ; then
- cp COPYING EXCEPTIONS-CLIENT $DEST/
- elif [ -f LICENSE.mysql ] ; then
- cp LICENSE.mysql $DEST/
- else
- echo "ERROR: no license files found"
- exit 1
- fi
+# ----------------------------------------------------------------------
+# Really ugly, one script, "mysql_install_db", needs prefix set to ".",
+# i.e. makes access relative the current directory. This matches
+# the documentation, so better not change this. And for another script,
+# "mysql.server", we make some relative, others not.
+# ----------------------------------------------------------------------
- # FIXME should be handled by make file, and to other dir
- mkdir -p $DEST/bin $DEST/support-files
- cp scripts/mysqlaccess.conf $DEST/bin/
- cp support-files/magic $DEST/support-files/
+cd scripts
+rm -f mysql_install_db
+@MAKE@ mysql_install_db \
+ prefix=. \
+ bindir=./bin \
+ sbindir=./bin \
+ scriptdir=./bin \
+ libexecdir=./bin \
+ pkgdatadir=./share \
+ localstatedir=./data
+cd ..
+
+cd support-files
+rm -f mysql.server
+@MAKE@ mysql.server \
+ bindir=./bin \
+ sbindir=./bin \
+ scriptdir=./bin \
+ libexecdir=./bin \
+ pkgdatadir=@pkgdatadir@
+cd ..
- # Create empty data directories, set permission (FIXME why?)
- mkdir $DEST/data $DEST/data/mysql $DEST/data/test
- chmod o-rwx $DEST/data $DEST/data/mysql $DEST/data/test
+# ----------------------------------------------------------------------
+# Do a install that we later are to pack. Use the same paths as in
+# the build for the relevant directories.
+# ----------------------------------------------------------------------
+@MAKE@ DESTDIR=$BASE install \
+ pkglibdir=@pkglibdir@ \
+ pkgincludedir=@pkgincludedir@ \
+ pkgdatadir=@pkgdatadir@ \
+ pkgplugindir=@pkgplugindir@ \
+ pkgsuppdir=@pkgsuppdir@ \
+ mandir=@mandir@ \
+ infodir=@infodir@
- # ----------------------------------------------------------------------
- # Create the result tar file
- # ----------------------------------------------------------------------
+# ----------------------------------------------------------------------
+# Rename top directory, and set DEST to the new directory
+# ----------------------------------------------------------------------
+mv $BASE@prefix@ $BASE/$NEW_NAME
+DEST=$BASE/$NEW_NAME
- echo "Using $tar to create archive"
- OPT=cvf
- if [ x$SILENT = x1 ] ; then
- OPT=cf
+# ----------------------------------------------------------------------
+# If we compiled with gcc, copy libgcc.a to the dist as libmygcc.a
+# ----------------------------------------------------------------------
+if [ x"@GXX@" = x"yes" ] ; then
+ gcclib=`@CC@ @CFLAGS@ --print-libgcc-file 2>/dev/null` || true
+ if [ -z "$gcclib" ] ; then
+ echo "Warning: Compiler doesn't tell libgcc.a!"
+ elif [ -f "$gcclib" ] ; then
+ $CP $gcclib $DEST/lib/libmygcc.a
+ else
+ echo "Warning: Compiler result '$gcclib' not found / no file!"
fi
-
- echo "Creating and compressing archive"
- rm -f $NEW_NAME.tar.gz
- (cd $BASE ; $tar $OPT - $NEW_NAME) | gzip -9 > $NEW_NAME.tar.gz
- echo "$NEW_NAME.tar.gz created"
-
- echo "Removing temporary directory"
- rm -rf $BASE
- exit 0
fi
+# If requested, add a malloc library .so into pkglibdir for use
+# by mysqld_safe
+if [ -n "$MALLOC_LIB" ]; then
+ cp "$MALLOC_LIB" "$DEST/lib/"
+fi
-##############################################################################
-#
-# Handle the Netware case, until integrated above
-#
-##############################################################################
+# FIXME let this script be in "bin/", where it is in the RPMs?
+# http://dev.mysql.com/doc/refman/5.1/en/mysql-install-db-problems.html
+mkdir $DEST/scripts
+mv $DEST/bin/mysql_install_db $DEST/scripts/
-BS=".nlm"
-MYSQL_SHARE=$BASE/share
-
-mkdir $BASE $BASE/bin $BASE/docs \
- $BASE/include $BASE/lib $BASE/support-files $BASE/share $BASE/scripts \
- $BASE/mysql-test $BASE/mysql-test/t $BASE/mysql-test/r \
- $BASE/mysql-test/include $BASE/mysql-test/std_data $BASE/mysql-test/lib \
- $BASE/mysql-test/suite
-
-# Copy files if they exists, warn for those that don't.
-# Note that when listing files to copy, we might list the file name
-# twice, once in the directory location where it is built, and a
-# second time in the ".libs" location. In the case the first one
-# is a wrapper script, the second one will overwrite it with the
-# binary file.
-copyfileto()
-{
- destdir=$1
- shift
- for i
- do
- if [ -f $i ] ; then
- $CP $i $destdir
- elif [ -d $i ] ; then
- echo "Warning: Will not copy directory \"$i\""
- else
- echo "Warning: Listed file not found \"$i\""
- fi
- done
-}
+# Note, no legacy "safe_mysqld" link to "mysqld_safe" in 5.1
-copyfileto $BASE/docs ChangeLog Docs/mysql.info
-
-copyfileto $BASE COPYING COPYING.LIB README Docs/INSTALL-BINARY \
- EXCEPTIONS-CLIENT LICENSE.mysql
-
-# Non platform-specific bin dir files:
-BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
- extra/resolveip$BS extra/my_print_defaults$BS \
- extra/resolve_stack_dump$BS extra/mysql_waitpid$BS \
- storage/myisam/myisamchk$BS storage/myisam/myisampack$BS \
- storage/myisam/myisamlog$BS storage/myisam/myisam_ftdump$BS \
- sql/mysqld$BS sql/mysqld-debug$BS \
- sql/mysql_tzinfo_to_sql$BS \
- client/mysql$BS client/mysqlshow$BS client/mysqladmin$BS \
- client/mysqlslap$BS \
- client/mysqldump$BS client/mysqlimport$BS \
- client/mysqltest$BS client/mysqlcheck$BS \
- client/mysqlbinlog$BS client/mysql_upgrade$BS \
- tests/mysql_client_test$BS \
- libmysqld/examples/mysql_client_test_embedded$BS \
- libmysqld/examples/mysqltest_embedded$BS \
- ";
-
-# Platform-specific bin dir files:
-BIN_FILES="$BIN_FILES \
- netware/mysqld_safe$BS netware/mysql_install_db$BS \
- netware/init_db.sql netware/test_db.sql \
- netware/mysqlhotcopy$BS netware/libmysql$BS netware/init_secure_db.sql \
- ";
-
-copyfileto $BASE/bin $BIN_FILES
-
-$CP netware/*.pl $BASE/scripts
-$CP scripts/mysqlhotcopy $BASE/scripts/mysqlhotcopy.pl
-
-copyfileto $BASE/lib \
- libmysql/.libs/libmysqlclient.a \
- libmysql/.libs/libmysqlclient.so* \
- libmysql/.libs/libmysqlclient.sl* \
- libmysql/.libs/libmysqlclient*.dylib \
- libmysql/libmysqlclient.* \
- libmysql_r/.libs/libmysqlclient_r.a \
- libmysql_r/.libs/libmysqlclient_r.so* \
- libmysql_r/.libs/libmysqlclient_r.sl* \
- libmysql_r/.libs/libmysqlclient_r*.dylib \
- libmysql_r/libmysqlclient_r.* \
- libmysqld/.libs/libmysqld.a \
- libmysqld/.libs/libmysqld.so* \
- libmysqld/.libs/libmysqld.sl* \
- libmysqld/.libs/libmysqld*.dylib \
- mysys/libmysys.a strings/libmystrings.a dbug/libdbug.a \
- libmysqld/libmysqld.a netware/libmysql.imp \
- zlib/.libs/libz.a
-
-# convert the .a to .lib for NetWare
-for i in $BASE/lib/*.a
-do
- libname=`basename $i .a`
- $MV $i $BASE/lib/$libname.lib
-done
-rm -f $BASE/lib/*.la
-
-
-copyfileto $BASE/include config.h include/*
-
-rm -f $BASE/include/Makefile* $BASE/include/*.in $BASE/include/config-win.h
-
-# In a NetWare binary package, these tools and their manuals are not useful
-rm -f $BASE/man/man1/make_win_*
-
-copyfileto $BASE/support-files support-files/*
-
-copyfileto $BASE/share scripts/*.sql
-
-$CP -r sql/share/* $MYSQL_SHARE
-rm -f $MYSQL_SHARE/Makefile* $MYSQL_SHARE/*/*.OLD
-
-copyfileto $BASE/mysql-test \
- mysql-test/mysql-test-run mysql-test/install_test_db \
- mysql-test/mysql-test-run.pl mysql-test/README \
- mysql-test/mysql-stress-test.pl \
- mysql-test/valgrind.supp \
- netware/mysql_test_run.nlm netware/install_test_db.ncf
-
-$CP mysql-test/lib/*.pl $BASE/mysql-test/lib
-$CP mysql-test/t/*.def $BASE/mysql-test/t
-$CP mysql-test/include/*.inc $BASE/mysql-test/include
-$CP mysql-test/include/*.sql $BASE/mysql-test/include
-$CP mysql-test/include/*.test $BASE/mysql-test/include
-$CP mysql-test/t/*.def $BASE/mysql-test/t
-$CP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
- mysql-test/std_data/*.MYD mysql-test/std_data/*.MYI \
- mysql-test/std_data/*.pem mysql-test/std_data/Moscow_leap \
- mysql-test/std_data/Index.xml \
- mysql-test/std_data/des_key_file mysql-test/std_data/*.*001 \
- mysql-test/std_data/*.cnf mysql-test/std_data/*.MY* \
- $BASE/mysql-test/std_data
-# Attention: when the wildcards expand to a line that is very long,
-# it may exceed the command line length limit on some platform(s). Bug#54590
-$CP mysql-test/t/*.test mysql-test/t/*.imtest $BASE/mysql-test/t
-$CP mysql-test/t/*.disabled mysql-test/t/*.opt $BASE/mysql-test/t
-$CP mysql-test/t/*.slave-mi mysql-test/t/*.sh mysql-test/t/*.sql $BASE/mysql-test/t
-$CP mysql-test/r/*.result mysql-test/r/*.require \
- $BASE/mysql-test/r
-
-# Copy the additional suites "as is", they are in flux
-$tar cf - mysql-test/suite | ( cd $BASE ; $tar xf - )
-# Clean up if we did this from a bk tree
-if [ -d mysql-test/SCCS ] ; then
- find $BASE/mysql-test -name SCCS -print | xargs rm -rf
+# Copy readme and license files
+cp README Docs/INSTALL-BINARY $DEST/
+if [ -f COPYING -a -f EXCEPTIONS-CLIENT ] ; then
+ cp COPYING EXCEPTIONS-CLIENT $DEST/
+elif [ -f LICENSE.mysql ] ; then
+ cp LICENSE.mysql $DEST/
+else
+ echo "ERROR: no license files found"
+ exit 1
fi
-rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh \
- $BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution \
- $BASE/bin/make_win_* \
- $BASE/bin/setsomevars $BASE/support-files/Makefile* \
- $BASE/support-files/*.sh
+# FIXME should be handled by make file, and to other dir
+mkdir -p $DEST/bin $DEST/support-files
+cp scripts/mysqlaccess.conf $DEST/bin/
+cp support-files/magic $DEST/support-files/
-#
-# Copy system dependent files
-#
-./scripts/fill_help_tables < ./Docs/manual.texi >> ./netware/init_db.sql
+# Create empty data directories, set permission (FIXME why?)
+mkdir $DEST/data $DEST/data/mysql $DEST/data/test
+chmod o-rwx $DEST/data $DEST/data/mysql $DEST/data/test
-#
-# Remove system dependent files
-#
-rm -f $BASE/support-files/magic \
- $BASE/support-files/mysql.server \
- $BASE/support-files/mysql*.spec \
- $BASE/support-files/mysql-log-rotate \
- $BASE/support-files/binary-configure \
- $BASE/support-files/build-tags \
- $BASE/support-files/MySQL-shared-compat.spec \
- $BASE/INSTALL-BINARY
-
-# Clean up if we did this from a bk tree
-if [ -d $BASE/sql-bench/SCCS ] ; then
- find $BASE/share -name SCCS -print | xargs rm -rf
- find $BASE/sql-bench -name SCCS -print | xargs rm -rf
-fi
+# ----------------------------------------------------------------------
+# Create the result tar file
+# ----------------------------------------------------------------------
-BASE2=$TMP/$NEW_NAME
-rm -rf $BASE2
-mv $BASE $BASE2
-BASE=$BASE2
+echo "Using $tar to create archive"
+OPT=cvf
+if [ x$SILENT = x1 ] ; then
+ OPT=cf
+fi
-#
-# Create a zip file for NetWare users
-#
-rm -f $NEW_NAME.zip
-(cd $TMP; zip -r "$SOURCE/$NEW_NAME.zip" $NEW_NAME)
-echo "$NEW_NAME.zip created"
+echo "Creating and compressing archive"
+rm -f $NEW_NAME.tar.gz
+(cd $BASE ; $tar $OPT - $NEW_NAME) | gzip -9 > $NEW_NAME.tar.gz
+echo "$NEW_NAME.tar.gz created"
echo "Removing temporary directory"
rm -rf $BASE
+exit 0
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh
index aea7a657c9e..a08db77ac56 100644
--- a/scripts/mysqlhotcopy.sh
+++ b/scripts/mysqlhotcopy.sh
@@ -234,10 +234,6 @@ elsif (defined($tgt_name) && ($tgt_name =~ m:/: || $tgt_name eq '.')) {
elsif ( $opt{suffix} ) {
print "Using copy suffix '$opt{suffix}'\n" unless $opt{quiet};
}
-elsif ( ($^O =~ m/^(NetWare)$/) && defined($tgt_name) && ($tgt_name =~ m:\\: || $tgt_name eq '.'))
-{
- $tgt_dirname = $tgt_name;
-}
else
{
$tgt_name="" if (!defined($tgt_name));
@@ -423,11 +419,8 @@ foreach my $rdb ( @db_desc ) {
else {
mkdir($tgt_dirpath, 0750) or die "Can't create '$tgt_dirpath': $!\n"
unless -d $tgt_dirpath;
- if ($^O !~ m/^(NetWare)$/)
- {
- my @f_info= stat "$datadir/$rdb->{src}";
- chown $f_info[4], $f_info[5], $tgt_dirpath;
- }
+ my @f_info= stat "$datadir/$rdb->{src}";
+ chown $f_info[4], $f_info[5], $tgt_dirpath;
}
}
@@ -598,14 +591,7 @@ sub copy_files {
my @cmd;
print "Copying ".@$files." files...\n" unless $opt{quiet};
- if ($^O =~ m/^(NetWare)$/) # on NetWare call PERL copy (slower)
- {
- foreach my $file ( @$files )
- {
- copy($file, $target."/".basename($file));
- }
- }
- elsif ($method =~ /^s?cp\b/) # cp or scp with optional flags
+ if ($method =~ /^s?cp\b/) # cp or scp with optional flags
{
my $cp = $method;
# add option to preserve mod time etc of copied files
diff --git a/sql-common/client.c b/sql-common/client.c
index c277b153109..0661cc41096 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -126,7 +126,7 @@ static void mysql_close_free_options(MYSQL *mysql);
static void mysql_close_free(MYSQL *mysql);
static void mysql_prune_stmt_list(MYSQL *mysql);
-#if !(defined(__WIN__) || defined(__NETWARE__))
+#if !defined(__WIN__)
static int wait_for_data(my_socket fd, uint timeout);
#endif
@@ -148,7 +148,7 @@ char mysql_server_last_error[MYSQL_ERRMSG_SIZE];
int my_connect(my_socket fd, const struct sockaddr *name, uint namelen,
uint timeout)
{
-#if defined(__WIN__) || defined(__NETWARE__)
+#if defined(__WIN__)
DBUG_ENTER("my_connect");
DBUG_RETURN(connect(fd, (struct sockaddr*) name, namelen));
#else
@@ -193,7 +193,7 @@ int my_connect(my_socket fd, const struct sockaddr *name, uint namelen,
If not, we will use select()
*/
-#if !(defined(__WIN__) || defined(__NETWARE__))
+#if !defined(__WIN__)
static int wait_for_data(my_socket fd, uint timeout)
{
@@ -316,7 +316,7 @@ static int wait_for_data(my_socket fd, uint timeout)
DBUG_RETURN(0); /* ok */
#endif /* HAVE_POLL */
}
-#endif /* defined(__WIN__) || defined(__NETWARE__) */
+#endif /* !defined(__WIN__) */
/**
Set the internal error message to mysql handler
diff --git a/sql/Makefile.am b/sql/Makefile.am
index 0616893a014..4b1ecbbc8da 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -135,8 +135,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
item_row.cc item_geofunc.cc item_xmlfunc.cc \
field.cc strfunc.cc key.cc sql_class.cc sql_list.cc \
net_serv.cc protocol.cc sql_state.c \
- lock.cc my_lock.c \
- sql_string.cc sql_manager.cc sql_map.cc \
+ lock.cc sql_string.cc sql_manager.cc sql_map.cc \
main.cc mysqld.cc password.c hash_filo.cc hostname.cc \
sql_connect.cc scheduler.cc sql_parse.cc \
keycaches.cc set_var.cc sql_yacc.yy sys_vars.cc \
diff --git a/sql/my_lock.c b/sql/my_lock.c
deleted file mode 100644
index f66d7282f72..00000000000
--- a/sql/my_lock.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Copyright (C) 2000-2003 MySQL AB
-
- 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
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- 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.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-#if defined(__NETWARE__)
-#include "../mysys/my_lock.c"
-#else
-
-#undef MAP_TO_USE_RAID /* Avoid RAID mappings */
-#include <my_global.h>
-#include <my_sys.h>
-#include <mysys_err.h>
-#include <my_pthread.h>
-#include <thr_alarm.h>
-#include <errno.h>
-
- /* Lock a part of a file */
-
-int my_lock(File fd,int locktype,my_off_t start,my_off_t length,myf MyFlags)
-{
- thr_alarm_t alarmed;
- ALARM alarm_buff;
- uint wait_for_alarm;
- struct flock m_lock;
- DBUG_ENTER("my_lock");
- DBUG_PRINT("my",("Fd: %d Op: %d start: %ld Length: %ld MyFlags: %d",
- fd,locktype,(ulong) start,(ulong) length,MyFlags));
- if (my_disable_locking)
- DBUG_RETURN(0); /* purecov: inspected */
- m_lock.l_type=(short) locktype;
- m_lock.l_whence=0L;
- m_lock.l_start=(long) start;
- m_lock.l_len=(long) length;
- wait_for_alarm=(MyFlags & MY_DONT_WAIT ? MY_HOW_OFTEN_TO_ALARM :
- (uint) 12*60*60);
- if (fcntl(fd,F_SETLK,&m_lock) != -1) /* Check if we can lock */
- DBUG_RETURN(0); /* Ok, file locked */
- DBUG_PRINT("info",("Was locked, trying with alarm"));
- if (!thr_alarm(&alarmed,wait_for_alarm,&alarm_buff))
- {
- int value;
- while ((value=fcntl(fd,F_SETLKW,&m_lock)) && !thr_got_alarm(&alarmed) &&
- errno == EINTR) ;
- thr_end_alarm(&alarmed);
- if (value != -1)
- DBUG_RETURN(0);
- }
- else
- {
- errno=EINTR;
- }
- if (errno == EINTR || errno == EACCES)
- my_errno=EAGAIN; /* Easier to check for this */
- else
- my_errno=errno;
-
- if (MyFlags & MY_WME)
- {
- if (locktype == F_UNLCK)
- my_error(EE_CANTUNLOCK,MYF(ME_BELL+ME_WAITTANG),errno);
- else
- my_error(EE_CANTLOCK,MYF(ME_BELL+ME_WAITTANG),errno);
- }
- DBUG_PRINT("error",("errno: %d",errno));
- DBUG_RETURN(-1);
-}
-#endif
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 35d6137789d..ddc5c17ba4b 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -126,14 +126,12 @@ extern "C" { // Because of SCO 3.2V4.2
#include <my_net.h>
#if !defined(__WIN__)
-# ifndef __NETWARE__
#include <sys/resource.h>
-# endif /* __NETWARE__ */
#ifdef HAVE_SYS_UN_H
-# include <sys/un.h>
+#include <sys/un.h>
#endif
#ifdef HAVE_SELECT_H
-# include <select.h>
+#include <select.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
@@ -164,45 +162,6 @@ extern int memcntl(caddr_t, size_t, int, caddr_t, int, int);
#endif /* __sun__ ... */
#endif /* HAVE_SOLARIS_LARGE_PAGES */
-#ifdef __NETWARE__
-#define zVOLSTATE_ACTIVE 6
-#define zVOLSTATE_DEACTIVE 2
-#define zVOLSTATE_MAINTENANCE 3
-
-#undef __event_h__
-#include <../include/event.h>
-/*
- This #undef exists here because both libc of NetWare and MySQL have
- files named event.h which causes compilation errors.
-*/
-
-#include <nks/netware.h>
-#include <nks/vm.h>
-#include <library.h>
-#include <monitor.h>
-#include <zOmni.h> //For NEB
-#include <neb.h> //For NEB
-#include <nebpub.h> //For NEB
-#include <zEvent.h> //For NSS event structures
-#include <zPublics.h>
-
-static void *neb_consumer_id= NULL; //For storing NEB consumer id
-static char datavolname[256]= {0};
-static VolumeID_t datavolid;
-static event_handle_t eh;
-static Report_t ref;
-static void *refneb= NULL;
-my_bool event_flag= FALSE;
-static int volumeid= -1;
-
- /* NEB event callback */
-unsigned long neb_event_callback(struct EventBlock *eblock);
-static void registerwithneb();
-static void getvolumename();
-static void getvolumeID(BYTE *volumeName);
-#endif /* __NETWARE__ */
-
-
#ifdef _AIX41
int initgroups(const char *,unsigned int);
#endif
@@ -1031,7 +990,7 @@ static void close_connections(void)
flush_thread_cache();
/* kill connection thread */
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
DBUG_PRINT("quit", ("waiting for select thread: 0x%lx",
(ulong) select_thread));
mysql_mutex_lock(&LOCK_thread_count);
@@ -1209,14 +1168,6 @@ static void close_server_sock()
ip_sock=INVALID_SOCKET;
DBUG_PRINT("info",("calling shutdown on TCP/IP socket"));
(void) shutdown(tmp_sock, SHUT_RDWR);
-#if defined(__NETWARE__)
- /*
- The following code is disabled for normal systems as it causes MySQL
- to hang on AIX 4.3 during shutdown
- */
- DBUG_PRINT("info",("calling closesocket on TCP/IP socket"));
- (void) closesocket(tmp_sock);
-#endif
}
tmp_sock=unix_sock;
if (tmp_sock != INVALID_SOCKET)
@@ -1224,14 +1175,6 @@ static void close_server_sock()
unix_sock=INVALID_SOCKET;
DBUG_PRINT("info",("calling shutdown on unix socket"));
(void) shutdown(tmp_sock, SHUT_RDWR);
-#if defined(__NETWARE__)
- /*
- The following code is disabled for normal systems as it may cause MySQL
- to hang on AIX 4.3 during shutdown
- */
- DBUG_PRINT("info",("calling closesocket on unix/IP socket"));
- (void) closesocket(tmp_sock);
-#endif
(void) unlink(mysqld_unix_port);
}
DBUG_VOID_RETURN;
@@ -1300,10 +1243,7 @@ void kill_mysql(void)
or stop, we just want to kill the server.
*/
-#if defined(__NETWARE__)
-extern "C" void kill_server(int sig_ptr)
-#define RETURN_FROM_KILL_SERVER return
-#elif !defined(__WIN__)
+#if !defined(__WIN__)
static void *kill_server(void *sig_ptr)
#define RETURN_FROM_KILL_SERVER return 0
#else
@@ -1349,11 +1289,6 @@ static void __cdecl kill_server(int sig_ptr)
unireg_end();
/* purecov: begin deadcode */
-#ifdef __NETWARE__
- if (!event_flag)
- pthread_join(select_thread, NULL); // wait for main thread
-#endif /* __NETWARE__ */
-
DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
@@ -1370,7 +1305,7 @@ static void __cdecl kill_server(int sig_ptr)
}
-#if defined(USE_ONE_SIGNAL_HAND) || (defined(__NETWARE__) && defined(SIGNALS_DONT_BREAK_READ))
+#if defined(USE_ONE_SIGNAL_HAND)
pthread_handler_t kill_server_thread(void *arg __attribute__((unused)))
{
my_thread_init(); // Initialize new thread
@@ -1391,7 +1326,7 @@ extern "C" sig_handler print_signal_warning(int sig)
#ifdef DONT_REMEMBER_SIGNAL
my_sigset(sig,print_signal_warning); /* int. thread system calls */
#endif
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
if (sig == SIGALRM)
alarm(2); /* reschedule alarm */
#endif
@@ -1425,7 +1360,7 @@ void unireg_end(void)
{
clean_up(1);
my_thread_end();
-#if defined(SIGNALS_DONT_BREAK_READ) && !defined(__NETWARE__)
+#if defined(SIGNALS_DONT_BREAK_READ)
exit(0);
#else
pthread_exit(0); // Exit is in main thread
@@ -1579,7 +1514,6 @@ void clean_up(bool print_message)
*/
static void wait_for_signal_thread_to_end()
{
-#ifndef __NETWARE__
uint i;
/*
Wait up to 10 seconds for signal thread to die. We use this mainly to
@@ -1591,7 +1525,6 @@ static void wait_for_signal_thread_to_end()
break;
my_sleep(100); // Give it time to die
}
-#endif
}
@@ -1689,7 +1622,7 @@ static void set_ports()
static struct passwd *check_user(const char *user)
{
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
struct passwd *tmp_user_info;
uid_t user_id= geteuid();
@@ -1754,7 +1687,7 @@ err:
static void set_user(const char *user, struct passwd *user_info_arg)
{
/* purecov: begin tested */
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
DBUG_ASSERT(user_info_arg != 0);
#ifdef HAVE_INITGROUPS
/*
@@ -1784,7 +1717,7 @@ static void set_user(const char *user, struct passwd *user_info_arg)
static void set_effective_user(struct passwd *user_info_arg)
{
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
DBUG_ASSERT(user_info_arg != 0);
if (setregid((gid_t)-1, user_info_arg->pw_gid) == -1)
{
@@ -1803,7 +1736,7 @@ static void set_effective_user(struct passwd *user_info_arg)
/** Change root user if started with @c --chroot . */
static void set_root(const char *path)
{
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
if (chroot(path) == -1)
{
sql_perror("chroot");
@@ -2393,243 +2326,7 @@ static void start_signal_handler(void)
static void check_data_home(const char *path)
{}
-
-#elif defined(__NETWARE__)
-
-/// down server event callback.
-void mysql_down_server_cb(void *, void *)
-{
- event_flag= TRUE;
- kill_server(0);
-}
-
-
-/// destroy callback resources.
-void mysql_cb_destroy(void *)
-{
- UnRegisterEventNotification(eh); // cleanup down event notification
- NX_UNWRAP_INTERFACE(ref);
- /* Deregister NSS volume deactivation event */
- NX_UNWRAP_INTERFACE(refneb);
- if (neb_consumer_id)
- UnRegisterConsumer(neb_consumer_id, NULL);
-}
-
-
-/// initialize callbacks.
-void mysql_cb_init()
-{
- // register for down server event
- void *handle = getnlmhandle();
- rtag_t rt= AllocateResourceTag(handle, "MySQL Down Server Callback",
- EventSignature);
- NX_WRAP_INTERFACE((void *)mysql_down_server_cb, 2, (void **)&ref);
- eh= RegisterForEventNotification(rt, EVENT_PRE_DOWN_SERVER,
- EVENT_PRIORITY_APPLICATION,
- NULL, ref, NULL);
-
- /*
- Register for volume deactivation event
- Wrap the callback function, as it is called by non-LibC thread
- */
- (void *) NX_WRAP_INTERFACE(neb_event_callback, 1, &refneb);
- registerwithneb();
-
- NXVmRegisterExitHandler(mysql_cb_destroy, NULL); // clean-up
-}
-
-
-/** To get the name of the NetWare volume having MySQL data folder. */
-static void getvolumename()
-{
- char *p;
- /*
- We assume that data path is already set.
- If not it won't come here. Terminate after volume name
- */
- if ((p= strchr(mysql_real_data_home, ':')))
- strmake(datavolname, mysql_real_data_home,
- (uint) (p - mysql_real_data_home));
-}
-
-
-/**
- Registering with NEB for NSS Volume Deactivation event.
-*/
-
-static void registerwithneb()
-{
-
- ConsumerRegistrationInfo reg_info;
-
- /* Clear NEB registration structure */
- bzero((char*) &reg_info, sizeof(struct ConsumerRegistrationInfo));
-
- /* Fill the NEB consumer information structure */
- reg_info.CRIVersion= 1; // NEB version
- /* NEB Consumer name */
- reg_info.CRIConsumerName= (BYTE *) "MySQL Database Server";
- /* Event of interest */
- reg_info.CRIEventName= (BYTE *) "NSS.ChangeVolState.Enter";
- reg_info.CRIUserParameter= NULL; // Consumer Info
- reg_info.CRIEventFlags= 0; // Event flags
- /* Consumer NLM handle */
- reg_info.CRIOwnerID= (LoadDefinitionStructure *)getnlmhandle();
- reg_info.CRIConsumerESR= NULL; // No consumer ESR required
- reg_info.CRISecurityToken= 0; // No security token for the event
- reg_info.CRIConsumerFlags= 0; // SMP_ENABLED_BIT;
- reg_info.CRIFilterName= 0; // No event filtering
- reg_info.CRIFilterDataLength= 0; // No filtering data
- reg_info.CRIFilterData= 0; // No filtering data
- /* Callback function for the event */
- (void *)reg_info.CRIConsumerCallback= (void *) refneb;
- reg_info.CRIOrder= 0; // Event callback order
- reg_info.CRIConsumerType= CHECK_CONSUMER; // Consumer type
-
- /* Register for the event with NEB */
- if (RegisterConsumer(&reg_info))
- {
- consoleprintf("Failed to register for NSS Volume Deactivation event \n");
- return;
- }
- /* This ID is required for deregistration */
- neb_consumer_id= reg_info.CRIConsumerID;
-
- /* Get MySQL data volume name, stored in global variable datavolname */
- getvolumename();
-
- /*
- Get the NSS volume ID of the MySQL Data volume.
- Volume ID is stored in a global variable
- */
- getvolumeID((BYTE*) datavolname);
-}
-
-
-/**
- Callback for NSS Volume Deactivation event.
-*/
-
-ulong neb_event_callback(struct EventBlock *eblock)
-{
- EventChangeVolStateEnter_s *voldata;
- extern bool nw_panic;
-
- voldata= (EventChangeVolStateEnter_s *)eblock->EBEventData;
-
- /* Deactivation of a volume */
- if ((voldata->oldState == zVOLSTATE_ACTIVE &&
- voldata->newState == zVOLSTATE_DEACTIVE ||
- voldata->newState == zVOLSTATE_MAINTENANCE))
- {
- /*
- Ensure that we bring down MySQL server only for MySQL data
- volume deactivation
- */
- if (!memcmp(&voldata->volID, &datavolid, sizeof(VolumeID_t)))
- {
- consoleprintf("MySQL data volume is deactivated, shutting down MySQL Server \n");
- event_flag= TRUE;
- nw_panic = TRUE;
- event_flag= TRUE;
- kill_server(0);
- }
- }
- return 0;
-}
-
-
-#define ADMIN_VOL_PATH "_ADMIN:/Volumes/"
-
-/**
- Function to get NSS volume ID of the MySQL data.
-*/
-static void getvolumeID(BYTE *volumeName)
-{
- char path[zMAX_FULL_NAME];
- Key_t rootKey= 0, fileKey= 0;
- QUAD getInfoMask;
- zInfo_s info;
- STATUS status;
-
- /* Get the root key */
- if ((status= zRootKey(0, &rootKey)) != zOK)
- {
- consoleprintf("\nGetNSSVolumeProperties - Failed to get root key, status: %d\n.", (int) status);
- goto exit;
- }
-
- /*
- Get the file key. This is the key to the volume object in the
- NSS admin volumes directory.
- */
-
- strxmov(path, (const char *) ADMIN_VOL_PATH, (const char *) volumeName,
- NullS);
- if ((status= zOpen(rootKey, zNSS_TASK, zNSPACE_LONG|zMODE_UTF8,
- (BYTE *) path, zRR_READ_ACCESS, &fileKey)) != zOK)
- {
- consoleprintf("\nGetNSSVolumeProperties - Failed to get file, status: %d\n.", (int) status);
- goto exit;
- }
-
- getInfoMask= zGET_IDS | zGET_VOLUME_INFO ;
- if ((status= zGetInfo(fileKey, getInfoMask, sizeof(info),
- zINFO_VERSION_A, &info)) != zOK)
- {
- consoleprintf("\nGetNSSVolumeProperties - Failed in zGetInfo, status: %d\n.", (int) status);
- goto exit;
- }
-
- /* Copy the data to global variable */
- datavolid.timeLow= info.vol.volumeID.timeLow;
- datavolid.timeMid= info.vol.volumeID.timeMid;
- datavolid.timeHighAndVersion= info.vol.volumeID.timeHighAndVersion;
- datavolid.clockSeqHighAndReserved= info.vol.volumeID.clockSeqHighAndReserved;
- datavolid.clockSeqLow= info.vol.volumeID.clockSeqLow;
- /* This is guranteed to be 6-byte length (but sizeof() would be better) */
- memcpy(datavolid.node, info.vol.volumeID.node, (unsigned int) 6);
-
-exit:
- if (rootKey)
- zClose(rootKey);
- if (fileKey)
- zClose(fileKey);
-}
-
-
-static void init_signals(void)
-{
- int signals[] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGABRT};
-
- for (uint i=0 ; i < sizeof(signals)/sizeof(int) ; i++)
- signal(signals[i], kill_server);
- mysql_cb_init(); // initialize callbacks
-
-}
-
-
-static void start_signal_handler(void)
-{
- // Save vm id of this process
- if (!opt_bootstrap)
- create_pid_file();
- // no signal handler
-}
-
-
-/**
- Warn if the data is on a Traditional volume.
-
- @note
- Already done by mysqld_safe
-*/
-
-static void check_data_home(const char *path)
-{
-}
-
-#endif /*__WIN__ || __NETWARE */
+#endif /* __WIN__ */
#ifdef HAVE_LINUXTHREADS
#define UNSAFE_DEFAULT_LINUX_THREADS 200
@@ -2798,7 +2495,7 @@ bugs.\n");
#endif
}
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
#ifndef SA_RESETHAND
#define SA_RESETHAND 0
#endif
@@ -4322,10 +4019,6 @@ a file name for --log-bin-index option", opt_binlog_index_name);
mysql_bin_log.purge_logs_before_date(purge_time);
}
#endif
-#ifdef __NETWARE__
- /* Increasing stacksize of threads on NetWare */
- pthread_attr_setstacksize(&connection_attrib, NW_THD_STACKSIZE);
-#endif
if (opt_myisam_log)
(void) mi_log(1);
@@ -4714,10 +4407,6 @@ int mysqld_main(int argc, char **argv)
}
}
#endif
-#ifdef __NETWARE__
- /* Increasing stacksize of threads on NetWare */
- pthread_attr_setstacksize(&connection_attrib, NW_THD_STACKSIZE);
-#endif
(void) thr_setconcurrency(concurrency); // 10 by default
@@ -4795,9 +4484,9 @@ int mysqld_main(int argc, char **argv)
{
abort_loop=1;
select_thread_in_use=0;
-#ifndef __NETWARE__
+
(void) pthread_kill(signal_thread, MYSQL_KILL_SIGNAL);
-#endif /* __NETWARE__ */
+
if (!opt_bootstrap)
mysql_file_delete(key_file_pid, pidfile_name, MYF(MY_WME)); // Not needed anymore
@@ -5343,15 +5032,12 @@ static void create_new_thread(THD *thd)
inline void kill_broken_server()
{
/* hack to get around signals ignored in syscalls for problem OS's */
- if (
-#if !defined(__NETWARE__)
- unix_sock == INVALID_SOCKET ||
-#endif
+ if (unix_sock == INVALID_SOCKET ||
(!opt_disable_networking && ip_sock == INVALID_SOCKET))
{
select_thread_in_use = 0;
/* The following call will never return */
- kill_server(IF_NETWARE(MYSQL_KILL_SIGNAL, (void*) MYSQL_KILL_SIGNAL));
+ kill_server((void*) MYSQL_KILL_SIGNAL);
}
}
#define MAYBE_BROKEN_SYSCALL kill_broken_server();
@@ -5485,13 +5171,6 @@ void handle_connections_sockets()
size_socket length= sizeof(struct sockaddr_storage);
new_sock= accept(sock, (struct sockaddr *)(&cAddr),
&length);
-#ifdef __NETWARE__
- // TODO: temporary fix, waiting for TCP/IP fix - DEFECT000303149
- if ((new_sock == INVALID_SOCKET) && (socket_errno == EINVAL))
- {
- kill_server(SIGTERM);
- }
-#endif
if (new_sock != INVALID_SOCKET ||
(socket_errno != SOCKET_EINTR && socket_errno != SOCKET_EAGAIN))
break;
@@ -7147,23 +6826,21 @@ static int mysql_init_variables(void)
shared_memory_base_name= default_shared_memory_base_name;
#endif
-#if defined(__WIN__) || defined(__NETWARE__)
- /* Allow Win32 and NetWare users to move MySQL anywhere */
+#if defined(__WIN__)
+ /* Allow Win32 users to move MySQL anywhere */
{
char prg_dev[LIBLEN];
-#if defined __WIN__
- char executing_path_name[LIBLEN];
- if (!test_if_hard_path(my_progname))
- {
- // we don't want to use GetModuleFileName inside of my_path since
- // my_path is a generic path dereferencing function and here we care
- // only about the executing binary.
- GetModuleFileName(NULL, executing_path_name, sizeof(executing_path_name));
- my_path(prg_dev, executing_path_name, NULL);
- }
- else
-#endif
- my_path(prg_dev,my_progname,"mysql/bin");
+ char executing_path_name[LIBLEN];
+ if (!test_if_hard_path(my_progname))
+ {
+ // we don't want to use GetModuleFileName inside of my_path since
+ // my_path is a generic path dereferencing function and here we care
+ // only about the executing binary.
+ GetModuleFileName(NULL, executing_path_name, sizeof(executing_path_name));
+ my_path(prg_dev, executing_path_name, NULL);
+ }
+ else
+ my_path(prg_dev, my_progname, "mysql/bin");
strcat(prg_dev,"/../"); // Remove 'bin' to get base dir
cleanup_dirname(mysql_home,prg_dev);
}
@@ -7581,13 +7258,8 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
}
if (opt_disable_networking)
- {
-#if defined(__NETWARE__)
- sql_print_error("Can't start server: skip-networking option is currently not supported on NetWare");
- return 1;
-#endif
mysqld_port= 0;
- }
+
if (opt_skip_show_db)
opt_specialflag|= SPECIAL_SKIP_SHOW_DB;
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 83435740ead..6f0b7a817ca 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -44,9 +44,6 @@
#include <signal.h>
#include <errno.h>
#include "probes_mysql.h"
-#ifdef __NETWARE__
-#include <sys/select.h>
-#endif
#ifdef EMBEDDED_LIBRARY
#undef MYSQL_SERVER
diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h
index 8d00c984d14..54a207c8adf 100644
--- a/sql/sql_bitmap.h
+++ b/sql/sql_bitmap.h
@@ -102,16 +102,7 @@ template <> class Bitmap<64>
ulonglong map;
public:
Bitmap<64>() { }
-#if defined(__NETWARE__) || defined(__MWERKS__)
- /*
- Metwork compiler gives error on Bitmap<64>
- Changed to Bitmap, since in this case also it will proper construct
- this class
- */
- explicit Bitmap(uint prefix_to_set) { set_prefix(prefix_to_set); }
-#else
explicit Bitmap<64>(uint prefix_to_set) { set_prefix(prefix_to_set); }
-#endif
void init() { }
void init(uint prefix_to_set) { set_prefix(prefix_to_set); }
uint length() const { return 64; }
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index 05d20b386dd..003203b5466 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1072,10 +1072,6 @@ static void prepare_new_connection_state(THD* thd)
{
Security_context *sctx= thd->security_ctx;
-#ifdef __NETWARE__
- netware_reg_user(sctx->ip, sctx->user, "MySQL");
-#endif
-
if (thd->client_capabilities & CLIENT_COMPRESS)
thd->net.compress=1; // Use compression
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 9a5792407b1..cbde8b9c982 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -355,7 +355,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
(void) fn_format(name, ex->file_name, mysql_real_data_home, "",
MY_RELATIVE_PATH | MY_UNPACK_FILENAME |
MY_RETURN_REAL_PATH);
-#if !defined(__WIN__) && ! defined(__NETWARE__)
+#if !defined(__WIN__)
MY_STAT stat_info;
if (!mysql_file_stat(key_file_load, name, &stat_info, MYF(MY_WME)))
DBUG_RETURN(TRUE);
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index eafb20cf0a3..53b07371baa 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -1630,7 +1630,7 @@ static Sys_var_ulong Sys_thread_stack(
static Sys_var_charptr Sys_tmpdir(
"tmpdir", "Path for temporary files. Several paths may "
"be specified, separated by a "
-#if defined(__WIN__) || defined(__NETWARE__)
+#if defined(__WIN__)
"semicolon (;)"
#else
"colon (:)"
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 79f3b83553e..af8574c38f1 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -2551,7 +2551,6 @@ scan_tz_dir(char * name_end)
int
main(int argc, char **argv)
{
-#ifndef __NETWARE__
MY_INIT(argv[0]);
if (argc != 2 && argc != 3)
@@ -2610,10 +2609,6 @@ main(int argc, char **argv)
free_root(&tz_storage, MYF(0));
}
-#else
- fprintf(stderr, "This tool has not been ported to NetWare\n");
-#endif /* __NETWARE__ */
-
return 0;
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 6b0d68241ea..f5227add6f1 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -187,10 +187,6 @@ static ulong innobase_active_counter = 0;
static hash_table_t* innobase_open_tables;
-#ifdef __NETWARE__ /* some special cleanup for NetWare */
-bool nw_panic = FALSE;
-#endif
-
/** Allowed values of innodb_change_buffering */
static const char* innobase_change_buffering_values[IBUF_USE_COUNT] = {
"none", /* IBUF_USE_NONE */
@@ -2469,11 +2465,6 @@ innobase_end(
DBUG_ENTER("innobase_end");
DBUG_ASSERT(hton == innodb_hton_ptr);
-#ifdef __NETWARE__ /* some special cleanup for NetWare */
- if (nw_panic) {
- set_panic_flag_for_netware();
- }
-#endif
if (innodb_inited) {
srv_fast_shutdown = (ulint) innobase_fast_shutdown;
@@ -10794,14 +10785,8 @@ static MYSQL_SYSVAR_ULONG(purge_threads, srv_n_purge_threads,
static MYSQL_SYSVAR_ULONG(fast_shutdown, innobase_fast_shutdown,
PLUGIN_VAR_OPCMDARG,
"Speeds up the shutdown process of the InnoDB storage engine. Possible "
- "values are 0, 1 (faster)"
- /*
- NetWare can't close unclosed files, can't automatically kill remaining
- threads, etc, so on this OS we disable the crash-like InnoDB shutdown.
- */
- IF_NETWARE("", " or 2 (fastest - crash-like)")
- ".",
- NULL, NULL, 1, 0, IF_NETWARE(1,2), 0);
+ "values are 0, 1 (faster) or 2 (fastest - crash-like).",
+ NULL, NULL, 1, 0, 2, 0);
static MYSQL_SYSVAR_BOOL(file_per_table, srv_file_per_table,
PLUGIN_VAR_NOCMDARG,
diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h
index 9155e142758..197e361b2b1 100644
--- a/storage/innobase/include/os0file.h
+++ b/storage/innobase/include/os0file.h
@@ -383,8 +383,6 @@ os_io_init_simple(void);
/***********************************************************************//**
Creates a temporary file. This function is like tmpfile(3), but
the temporary file is created in the MySQL temporary directory.
-On Netware, this function is like tmpfile(3), because the C run-time
-library of Netware does not expose the delete-on-close flag.
@return temporary file handle, or NULL on error */
FILE*
@@ -1166,7 +1164,7 @@ os_file_get_status(
os_file_stat_t* stat_info); /*!< information of a file in a
directory */
-#if !defined(UNIV_HOTBACKUP) && !defined(__NETWARE__)
+#if !defined(UNIV_HOTBACKUP)
/*********************************************************************//**
Creates a temporary file that will be deleted on close.
This function is defined in ha_innodb.cc.
@@ -1175,7 +1173,7 @@ UNIV_INTERN
int
innobase_mysql_tmpfile(void);
/*========================*/
-#endif /* !UNIV_HOTBACKUP && !__NETWARE__ */
+#endif /* !UNIV_HOTBACKUP */
#if defined(LINUX_NATIVE_AIO)
diff --git a/storage/innobase/include/srv0start.h b/storage/innobase/include/srv0start.h
index 8abf15da9c1..796d2cade3b 100644
--- a/storage/innobase/include/srv0start.h
+++ b/storage/innobase/include/srv0start.h
@@ -91,10 +91,6 @@ extern ib_uint64_t srv_shutdown_lsn;
/** Log sequence number immediately after startup */
extern ib_uint64_t srv_start_lsn;
-#ifdef __NETWARE__
-void set_panic_flag_for_netware(void);
-#endif
-
#ifdef HAVE_DARWIN_THREADS
/** TRUE if the F_FULLFSYNC option is available */
extern ibool srv_have_fullfsync;
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 11cec113fc8..ea213486445 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -115,7 +115,7 @@ if we are compiling on Windows. */
/* Include <sys/stat.h> to get S_I... macros defined for os0file.c */
# include <sys/stat.h>
-# if !defined(__NETWARE__) && !defined(__WIN__)
+# if !defined(__WIN__)
# include <sys/mman.h> /* mmap() for os0proc.c */
# endif
diff --git a/storage/innobase/include/ut0dbg.h b/storage/innobase/include/ut0dbg.h
index 78b525c38ab..d7ec90db0fb 100644
--- a/storage/innobase/include/ut0dbg.h
+++ b/storage/innobase/include/ut0dbg.h
@@ -54,29 +54,18 @@ ut_dbg_assertion_failed(
const char* file, /*!< in: source file containing the assertion */
ulint line); /*!< in: line number of the assertion */
-#ifdef __NETWARE__
-/** Flag for ignoring further assertion failures. This is set to TRUE
-when on NetWare there happens an InnoDB assertion failure or other
-fatal error condition that requires an immediate shutdown. */
-extern ibool panic_shutdown;
-/* Abort the execution. */
-void ut_dbg_panic(void);
-# define UT_DBG_PANIC ut_dbg_panic()
-/* Stop threads in ut_a(). */
-# define UT_DBG_STOP do {} while (0) /* We do not do this on NetWare */
-#else /* __NETWARE__ */
-# if defined(__WIN__) || defined(__INTEL_COMPILER)
-# undef UT_DBG_USE_ABORT
-# elif defined(__GNUC__) && (__GNUC__ > 2)
-# define UT_DBG_USE_ABORT
-# endif
-
-# ifndef UT_DBG_USE_ABORT
+#if defined(__WIN__) || defined(__INTEL_COMPILER)
+# undef UT_DBG_USE_ABORT
+#elif defined(__GNUC__) && (__GNUC__ > 2)
+# define UT_DBG_USE_ABORT
+#endif
+
+#ifndef UT_DBG_USE_ABORT
/** A null pointer that will be dereferenced to trigger a memory trap */
extern ulint* ut_dbg_null_ptr;
-# endif
+#endif
-# if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
+#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
/** If this is set to TRUE by ut_dbg_assertion_failed(), all threads
will stop at the next ut_a() or ut_ad(). */
extern ibool ut_dbg_stop_threads;
@@ -89,24 +78,23 @@ ut_dbg_stop_thread(
/*===============*/
const char* file,
ulint line);
-# endif
+#endif
-# ifdef UT_DBG_USE_ABORT
+#ifdef UT_DBG_USE_ABORT
/** Abort the execution. */
-# define UT_DBG_PANIC abort()
+# define UT_DBG_PANIC abort()
/** Stop threads (null operation) */
-# define UT_DBG_STOP do {} while (0)
-# else /* UT_DBG_USE_ABORT */
+# define UT_DBG_STOP do {} while (0)
+#else /* UT_DBG_USE_ABORT */
/** Abort the execution. */
-# define UT_DBG_PANIC \
+# define UT_DBG_PANIC \
if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL
/** Stop threads in ut_a(). */
-# define UT_DBG_STOP do \
+# define UT_DBG_STOP do \
if (UNIV_UNLIKELY(ut_dbg_stop_threads)) { \
ut_dbg_stop_thread(__FILE__, (ulint) __LINE__); \
} while (0)
-# endif /* UT_DBG_USE_ABORT */
-#endif /* __NETWARE__ */
+#endif /* UT_DBG_USE_ABORT */
/** Abort execution if EXPR does not evaluate to nonzero.
@param EXPR assertion expression that should hold */
diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c
index c07f8f4bf95..7c502d616d3 100644
--- a/storage/innobase/os/os0file.c
+++ b/storage/innobase/os/os0file.c
@@ -623,7 +623,7 @@ os_file_handle_error_no_exit(
#undef USE_FILE_LOCK
#define USE_FILE_LOCK
-#if defined(UNIV_HOTBACKUP) || defined(__WIN__) || defined(__NETWARE__)
+#if defined(UNIV_HOTBACKUP) || defined(__WIN__)
/* InnoDB Hot Backup does not lock the data files.
* On Windows, mandatory locking is used.
*/
@@ -683,35 +683,27 @@ os_io_init_simple(void)
/***********************************************************************//**
Creates a temporary file. This function is like tmpfile(3), but
the temporary file is created in the MySQL temporary directory.
-On Netware, this function is like tmpfile(3), because the C run-time
-library of Netware does not expose the delete-on-close flag.
@return temporary file handle, or NULL on error */
UNIV_INTERN
FILE*
os_file_create_tmpfile(void)
/*========================*/
{
-#ifdef __NETWARE__
- FILE* file = tmpfile();
-#else /* __NETWARE__ */
FILE* file = NULL;
int fd = innobase_mysql_tmpfile();
if (fd >= 0) {
file = fdopen(fd, "w+b");
}
-#endif /* __NETWARE__ */
if (!file) {
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Error: unable to create temporary file;"
" errno: %d\n", errno);
-#ifndef __NETWARE__
if (fd >= 0) {
close(fd);
}
-#endif /* !__NETWARE__ */
}
return(file);
diff --git a/storage/innobase/os/os0proc.c b/storage/innobase/os/os0proc.c
index 48922886f23..0f56a608f38 100644
--- a/storage/innobase/os/os0proc.c
+++ b/storage/innobase/os/os0proc.c
@@ -145,7 +145,7 @@ skip:
os_fast_mutex_unlock(&ut_list_mutex);
UNIV_MEM_ALLOC(ptr, size);
}
-#elif defined __NETWARE__ || !defined OS_MAP_ANON
+#elif !defined OS_MAP_ANON
size = *n;
ptr = ut_malloc_low(size, TRUE, FALSE);
#else
@@ -213,7 +213,7 @@ os_mem_free_large(
os_fast_mutex_unlock(&ut_list_mutex);
UNIV_MEM_FREE(ptr, size);
}
-#elif defined __NETWARE__ || !defined OS_MAP_ANON
+#elif !defined OS_MAP_ANON
ut_free(ptr);
#else
if (munmap(ptr, size)) {
diff --git a/storage/innobase/os/os0thread.c b/storage/innobase/os/os0thread.c
index 78df66d7834..632199b56bc 100644
--- a/storage/innobase/os/os0thread.c
+++ b/storage/innobase/os/os0thread.c
@@ -163,16 +163,6 @@ os_thread_create(
exit(1);
}
#endif
-#ifdef __NETWARE__
- ret = pthread_attr_setstacksize(&attr,
- (size_t) NW_THD_STACKSIZE);
- if (ret) {
- fprintf(stderr,
- "InnoDB: Error: pthread_attr_setstacksize"
- " returned %d\n", ret);
- exit(1);
- }
-#endif
os_mutex_enter(os_sync_mutex);
os_thread_count++;
os_mutex_exit(os_sync_mutex);
@@ -275,8 +265,6 @@ os_thread_sleep(
{
#ifdef __WIN__
Sleep((DWORD) tm / 1000);
-#elif defined(__NETWARE__)
- delay(tm / 1000);
#else
struct timeval t;
diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
index 4a0ecc5154f..686ee6a4198 100644
--- a/storage/innobase/srv/srv0start.c
+++ b/storage/innobase/srv/srv0start.c
@@ -1231,14 +1231,6 @@ innobase_start_or_create_for_mysql(void)
maximum number of threads that can wait in the 'srv_conc array' for
their time to enter InnoDB. */
-#if defined(__NETWARE__)
-
- /* Create less event semaphores because Win 98/ME had
- difficulty creating 40000 event semaphores. Comment from
- Novell, Inc.: also, these just take a lot of memory on
- NetWare. */
- srv_max_n_threads = 1000;
-#else
if (srv_buf_pool_size >= 1000 * 1024 * 1024) {
/* If buffer pool is less than 1000 MB,
assume fewer threads. Also use only one
@@ -1255,7 +1247,7 @@ innobase_start_or_create_for_mysql(void)
especially in 64-bit
computers */
}
-#endif
+
err = srv_boot();
if (err != DB_SUCCESS) {
@@ -1932,9 +1924,6 @@ innobase_shutdown_for_mysql(void)
/*=============================*/
{
ulint i;
-#ifdef __NETWARE__
- extern ibool panic_shutdown;
-#endif
if (!srv_was_started) {
if (srv_is_being_started) {
ut_print_timestamp(stderr);
@@ -1963,10 +1952,7 @@ innobase_shutdown_for_mysql(void)
"InnoDB will do a crash recovery!\n");
}
-#ifdef __NETWARE__
- if (!panic_shutdown)
-#endif
- logs_empty_and_mark_files_at_shutdown();
+ logs_empty_and_mark_files_at_shutdown();
if (srv_conc_n_threads != 0) {
fprintf(stderr,
@@ -2133,12 +2119,4 @@ innobase_shutdown_for_mysql(void)
return((int) DB_SUCCESS);
}
-
-#ifdef __NETWARE__
-void set_panic_flag_for_netware()
-{
- extern ibool panic_shutdown;
- panic_shutdown = TRUE;
-}
-#endif /* __NETWARE__ */
#endif /* !UNIV_HOTBACKUP */
diff --git a/storage/innobase/ut/ut0dbg.c b/storage/innobase/ut/ut0dbg.c
index 4484e6c36de..e79217d5b86 100644
--- a/storage/innobase/ut/ut0dbg.c
+++ b/storage/innobase/ut/ut0dbg.c
@@ -37,12 +37,7 @@ UNIV_INTERN ulint ut_dbg_zero = 0;
will stop at the next ut_a() or ut_ad(). */
UNIV_INTERN ibool ut_dbg_stop_threads = FALSE;
#endif
-#ifdef __NETWARE__
-/** Flag for ignoring further assertion failures. This is set to TRUE
-when on NetWare there happens an InnoDB assertion failure or other
-fatal error condition that requires an immediate shutdown. */
-UNIV_INTERN ibool panic_shutdown = FALSE;
-#elif !defined(UT_DBG_USE_ABORT)
+#ifndef UT_DBG_USE_ABORT
/** A null pointer that will be dereferenced to trigger a memory trap */
UNIV_INTERN ulint* ut_dbg_null_ptr = NULL;
#endif
@@ -86,22 +81,7 @@ ut_dbg_assertion_failed(
#endif
}
-#ifdef __NETWARE__
-/*************************************************************//**
-Shut down MySQL/InnoDB after assertion failure. */
-UNIV_INTERN
-void
-ut_dbg_panic(void)
-/*==============*/
-{
- if (!panic_shutdown) {
- panic_shutdown = TRUE;
- innobase_shutdown_for_mysql();
- }
- exit(1);
-}
-#else /* __NETWARE__ */
-# if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
+#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
/*************************************************************//**
Stop a thread after assertion failure. */
UNIV_INTERN
@@ -117,8 +97,7 @@ ut_dbg_stop_thread(
os_thread_sleep(1000000000);
#endif /* !UNIV_HOTBACKUP */
}
-# endif
-#endif /* __NETWARE__ */
+#endif
#ifdef UNIV_COMPILE_TEST_FUNCS
diff --git a/storage/innobase/ut/ut0mem.c b/storage/innobase/ut/ut0mem.c
index f2baab67f09..53f15029e1b 100644
--- a/storage/innobase/ut/ut0mem.c
+++ b/storage/innobase/ut/ut0mem.c
@@ -179,9 +179,6 @@ retry:
/* Make an intentional seg fault so that we get a stack
trace */
- /* Intentional segfault on NetWare causes an abend. Avoid this
- by graceful exit handling in ut_a(). */
-#if (!defined __NETWARE__)
if (assert_on_error) {
ut_print_timestamp(stderr);
@@ -194,9 +191,6 @@ retry:
} else {
return(NULL);
}
-#else
- ut_a(0);
-#endif
}
if (set_to_zero) {
diff --git a/storage/myisam/mi_test3.c b/storage/myisam/mi_test3.c
index 7b16d6c05d6..bf36d8df7f4 100644
--- a/storage/myisam/mi_test3.c
+++ b/storage/myisam/mi_test3.c
@@ -15,8 +15,6 @@
/* Test av locking */
-#ifndef __NETWARE__
-
#include "myisam.h"
#include <sys/types.h>
#ifdef HAVE_SYS_WAIT_H
@@ -489,15 +487,3 @@ int test_update(MI_INFO *file,int id,int lock_type)
}
#include "mi_extrafunc.h"
-
-#else /* __NETWARE__ */
-
-#include <stdio.h>
-
-main()
-{
- fprintf(stderr,"this test has not been ported to NetWare\n");
- return 0;
-}
-
-#endif /* __NETWARE__ */
diff --git a/storage/myisam/myisam_ftdump.c b/storage/myisam/myisam_ftdump.c
index 74fa506a5b5..4718abc3481 100644
--- a/storage/myisam/myisam_ftdump.c
+++ b/storage/myisam/myisam_ftdump.c
@@ -253,18 +253,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
return 0;
}
-#include <help_start.h>
static void usage()
{
printf("Use: myisam_ftdump <table_name> <index_num>\n");
my_print_help(my_long_options);
my_print_variables(my_long_options);
- NETWARE_SET_SCREEN_MODE(1);
exit(1);
}
-#include <help_end.h>
static void complain(int val) /* Kinda assert :-) */
{
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index 0e32dc59d89..e1cedf6bc31 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -148,7 +148,7 @@ enum options_mc {
OPT_READ_BUFFER_SIZE, OPT_WRITE_BUFFER_SIZE, OPT_SORT_BUFFER_SIZE,
OPT_SORT_KEY_BLOCKS, OPT_DECODE_BITS, OPT_FT_MIN_WORD_LEN,
OPT_FT_MAX_WORD_LEN, OPT_FT_STOPWORD_FILE,
- OPT_MAX_RECORD_LENGTH, OPT_AUTO_CLOSE, OPT_STATS_METHOD
+ OPT_MAX_RECORD_LENGTH, OPT_STATS_METHOD
};
static struct my_option my_long_options[] =
@@ -156,10 +156,6 @@ static struct my_option my_long_options[] =
{"analyze", 'a',
"Analyze distribution of keys. Will make some joins in MySQL faster. You can check the calculated distribution.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef __NETWARE__
- {"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"block-search", 'b',
"No help available.",
0, 0, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -336,13 +332,10 @@ static struct my_option my_long_options[] =
};
-#include <help_start.h>
-
static void print_version(void)
{
printf("%s Ver 2.7 for %s at %s\n", my_progname, SYSTEM_TYPE,
MACHINE_TYPE);
- NETWARE_SET_SCREEN_MODE(1);
}
@@ -364,7 +357,7 @@ static void usage(void)
-?, --help Display this help and exit.\n\
-t, --tmpdir=path Path for temporary files. Multiple paths can be\n\
specified, separated by ");
-#if defined( __WIN__) || defined(__NETWARE__)
+#if defined( __WIN__)
printf("semicolon (;)");
#else
printf("colon (:)");
@@ -460,7 +453,6 @@ static void usage(void)
my_print_variables(my_long_options);
}
-#include <help_end.h>
const char *myisam_stats_method_names[] = {"nulls_unequal", "nulls_equal",
"nulls_ignored", NullS};
@@ -476,11 +468,6 @@ get_one_option(int optid,
char *argument)
{
switch (optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
case 'a':
if (argument == disabled_my_option)
check_param.testflag&= ~T_STATISTICS;
diff --git a/storage/myisam/myisamlog.c b/storage/myisam/myisamlog.c
index 1733d7140cd..d3da0eab22c 100644
--- a/storage/myisam/myisamlog.c
+++ b/storage/myisam/myisamlog.c
@@ -248,7 +248,6 @@ static void get_options(register int *argc, register char ***argv)
/* Fall through */
case 'I':
case '?':
-#include <help_start.h>
printf("%s Ver 1.4 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
puts("By Monty, for your professional use\n");
@@ -270,7 +269,6 @@ static void get_options(register int *argc, register char ***argv)
puts("If a recover is done all writes and all possibly updates and deletes is done\nand errors are only counted.");
puts("If one gives table names as arguments only these tables will be updated\n");
help=1;
-#include <help_end.h>
break;
default:
printf("illegal option: \"-%c\"\n",*pos);
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index d4997a2bcbb..9f25a6bc112 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -256,14 +256,10 @@ int main(int argc, char **argv)
#endif
}
-enum options_mp {OPT_CHARSETS_DIR_MP=256, OPT_AUTO_CLOSE};
+enum options_mp {OPT_CHARSETS_DIR_MP=256};
static struct my_option my_long_options[] =
{
-#ifdef __NETWARE__
- {"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"backup", 'b', "Make a backup of the table as table_name.OLD.",
&backup, &backup, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR_MP,
@@ -295,13 +291,11 @@ static struct my_option my_long_options[] =
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
-#include <help_start.h>
static void print_version(void)
{
printf("%s Ver 1.23 for %s on %s\n",
my_progname, SYSTEM_TYPE, MACHINE_TYPE);
- NETWARE_SET_SCREEN_MODE(1);
}
@@ -323,7 +317,6 @@ static void usage(void)
my_print_variables(my_long_options);
}
-#include <help_end.h>
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
@@ -332,11 +325,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
uint length;
switch(optid) {
-#ifdef __NETWARE__
- case OPT_AUTO_CLOSE:
- setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
- break;
-#endif
case 'f':
force_pack= 1;
tmpfile_createflag= O_RDWR | O_TRUNC;
diff --git a/storage/ndb/src/mgmclient/main.cpp b/storage/ndb/src/mgmclient/main.cpp
index fbd81c71700..980530953ad 100644
--- a/storage/ndb/src/mgmclient/main.cpp
+++ b/storage/ndb/src/mgmclient/main.cpp
@@ -20,7 +20,7 @@
extern "C" {
#if defined( __WIN__)
#include <conio.h>
-#elif !defined(__NETWARE__)
+#else
#include <readline/readline.h>
extern "C" int add_history(const char *command); /* From readline directory */
extern "C" int read_history(const char *command);
diff --git a/storage/ndb/src/mgmsrv/main.cpp b/storage/ndb/src/mgmsrv/main.cpp
index 16c560868ef..26198a44a23 100644
--- a/storage/ndb/src/mgmsrv/main.cpp
+++ b/storage/ndb/src/mgmsrv/main.cpp
@@ -48,7 +48,7 @@ const char *load_default_groups[]= { "mysql_cluster","ndb_mgmd",0 };
extern "C" {
#if defined( __WIN__)
#include <conio.h>
-#elif !defined(__NETWARE__)
+#else
#include <readline/readline.h>
extern "C" int add_history(const char *command); /* From readline directory */
#define HAVE_READLINE
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 6ff8c83dcf7..8a3d3d7425c 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -1385,19 +1385,6 @@ int my_mb_ctype_8bit(CHARSET_INFO *cs, int *ctype,
}
-#undef ULONGLONG_MAX
-/*
- Needed under MetroWerks Compiler, since MetroWerks compiler does not
- properly handle a constant expression containing a mod operator
-*/
-#if defined(__NETWARE__) && defined(__MWERKS__)
-static ulonglong ulonglong_max= ~(ulonglong) 0;
-#define ULONGLONG_MAX ulonglong_max
-#else
-#define ULONGLONG_MAX (~(ulonglong) 0)
-#endif /* __NETWARE__ && __MWERKS__ */
-
-
#define CUTOFF (ULONGLONG_MAX / 10)
#define CUTLIM (ULONGLONG_MAX % 10)
#define DIGITS_IN_ULONGLONG 20
diff --git a/strings/my_strtoll10.c b/strings/my_strtoll10.c
index 4f73b1f8e71..b9fc4b4be8e 100644
--- a/strings/my_strtoll10.c
+++ b/strings/my_strtoll10.c
@@ -17,17 +17,6 @@
#include <my_sys.h> /* Needed for MY_ERRNO_ERANGE */
#include <m_string.h>
-#undef ULONGLONG_MAX
-/*
- Needed under MetroWerks Compiler, since MetroWerks compiler does not
- properly handle a constant expression containing a mod operator
-*/
-#if defined(__NETWARE__) && defined(__MWERKS__)
-static ulonglong ulonglong_max= ~(ulonglong) 0;
-#define ULONGLONG_MAX ulonglong_max
-#else
-#define ULONGLONG_MAX (~(ulonglong) 0)
-#endif /* __NETWARE__ && __MWERKS__ */
#define MAX_NEGATIVE_NUMBER ((ulonglong) LL(0x8000000000000000))
#define INIT_CNT 9
#define LFACTOR ULL(1000000000)
diff --git a/vio/test-ssl.c b/vio/test-ssl.c
index 25a394a1ce0..1e846727d00 100644
--- a/vio/test-ssl.c
+++ b/vio/test-ssl.c
@@ -14,7 +14,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <my_global.h>
-#if defined(HAVE_OPENSSL) && !defined(__NETWARE__)
+#if defined(HAVE_OPENSSL)
#include <my_sys.h>
#include <m_string.h>
#include <m_ctype.h>
diff --git a/vio/viossl.c b/vio/viossl.c
index 0651fd8b7a3..79f358b047c 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -24,36 +24,6 @@
#ifdef HAVE_OPENSSL
-#ifdef __NETWARE__
-
-/* yaSSL already uses BSD sockets */
-#ifndef HAVE_YASSL
-
-/*
- The default OpenSSL implementation on NetWare uses WinSock.
- This code allows us to use the BSD sockets.
-*/
-
-static int SSL_set_fd_bsd(SSL *s, int fd)
-{
- int result= -1;
- BIO_METHOD *BIO_s_bsdsocket();
- BIO *bio;
-
- if ((bio= BIO_new(BIO_s_bsdsocket())))
- {
- result= BIO_set_fd(bio, fd, BIO_NOCLOSE);
- SSL_set_bio(s, bio, bio);
- }
- return result;
-}
-
-#define SSL_set_fd(A, B) SSL_set_fd_bsd((A), (B))
-
-#endif /* HAVE_YASSL */
-#endif /* __NETWARE__ */
-
-
static void
report_errors(SSL* ssl)
{
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 2a38bbdfd57..4971dec37fb 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -143,36 +143,6 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file,
}
-#ifdef __NETWARE__
-
-/* NetWare SSL cleanup */
-void netware_ssl_cleanup()
-{
- /* free memory from SSL_library_init() */
- EVP_cleanup();
-
-/* OpenSSL NetWare port specific functions */
-#ifndef HAVE_YASSL
-
- /* free global X509 method */
- X509_STORE_method_cleanup();
-
- /* free the thread_hash error table */
- ERR_free_state_table();
-#endif
-}
-
-
-/* NetWare SSL initialization */
-static void netware_ssl_init()
-{
- /* cleanup OpenSSL library */
- NXVmRegisterExitHandler(netware_ssl_cleanup, NULL);
-}
-
-#endif /* __NETWARE__ */
-
-
static void check_ssl_init()
{
if (!ssl_algorithms_added)
@@ -183,10 +153,6 @@ static void check_ssl_init()
}
-#ifdef __NETWARE__
- netware_ssl_init();
-#endif
-
if (!ssl_error_strings_loaded)
{
ssl_error_strings_loaded= TRUE;