mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge with 4.0 to get Netware patches and fixes for libmysqld.dll
configure.in: Auto merged Build-tools/Do-compile: Auto merged client/mysql.cc: Auto merged client/mysqladmin.c: Auto merged client/mysqlcheck.c: Auto merged client/mysqldump.c: Auto merged client/mysqlimport.c: Auto merged client/mysqlshow.c: Auto merged client/mysqltest.c: Auto merged include/my_global.h: Auto merged include/thr_alarm.h: Auto merged innobase/include/trx0roll.h: Auto merged innobase/include/trx0trx.h: Auto merged innobase/que/que0que.c: Auto merged innobase/srv/srv0srv.c: Auto merged innobase/trx/trx0purge.c: Auto merged innobase/trx/trx0roll.c: Auto merged innobase/trx/trx0trx.c: Auto merged innobase/usr/usr0sess.c: Auto merged isam/isamchk.c: Auto merged myisam/myisam_ftdump.c: Auto merged myisam/myisamchk.c: Auto merged myisam/myisampack.c: Auto merged mysys/default.c: Auto merged mysys/my_getopt.c: Auto merged mysys/my_init.c: Auto merged mysys/my_pthread.c: Auto merged netware/Makefile.am: Auto merged netware/init_db.sql: Auto merged scripts/make_binary_distribution.sh: Auto merged tools/mysqlmanager.c: Auto merged VC++Files/dbug/dbug.dsp: Auto merged VC++Files/heap/heap.dsp: Auto merged VC++Files/isam/isam.dsp: Auto merged VC++Files/libmysql/libmysql.dsp: Auto merged VC++Files/myisam/myisam.dsp: Auto merged VC++Files/myisammrg/myisammrg.dsp: Auto merged VC++Files/mysys/mysys.dsp: Auto merged VC++Files/libmysqld/libmysqld.dsp: merge client/mysqlbinlog.cc: merge extra/perror.c: merge include/mysql_com.h: merge libmysqld/Makefile.am: merge netware/BUILD/mwenv: merge sql/mysqld.cc: merge
This commit is contained in:
@ -669,6 +669,10 @@ 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
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",
|
||||
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
|
||||
if (version)
|
||||
@ -681,8 +685,13 @@ and you are welcome to modify and redistribute it under the GPL license\n");
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
static my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
@ -916,6 +925,7 @@ static int read_lines(bool execute_commands)
|
||||
#ifdef __NETWARE__
|
||||
line=fgets(linebuffer, sizeof(linebuffer)-1, stdin);
|
||||
/* Remove the '\n' */
|
||||
if (line)
|
||||
{
|
||||
char *p = strrchr(line, '\n');
|
||||
if (p != NULL)
|
||||
@ -931,7 +941,11 @@ static int read_lines(bool execute_commands)
|
||||
line= readline(prompt);
|
||||
#endif /* defined( __WIN__) || defined(OS2) || defined(__NETWARE__) */
|
||||
|
||||
if (opt_outfile)
|
||||
/*
|
||||
When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS
|
||||
which may cause coredump.
|
||||
*/
|
||||
if (opt_outfile && line)
|
||||
fprintf(OUTFILE, "%s\n", line);
|
||||
}
|
||||
if (!line) // End of file
|
||||
@ -2384,10 +2398,8 @@ static int
|
||||
com_quit(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)))
|
||||
{
|
||||
#ifdef __NETWARE__
|
||||
// let the screen auto close on a normal shutdown
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
#endif
|
||||
/* let the screen auto close on a normal shutdown */
|
||||
NETWARE_SET_SCREEN_MODE(SCR_AUTOCLOSE_ON_EXIT);
|
||||
status.exit_status=0;
|
||||
return 1;
|
||||
}
|
||||
@ -2993,6 +3005,7 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
NETWARE_YIELD;
|
||||
va_start(args, fmt);
|
||||
(void) vfprintf(file, fmt, args);
|
||||
#ifdef OS2
|
||||
@ -3006,6 +3019,7 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
|
||||
|
||||
void tee_fputs(const char *s, FILE *file)
|
||||
{
|
||||
NETWARE_YIELD;
|
||||
fputs(s, file);
|
||||
#ifdef OS2
|
||||
fflush( file);
|
||||
@ -3017,6 +3031,7 @@ void tee_fputs(const char *s, FILE *file)
|
||||
|
||||
void tee_puts(const char *s, FILE *file)
|
||||
{
|
||||
NETWARE_YIELD;
|
||||
fputs(s, file);
|
||||
fputs("\n", file);
|
||||
#ifdef OS2
|
||||
|
Reference in New Issue
Block a user