Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 5.1.62
-
Fix Version/s: 5.5.25
-
Component/s: None
-
Labels:None
-
Environment:i didn´t found the version, but it´s mariadb 5.3.2
Description
CREATE TABLE `tmp` (
`id` int(10) unsigned NOT NULL DEFAULT '0',
`datahora` decimal(17,6) NOT NULL DEFAULT '0.000000',
`value` decimal(20,10) NOT NULL DEFAULT '0.0000000000',
PRIMARY KEY (`id`,`datahora`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
====
INSERT INTO `tmp` (`id`, `datahora`, `value`) VALUES (1, 1340977500.000000, 1.0000000000);
====
this don´t work...:
SELECT * FROM tmp WHERE id=1 AND
datahora="1340977500.00000000000000"
this work: (without conversion)
SELECT * FROM tmp WHERE id=1 AND
datahora=1340977500.00000000000000
any idea?
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Hi Roberto,
Is there any particular reason why you expect the first comparison should work? (Did you find it documented somewhere, or something?)
Otherwise, you are comparing a numeric value to a string, there is no "conversion" as far as I can see.
Try to use CAST if you need to convert the value.