Bug #10089 Update or Insert a float value 100 or above results in 99,99
Submitted: 22 Apr 2005 10:00 Modified: 22 Apr 2005 17:14
Reporter: Daan Landwehr Johan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.11 OS:UNIX
Assigned to: CPU Architecture:Any

[22 Apr 2005 10:00] Daan Landwehr Johan
Description:
Update or Insert a float value 100 or above results in a 99,99 value enterd

field type: float(4,2)

sql:
UPDATE 'tablenaam' SET price = '120'
WHERE 'id' = '1';

it results in the value being set to 99,99
same for an INSERT statement

when the value is set to anything below 100 it updates correctly

error started to occur after an update from version 4.0.2x to 4.1.11

How to repeat:
endlessly repeat the sql query with a value of 100 or above
[22 Apr 2005 16:49] Jorge del Conde
mysql> create table tablenaam (id int not null auto_increment primary key, price float);              
Query OK, 0 rows affected (0.00 sec)

mysql> insert into tablenaam values(1, 59);
Query OK, 1 row affected (0.00 sec)

mysql> select * from tablenaam;
+----+-------+
| id | price |
+----+-------+
|  1 |    59 |
+----+-------+
1 row in set (0.00 sec)

mysql> UPDATE tablenaam SET price = '120' WHERE 'id' = '1';  
Query OK, 0 rows affected (0.00 sec)

mysql> select * from tablenaam;
+----+-------+
| id | price |
+----+-------+
|  1 |    59 |
+----+-------+
1 row in set (0.00 sec)

mysql>
[22 Apr 2005 17:14] Jorge del Conde
Using the latest changeset, i now get the following warning:

| Warning | 1264 | Out of range value adjusted for column 'price' at row 1