Bug #69215 Wasted work in runScanReadErrorOneNode()
Submitted: 13 May 2013 14:01 Modified: 10 Jun 2013 14:08
Reporter: Po-Chun Chang (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Storage Engine API Severity:S5 (Performance)
Version:5.6, 5.7 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: patch, performance

[13 May 2013 14:01] Po-Chun Chang
Description:
The problem appears in version 5.6 and in the latest revision 5216 in
version 5.7.  I have attached a simple one-line patch (patch.diff) that
fixes it.

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

How to repeat:
Once runScanReadErrorOneNode() is executed.

Suggested fix:
=== modified file 'storage/ndb/test/ndbapi/testScan.cpp'
--- storage/ndb/test/ndbapi/testScan.cpp	2013-02-26 06:21:48 +0000
+++ storage/ndb/test/ndbapi/testScan.cpp	2013-05-13 14:01:55 +0000
@@ -540,6 +540,7 @@
       if (hugoTrans.scanReadRecords(GETNDB(step), 
 				    records, 0, parallelism) != 0)
 	result = NDBT_FAILED;
+	break;
     }
[13 May 2013 14:02] Po-Chun Chang
Suggested patch

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

[13 May 2013 15:43] MySQL Verification Team
Thank you for the bug report.
[10 Jun 2013 14:08] 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:40] Jon Stephens
For documentation, see BUG#69393.