From edf668e8fa76fe4558c43d54308c6a0cad59e325 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 23 Oct 2006 13:32:20 +0200 Subject: [PATCH 1/4] Don't use the "4.1 vardir trick" on OS that does not have native symlink(i.e windows) --- mysql-test/mysql-test-run.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f429bac850d..c36a06f56ef 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -758,7 +758,8 @@ sub command_line_setup () { $opt_vardir= $default_vardir; } elsif ( $mysql_version_id < 50000 and - $opt_vardir ne $default_vardir ) + ! $glob_win32 and # No supported on platforms without native symlink + $opt_vardir ne $default_vardir) { # Version 4.1 and --vardir was specified # Only supported as a symlink from var/ From 13c55f3c1783d8820ad6f2c538a187b371b3017a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 23 Oct 2006 16:51:48 +0200 Subject: [PATCH 2/4] The vardir trick can only bge used on platforms with native symlinks - otherwise opt_vardir need to be set to default value. --- mysql-test/mysql-test-run.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index c36a06f56ef..84d84cf8f14 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -758,15 +758,19 @@ sub command_line_setup () { $opt_vardir= $default_vardir; } elsif ( $mysql_version_id < 50000 and - ! $glob_win32 and # No supported on platforms without native symlink $opt_vardir ne $default_vardir) { # Version 4.1 and --vardir was specified # Only supported as a symlink from var/ # by setting up $opt_mem that symlink will be created - $opt_mem= $opt_vardir; + if ( ! $glob_win32 ) + { + # Only platforms that have native symlinks can use the vardir trick + $opt_mem= $opt_vardir; + mtr_report("Using 4.1 vardir trick"); + } + $opt_vardir= $default_vardir; - mtr_report("Using 4.1 vardir trick"); } $path_vardir_trace= $opt_vardir; From f9ff7472a23d97cc7235b5396191b02aad37fc21 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 23 Oct 2006 20:36:44 +0200 Subject: [PATCH 3/4] Avoid matching the trailing carriage return when parsing the mysqld.spec file This fixes problem where --replace_result failed in rpl000015 because the MYSQL_TCP_PORT variable was "3306\r" mysql-test/mysql-test-run.pl: Avoid matching the trailing carriage return when parsing the mysqld.spec file --- mysql-test/mysql-test-run.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 84d84cf8f14..7f1f7a43b10 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1269,9 +1269,9 @@ sub collect_mysqld_features () { else { # Put variables into hash - if ( $line =~ /^([\S]+)[ \t]+(.*)$/ ) + if ( $line =~ /^([\S]+)[ \t]+(.*?)\r?$/ ) { - # print "$1=$2\n"; + # print "$1=\"$2\"\n"; $mysqld_variables{$1}= $2; } else From 7e1fcb649f9e2e7a113da14db8bd290c8dc97f66 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Oct 2006 13:34:10 +0200 Subject: [PATCH 4/4] Enable the ATTRIBUTE_FORMAT macros to check format of variable arg parameters --- client/mysqltest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 5bc132a874f..9f41586afae 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -398,13 +398,13 @@ TYPELIB command_typelib= {array_elements(command_names),"", DYNAMIC_STRING ds_res, ds_progress, ds_warning_messages; void die(const char *fmt, ...) - /* ATTRIBUTE_FORMAT(printf, 1, 2) */; + ATTRIBUTE_FORMAT(printf, 1, 2); void abort_not_supported_test(const char *fmt, ...) - /* ATTRIBUTE_FORMAT(printf, 1, 2) */; + ATTRIBUTE_FORMAT(printf, 1, 2); void verbose_msg(const char *fmt, ...) - /* ATTRIBUTE_FORMAT(printf, 1, 2) */; + ATTRIBUTE_FORMAT(printf, 1, 2); void warning_msg(const char *fmt, ...) - /* ATTRIBUTE_FORMAT(printf, 1, 2) */; + ATTRIBUTE_FORMAT(printf, 1, 2); VAR* var_from_env(const char *, const char *); VAR* var_init(VAR* v, const char *name, int name_len, const char *val,