Description:
So, after 5.0.3, DECIMAL(65,0) is the largest DECIMAL value, however, when dealing with larger numbers (i.e. when selecting LENGTH()) the truncation does not happen >65, but rather at >81, and then gives a warning about "Truncated incorrect DECIMAL value: ''" Which would have been incorrect already >65
How to repeat:
5067 (blogs) > SELECT LENGTH(999999999999999999999999999999999999999999999999999999999999999999999999999999999);
+-------------------------------------------------------------------------------------------+
| LENGTH(999999999999999999999999999999999999999999999999999999999999999999999999999999999) |
+-------------------------------------------------------------------------------------------+
| 81 |
+-------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
5067 (blogs) > SELECT LENGTH(9999999999999999999999999999999999999999999999999999999999999999999999999999999999);
+--------------------------------------------------------------------------------------------+
| LENGTH(9999999999999999999999999999999999999999999999999999999999999999999999999999999999) |
+--------------------------------------------------------------------------------------------+
| 65 |
+--------------------------------------------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)
5067 (blogs) > SHOW WARNINGS;
+-------+------+---------------------------------------+
| Level | Code | Message |
+-------+------+---------------------------------------+
| Error | 1292 | Truncated incorrect DECIMAL value: '' |
+-------+------+---------------------------------------+
1 row in set (0.02 sec)