Applied a patch for Netware.

parent 7d1af16c
...@@ -2169,6 +2169,9 @@ static struct my_option my_long_options[] = ...@@ -2169,6 +2169,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,
...@@ -2187,6 +2190,8 @@ void usage() ...@@ -2187,6 +2190,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)),
......
...@@ -55,6 +55,9 @@ static struct my_option my_long_options[] = ...@@ -55,6 +55,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 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,
...@@ -69,6 +72,8 @@ static void usage(my_bool version) ...@@ -69,6 +72,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)),
......
...@@ -113,12 +113,15 @@ static HA_ERRORS ha_errlist[]= ...@@ -113,12 +113,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();
...@@ -130,6 +133,8 @@ static void usage(void) ...@@ -130,6 +133,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
...@@ -260,6 +260,8 @@ static struct my_option my_long_options[] = ...@@ -260,6 +260,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);
...@@ -283,6 +285,8 @@ static void usage(void) ...@@ -283,6 +285,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)),
......
...@@ -247,6 +247,7 @@ static void get_options(register int *argc, register char ***argv) ...@@ -247,6 +247,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");
...@@ -268,6 +269,7 @@ static void get_options(register int *argc, register char ***argv) ...@@ -268,6 +269,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);
......
...@@ -45,7 +45,7 @@ int my_rename(const char *from, const char *to, myf MyFlags) ...@@ -45,7 +45,7 @@ int my_rename(const char *from, const char *to, myf MyFlags)
} }
#endif #endif
#if defined(HAVE_RENAME) #if defined(HAVE_RENAME)
#ifdef __WIN__ #if defined(__WIN__) || defined(__NETWARE__)
/* /*
On windows we can't rename over an existing file: On windows we can't rename over an existing file:
Remove any conflicting files: Remove any conflicting files:
......
...@@ -171,15 +171,9 @@ do ...@@ -171,15 +171,9 @@ do
rm $file.org rm $file.org
done done
# create the libmysql.imp file in netware folder from libmysql/libmysql.def
# file
echo "generating llibmysql.imp file..."
awk 'BEGIN{x=0;} x==1 {print $1;next} /EXPORTS/{x=1}' libmysql/libmysql.def > netware/libmysql.imp
# create the libmysql.imp file in netware folder from libmysql/libmysql.def file # create the libmysql.imp file in netware folder from libmysql/libmysql.def file
echo "generating llibmysql.imp file..." echo "generating llibmysql.imp file..."
awk 'BEGIN{x=0;} x==1 {print $1;next} /EXPORTS/{x=1}' libmysql/libmysql.def > netware/libmysql.imp 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 # build linux tools
echo "compiling linux tools..." echo "compiling linux tools..."
......
...@@ -192,7 +192,7 @@ void install_db(char *datadir) ...@@ -192,7 +192,7 @@ void install_db(char *datadir)
char error[PATH_MAX]; char error[PATH_MAX];
// input file // input file
snprintf(input, PATH_MAX, "%s/bin/init_db.sql", base_dir); snprintf(input, PATH_MAX, "%s/bin/test_db.sql", base_dir);
snprintf(output, PATH_MAX, "%s/install.out", datadir); snprintf(output, PATH_MAX, "%s/install.out", datadir);
snprintf(error, PATH_MAX, "%s/install.err", datadir); snprintf(error, PATH_MAX, "%s/install.err", datadir);
...@@ -1160,7 +1160,8 @@ void setup(char *file) ...@@ -1160,7 +1160,8 @@ void setup(char *file)
setenv("MASTER_MYPORT", "9306", 1); setenv("MASTER_MYPORT", "9306", 1);
setenv("SLAVE_MYPORT", "9307", 1); setenv("SLAVE_MYPORT", "9307", 1);
setenv("MYSQL_TCP_PORT", "3306", 1); setenv("MYSQL_TCP_PORT", "3306", 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);
} }
/****************************************************************************** /******************************************************************************
......
...@@ -242,8 +242,12 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_ ...@@ -242,8 +242,12 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_
# Copy system dependent files # Copy system dependent files
# #
if [ $BASE_SYSTEM = "netware" ] ; then if [ $BASE_SYSTEM = "netware" ] ; then
cp ./netware/static_init_db.sql ./netware/init_db.sql echo "CREATE DATABASE mysql;" > $BASE/bin/init_db.sql
./scripts/fill_help_tables < ./Docs/manual.texi >> ./netware/init_db.sql echo "CREATE DATABASE test;" >> $BASE/bin/init_db.sql
sh ./scripts/mysql_create_system_tables.sh real "" "%" 0 >> $BASE/bin/init_db.sql
sh ./scripts/mysql_create_system_tables.sh test "" "%" 0 > $BASE/bin/test_db.sql
# cp ./netware/static_init_db.sql ./netware/init_db.sql
# ./scripts/fill_help_tables < ./Docs/manual.texi >> ./netware/init_db.sql
fi fi
# #
......
...@@ -147,6 +147,10 @@ int deny_severity = LOG_WARNING; ...@@ -147,6 +147,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/vm.h> #include <nks/vm.h>
#include <library.h> #include <library.h>
...@@ -1667,7 +1671,9 @@ ulong neb_event_callback(struct EventBlock *eblock) ...@@ -1667,7 +1671,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
......
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