From 34c086526ce0b1a694c445eadcc99d88441ae0b5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Apr 2006 19:43:19 -0700 Subject: [PATCH 1/4] Fix for bug #18979, bad RE in mysql-test-run.pl mysql-test/lib/mtr_cases.pl: Fixed the RE so that backtracking will not occur. --- mysql-test/lib/mtr_cases.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index d8f3e61bd11..ed0395abd9d 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -116,7 +116,7 @@ sub collect_test_cases ($) { while ( ) { chomp; - if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) + if ( /^\s*([^\s:]+)\s*:\s*(.*?)\s*$/ ) { $disabled{$1}= $2; } From 2664605c04ad7ccc5fc2977026cbd62f9d86f0cc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Apr 2006 19:57:50 -0700 Subject: [PATCH 2/4] Fix for bug #17353. scripts/mysqld_safe.sh: Moved core file changing command outside of root-user only conditional --- scripts/mysqld_safe.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index a584c384712..02a961dc3ec 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -321,10 +321,13 @@ then ulimit -n $open_files args="--open-files-limit=$open_files $args" fi - if test -n "$core_file_size" - then - ulimit -c $core_file_size - fi +fi + +# Try to set the core file size (even if we aren't root) because many systems +# don't specify a hard limit on core file size. +if test -n "$core_file_size" +then + ulimit -c $core_file_size fi # From 019e221ca1a8be892e736f87e2b64df47ed91656 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 10 Jul 2006 16:38:03 -0400 Subject: [PATCH 3/4] A patch to Bug#17667 didn't take into consideration that the vardir, which contains the server's binlog file, might be set to a different directory. This adds a new "vardir" parameter, which takes the name of the directory as a value, so that the test_bug17667() test can find the binlog. mysql-test/mysql-test-run.pl: Add the "vardir" to the options passed to "mysql_test_client", so we know where to find the binlog file. tests/mysql_client_test.c: Receive a new option, "vardir". Use the vardir option to find the binlog file in test_bug17667() . --- mysql-test/mysql-test-run.pl | 1 + tests/mysql_client_test.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 5226e6f80df..a3040127fcc 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3069,6 +3069,7 @@ sub run_mysqltest ($) { my $cmdline_mysql_client_test= "$exe_mysql_client_test --no-defaults --testcase --user=root --silent " . "--port=$master->[0]->{'path_myport'} " . + "--vardir=$opt_vardir " . "--socket=$master->[0]->{'path_mysock'}"; if ( $glob_use_embedded_server ) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 3876de58b0e..2e8a3c7f4e9 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -58,6 +58,7 @@ static unsigned int iter_count= 0; static my_bool have_innodb= FALSE; static const char *opt_basedir= "./"; +static const char *opt_vardir= "mysql-test/var"; static longlong opt_getopt_ll_test= 0; @@ -14850,6 +14851,7 @@ static void test_bug17667() struct buffer_and_length *statement_cursor; FILE *log_file; + char *master_log_filename; myheader("test_bug17667"); @@ -14861,7 +14863,13 @@ static void test_bug17667() } sleep(1); /* The server may need time to flush the data to the log. */ - log_file= fopen("var/log/master.log", "r"); + + master_log_filename = (char *) malloc(strlen(opt_vardir) + strlen("/log/master.log") + 1); + strcpy(master_log_filename, opt_vardir); + strcat(master_log_filename, "/log/master.log"); + log_file= fopen(master_log_filename, "r"); + free(master_log_filename); + if (log_file != NULL) { for (statement_cursor= statements; statement_cursor->buffer != NULL; @@ -14883,8 +14891,8 @@ static void test_bug17667() printf("success. All queries found intact in the log.\n"); } else { - fprintf(stderr, "Could not find the log file, var/log/master.log, so " - "test_bug17667 is \ninconclusive. Run test from the " + fprintf(stderr, "Could not find the log file, VARDIR/log/master.log, " + "so test_bug17667 \nis inconclusive. Run test from the " "mysql-test/mysql-test-run* program \nto set up the correct " "environment for this test.\n\n"); } @@ -14971,6 +14979,8 @@ static struct my_option client_test_long_options[] = {"user", 'u', "User for login if not current user", (char **) &opt_user, (char **) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #endif + {"vardir", 'v', "Data dir for tests.", (gptr*) &opt_vardir, + (gptr*) &opt_vardir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"getopt-ll-test", 'g', "Option for testing bug in getopt library", (char **) &opt_getopt_ll_test, (char **) &opt_getopt_ll_test, 0, GET_LL, REQUIRED_ARG, 0, 0, LONGLONG_MAX, 0, 0, 0}, From 4bfb28e22c81bd9e3086c170280746d9c3b7a7c2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Jul 2006 10:26:19 -0400 Subject: [PATCH 4/4] Bug#18470: Compile Failure: strings.s fails make with unknown pseudo-ops The bug is thqt we use some nonstandard assembly codes in our strings source, and some assemblers don't know what to do with them: Specifically, Sun's Solaris assembler and Apple's Darwin assembler balk at them. This patch, rather than trying to test for properties of the assembler, which Autoconf doesn't have any decent facilites for, instead tries to compile the code in question and disables assembly if it fails. There's still the problem of unportable assembly, but I'll leave that to someone who feels like rewriting and debugging it. configure.in: Actually try to compile the code in question, since a test for the CPU type is insufficient to determine whether our code will compile. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index b230b7f042e..b32426595ad 100644 --- a/configure.in +++ b/configure.in @@ -718,7 +718,7 @@ AC_ARG_ENABLE(assembler, AC_MSG_CHECKING(if we should use assembler functions) # For now we only support assembler on i386 and sparc systems -AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386") +AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $AS strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;)) AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc") AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9") AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")