DBD-mysql icon indicating copy to clipboard operation
DBD-mysql copied to clipboard

Missing trailing zero in some cases with mysql round() [rt.cpan.org #122541]

Open mbeijen opened this issue 8 years ago • 2 comments
trafficstars

Migrated from rt.cpan.org#122541 (status was 'new')

Requestors:

From [email protected] on 2017-07-19 15:15:21:

This bug seems to have been introduced in DBD::mysql version 4.038_01 and is still present (4.043), tested on CentOS 6.5 with perl 5.10 and CentOS 7.2 with perl 5.24.
Minimum reproducible code:

use DBI;

my $dbh = DBI->connect("DBI:mysql:host=localhost");
my $stmt = "SELECT round( degrees(0.00043)*69, 2)";
print $dbh->selectrow_array($stmt);

result is “1.7” instead of the expected “1.70” for DBD::mysql versions > 4.038.



Flatshare is a limited company registered in England and Wales. Registration #04407847, Registered office: 32 Park Green, Macclesfield, Cheshire, SK11 7NA. T: 01625 666 750

This electronic mail may contain confidential or legally privileged information. It is for the intended recipient(s) only. Should you receive this message in error, please notify the sender immediately by replying to this email. If you are not the intended recipient, any disclosure, distribution, reproduction, printing or reliance on the contents of this information is strictly prohibited. Whilst all care has been taken, Flatshare Ltd is not responsible for the integrity or content of any attachment(s) or links included within.

* THE CONTENT OF THIS EMAIL IS NOT LEGAL ADVICE AND SHOULD NOT BE TREATED AS SUCH.  CONTENT IS THE AUTHORS OPINION BASED ON EXPERIENCE OR THEIR INTERPRETATION OF PUBLICLY AVAILABLE INFORMATION.  NONE OF OUR STAFF ARE LEGALLY TRAINED AND WE ALWAYS ADVISE THAT PROPER LEGAL ADVICE IS TAKEN IF REQUIRED.

mbeijen avatar Nov 14 '17 19:11 mbeijen

This issue was fixed in https://github.com/gooddata/DBD-MariaDB repository.

pali avatar Jan 23 '18 15:01 pali

Confirmed the wrong result with tag:4.048

dveeden avatar Sep 15 '18 20:09 dveeden