Bug #65808 | Minimum value is incorrect. | ||
---|---|---|---|
Submitted: | 4 Jul 2012 11:27 | Modified: | 4 Jul 2012 14:05 |
Reporter: | kamesh bhallamudi | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S1 (Critical) |
Version: | 5.1.62 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[4 Jul 2012 11:27]
kamesh bhallamudi
[4 Jul 2012 12:54]
Valeriy Kravchuk
Please, provide complete repeatable test case, with CREATE TABLE and INSERTs that are enough to reproduce the problem.
[4 Jul 2012 13:25]
kamesh bhallamudi
I have attached the sample SQL. Just realized, it is giving even MAX value also wrong. For the attached SQL. mysql> SELECT AVG(Sale), MAX(Sale), MIN(Sale), COUNT(Sale), SUM(Sale) from SaleInfo where Country='IND' and Month='July'; +-----------+-----------+-----------+-------------+-----------+ | AVG(Sale) | MAX(Sale) | MIN(Sale) | COUNT(Sale) | SUM(Sale) | +-----------+-----------+-----------+-------------+-----------+ | 23.8 | 8 | 12 | 5 | 119 | +-----------+-----------+-----------+-------------+-----------+
[4 Jul 2012 14:05]
Valeriy Kravchuk
This is the reason of your problem: `Sale` varchar(50) DEFAULT NULL, This column is defined as string, and string "8" is bigger than "12" or "44".