I encountered a problem where a simple comparison operation seemed to fail.
Has anyone else seen this? Take a simple table:
a FLOAT(10, 2) b DOUBLE
With data:
+------+------+ | a | b | +------+------+ | 1.50 | 1 | | 6.00 | 4 | | 5.60 | 4 | +------+------+
Then do a simple query involving the >= comparison operator:
SELECT a, b, 1.40 * b, a >= 1.40 * b FROM t1;
which returns:
+------+------+----------+---------------+ | a | b | 1.40 * b | a >= 1.40 * b | +------+------+----------+---------------+ | 1.50 | 1 | 1.4 | 1 | | 6.00 | 4 | 5.6 | 1 | | 5.60 | 4 | 5.6 | 0 | +------+------+----------+---------------+
What's up with row 3 !? The comparision should most definitely return true. The really wierd thing is that the error does NOT occur if you use these values and a factor of 1.5. I came across this purely by accident -- I can't get the same error for different values and/or factors.
Note that a and b are different types, if I alter the table so that both column are REAL, then the error does not occur. So, it's pretty cleare what's going on -- would it be safe to say this is a bug?
-PV
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]