Bug #69393 Wasted work in NDBT_TestCaseImpl1::runSteps()
Submitted: 4 Jun 2013 0:18 Modified: 10 Jun 2013 14:11
Reporter: Po-Chun Chang (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S5 (Performance)
Version:5.6, 5.7 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: patch, performance

[4 Jun 2013 0:18] Po-Chun Chang
Description:
The problem appears in version 5.6 and in the revision 5216 in
version 5.7.  I attached a simple one-line patch (patch.diff) that
fixes it.

In method "runSteps()" in NDBT_Test.cpp, the loop on line 729 should 
break immediately after "res" is set to NDBT_FAILED. All the iterations after 
"res" is set to NDBT_FAILED do not perform any useful work, at best they just
set "res" again to NDBT_FAILED.

How to repeat:
Once NDBT_TestCaseImpl1::runSteps() is executed.

Suggested fix:
=== modified file 'storage/ndb/test/src/NDBT_Test.cpp'
--- storage/ndb/test/src/NDBT_Test.cpp	2013-02-26 06:21:48 +0000
+++ storage/ndb/test/src/NDBT_Test.cpp	2013-06-04 00:15:25 +0000
@@ -727,8 +727,10 @@
   waitSteps();
 
   for(i = 0; i < steps.size(); i++)
-    if (results[i] != NDBT_OK)
+    if (results[i] != NDBT_OK) {
       res = NDBT_FAILED;
+      break;
+    }
   return res;
 }
[4 Jun 2013 0:18] Po-Chun Chang
Suggested patch

Attachment: patch.diff (text/plain), 395 bytes.

[4 Jun 2013 6:27] MySQL Verification Team
Hello Po-Chun,

Thank you for the report and contribution.

Thanks,
Umesh
[10 Jun 2013 14:11] Magnus Blåudd
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Fixed from MySQL Cluster 7.0.39 and upwards
[17 Jun 2013 11:37] Jon Stephens
For documentation, see BUG#69393.