Commit 97dbe8db authored by unknown's avatar unknown

Several fixes for Netware.


client/client_priv.h:
  Added option auto close for Netware.
client/mysql.cc:
  Added option auto close for Netware.
client/mysqladmin.c:
  Added option auto close for Netware.
client/mysqlbinlog.cc:
  Added option auto close for Netware.
client/mysqlcheck.c:
  Added option auto close for Netware.
client/mysqldump.c:
  Added option auto close for Netware.
client/mysqlimport.c:
  Added option auto close for Netware.
client/mysqlshow.c:
  Added option auto close for Netware.
client/mysqltest.c:
  Fixed help messages for Netware.
extra/my_print_defaults.c:
  Fixed help messages for Netware.
extra/perror.c:
  Fixed help messages for Netware.
extra/resolve_stack_dump.c:
  Fixed help messages for Netware.
include/help_end.h:
  Fixed help messages for Netware.
include/help_start.h:
  Fixed help messages for Netware.
isam/isamchk.c:
  Added auto close of window for Netware
isam/pack_isam.c:
  Added auto close of window for Netware
myisam/myisamchk.c:
  Added auto close of window for Netware
myisam/myisamlog.c:
  Added help for Netware.
myisam/myisampack.c:
  Added auto close for Netware.
netware/myisamchk.def:
  Scrollable screen patch.
netware/mysql.def:
  Scrollable screen patch.
netware/mysql_test_run.c:
  Fixed strindex for Netware.
netware/mysqladmin.def:
  Scrollable screen patch.
netware/mysqlbinlog.def:
  Scrollable screen patch.
netware/mysqlcheck.def:
  Scrollable screen patch.
netware/mysqld_safe.c:
  Removed debug message for Netware.
netware/mysqldump.def:
  Scrollable screen patch.
netware/mysqlimport.def:
  Scrollable screen patch.
netware/mysqlshow.def:
  Scrollable screen patch.
sql/mysqld.cc:
  Abnormal end patch when shutting down and volume not ready.
