MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:August 11 2009 9:42pm
Subject:bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2815) Bug#44012
View as plain text  
#At file:///home/bm136801/my/empty-51/ based on revid:bjorn.munch@stripped

 2815 Bjorn Munch	2009-08-11
      Bug #44012 mtr: test cases that are not supposed to return output always fail
      Output would match an empty result file but we don't check
      Allow empty output IFF there is an empty result file.

    modified:
      client/mysqltest.cc
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2009-05-29 11:04:02 +0000
+++ b/client/mysqltest.cc	2009-08-11 21:41:44 +0000
@@ -7987,6 +7987,8 @@ int main(int argc, char **argv)
   if (parsing_disabled)
     die("Test ended with parsing disabled");
 
+  my_bool empty_result= FALSE;
+  
   /*
     The whole test has been executed _sucessfully_.
     Time to compare result or save it to record file.
@@ -8027,11 +8029,20 @@ int main(int argc, char **argv)
   }
   else
   {
-    die("The test didn't produce any output");
+    /* Empty output is an error *unless* we also have an empty result file */
+    if (! result_file_name || record ||
+        compare_files (log_file.file_name(), result_file_name))
+    {
+      die("The test didn't produce any output");
+    }
+    else 
+    {
+      empty_result= TRUE;  /* Meaning empty was expected */
+    }
   }
 
-  if (!command_executed && result_file_name)
-    die("No queries executed but result file found!");
+  if (!command_executed && result_file_name && !empty_result)
+    die("No queries executed but non-empty result file found!");
 
   verbose_msg("Test has succeeded!");
   timer_output();


Attachment: [text/bzr-bundle] bzr/bjorn.munch@sun.com-20090811214144-wqp95w6wuks24paz.bundle
Thread
bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2815) Bug#44012Bjorn Munch11 Aug