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.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
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.