Commit 6e5abcaf authored by unknown's avatar unknown

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

into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint


Makefile.am:
  Auto merged
client/mysql_upgrade.c:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/r/mysql.result:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
parents 361649b9 09e6e661
......@@ -250,6 +250,7 @@ static int run_command(char* cmd,
{
char buf[512]= {0};
FILE *res_file;
int error;
if (!(res_file= popen(cmd, "r")))
die("popen(\"%s\", \"r\") failed", 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)
return;
}
/* Write new version to file, just print a message if it fails */
if (!fputs(MYSQL_SERVER_VERSION, out))
/* Write new version to file */
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,
"Could not write to the upgrade info file '%s' in "
"the MySQL Servers datadir, errno: %d\n",
upgrade_info_file, errno);
my_fclose(out, MYF(0));
return;
}
......
......@@ -1099,6 +1099,13 @@ sub mtr_kill_processes ($) {
foreach my $pid (@$pids)
{
if ($pid <= 0)
{
mtr_warning("Trying to kill illegal pid: $pid");
next;
}
foreach my $sig (15, 9)
{
last if mtr_im_kill_process([ $pid ], $sig, 10, 1);
......
......@@ -176,6 +176,4 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
ERROR at line 1: DELIMITER cannot contain a backslash character
1
1
1
1
End of 5.0 tests
......@@ -268,7 +268,10 @@ EOF
#
# bug #26851: Mysql Client --pager Buffer Overflow
#
--exec $MYSQL --pager="540bytelengthstringxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -e "select 1" > /dev/null 2>&1
--exec $MYSQL --character-sets-dir="540bytelengthstringxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -e "select 1" 2>&1
--echo End of 5.0 tests
......@@ -87,7 +87,7 @@ DBUG_PRINT("test", ("name: %s", str)); \
if (opt_silent < 2) \
{ \
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); \
fprintf(stdout, " \n#####################################\n"); \
}
......@@ -103,7 +103,7 @@ if (!opt_silent) \
static void print_error(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();
#define DIE(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);
fprintf(stderr, "%s:%d: check failed: '%s'\n", file, line, expr);
......@@ -256,7 +256,7 @@ static my_bool check_have_innodb(MYSQL *conn)
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_STMT *stmt= mysql_stmt_init(mysql_arg);
......@@ -472,7 +472,7 @@ static void my_print_result_metadata(MYSQL_RES *result)
/* 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_FIELD *field;
......@@ -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;
int row_count;
......@@ -548,7 +548,7 @@ int my_process_result(MYSQL *mysql_arg)
#define MAX_RES_FIELDS 50
#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 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