[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problem with floating point data types in MySQL



I'm new in this forum but i'd appreciate if someone could help me.
I installed MySQL's Debian packages on my ARM-based system and
when i insert any value to a floating point field, the server writes
a
wrong number.

For example:
*****************************
//Suppose the following table:
mysql> create table prueba(
    -> campo                           numeric(10,2)
    -> );
Query OK, 0 rows affected (0.11 sec)

mysql> describe prueba;
+-------+---------------+------+-----+---------+-------+
| Field | Type          | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| campo | decimal(10,2) | YES  |     | NULL    |       |
+-------+---------------+------+-----+---------+-------+
1 row in set (0.05 sec)

mysql> insert into prueba values (15230.23);
Query OK, 1 row affected (0.05 sec)

mysql> select * from prueba;
+------------+
| campo      |
+------------+
| 9999999.99 |
+------------+
1 row in set (0.04 sec)

mysql>
*********************

what's going wrong? this doesn't happen in the x86 package.

Thanks in advance,
- Alejandro

--
======================================
\       M.Sc.Alejandro Lee Ibarra    /
 \      Quality assurance           /
  >     DDTec Mexico               <
 /      http://www.didtec.com.mx    \
/       01-52-333-825-6563           \
======================================


-- 
To UNSUBSCRIBE, email to debian-arm-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: