[Libreoffice-bugs] [Bug 125165] New: Firebird query: decimal fields are not handled correctly in arithmetic operations

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue May 7 20:10:57 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=125165

            Bug ID: 125165
           Summary: Firebird query: decimal fields are not handled
                    correctly in arithmetic operations
           Product: LibreOffice
           Version: 6.1.5.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: seb+lo at ldd.fr

Description:
In Firebird Embedded databases, decimal values cannot be reliably used in
arithmetic expressions in a query.

However, in the "Execute SQL Statement" window, they work as expected.

Steps to Reproduce:
1. Open the attached ODB file
2. Execute Query1

Actual Results:
In the second column, value 246 is shown.

Expected Results:
Value 2.46 is expected ( 1.23 * 2 = 2.46 )


Reproducible: Always


User Profile Reset: Yes



Additional Info:
This issue only affects Firebird Embedded databases.
It does not affect HSQLDB Embedded databases.

This issue only affects the standard query execution system.
It does not affect SQL commands executed in the "Execute SQL Statement" window
:
in menu bar, open "Tools" / "SQL…" to type Query1's SQL command :
select c, c * 2 from Table1
Check "Show output of "select command"" and click "Execute".
The output is correct: 1.23,2.46

The same bug occurs with other arithmetic operators (+ - /).

The same bug occurs with constants. for example,
 1.00 * 2 returns 200
 1.00 * 12.00 returns 120000.

Column "c" has data type DECIMAL with 2 decimal places.
Table Table1 contains only one record with value 1.23 in column "c".

It looks like LibreOffice removes the input values decimal points to convert
them to integers prior to the operation, but then forgets to insert it back in
the resulting integer.

Checking "Run SQL comand directly" does not help.

Version: 6.1.5.2
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 4; OS: Linux 4.9; UI render: default; VCL: gtk2; 
Locale: en-US (C); Calc: group threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190507/8e262c25/attachment.html>


More information about the Libreoffice-bugs mailing list