When editing a long integer value, the updated value is sometimes ignored by the Table Data Editor.
1. Create a table with a "long integer" column and insert a record with a "long integer" value. For example, create the following table in MySQL:
CREATE TABLE `testBigInteger` ( `id` int(11) NOT NULL, `bigint_value` bigint(20) NULL, PRIMARY KEY(`id`) ) GO INSERT INTO `testBigInteger` VALUES (1, 9223372036854775807) GO
2. Edit the table using the Table Data Editor. Change the value of 9223372036854775807 to 9223372036854775806 (i.e. last digit from 7 to 6).
3. After you enter the value, it is reverted back to the original value of 9223372036854775807.
The problem is in the DataTableModel.isEqual method. When it compares the original value with the updated value, it uses the "double" data type. The double data type uses only 16 significant digits. Both the original value (9223372036854775807) and the updated value (9223372036854775806) are 9.223372036854776E18, and therefore the isEqual method returns true. As a result, the Table Data Editor thinks that no changes have been made.
Issue #10241 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 15.0-dev-339 |
No time estimate |
2 issue links |
relates to #10276
Issue #10276Aggregate functions max and sum are not working properly in table data editor . |
relates to #10208
Issue #10208Issues with long integer values ( when working against MongoDB) |
The problem is in the DataTableModel.isEqual method. When it compares the original value with the updated value, it uses the "double" data type. The double data type uses only 16 significant digits. Both the original value (9223372036854775807) and the updated value (9223372036854775806) are 9.223372036854776E18, and therefore the isEqual method returns true. As a result, the Table Data Editor thinks that no changes have been made.