Commit b941ef86 authored by msvensson@pilot.blaudden's avatar msvensson@pilot.blaudden

Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint

into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
parents f5245757 7ddc3375
...@@ -250,6 +250,7 @@ static int run_command(char* cmd, ...@@ -250,6 +250,7 @@ static int run_command(char* cmd,
{ {
char buf[512]= {0}; char buf[512]= {0};
FILE *res_file; FILE *res_file;
int error;
if (!(res_file= popen(cmd, "r"))) if (!(res_file= popen(cmd, "r")))
die("popen(\"%s\", \"r\") failed", cmd); die("popen(\"%s\", \"r\") failed", cmd);
...@@ -269,7 +270,8 @@ static int run_command(char* cmd, ...@@ -269,7 +270,8 @@ static int run_command(char* cmd,
} }
} }
return WEXITSTATUS(pclose(res_file)); error= pclose(res_file);
return WEXITSTATUS(error);
} }
...@@ -578,14 +580,20 @@ static void create_mysql_upgrade_info_file(void) ...@@ -578,14 +580,20 @@ static void create_mysql_upgrade_info_file(void)
return; return;
} }
/* Write new version to file, just print a message if it fails */ /* Write new version to file */
if (!fputs(MYSQL_SERVER_VERSION, out)) fputs(MYSQL_SERVER_VERSION, out);
my_fclose(out, MYF(0));
/*
Check if the upgrad_info_file was properly created/updated
It's not a fatal error -> just print a message if it fails
*/
if (!upgrade_already_done())
fprintf(stderr, fprintf(stderr,
"Could not write to the upgrade info file '%s' in " "Could not write to the upgrade info file '%s' in "
"the MySQL Servers datadir, errno: %d\n", "the MySQL Servers datadir, errno: %d\n",
upgrade_info_file, errno); upgrade_info_file, errno);
return;
my_fclose(out, MYF(0));
} }
......
...@@ -1099,6 +1099,13 @@ sub mtr_kill_processes ($) { ...@@ -1099,6 +1099,13 @@ sub mtr_kill_processes ($) {
foreach my $pid (@$pids) foreach my $pid (@$pids)
{ {
if ($pid <= 0)
{
mtr_warning("Trying to kill illegal pid: $pid");
next;
}
foreach my $sig (15, 9) foreach my $sig (15, 9)
{ {
last if mtr_im_kill_process([ $pid ], $sig, 10, 1); last if mtr_im_kill_process([ $pid ], $sig, 10, 1);
......
...@@ -176,6 +176,4 @@ ERROR at line 1: DELIMITER cannot contain a backslash character ...@@ -176,6 +176,4 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
ERROR at line 1: DELIMITER cannot contain a backslash character ERROR at line 1: DELIMITER cannot contain a backslash character
1 1
1 1
1
1
End of 5.0 tests End of 5.0 tests
...@@ -268,7 +268,10 @@ EOF ...@@ -268,7 +268,10 @@ EOF
# #
# bug #26851: Mysql Client --pager Buffer Overflow # bug #26851: Mysql Client --pager Buffer Overflow
# #
--exec $MYSQL --pager="540bytelengthstringxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -e "select 1" 2>&1
# allow error 7(invalid argument) since --pager does not always exist in mysql
--error 0,7
--exec $MYSQL --pager="540bytelengthstringxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -e "select 1" 2>&1
--echo End of 5.0 tests --echo End of 5.0 tests
...@@ -87,7 +87,7 @@ DBUG_PRINT("test", ("name: %s", str)); \ ...@@ -87,7 +87,7 @@ DBUG_PRINT("test", ("name: %s", str)); \
if (opt_silent < 2) \ if (opt_silent < 2) \
{ \ { \
fprintf(stdout, "\n\n#####################################\n"); \ fprintf(stdout, "\n\n#####################################\n"); \
fprintf(stdout, "%d of (%d/%d): %s", test_count++, iter_count, \ fprintf(stdout, "%u of (%u/%u): %s", test_count++, iter_count, \
opt_count, str); \ opt_count, str); \
fprintf(stdout, " \n#####################################\n"); \ fprintf(stdout, " \n#####################################\n"); \
} }
...@@ -103,7 +103,7 @@ if (!opt_silent) \ ...@@ -103,7 +103,7 @@ if (!opt_silent) \
static void print_error(const char *msg); static void print_error(const char *msg);
static void print_st_error(MYSQL_STMT *stmt, const char *msg); static void print_st_error(MYSQL_STMT *stmt, const char *msg);
static void client_disconnect(); static void client_disconnect(void);
/* /*
...@@ -122,7 +122,7 @@ static void client_disconnect(); ...@@ -122,7 +122,7 @@ static void client_disconnect();
#define DIE(expr) \ #define DIE(expr) \
die(__FILE__, __LINE__, #expr) die(__FILE__, __LINE__, #expr)
void die(const char *file, int line, const char *expr) static void die(const char *file, int line, const char *expr)
{ {
fflush(stdout); fflush(stdout);
fprintf(stderr, "%s:%d: check failed: '%s'\n", file, line, expr); fprintf(stderr, "%s:%d: check failed: '%s'\n", file, line, expr);
...@@ -256,7 +256,7 @@ static my_bool check_have_innodb(MYSQL *conn) ...@@ -256,7 +256,7 @@ static my_bool check_have_innodb(MYSQL *conn)
mysql_simple_prepare(): a variant without the 'length' parameter. mysql_simple_prepare(): a variant without the 'length' parameter.
*/ */
MYSQL_STMT *STDCALL static MYSQL_STMT *STDCALL
mysql_simple_prepare(MYSQL *mysql_arg, const char *query) mysql_simple_prepare(MYSQL *mysql_arg, const char *query)
{ {
MYSQL_STMT *stmt= mysql_stmt_init(mysql_arg); MYSQL_STMT *stmt= mysql_stmt_init(mysql_arg);
...@@ -472,7 +472,7 @@ static void my_print_result_metadata(MYSQL_RES *result) ...@@ -472,7 +472,7 @@ static void my_print_result_metadata(MYSQL_RES *result)
/* Process the result set */ /* Process the result set */
int my_process_result_set(MYSQL_RES *result) static int my_process_result_set(MYSQL_RES *result)
{ {
MYSQL_ROW row; MYSQL_ROW row;
MYSQL_FIELD *field; MYSQL_FIELD *field;
...@@ -528,7 +528,7 @@ int my_process_result_set(MYSQL_RES *result) ...@@ -528,7 +528,7 @@ int my_process_result_set(MYSQL_RES *result)
} }
int my_process_result(MYSQL *mysql_arg) static int my_process_result(MYSQL *mysql_arg)
{ {
MYSQL_RES *result; MYSQL_RES *result;
int row_count; int row_count;
...@@ -548,7 +548,7 @@ int my_process_result(MYSQL *mysql_arg) ...@@ -548,7 +548,7 @@ int my_process_result(MYSQL *mysql_arg)
#define MAX_RES_FIELDS 50 #define MAX_RES_FIELDS 50
#define MAX_FIELD_DATA_SIZE 255 #define MAX_FIELD_DATA_SIZE 255
int my_process_stmt_result(MYSQL_STMT *stmt) static int my_process_stmt_result(MYSQL_STMT *stmt)
{ {
int field_count; int field_count;
int row_count= 0; int row_count= 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