Open zhangysh1995 opened 4 years ago
Another similar case:
mysql> select CAST(1.0E+300 AS DECIMAL);
ERROR 1690 (22003): %s value is out of range in '%s'
mysql> select CAST(1.0E+3000000 AS DECIMAL);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 25 near "1.0E+3000000 AS DECIMAL)"float literal: strconv.ParseFloat: parsing "1.0E+3000000": value out of range
mysql> select CAST(1.0E+300000000000 AS DECIMAL);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 30 near "1.0E+300000000000 AS DECIMAL)"float literal: strconv.ParseFloat: parsing "1.0E+300000000000": value out of range
mysql> select CAST(1.0E+300000000000000000 AS DECIMAL);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 36 near "1.0E+300000000000000000 AS DECIMAL)"float literal: strconv.ParseFloat: parsing "1.0E+300000000000000000": value out of range
/bug P2
Bug Report
1. What did you do?
2. What did you expect to see?
3. What did you see instead?
4. What version of TiDB are you using? (
tidb-server -V
or runselect tidb_version();
on TiDB)