Bug #23177 comparison after converting from 'conv' operator, doesn't give right results.
Submitted: 11 Oct 2006 14:51 Modified: 13 Oct 2006 9:26
Reporter: Lokesh Thakur Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1 OS:
Assigned to: Sveta Smirnova CPU Architecture:Any

[11 Oct 2006 14:51] Lokesh Thakur
Description:
1. table prices( id INTEGER, price DECIMAL(10,2) );

row 1 :   1, 125
row 2 :   2, 1230

query         : select conv(min(conv(price,10,2)),2,10) from prices;
expected      : 125
mysql result  : 1230.

How to repeat:
DROP TABLE prices;
CREATE TABLE prices(
id INTEGER(40) NOT NULL PRIMARY KEY AUTO_INCREMENT,
price DECIMAL(10,2)
);

INSERT INTO prices(price) VALUES (125),(1230);

query         : select conv(min(conv(price,10,2)),2,10) from prices;

now see your self
[13 Oct 2006 9:26] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Read carefull about return value of the CONV function here: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html