| Bug #43270 | PROCEDURE ANALYZE returns wrong FLOAT(M,D) and doesn't honor max_elements | ||
|---|---|---|---|
| Submitted: | 27 Feb 2009 18:10 | Modified: | 28 Feb 2009 16:59 |
| Reporter: | Shailesh Humbad | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
| Version: | 5.0.51a, 5.0.67 | OS: | FreeBSD (FreeBSD 6.3, Linux) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | ANALYSE, FLOAT, max_elements, PROCEDURE ANALYZE | ||
[28 Feb 2009 16:59]
Sveta Smirnova
Thank you for the report. Verified as described.

Description: On a small table, PROCEDURE ANALYZE returns the wrong M and D value, and it doesn't honor the max_elements setting. Confirmed in 5.0.51a FreeBSD and 5.0.67 Linux. In the sample code below, Windows 5.0.21 returns FLOAT(1,1), whereas in in FreeBSD/Linux, FLOAT(2,1) is returned. It should return FLOAT(5,2). How to repeat: create table t (price TEXT); insert into t values ('999.99'); insert into t values ('0.10'); # RETURNS FLOAT(2,1) select price from t procedure analyse(0,0); # RETURNS ENUM select price from t procedure analyse(1,8192); Suggested fix: It should return the correct M and D values for the FLOAT, and it should not return ENUM with more than max_elements.