Data may be corrupted when coping data into numeric and decimal fields in the firebird database. These fields may also be corrupted when migrating from a HSQLDB databases. Steps: Created a table with the following schema: CREATE TABLE "Table1" (ID INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL, "Numeric" NUMERIC(15, 4), "Decimal" DECIMAL(15, 4), "Double" DOUBLE PRECISION, PRIMARY KEY (ID)); Created a calc sheet with the following data: ID Numeric Decimal Double 1 1 2 3 2 1.1 2.1 3.1 3 1.12 2.12 3.12 4 1.123 2.123 3.123 5 1.1234 2.1234 3.1234 6 1.12345 2.12345 3.12345 Selected the calc sheet and pasted it into the firebird table. This resulted in the firebird table containing the following unexpected data: ID Numeric Decimal Double 1 0.0001 0.0002 3 2 0.0001 0.0002 3.1 3 0.0001 0.0002 3.12 4 0.0001 0.0002 3.123 5 0.0001 0.0002 3.1234 6 0.0001 0.0002 3.1235 Repeating the above with a similarly configured HSQLDB database resulted in the expected results. Similar issues exist when the numeric and decimal fields are migrated to the firebird database Used the above HSQLDB database and loaded it with the following data: ID Numeric Decimal Double 1 10.1 10.1 10.1 2 10.2 10.2 10.2 3 10.3 10.3 10.3 4 10.4 10.4 10.4 5 10.5 10.5 10.5 6 10.6 10.6 10.6 Closed the database, opened and migrated it to the firebird database. This resulted in the firebird table containing the following unexpected data: ID Numeric Decimal Double 1 -1667.6216 -1667.6216 10.1 2 -1667.5216 -1667.5216 10.2 3 -1667.4216 -1667.4216 10.3 4 -1667.3216 -1667.3216 10.4 5 -1667.2216 -1667.2216 10.5 6 -1667.1216 -1667.1216 10.6 LibreOffice Version 6.2.4.2 LibreOffice Version 6.2.5.2 Linux Mint19 Possibly related issues: 126268 123591 116893
Could confirm the buggy behaviour with Version: 6.3.0.0.beta2 Build-ID: 6c6edded7133daf2d8d0b2ea7ae25b8109c5c064 on OpenSUSE 15 64bit rpm Linux Note: If you set NUMERIC(15, 4) it will be all 0.0001 If you set NUMERIC(15, 5) it will be all 0.00001 ... and the same behaviour for DECIMAL. Could be this is the reason: ------------- NUMERIC(4) stored as SMALLINT (exact data) NUMERIC(4,2) SMALLINT (data * 10^2) NUMERIC(10,4) (Dialect 1) DOUBLE PRECISION (Dialect 3) BIGINT (data * 10^4 ) ------------- See Firebird 2.5 Language Reference
Looks like a dup from bug 126268
Hello, The problem when copying from Calc to Base is the same as in bug 123591 ( I have a fix for this in gerrit ). The migration problem is covered by bug 126268. Closing as DUPLICATED *** This bug has been marked as a duplicate of bug 123591 ***