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
Created attachment 151219 [details] A minimal Firebird database with one table and one query to test operations on decimal value
Version 6.3.0.0.alpha0+ still has this bug.
Pretty certain that this is a DUP...
*** This bug has been marked as a duplicate of bug 121528 ***