List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:July 10 2006 10:38pm
Subject:bk commit into 5.0 tree (cmiller:1.2217) BUG#17667
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of cmiller. When cmiller does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-07-10 16:38:03-04:00, cmiller@zippy.(none) +2 -0
  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@stripped, 2006-07-10 16:38:01-04:00, cmiller@zippy.(none) +1
-0
    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@stripped, 2006-07-10 16:38:01-04:00, cmiller@zippy.(none) +13 -3
    Receive a new option, "vardir".
    
    Use the vardir option to find the binlog file in test_bug17667() .

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	cmiller
# Host:	zippy.(none)
# Root:	/home/cmiller/work/mysql/mysql-5.0-maint__pristine

--- 1.102/mysql-test/mysql-test-run.pl	2006-07-10 16:38:08 -04:00
+++ 1.103/mysql-test/mysql-test-run.pl	2006-07-10 16:38:08 -04:00
@@ -3069,6 +3069,7 @@
   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 )

--- 1.187/tests/mysql_client_test.c	2006-07-10 16:38:08 -04:00
+++ 1.188/tests/mysql_client_test.c	2006-07-10 16:38:08 -04:00
@@ -58,6 +58,7 @@
 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 @@
 
   struct buffer_and_length *statement_cursor;
   FILE *log_file;
+  char *master_log_filename;
 
   myheader("test_bug17667");
 
@@ -14861,7 +14863,13 @@
   }
 
   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 @@
     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 @@
   {"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},
Thread
bk commit into 5.0 tree (cmiller:1.2217) BUG#17667Chad MILLER10 Jul