MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:October 5 2007 4:18pm
Subject:bk commit into 5.0 tree (msvensson:1.2532) BUG#31398
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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, 2007-10-05 18:18:50+02:00, msvensson@shellback.(none) +1 -0
  Bug#31398 problems with mysql-test-run, part2
  Write .reject file to r/ if it's writable else use opt_logdir 

  client/mysqltest.c@stripped, 2007-10-05 18:18:47+02:00, msvensson@shellback.(none) +15 -4
    Write .reject file to r/ if it's writable else use opt_logdir 

diff -Nrup a/client/mysqltest.c b/client/mysqltest.c
--- a/client/mysqltest.c	2007-09-15 04:45:10 +02:00
+++ b/client/mysqltest.c	2007-10-05 18:18:47 +02:00
@@ -1580,10 +1580,21 @@ void check_result(DYNAMIC_STRING* ds)
       and then show the diff
     */
     char reject_file[FN_REFLEN];
-    str_to_file(fn_format(reject_file, result_file_name, opt_logdir, ".reject",
-                          *opt_logdir ? MY_REPLACE_DIR | MY_REPLACE_EXT :
-                          MY_REPLACE_EXT),
-                ds->str, ds->length);
+    dirname_part(reject_file, result_file_name);
+
+    if (access(reject_file, W_OK) == 0)
+    {
+      /* Result file directory is writable, save reject file there */
+      fn_format(reject_file, result_file_name, NULL,
+                ".reject", MY_REPLACE_EXT);
+    }
+    else
+    {
+      /* Put reject file in opt_logdir */
+      fn_format(reject_file, result_file_name, opt_logdir,
+                ".reject", MY_REPLACE_DIR | MY_REPLACE_EXT);
+    }
+    str_to_file(reject_file, ds->str, ds->length);
 
     dynstr_set(ds, NULL); /* Don't create a .log file */
 
Thread
bk commit into 5.0 tree (msvensson:1.2532) BUG#31398msvensson5 Oct