Several fixes for Netware.

parent 9f72d504
...@@ -39,4 +39,4 @@ enum options_client { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, ...@@ -39,4 +39,4 @@ enum options_client { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE, OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
OPT_DELETE_MASTER_LOGS, OPT_DELETE_MASTER_LOGS,
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION, OPT_FRM, OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION, OPT_FRM,
OPT_HEXBLOB }; OPT_HEXBLOB, OPT_AUTO_CLOSE };
...@@ -441,6 +441,10 @@ static struct my_option my_long_options[] = ...@@ -441,6 +441,10 @@ static struct my_option my_long_options[] =
{ {
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
#ifdef __NETWARE__
{"auto-close", 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
{"auto-rehash", OPT_AUTO_REHASH, {"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. Disable with --disable-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. Disable with --disable-auto-rehash.",
(gptr*) &rehash, (gptr*) &rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, (gptr*) &rehash, (gptr*) &rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
...@@ -620,6 +624,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -620,6 +624,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument) char *argument)
{ {
switch(optid) { switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case OPT_CHARSETS_DIR: case OPT_CHARSETS_DIR:
strmov(mysql_charsets_dir, argument); strmov(mysql_charsets_dir, argument);
charsets_dir = mysql_charsets_dir; charsets_dir = mysql_charsets_dir;
......
...@@ -106,6 +106,10 @@ static TYPELIB command_typelib= ...@@ -106,6 +106,10 @@ static TYPELIB command_typelib=
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
#ifdef __NETWARE__
{"auto-close", 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
{"count", 'c', {"count", 'c',
"Number of iterations to make. This works with -i (--sleep) only", "Number of iterations to make. This works with -i (--sleep) only",
(gptr*) &nr_iterations, (gptr*) &nr_iterations, 0, GET_UINT, (gptr*) &nr_iterations, (gptr*) &nr_iterations, 0, GET_UINT,
...@@ -184,6 +188,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -184,6 +188,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int error = 0; int error = 0;
switch(optid) { switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case 'c': case 'c':
opt_count_iterations= 1; opt_count_iterations= 1;
break; break;
......
...@@ -400,6 +400,11 @@ Create_file event for file_id: %u\n",exv->file_id); ...@@ -400,6 +400,11 @@ Create_file event for file_id: %u\n",exv->file_id);
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
#ifdef __NETWARE__
{"auto-close", 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
#ifndef DBUG_OFF #ifndef DBUG_OFF
{"debug", '#', "Output debug log.", (gptr*) &default_dbug_option, {"debug", '#', "Output debug log.", (gptr*) &default_dbug_option,
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, (gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
...@@ -511,6 +516,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -511,6 +516,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
{ {
bool tty_password=0; bool tty_password=0;
switch (optid) { switch (optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
#ifndef DBUG_OFF #ifndef DBUG_OFF
case '#': case '#':
DBUG_PUSH(argument ? argument : default_dbug_option); DBUG_PUSH(argument ? argument : default_dbug_option);
...@@ -857,7 +867,7 @@ typedef struct st_my_tmpdir ...@@ -857,7 +867,7 @@ typedef struct st_my_tmpdir
uint cur, max; uint cur, max;
} MY_TMPDIR; } MY_TMPDIR;
#if defined( __WIN__) || defined(OS2) #if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
#define DELIM ';' #define DELIM ';'
#else #else
#define DELIM ':' #define DELIM ':'
......
...@@ -56,6 +56,10 @@ static struct my_option my_long_options[] = ...@@ -56,6 +56,10 @@ 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.", "Instead of issuing one query for each table, use one query per database, naming all tables in the database in a comma-separated list.",
(gptr*) &opt_all_in_1, (gptr*) &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0, (gptr*) &opt_all_in_1, (gptr*) &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
#ifdef __NETWARE__
{"auto-close", 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
{"auto-repair", OPT_AUTO_REPAIR, {"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.", "If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.",
(gptr*) &opt_auto_repair, (gptr*) &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0, (gptr*) &opt_auto_repair, (gptr*) &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
...@@ -203,6 +207,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -203,6 +207,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument) char *argument)
{ {
switch(optid) { switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case 'a': case 'a':
what_to_do = DO_ANALYZE; what_to_do = DO_ANALYZE;
break; break;
......
...@@ -111,6 +111,10 @@ static struct my_option my_long_options[] = ...@@ -111,6 +111,10 @@ static struct my_option my_long_options[] =
{"allow-keywords", OPT_KEYWORDS, {"allow-keywords", OPT_KEYWORDS,
"Allow creation of column names that are keywords.", (gptr*) &opt_keywords, "Allow creation of column names that are keywords.", (gptr*) &opt_keywords,
(gptr*) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (gptr*) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef __NETWARE__
{"auto-close", 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
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are", (gptr*) &charsets_dir, "Directory where character sets are", (gptr*) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -346,6 +350,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -346,6 +350,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument) char *argument)
{ {
switch (optid) { switch (optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case OPT_MASTER_DATA: case OPT_MASTER_DATA:
opt_master_data=1; opt_master_data=1;
opt_first_slave=1; opt_first_slave=1;
......
...@@ -51,6 +51,10 @@ static longlong opt_ignore_lines= -1; ...@@ -51,6 +51,10 @@ static longlong opt_ignore_lines= -1;
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
#ifdef __NETWARE__
{"auto-close", 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
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are", (gptr*) &charsets_dir, "Directory where character sets are", (gptr*) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -169,6 +173,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -169,6 +173,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument) char *argument)
{ {
switch(optid) { switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case 'p': case 'p':
if (argument) if (argument)
{ {
......
...@@ -138,6 +138,10 @@ int main(int argc, char **argv) ...@@ -138,6 +138,10 @@ int main(int argc, char **argv)
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
#ifdef __NETWARE__
{"auto-close", 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
{"character-sets-dir", 'c', "Directory where character sets are", {"character-sets-dir", 'c', "Directory where character sets are",
(gptr*) &charsets_dir, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, (gptr*) &charsets_dir, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
...@@ -218,6 +222,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -218,6 +222,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument) char *argument)
{ {
switch(optid) { switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case 'v': case 'v':
opt_verbose++; opt_verbose++;
break; break;
......
...@@ -1959,6 +1959,9 @@ static struct my_option my_long_options[] = ...@@ -1959,6 +1959,9 @@ static struct my_option my_long_options[] =
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 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) static void print_version(void)
{ {
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,MTEST_VERSION, printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,MTEST_VERSION,
...@@ -1977,6 +1980,8 @@ void usage() ...@@ -1977,6 +1980,8 @@ void usage()
my_print_variables(my_long_options); my_print_variables(my_long_options);
} }
#include <help_end.h>
static my_bool static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
......
...@@ -56,6 +56,9 @@ static struct my_option my_long_options[] = ...@@ -56,6 +56,9 @@ static struct my_option my_long_options[] =
}; };
#include <help_start.h>
static void usage(my_bool version) static void usage(my_bool version)
{ {
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
...@@ -70,6 +73,8 @@ static void usage(my_bool version) ...@@ -70,6 +73,8 @@ static void usage(my_bool version)
printf("\nExample usage:\n%s --config-file=my client mysql\n", my_progname); printf("\nExample usage:\n%s --config-file=my client mysql\n", my_progname);
} }
#include <help_end.h>
static my_bool static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
......
...@@ -101,12 +101,15 @@ static HA_ERRORS ha_errlist[]= ...@@ -101,12 +101,15 @@ static HA_ERRORS ha_errlist[]=
}; };
#include <help_start.h>
static void print_version(void) static void print_version(void)
{ {
printf("%s Ver %s, for %s (%s)\n",my_progname,PERROR_VERSION, printf("%s Ver %s, for %s (%s)\n",my_progname,PERROR_VERSION,
SYSTEM_TYPE,MACHINE_TYPE); SYSTEM_TYPE,MACHINE_TYPE);
} }
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
...@@ -118,6 +121,8 @@ static void usage(void) ...@@ -118,6 +121,8 @@ static void usage(void)
my_print_variables(my_long_options); my_print_variables(my_long_options);
} }
#include <help_end.h>
static my_bool static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
......
...@@ -65,12 +65,16 @@ static struct my_option my_long_options[] = ...@@ -65,12 +65,16 @@ static struct my_option my_long_options[] =
static void verify_sort(); static void verify_sort();
#include <help_start.h>
static void print_version(void) static void print_version(void)
{ {
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION, printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
} }
static void usage() static void usage()
{ {
print_version(); print_version();
...@@ -87,6 +91,7 @@ The numeric-dump-file should contain a numeric stack trace from mysqld.\n\ ...@@ -87,6 +91,7 @@ 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"); 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, ...) static void die(const char* fmt, ...)
......
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
#undef printf #undef printf
#undef puts #undef puts
#undef fputs #undef fputs
#undef fputc
#undef putchar #undef putchar
#endif #endif
...@@ -4,4 +4,6 @@ ...@@ -4,4 +4,6 @@
#define printf consoleprintf #define printf consoleprintf
#define puts(s) consoleprintf("%s\n",s) #define puts(s) consoleprintf("%s\n",s)
#define fputs(s,f) puts(s) #define fputs(s,f) puts(s)
#define fputc(s,f) consoleprintf("%c", s)
#define putchar(s) consoleprintf("%c", s)
#endif #endif
...@@ -97,7 +97,7 @@ typedef struct st_isam_sort_info { ...@@ -97,7 +97,7 @@ typedef struct st_isam_sort_info {
enum ic_options {OPT_CHARSETS_DIR_IC=256, OPT_KEY_BUFFER_SIZE, enum ic_options {OPT_CHARSETS_DIR_IC=256, OPT_KEY_BUFFER_SIZE,
OPT_READ_BUFFER_SIZE, OPT_WRITE_BUFFER_SIZE, OPT_READ_BUFFER_SIZE, OPT_WRITE_BUFFER_SIZE,
OPT_SORT_BUFFER_SIZE, OPT_SORT_KEY_BLOCKS, OPT_SORT_BUFFER_SIZE, OPT_SORT_KEY_BLOCKS,
OPT_DECODE_BITS}; OPT_DECODE_BITS, OPT_AUTO_CLOSE};
static ulong use_buffers=0,read_buffer_length=0,write_buffer_length=0, static ulong use_buffers=0,read_buffer_length=0,write_buffer_length=0,
sort_buffer_length=0,sort_key_blocks=0,crc=0,unique_count=0; sort_buffer_length=0,sort_key_blocks=0,crc=0,unique_count=0;
...@@ -243,6 +243,10 @@ static struct my_option my_long_options[] = ...@@ -243,6 +243,10 @@ static struct my_option my_long_options[] =
{"analyze", 'a', {"analyze", 'a',
"Analyze distribution of keys. Will make some joins in MySQL faster.", "Analyze distribution of keys. Will make some joins in MySQL faster.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef __NETWARE__
{"auto-close", 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
{"character-sets-dir", OPT_CHARSETS_DIR_IC, {"character-sets-dir", OPT_CHARSETS_DIR_IC,
"Directory where character sets are", (gptr*) &charsets_dir, "Directory where character sets are", (gptr*) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -591,6 +595,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -591,6 +595,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
{ {
switch(optid) { switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case 'a': case 'a':
testflag|= T_STATISTICS; testflag|= T_STATISTICS;
break; break;
......
...@@ -276,6 +276,8 @@ static struct my_option my_long_options[] = ...@@ -276,6 +276,8 @@ static struct my_option my_long_options[] =
}; };
#include <help_start.h>
static void print_version(void) static void print_version(void)
{ {
printf("%s Ver 5.10 for %s on %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE); printf("%s Ver 5.10 for %s on %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
...@@ -299,6 +301,8 @@ static void usage(void) ...@@ -299,6 +301,8 @@ static void usage(void)
my_print_variables(my_long_options); my_print_variables(my_long_options);
} }
#include <help_end.h>
static my_bool static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
......
...@@ -149,7 +149,8 @@ enum options_mc { ...@@ -149,7 +149,8 @@ enum options_mc {
OPT_CORRECT_CHECKSUM, OPT_KEY_BUFFER_SIZE, OPT_MYISAM_BLOCK_SIZE, OPT_CORRECT_CHECKSUM, OPT_KEY_BUFFER_SIZE, OPT_MYISAM_BLOCK_SIZE,
OPT_READ_BUFFER_SIZE, OPT_WRITE_BUFFER_SIZE, OPT_SORT_BUFFER_SIZE, 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_SORT_KEY_BLOCKS, OPT_DECODE_BITS, OPT_FT_MIN_WORD_LEN,
OPT_FT_MAX_WORD_LEN, OPT_FT_MAX_WORD_LEN_FOR_SORT, OPT_FT_STOPWORD_FILE OPT_FT_MAX_WORD_LEN, OPT_FT_MAX_WORD_LEN_FOR_SORT, OPT_FT_STOPWORD_FILE,
OPT_AUTO_CLOSE
}; };
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
...@@ -157,6 +158,10 @@ static struct my_option my_long_options[] = ...@@ -157,6 +158,10 @@ static struct my_option my_long_options[] =
{"analyze", 'a', {"analyze", 'a',
"Analyze distribution of keys. Will make some joins in MySQL faster. You can check the calculated distribution.", "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}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef __NETWARE__
{"auto-close", 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', {"block-search", 'b',
"No help available.", "No help available.",
0, 0, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -446,6 +451,11 @@ get_one_option(int optid, ...@@ -446,6 +451,11 @@ get_one_option(int optid,
char *argument) char *argument)
{ {
switch (optid) { switch (optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case 'a': case 'a':
if (argument == disabled_my_option) if (argument == disabled_my_option)
check_param.testflag&= ~T_STATISTICS; check_param.testflag&= ~T_STATISTICS;
......
...@@ -251,6 +251,7 @@ static void get_options(register int *argc, register char ***argv) ...@@ -251,6 +251,7 @@ static void get_options(register int *argc, register char ***argv)
/* Fall through */ /* Fall through */
case 'I': case 'I':
case '?': case '?':
#include <help_start.h>
printf("%s Ver 1.4 for %s at %s\n",my_progname,SYSTEM_TYPE, printf("%s Ver 1.4 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE); MACHINE_TYPE);
puts("By Monty, for your professional use\n"); puts("By Monty, for your professional use\n");
...@@ -272,6 +273,7 @@ static void get_options(register int *argc, register char ***argv) ...@@ -272,6 +273,7 @@ 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 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"); puts("If one gives table names as arguments only these tables will be updated\n");
help=1; help=1;
#include <help_end.h>
break; break;
default: default:
printf("illegal option: \"-%c\"\n",*pos); printf("illegal option: \"-%c\"\n",*pos);
......
...@@ -234,10 +234,14 @@ int main(int argc, char **argv) ...@@ -234,10 +234,14 @@ int main(int argc, char **argv)
#endif #endif
} }
enum options_mp {OPT_CHARSETS_DIR_MP=256}; enum options_mp {OPT_CHARSETS_DIR_MP=256, OPT_AUTO_CLOSE};
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
#ifdef __NETWARE__
{"auto-close", 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", 'b', "Make a backup of the table as table_name.OLD",
(gptr*) &backup, (gptr*) &backup, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (gptr*) &backup, (gptr*) &backup, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR_MP, {"character-sets-dir", OPT_CHARSETS_DIR_MP,
...@@ -305,6 +309,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -305,6 +309,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
uint length; uint length;
switch(optid) { switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case 'f': case 'f':
force_pack= 1; force_pack= 1;
tmpfile_createflag= O_RDWR | O_TRUNC; tmpfile_createflag= O_RDWR | O_TRUNC;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MyISAM Check # MyISAM Check
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL MyISAM Table Check Tool" SCREENNAME "MySQL MyISAM Table Check Tool[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Check Tool" DESCRIPTION "MySQL MyISAM Table Check Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Client # MySQL Client
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Monitor" SCREENNAME "MySQL Monitor[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Monitor" DESCRIPTION "MySQL Monitor"
VERSION 4, 0 VERSION 4, 0
......
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
#include "my_manage.h" #include "my_manage.h"
#ifdef __NETWARE__
#define strindex(a,b) ((char*)strindex(a,b))
#endif
/****************************************************************************** /******************************************************************************
macros macros
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Admin # MySQL Admin
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Admin" SCREENNAME "MySQL Admin[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Admin Tool" DESCRIPTION "MySQL Admin Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Binary Log # MySQL Binary Log
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Binary Log Dump Tool" SCREENNAME "MySQL Binary Log Dump Tool[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Binary Log Dump Tool" DESCRIPTION "MySQL Binary Log Dump Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Client # MySQL Client
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Check Tool" SCREENNAME "MySQL Check Tool[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Check Tool" DESCRIPTION "MySQL Check Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -659,7 +659,6 @@ void mysql_start(int argc, char *argv[]) ...@@ -659,7 +659,6 @@ void mysql_start(int argc, char *argv[])
if(!strnicmp(argv[i], private_options[j], strlen(private_options[j]))) if(!strnicmp(argv[i], private_options[j], strlen(private_options[j])))
{ {
skip = TRUE; skip = TRUE;
consoleprintf("The argument skipped is %s\n",argv[i]);
break; break;
} }
} }
...@@ -667,7 +666,6 @@ void mysql_start(int argc, char *argv[]) ...@@ -667,7 +666,6 @@ void mysql_start(int argc, char *argv[])
if (!skip) if (!skip)
{ {
add_arg(&al, "%s", argv[i]); add_arg(&al, "%s", argv[i]);
consoleprintf("The final argument is %s\n",argv[i]);
} }
} }
// spawn // spawn
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Admin # MySQL Admin
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Dump Tool" SCREENNAME "MySQL Dump Tool[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Dump Tool" DESCRIPTION "MySQL Dump Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Client # MySQL Client
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Import" SCREENNAME "MySQL Import[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Import Tool" DESCRIPTION "MySQL Import Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Show # MySQL Show
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Show" SCREENNAME "MySQL Show[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Show Tool" DESCRIPTION "MySQL Show Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -113,6 +113,10 @@ int deny_severity = LOG_WARNING; ...@@ -113,6 +113,10 @@ int deny_severity = LOG_WARNING;
#include <sys/mman.h> #include <sys/mman.h>
#endif #endif
#define zVOLSTATE_ACTIVE 6
#define zVOLSTATE_DEACTIVE 2
#define zVOLSTATE_MAINTENANCE 3
#ifdef __NETWARE__ #ifdef __NETWARE__
#include <nks/netware.h> #include <nks/netware.h>
#include <nks/vm.h> #include <nks/vm.h>
...@@ -130,6 +134,7 @@ VolumeID_t datavolid; ...@@ -130,6 +134,7 @@ VolumeID_t datavolid;
event_handle_t eh; event_handle_t eh;
Report_t ref; Report_t ref;
void *refneb=NULL; void *refneb=NULL;
bool event_flag=FALSE;
int volumeid=-1; int volumeid=-1;
/* NEB event callback */ /* NEB event callback */
...@@ -804,7 +809,8 @@ static void __cdecl kill_server(int sig_ptr) ...@@ -804,7 +809,8 @@ static void __cdecl kill_server(int sig_ptr)
unireg_end(); unireg_end();
#ifdef __NETWARE__ #ifdef __NETWARE__
pthread_join(select_thread, NULL); // wait for main thread if(!event_flag)
pthread_join(select_thread, NULL); // wait for main thread
#endif /* __NETWARE__ */ #endif /* __NETWARE__ */
pthread_exit(0); /* purecov: deadcode */ pthread_exit(0); /* purecov: deadcode */
...@@ -1468,6 +1474,7 @@ static void check_data_home(const char *path) ...@@ -1468,6 +1474,7 @@ static void check_data_home(const char *path)
// down server event callback // down server event callback
void mysql_down_server_cb(void *, void *) void mysql_down_server_cb(void *, void *)
{ {
event_flag = TRUE;
kill_server(0); kill_server(0);
} }
...@@ -1501,7 +1508,7 @@ void mysql_cb_init() ...@@ -1501,7 +1508,7 @@ void mysql_cb_init()
Register for volume deactivation event Register for volume deactivation event
Wrap the callback function, as it is called by non-LibC thread Wrap the callback function, as it is called by non-LibC thread
*/ */
(void)NX_WRAP_INTERFACE(neb_event_callback, 1, &refneb); (void *)NX_WRAP_INTERFACE(neb_event_callback, 1, &refneb);
registerwithneb(); registerwithneb();
NXVmRegisterExitHandler(mysql_cb_destroy, NULL); // clean-up NXVmRegisterExitHandler(mysql_cb_destroy, NULL); // clean-up
...@@ -1587,7 +1594,9 @@ ulong neb_event_callback(struct EventBlock *eblock) ...@@ -1587,7 +1594,9 @@ ulong neb_event_callback(struct EventBlock *eblock)
voldata= (EventChangeVolStateEnter_s *)eblock->EBEventData; voldata= (EventChangeVolStateEnter_s *)eblock->EBEventData;
/* Deactivation of a volume */ /* Deactivation of a volume */
if ((voldata->oldState == 6 && voldata->newState == 2)) if ((voldata->oldState == zVOLSTATE_ACTIVE &&
voldata->newState == zVOLSTATE_DEACTIVE ||
voldata->newState == zVOLSTATE_MAINTENANCE))
{ {
/* /*
Ensure that we bring down MySQL server only for MySQL data Ensure that we bring down MySQL server only for MySQL data
...@@ -1596,6 +1605,7 @@ ulong neb_event_callback(struct EventBlock *eblock) ...@@ -1596,6 +1605,7 @@ ulong neb_event_callback(struct EventBlock *eblock)
if (!memcmp(&voldata->volID, &datavolid, sizeof(VolumeID_t))) if (!memcmp(&voldata->volID, &datavolid, sizeof(VolumeID_t)))
{ {
consoleprintf("MySQL data volume is deactivated, shutting down MySQL Server \n"); consoleprintf("MySQL data volume is deactivated, shutting down MySQL Server \n");
event_flag= TRUE;
nw_panic = TRUE; nw_panic = TRUE;
kill_server(0); kill_server(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment