Commit 07978008 authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-4.1-maint

into  shellback.(none):/home/msvensson/mysql/mysql-4.1-maint

parents 2d1215f4 bc7b0a2e
...@@ -1409,7 +1409,7 @@ int open_file(const char *name) ...@@ -1409,7 +1409,7 @@ int open_file(const char *name)
void do_source(struct st_command *command) void do_source(struct st_command *command)
{ {
DYNAMIC_STRING ds_filename; static DYNAMIC_STRING ds_filename;
const struct command_arg source_args[] = { const struct command_arg source_args[] = {
"filename", ARG_STRING, TRUE, &ds_filename, "File to source" "filename", ARG_STRING, TRUE, &ds_filename, "File to source"
}; };
...@@ -1697,7 +1697,7 @@ void do_system(struct st_command *command) ...@@ -1697,7 +1697,7 @@ void do_system(struct st_command *command)
void do_remove_file(struct st_command *command) void do_remove_file(struct st_command *command)
{ {
int error; int error;
DYNAMIC_STRING ds_filename; static DYNAMIC_STRING ds_filename;
const struct command_arg rm_args[] = { const struct command_arg rm_args[] = {
"filename", ARG_STRING, TRUE, &ds_filename, "File to delete" "filename", ARG_STRING, TRUE, &ds_filename, "File to delete"
}; };
...@@ -1730,8 +1730,8 @@ void do_remove_file(struct st_command *command) ...@@ -1730,8 +1730,8 @@ void do_remove_file(struct st_command *command)
void do_copy_file(struct st_command *command) void do_copy_file(struct st_command *command)
{ {
int error; int error;
DYNAMIC_STRING ds_from_file; static DYNAMIC_STRING ds_from_file;
DYNAMIC_STRING ds_to_file; static DYNAMIC_STRING ds_to_file;
const struct command_arg copy_file_args[] = { const struct command_arg copy_file_args[] = {
"from_file", ARG_STRING, TRUE, &ds_from_file, "Filename to copy from", "from_file", ARG_STRING, TRUE, &ds_from_file, "Filename to copy from",
"to_file", ARG_STRING, TRUE, &ds_to_file, "Filename to copy to" "to_file", ARG_STRING, TRUE, &ds_to_file, "Filename to copy to"
...@@ -1766,7 +1766,7 @@ void do_copy_file(struct st_command *command) ...@@ -1766,7 +1766,7 @@ void do_copy_file(struct st_command *command)
void do_file_exist(struct st_command *command) void do_file_exist(struct st_command *command)
{ {
int error; int error;
DYNAMIC_STRING ds_filename; static DYNAMIC_STRING ds_filename;
const struct command_arg file_exist_args[] = { const struct command_arg file_exist_args[] = {
"filename", ARG_STRING, TRUE, &ds_filename, "File to check if it exist" "filename", ARG_STRING, TRUE, &ds_filename, "File to check if it exist"
}; };
...@@ -1873,9 +1873,9 @@ void read_until_delimiter(DYNAMIC_STRING *ds, ...@@ -1873,9 +1873,9 @@ void read_until_delimiter(DYNAMIC_STRING *ds,
void do_write_file(struct st_command *command) void do_write_file(struct st_command *command)
{ {
DYNAMIC_STRING ds_content; static DYNAMIC_STRING ds_content;
DYNAMIC_STRING ds_filename; static DYNAMIC_STRING ds_filename;
DYNAMIC_STRING ds_delimiter; static DYNAMIC_STRING ds_delimiter;
const struct command_arg write_file_args[] = { const struct command_arg write_file_args[] = {
"filename", ARG_STRING, TRUE, &ds_filename, "File to write to", "filename", ARG_STRING, TRUE, &ds_filename, "File to write to",
"delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until" "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until"
...@@ -1927,8 +1927,8 @@ void do_perl(struct st_command *command) ...@@ -1927,8 +1927,8 @@ void do_perl(struct st_command *command)
int error; int error;
char buf[FN_REFLEN]; char buf[FN_REFLEN];
FILE *res_file; FILE *res_file;
DYNAMIC_STRING ds_script; static DYNAMIC_STRING ds_script;
DYNAMIC_STRING ds_delimiter; static DYNAMIC_STRING ds_delimiter;
const struct command_arg perl_args[] = { const struct command_arg perl_args[] = {
"delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until" "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until"
}; };
...@@ -2985,14 +2985,14 @@ void do_connect(struct st_command *command) ...@@ -2985,14 +2985,14 @@ void do_connect(struct st_command *command)
bool con_ssl= 0, con_compress= 0; bool con_ssl= 0, con_compress= 0;
char *ptr; char *ptr;
DYNAMIC_STRING ds_connection_name; static DYNAMIC_STRING ds_connection_name;
DYNAMIC_STRING ds_host; static DYNAMIC_STRING ds_host;
DYNAMIC_STRING ds_user; static DYNAMIC_STRING ds_user;
DYNAMIC_STRING ds_password; static DYNAMIC_STRING ds_password;
DYNAMIC_STRING ds_database; static DYNAMIC_STRING ds_database;
DYNAMIC_STRING ds_port; static DYNAMIC_STRING ds_port;
DYNAMIC_STRING ds_sock; static DYNAMIC_STRING ds_sock;
DYNAMIC_STRING ds_options; static DYNAMIC_STRING ds_options;
const struct command_arg connect_args[] = { const struct command_arg connect_args[] = {
"connection name", ARG_STRING, TRUE, &ds_connection_name, "connection name", ARG_STRING, TRUE, &ds_connection_name,
"Name of the connection", "Name of the connection",
......
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA # MA 02111-1307, USA
BUILT_SOURCES = mysql_version.h m_ctype.h my_config.h mysql_h.ic BUILT_SOURCES = mysql_version.h my_config.h abi_check
pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \
mysql.h mysql_com.h mysqld_error.h mysql_embed.h \ mysql.h mysql_com.h mysqld_error.h mysql_embed.h \
my_semaphore.h my_pthread.h my_no_pthread.h raid.h \ my_semaphore.h my_pthread.h my_no_pthread.h raid.h \
errmsg.h my_global.h my_net.h my_alloc.h \ errmsg.h my_global.h my_net.h my_alloc.h \
my_getopt.h sslopt-longopts.h my_dir.h typelib.h \ my_getopt.h sslopt-longopts.h my_dir.h typelib.h \
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \ sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
sql_state.h mysql_time.h $(BUILT_SOURCES) sql_state.h mysql_time.h m_ctype.h $(BUILT_SOURCES)
noinst_HEADERS = config-win.h config-os2.h config-netware.h \ noinst_HEADERS = config-win.h config-os2.h config-netware.h \
nisam.h heap.h merge.h my_bitmap.h\ nisam.h heap.h merge.h my_bitmap.h\
myisam.h myisampack.h myisammrg.h ft_global.h\ myisam.h myisampack.h myisammrg.h ft_global.h\
...@@ -32,7 +32,8 @@ noinst_HEADERS = config-win.h config-os2.h config-netware.h \ ...@@ -32,7 +32,8 @@ noinst_HEADERS = config-win.h config-os2.h config-netware.h \
thr_lock.h t_ctype.h violite.h md5.h \ thr_lock.h t_ctype.h violite.h md5.h \
mysql_version.h.in my_handler.h my_time.h mysql_version.h.in my_handler.h my_time.h
CLEANFILES = mysql_h.ic CLEANFILES = abi_check
EXTRA_DIST = mysql_h.ic
# mysql_version.h are generated # mysql_version.h are generated
SUPERCLEANFILES = mysql_version.h my_config.h $(CLEANFILES) SUPERCLEANFILES = mysql_version.h my_config.h $(CLEANFILES)
...@@ -61,22 +62,17 @@ dist-hook: ...@@ -61,22 +62,17 @@ dist-hook:
# Rules for checking that ABI has not changed # Rules for checking that ABI has not changed
# #
# Create a icheck file for mysql.h # Create a icheck file and compare it to the reference
mysql_h.ic: mysql.h abi_check: mysql.h mysql_version.h mysql_com.h mysql_time.h my_list.h \
@set -x; \ my_alloc.h typelib.h
@set -ex; \
if [ @ICHECK@ != no ] ; then \ if [ @ICHECK@ != no ] ; then \
@ICHECK@ --canonify -o $@ mysql.h; \ @ICHECK@ --canonify --skip-from-re /usr/ -o $@.ic mysql.h; \
fi; @ICHECK@ --compare mysql_h.ic $@.ic; \
# Compare the icheck file to the reference
check_abi: mysql_h.ic
@set -x; \
if [ @ICHECK@ != no ] ; then \
@ICHECK@ --compare mysql_h.ic mysql_h_abi.ic; \
fi; \ fi; \
touch check_abi; touch abi_check;
all: check_abi all: abi_check
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
......
...@@ -37,18 +37,16 @@ sub mtr_get_pid_from_file ($) { ...@@ -37,18 +37,16 @@ sub mtr_get_pid_from_file ($) {
open(FILE, '<', $pid_file_path) open(FILE, '<', $pid_file_path)
or mtr_error("can't open file \"$pid_file_path\": $!"); or mtr_error("can't open file \"$pid_file_path\": $!");
# Read pid number from file
my $pid= <FILE>; my $pid= <FILE>;
chomp($pid) if defined $pid;
close FILE; close FILE;
return $pid if defined $pid && $pid ne ''; return $pid if $pid=~ /^(\d+)/;
mtr_debug("Pid file '$pid_file_path' is empty. " . mtr_debug("Pid file '$pid_file_path' does not yet contain pid number.\n" .
"Sleeping $timeout second(s)..."); "Sleeping $timeout second(s) more...");
sleep(1); sleep($timeout);
} }
mtr_error("Pid file '$pid_file_path' is corrupted. " . mtr_error("Pid file '$pid_file_path' is corrupted. " .
......
...@@ -438,6 +438,10 @@ sub mtr_kill_leftovers () { ...@@ -438,6 +438,10 @@ sub mtr_kill_leftovers () {
while ( my $elem= readdir(RUNDIR) ) while ( my $elem= readdir(RUNDIR) )
{ {
# Only read pid from files that end with .pid
if ( $elem =~ /.*[.]pid$/)
{
my $pidfile= "$rundir/$elem"; my $pidfile= "$rundir/$elem";
if ( -f $pidfile ) if ( -f $pidfile )
...@@ -459,6 +463,12 @@ sub mtr_kill_leftovers () { ...@@ -459,6 +463,12 @@ sub mtr_kill_leftovers () {
} }
} }
} }
else
{
mtr_warning("Found non pid file $elem in $rundir");
next;
}
}
closedir(RUNDIR); closedir(RUNDIR);
if ( @pids ) if ( @pids )
......
...@@ -1801,14 +1801,16 @@ sub environment_setup () { ...@@ -1801,14 +1801,16 @@ sub environment_setup () {
# ---------------------------------------------------- # ----------------------------------------------------
# Setup env so childs can execute mysql_fix_system_tables # Setup env so childs can execute mysql_fix_system_tables
# ---------------------------------------------------- # ----------------------------------------------------
if ( ! $glob_win32 )
{
my $cmdline_mysql_fix_system_tables= my $cmdline_mysql_fix_system_tables=
"$exe_mysql_fix_system_tables --no-defaults --host=localhost " . "$exe_mysql_fix_system_tables --no-defaults --host=localhost " .
"--user=root --password= " . "--user=root --password= " .
"--basedir=$glob_basedir --bindir=$path_client_bindir --verbose " . "--basedir=$glob_basedir --bindir=$path_client_bindir --verbose " .
"--port=$master->[0]->{'port'} " . "--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'}"; "--socket=$master->[0]->{'path_sock'}";
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables; $ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
}
# ---------------------------------------------------- # ----------------------------------------------------
# Setup env so childs can execute my_print_defaults # Setup env so childs can execute my_print_defaults
......
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