Bug #74805 monotonic spelt incorrectly in NDB code
Submitted: 12 Nov 2014 4:13 Modified: 17 Mar 2015 11:24
Reporter: Stewart Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.3.7 OS:Any
Assigned to: CPU Architecture:Any

[12 Nov 2014 4:13] Stewart Smith
Description:
-  isMontonic = false;
+  isMonotonic = false;

How to repeat:
write some incorrect code on a new architecture that causes you to check what's going on in the NdbTick code, search for a string and then discover there's a spelling mistake that's been there for *mumble* years.

Suggested fix:
Patch attached.
[12 Nov 2014 4:14] Stewart Smith
spelling fix

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: ndb-monotonic-spelling.patch (text/x-patch), 1.10 KiB.

[12 Nov 2014 6:30] MySQL Verification Team
Hello Stewart,

Thank you for the report and contribution.

Thanks,
Umesh
[12 Nov 2014 6:31] MySQL Verification Team
// 
revno: 4444
tags: mysql-cluster-7.3.7
branch nick: cluster-7.3.7-release

mysql-cluster-7.3.7/storage/ndb/src/common/portlib/NdbTick.cpp:
   28  
   29  Uint64 NdbDuration::tick_frequency = 0;
   30: static bool isMontonic = true;
   31  static bool isInited = false;
   32  
   ..
   63     * Fall through: Fallback to use CLOCK_REALTIME.
   64     */
   65:   isMontonic = false;
   66    NdbTick_clk_id = CLOCK_REALTIME;
   67    if (clock_gettime(NdbTick_clk_id, &tick_time) == 0)
   ..
  110  
  111    /* gettimeofday() is not guaranteed to be monotonic */
  112:   isMontonic = false;
  113  #endif
  114  }
  ...
  117  {
  118    assert(isInited);
  119:   return isMontonic;
  120  }
  121
[17 Mar 2015 11:32] Jon Stephens
Fixed in NDB 7.5 tree. No user-visible changes. Closed.