Bug #84363 Deprecate or remove "(m,n)" from FLOAT(m,n) and DOUBLE(m,n)
Submitted: 28 Dec 2016 23:04 Modified: 28 Apr 0:45
Reporter: Rick James Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:all OS:Any
Assigned to: CPU Architecture:Any
Tags: double, FLOAT, precision

[28 Dec 2016 23:04] Rick James
(In my opinion...)  FLOAT(m,n) provides no benefit over plain FLOAT.  If fact, it provide a drawback in that storing into such a column may necessitate rounding the value twice.  Also, it puts limits on the size of the values, which is rarely useful.

Users should use either FLOAT or DECIMAL(m,n).

(I have pointed this out to dozens, maybe hundreds, of forum users.  None has come back claiming to need (m,n) for some valid reason.)

How to repeat:

Suggested fix:
Remove, or at least discourage, the use of (m,n) on FLOAT and DOUBLE.  This can be done in the documentation first.

Perhaps it needs to be kept in the code for compatibility purposes.

You could even consider allowing the syntax, but then removing (m,n) from the implementation.
[29 Dec 2016 4:55] Umesh Shastry
Hello Rick James,

Thank you for the report and feedback!

[28 Apr 0:45] Paul Dubois
Posted by developer:
Fixed in 8.0.17.

FLOAT(M,D) and DOUBLE(M,D) syntax to specify the number of digits for
columns of type FLOAT and DOUBLE (and any synonyms) is a nonstandard
MySQL extension. This syntax is deprecated and support for it will be
removed in a future MySQL version.