Commit 6f604246 authored by greg@gcw.ath.cx's avatar greg@gcw.ath.cx

mysql_test_run.c and associated files, with my initial changes and WAX's changes for Windows

parent 19efafcc
...@@ -22,6 +22,7 @@ carsten@tsort.bitbybit.dk ...@@ -22,6 +22,7 @@ carsten@tsort.bitbybit.dk
davida@isil.mysql.com davida@isil.mysql.com
gluh@gluh.(none) gluh@gluh.(none)
gluh@gluh.mysql.r18.ru gluh@gluh.mysql.r18.ru
greg@gcw.ath.cx
greg@mysql.com greg@mysql.com
guilhem@mysql.com guilhem@mysql.com
gweir@work.mysql.com gweir@work.mysql.com
......
# Copyright (c) 2002 Novell, Inc. All Rights Reserved. # Copyright (c) 2002 Novell, Inc. All Rights Reserved.
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -11,37 +11,37 @@ ...@@ -11,37 +11,37 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES= -I$(srcdir)/../include -I../include -I.. INCLUDES= -I$(srcdir)/../include -I../include -I..
bin_PROGRAMS= mysqld_safe mysql_install_db mysql_test_run libmysql bin_PROGRAMS= mysqld_safe mysql_install_db mysql_test_run libmysql
mysqld_safe_SOURCES= mysqld_safe.c my_manage.c mysqld_safe_SOURCES= mysqld_safe.c my_manage.c
mysql_install_db_SOURCES= mysql_install_db.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 mysql_test_run_SOURCES= mysql_test_run.c my_manage.c
libmysql_SOURCES= libmysqlmain.c libmysql_SOURCES= libmysqlmain.c
libmysql_LDADD= ../libmysql/.libs/libmysqlclient.a libmysql_LDADD= ../libmysql/.libs/libmysqlclient.a
netware_build_files = client/mysql.def client/mysqladmin.def \ netware_build_files = client/mysql.def client/mysqladmin.def \
client/mysqlbinlog.def client/mysqlcheck.def \ client/mysqlbinlog.def client/mysqlcheck.def \
client/mysqldump.def client/mysqlimport.def \ client/mysqldump.def client/mysqlimport.def \
client/mysqlshow.def client/mysqltest.def \ client/mysqlshow.def client/mysqltest.def \
extra/mysql_install.def extra/my_print_defaults.def \ extra/mysql_install.def extra/my_print_defaults.def \
extra/perror.def extra/replace.def \ extra/perror.def extra/replace.def \
extra/resolveip.def extra/comp_err.def \ extra/resolveip.def extra/comp_err.def \
isam/isamchk.def \ isam/isamchk.def \
isam/isamlog.def isam/pack_isam.def \ isam/isamlog.def isam/pack_isam.def \
libmysqld/libmysqld.def myisam/myisamchk.def \ libmysqld/libmysqld.def myisam/myisamchk.def \
myisam/myisamlog.def myisam/myisampack.def \ myisam/myisamlog.def myisam/myisampack.def \
sql/mysqld.def sql/mysqld.def
link_sources: link_sources:
set -x; \ set -x; \
for f in $(netware_build_files); do \ for f in $(netware_build_files); do \
rm -f $(srcdir)/../$$f; \ rm -f $(srcdir)/../$$f; \
org=`echo $$f | sed -e 's/.*\/\(.*\)/\1/g'`; \ org=`echo $$f | sed -e 's/.*\/\(.*\)/\1/g'`; \
@LN_CP_F@ $(srcdir)/$$org $(srcdir)/../$$f; \ @LN_CP_F@ $(srcdir)/$$org $(srcdir)/../$$f; \
done; done;
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
This diff is collapsed.
...@@ -26,17 +26,41 @@ ...@@ -26,17 +26,41 @@
******************************************************************************/ ******************************************************************************/
#include <stdlib.h> #include <stdlib.h>
#ifndef __WIN__
#include <unistd.h> #include <unistd.h>
#endif
/****************************************************************************** /******************************************************************************
macros 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 ARG_BUF 10
#define TRY_MAX 5 #define TRY_MAX 5
#ifdef __NETWARE__
#define strstr(A,B) strindex(A,B)
#endif
/****************************************************************************** /******************************************************************************
structures structures
...@@ -53,6 +77,8 @@ typedef struct ...@@ -53,6 +77,8 @@ typedef struct
} arg_list_t; } arg_list_t;
typedef int pid_t;
/****************************************************************************** /******************************************************************************
global variables global variables
...@@ -66,7 +92,7 @@ typedef struct ...@@ -66,7 +92,7 @@ typedef struct
******************************************************************************/ ******************************************************************************/
void init_args(arg_list_t *); void init_args(arg_list_t *);
void add_arg(arg_list_t *, char *, ...); void add_arg(arg_list_t *, const char *, ...);
void free_args(arg_list_t *); void free_args(arg_list_t *);
int sleep_until_file_exists(char *); int sleep_until_file_exists(char *);
...@@ -80,8 +106,12 @@ pid_t get_server_pid(char *); ...@@ -80,8 +106,12 @@ pid_t get_server_pid(char *);
void kill_server(pid_t pid); void kill_server(pid_t pid);
void del_tree(char *); void del_tree(char *);
int removef(char *, ...); int removef(const char *, ...);
void get_basedir(char *, char *); void get_basedir(char *, char *);
char mysqladmin_file[PATH_MAX];
#endif /* _MY_MANAGE */ #endif /* _MY_MANAGE */
This diff is collapsed.
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