Loading mysql-test/r/insert.result +14 −0 Original line number Diff line number Diff line Loading @@ -461,4 +461,18 @@ i 2 2 DROP TABLE t1, t2; CREATE TABLE t1 (c1 INT NOT NULL); INSERT INTO t1 VALUES(4188.32999999999992724042385816574096679687500), ('4188.32999999999992724042385816574096679687500'), (4188); SELECT * FROM t1; c1 4188 4188 4188 CREATE TABLE t2 (c1 BIGINT); INSERT INTO t2 VALUES('15449237462.0000000000'); SELECT * FROM t2; c1 15449237462 DROP TABLE t1, t2; End of 5.0 tests. mysql-test/t/insert.test +15 −0 Original line number Diff line number Diff line Loading @@ -353,5 +353,20 @@ SELECT * FROM t2; DROP TABLE t1, t2; # # Bug #30453: String not cast to int correctly # CREATE TABLE t1 (c1 INT NOT NULL); INSERT INTO t1 VALUES(4188.32999999999992724042385816574096679687500), ('4188.32999999999992724042385816574096679687500'), (4188); SELECT * FROM t1; CREATE TABLE t2 (c1 BIGINT); INSERT INTO t2 VALUES('15449237462.0000000000'); SELECT * FROM t2; DROP TABLE t1, t2; --echo End of 5.0 tests. strings/ctype-simple.c +9 −5 Original line number Diff line number Diff line Loading @@ -1538,16 +1538,20 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)), } else addon= (*str >= '5'); for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++) { if (!dot) shift++; } if (str < end && *str == '.' && !dot) { for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; shift++, str++); if (str < end && *str == '.') { str++; for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++); } } else { shift= dot - str; for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++); } goto exp; } Loading Loading
mysql-test/r/insert.result +14 −0 Original line number Diff line number Diff line Loading @@ -461,4 +461,18 @@ i 2 2 DROP TABLE t1, t2; CREATE TABLE t1 (c1 INT NOT NULL); INSERT INTO t1 VALUES(4188.32999999999992724042385816574096679687500), ('4188.32999999999992724042385816574096679687500'), (4188); SELECT * FROM t1; c1 4188 4188 4188 CREATE TABLE t2 (c1 BIGINT); INSERT INTO t2 VALUES('15449237462.0000000000'); SELECT * FROM t2; c1 15449237462 DROP TABLE t1, t2; End of 5.0 tests.
mysql-test/t/insert.test +15 −0 Original line number Diff line number Diff line Loading @@ -353,5 +353,20 @@ SELECT * FROM t2; DROP TABLE t1, t2; # # Bug #30453: String not cast to int correctly # CREATE TABLE t1 (c1 INT NOT NULL); INSERT INTO t1 VALUES(4188.32999999999992724042385816574096679687500), ('4188.32999999999992724042385816574096679687500'), (4188); SELECT * FROM t1; CREATE TABLE t2 (c1 BIGINT); INSERT INTO t2 VALUES('15449237462.0000000000'); SELECT * FROM t2; DROP TABLE t1, t2; --echo End of 5.0 tests.
strings/ctype-simple.c +9 −5 Original line number Diff line number Diff line Loading @@ -1538,16 +1538,20 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)), } else addon= (*str >= '5'); for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++) { if (!dot) shift++; } if (str < end && *str == '.' && !dot) { for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; shift++, str++); if (str < end && *str == '.') { str++; for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++); } } else { shift= dot - str; for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++); } goto exp; } Loading