Bug #7361 | Strange Data Truncation with float(M,30) | ||
---|---|---|---|
Submitted: | 16 Dec 2004 20:49 | Modified: | 12 Jan 2005 20:09 |
Reporter: | Bill Adams | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.8 | OS: | Linux (Linux) |
Assigned to: | Jim Winstead | CPU Architecture: | Any |
[16 Dec 2004 20:49]
Bill Adams
[7 Jan 2005 5:06]
Jim Winstead
The truncation is correct, and should also have been happening when inserting an integer. The truncation in your case is actually to a rounded-off -9.999(etc).
[12 Jan 2005 20:09]
Paul DuBois
Mentioned in 4.1.9 change notes.
[9 Mar 2005 20:53]
Sen Ye
same happed in 4.1.7 when embeded query into java and inset data into table , an Exception happened but data was inserted correctly, process was brocken: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for column 'orderstatus' at row 658 at com.mysql.jdbc.SQLError.convertShowWarningsToSQLWarnings(SQLError.java:693) at com.mysql.jdbc.MysqlIO.scanForAndThrowDataTruncation(MysqlIO.java:3286) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1728) at com.mysql.jdbc.Connection.execSQL(Connection.java:2228) at com.mysql.jdbc.Connection.execSQL(Connection.java:2159) at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1243) at com.trlm.db.ExecuteMySql.GetSqlUpdate(ExecuteMySql.java:44) at com.trlm.db.DatabaseAccessor.updateMySql(DatabaseAccessor.java:92) at com.trlm.acounting.act_splitdata.split_orders(act_splitdata.java:95) at com.trlm.acounting.act_splitdata.splitdata(act_splitdata.java:33) at com.trlm.acounting.act_server.run_splitdata(act_server.java:170) at com.trlm.acounting.act_server.main(act_server.java:201)