<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Data corruption of firebird numeric and decimal fields."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=126281">126281</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Data corruption of firebird numeric and decimal fields.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.2.5.2 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Base
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mike60992@live.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>