Bug #84007 More exact timing for mysql client based on my_timer_microseconds (contribution)
Submitted: 29 Nov 2016 16:48 Modified: 29 Nov 2016 22:14
Reporter: OCA Admin (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[29 Nov 2016 16:48] OCA Admin
This bug tracks a contribution by Daniël van Eeden (Github user: dveeden) as described in http://github.com/mysql/mysql-server/pull/113

How to repeat:
See description

Suggested fix:
See contribution code attached
[29 Nov 2016 16:48] OCA Admin
Contribution submitted via Github - More exact timing for mysql client based on my_timer_microseconds 
(*) Contribution by Daniël van Eeden (Github dveeden, mysql-server/pull/113#issuecomment-263352699): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: git_patch_95449344.txt (text/plain), 1.41 KiB.

[29 Nov 2016 22:14] MySQL Verification Team
Thank you for the contribution.
[9 Mar 2017 17:06] Eric Herman
Three issues with the patch as it is:

First, my_timer_microseconds() returns a ulonglong;

Second, as nice_time takes a "sec" parameter, the division should be done by the caller.

Third, the division should be by 1000000 (not 10000) ... I suspect this bug of dividing only by 10000 was hidden because of the narrowing of ulonglong to ulong or something more subtle.