List:Commits« Previous MessageNext Message »
From:Patrick Crews Date:December 18 2008 12:39pm
Subject:bzr commit into mysql-5.0-bugteam branch (patrick.crews:2747) Bug#38833
View as plain text  
#At file:///Users/pcrews/usr/local/bin/data1/work/mtr_win/mysql-5.0-diff_patch/ based on revid:patrick.crews@stripped

 2747 Patrick Crews	2008-12-18
      Bug#38833: mysql-test-run needs diff.  Problem w/ error handling in calling diff on Windows
      
      Altered run_command to look for an output pattern that indicates diff is missing.
      This is needed since diff returns 1 on Windows whether the utility is successful or
      not present.
modified:
  client/mysqltest.c

=== modified file 'client/mysqltest.c'
--- a/client/mysqltest.c	2008-12-17 21:32:11 +0000
+++ b/client/mysqltest.c	2008-12-18 12:39:26 +0000
@@ -1254,7 +1254,7 @@ static int run_command(char* cmd,
   int error;
   /* vars added to detect a lack of 'diff' on Windows */
   int diff_flag= 0;
-  int first_line = 0;
+  int first_line = 1;
   char *diff_cmd= "\"diff\"";
 
   if (!(res_file= popen(cmd, "r")))
@@ -1266,11 +1266,14 @@ static int run_command(char* cmd,
     if it doesn't have a command (no decent differences in return values)
     So, we have to look for this pattern "diff" in the first line of
     text returned from the command */
-    if (first_line && strstr(buf,diff_cmd))
+    if (first_line) 
       {
-        diff_flag=1;
+        first_line = 0;
+        if (strstr(buf,diff_cmd))
+          {
+            diff_flag = 1;
+          }
       }
-    first_line += 1;
     DBUG_PRINT("info", ("buf: %s", buf));
     if(ds_res)
     {

Thread
bzr commit into mysql-5.0-bugteam branch (patrick.crews:2747) Bug#38833Patrick Crews18 Dec