Bug #7681 precision error on double fields

Submitted: 5 Jan 2005 10:05 Modified: 5 Jan 2005 10:45
Reporter: Sean Liang Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version: OS:
Assigned to: CPU Architecture:Any

[5 Jan 2005 10:05] Sean Liang
Description:
The number of resultset is incorrect when running the attached script in first two environments:

host1: Windows XP
mysql  Ver 14.6 Distrib 4.1.4-gamma, for Win95/Win98 (i32)

host2: FreeBSD 5.2.1
mysql  Ver 14.7 Distrib 4.1.7, for portbld-freebsd5.2.1 (i386)

host3: FreeBSD 5.2.1
mysql  Ver 13.5 Distrib 4.1.0-alpha, for portbld-freebsd5.1 (i386)

How to repeat:
drop table if exists test;

create table test (
id int(11) unsigned not null auto_increment,
value double(8,2) unsigned default 0,
primary key  (id),
unique key id (id)
);

insert into test (value) values (28.15), (30);

select * from test where value in (28.15, 30);
[5 Jan 2005 10:45] MySQL Verification Team
Hi,

Thank you for the report, but this is really not a bug.
You can read more about problems with floating point numbers at:
http://dev.mysql.com/doc/mysql/en/Problems_with_float.html

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.