parent 4c76d94f
......@@ -39,4 +39,4 @@ enum options_client { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
OPT_DELETE_MASTER_LOGS,
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[] =
{
{"help", '?', "Display this help and exit.", 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
{"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.",
(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)),
char *argument)
{
switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case OPT_CHARSETS_DIR:
strmov(mysql_charsets_dir, argument);
charsets_dir = mysql_charsets_dir;
......
......@@ -106,6 +106,10 @@ static TYPELIB command_typelib=
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',
"Number of iterations to make. This works with -i (--sleep) only",
(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)),
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;
......
......@@ -400,6 +400,11 @@ Create_file event for file_id: %u\n",exv->file_id);
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
{"debug", '#', "Output debug log.", (gptr*) &default_dbug_option,
(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)),
{
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);
......@@ -857,7 +867,7 @@ typedef struct st_my_tmpdir
uint cur, max;
} MY_TMPDIR;
#if defined( __WIN__) || defined(OS2)
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
#define DELIM ';'
#else
#define DELIM ':'
......
......@@ -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.",
(gptr*) &opt_all_in_1, (gptr*) &opt_all_in_1, 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
{"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.",
(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)),
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;
......
......@@ -111,6 +111,10 @@ static struct my_option my_long_options[] =
{"allow-keywords", 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},
#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,
"Directory where character sets are", (gptr*) &charsets_dir,
(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)),
char *argument)
{
switch (optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case OPT_MASTER_DATA:
opt_master_data=1;
opt_first_slave=1;
......
......@@ -51,6 +51,10 @@ static longlong opt_ignore_lines= -1;
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,
"Directory where character sets are", (gptr*) &charsets_dir,
(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)),
char *argument)
{
switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case 'p':
if (argument)
{
......
......@@ -138,6 +138,10 @@ int main(int argc, char **argv)
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",
(gptr*) &charsets_dir, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0,
0, 0, 0, 0, 0},
......@@ -218,6 +222,11 @@ 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;
......
......@@ -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}
};
#include <help_start.h>
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,MTEST_VERSION,
......@@ -1977,6 +1980,8 @@ void usage()
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)),
......
......@@ -56,6 +56,9 @@ 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,
......@@ -70,6 +73,8 @@ static void usage(my_bool version)
printf("\nExample usage:\n%s --config-file=my client mysql\n", my_progname);
}
#include <help_end.h>
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
......
......@@ -101,12 +101,15 @@ 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,
SYSTEM_TYPE,MACHINE_TYPE);
}
static void usage(void)
{
print_version();
......@@ -118,6 +121,8 @@ 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)),
......
......@@ -65,12 +65,16 @@ 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,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
static void usage()
{
print_version();
......@@ -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");
}
#include <help_end.h>
static void die(const char* fmt, ...)
......
......@@ -2,5 +2,6 @@
#undef printf
#undef puts
#undef fputs
#undef fputc
#undef putchar
#endif
......@@ -4,4 +4,6 @@
#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
......@@ -97,7 +97,7 @@ typedef struct st_isam_sort_info {
enum ic_options {OPT_CHARSETS_DIR_IC=256, OPT_KEY_BUFFER_SIZE,
OPT_READ_BUFFER_SIZE, OPT_WRITE_BUFFER_SIZE,
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,
sort_buffer_length=0,sort_key_blocks=0,crc=0,unique_count=0;
......@@ -243,6 +243,10 @@ static struct my_option my_long_options[] =
{"analyze", 'a',
"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},
#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,
"Directory where character sets are", (gptr*) &charsets_dir,
(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)),
{
switch(optid) {
#ifdef __NETWARE__
case OPT_AUTO_CLOSE:
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
break;
#endif
case 'a':
testflag|= T_STATISTICS;
break;
......
......@@ -276,6 +276,8 @@ static struct my_option my_long_options[] =
};
#include <help_start.h>
static void print_version(void)
{
printf("%s Ver 5.10 for %s on %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
......@@ -299,6 +301,8 @@ 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)),
......
......@@ -149,7 +149,8 @@ enum options_mc {
OPT_CORRECT_CHECKSUM, OPT_KEY_BUFFER_SIZE, OPT_MYISAM_BLOCK_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_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[] =
......@@ -157,6 +158,10 @@ 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__
{"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',
"No help available.",
0, 0, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
......@@ -446,6 +451,11 @@ 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;
......
......@@ -251,6 +251,7 @@ 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");
......@@ -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 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);
......
......@@ -234,10 +234,14 @@ int main(int argc, char **argv)
#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[] =
{
#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",
(gptr*) &backup, (gptr*) &backup, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR_MP,
......@@ -305,6 +309,11 @@ 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;
......
......@@ -2,7 +2,7 @@
# MyISAM Check
#------------------------------------------------------------------------------
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."
DESCRIPTION "MySQL MyISAM Table Check Tool"
VERSION 4, 0
......
......@@ -2,7 +2,7 @@
# MySQL Client
#------------------------------------------------------------------------------
MODULE libc.nlm
SCREENNAME "MySQL Monitor"
SCREENNAME "MySQL Monitor[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Monitor"
VERSION 4, 0
......
......@@ -27,6 +27,10 @@
#include "my_manage.h"
#ifdef __NETWARE__
#define strindex(a,b) ((char*)strindex(a,b))
#endif
/******************************************************************************
macros
......
......@@ -2,7 +2,7 @@
# MySQL Admin
#------------------------------------------------------------------------------
MODULE libc.nlm
SCREENNAME "MySQL Admin"
SCREENNAME "MySQL Admin[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Admin Tool"
VERSION 4, 0
......
......@@ -2,7 +2,7 @@
# MySQL Binary Log
#------------------------------------------------------------------------------
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."
DESCRIPTION "MySQL Binary Log Dump Tool"
VERSION 4, 0
......
......@@ -2,7 +2,7 @@
# MySQL Client
#------------------------------------------------------------------------------
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."
DESCRIPTION "MySQL Check Tool"
VERSION 4, 0
......
......@@ -659,7 +659,6 @@ void mysql_start(int argc, char *argv[])
if(!strnicmp(argv[i], private_options[j], strlen(private_options[j])))
{
skip = TRUE;
consoleprintf("The argument skipped is %s\n",argv[i]);
break;
}
}
......@@ -667,7 +666,6 @@ void mysql_start(int argc, char *argv[])
if (!skip)
{
add_arg(&al, "%s", argv[i]);
consoleprintf("The final argument is %s\n",argv[i]);
}
}
// spawn
......
......@@ -2,7 +2,7 @@
# MySQL Admin
#------------------------------------------------------------------------------
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."
DESCRIPTION "MySQL Dump Tool"
VERSION 4, 0
......
......@@ -2,7 +2,7 @@
# MySQL Client
#------------------------------------------------------------------------------
MODULE libc.nlm
SCREENNAME "MySQL Import"
SCREENNAME "MySQL Import[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Import Tool"
VERSION 4, 0
......
......@@ -2,7 +2,7 @@
# MySQL Show
#------------------------------------------------------------------------------
MODULE libc.nlm
SCREENNAME "MySQL Show"
SCREENNAME "MySQL Show[scrollable]"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Show Tool"
VERSION 4, 0
......
......@@ -113,6 +113,10 @@ int deny_severity = LOG_WARNING;
#include <sys/mman.h>
#endif
#define zVOLSTATE_ACTIVE 6
#define zVOLSTATE_DEACTIVE 2
#define zVOLSTATE_MAINTENANCE 3
#ifdef __NETWARE__
#include <nks/netware.h>
#include <nks/vm.h>
......@@ -130,6 +134,7 @@ VolumeID_t datavolid;
event_handle_t eh;
Report_t ref;
void *refneb=NULL;
bool event_flag=FALSE;
int volumeid=-1;
/* NEB event callback */
......@@ -804,6 +809,7 @@ static void __cdecl kill_server(int sig_ptr)
unireg_end();
#ifdef __NETWARE__
if(!event_flag)
pthread_join(select_thread, NULL); // wait for main thread
#endif /* __NETWARE__ */
......@@ -1468,6 +1474,7 @@ static void check_data_home(const char *path)
// down server event callback
void mysql_down_server_cb(void *, void *)
{
event_flag = TRUE;
kill_server(0);
}
......@@ -1501,7 +1508,7 @@ void mysql_cb_init()
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);
(void *)NX_WRAP_INTERFACE(neb_event_callback, 1, &refneb);
registerwithneb();
NXVmRegisterExitHandler(mysql_cb_destroy, NULL); // clean-up
......@@ -1587,7 +1594,9 @@ ulong neb_event_callback(struct EventBlock *eblock)
voldata= (EventChangeVolStateEnter_s *)eblock->EBEventData;
/* 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
......@@ -1596,6 +1605,7 @@ ulong neb_event_callback(struct EventBlock *eblock)
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;
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