=== modified file 'mysql-test/r/type_float.result' --- mysql-test/r/type_float.result 2012-01-13 14:50:02 +0000 +++ mysql-test/r/type_float.result 2014-03-11 08:51:24 +0000 @@ -447,3 +447,21 @@ End of 5.0 tests select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo; foo 0 +# +# Bug #13500371 63704: CONVERSION OF '1.' TO A NUMBER GIVES ERROR 1265 +# (WARN_DATA_TRUNCATED) +# +CREATE TABLE t1 (f FLOAT); +INSERT INTO t1 VALUES ('1.'); +INSERT INTO t1 VALUES ('2.0.'); +Warnings: +Warning 1265 Data truncated for column 'f' at row 1 +INSERT INTO t1 VALUES ('.'); +Warnings: +Warning 1265 Data truncated for column 'f' at row 1 +SELECT * FROM t1 ORDER BY f; +f +0 +1 +2 +DROP TABLE t1; === modified file 'mysql-test/t/type_float.test' --- mysql-test/t/type_float.test 2011-07-18 08:27:05 +0000 +++ mysql-test/t/type_float.test 2014-03-11 08:51:24 +0000 @@ -331,3 +331,15 @@ eval select concat((truncate((-1.7976931 --echo # select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo; + +--echo # +--echo # Bug #13500371 63704: CONVERSION OF '1.' TO A NUMBER GIVES ERROR 1265 +--echo # (WARN_DATA_TRUNCATED) +--echo # + +CREATE TABLE t1 (f FLOAT); +INSERT INTO t1 VALUES ('1.'); +INSERT INTO t1 VALUES ('2.0.'); +INSERT INTO t1 VALUES ('.'); +SELECT * FROM t1 ORDER BY f; +DROP TABLE t1;