Bug 124420 - FIREBIRD: Query multiplication function returns invalid data when used with fixed point data types (numeric and decimal)
Summary: FIREBIRD: Query multiplication function returns invalid data when used with f...
Status: RESOLVED DUPLICATE of bug 121528
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2019-03-29 10:01 UTC by Andreas Zieritz
Modified: 2019-03-31 16:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
LibreOffice base file (3.25 KB, application/x-zip-compressed)
2019-03-29 10:02 UTC, Andreas Zieritz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Zieritz 2019-03-29 10:01:59 UTC
Description:
Multiplication of fields in queries gives wrong results.

Steps to Reproduce:
1. Open query "Spørring1" in attached file
2. Multiplication should give 1 for all 3 multiplications
3. Works fine when doing same operation in reports

Actual Results:
1 000 000, or 10 000

Expected Results:
1


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Andreas Zieritz 2019-03-29 10:02:38 UTC
Created attachment 150388 [details]
LibreOffice base file
Comment 2 Drew Jensen 2019-03-29 12:38:31 UTC
Verified with Ubuntu 18.04 and LO 6.2.2

Also I duplicated this with decimal data types with the exact same error.

Numeric and Decimal being the two fixed point data types in FB and both continue to cause problems. Along with failing in math equations it is still impossible to import a firbird table with either data type from one firebird sdbc base file into another firebird sdbc Base file ( forget about migrating from HSQL ).

Exporting into Calc seems to work properly at least. Anyway I digress for this issue. 


Also there is another issue https://bugs.documentfoundation.org/show_bug.cgi?id=121528 but I think the two are different.
Comment 3 Robert Großkopf 2019-03-29 19:09:13 UTC
This seems to be a bug of the GUI. I have tested the same query with Tools > SQL and the results were all 1. The decimalseparator will appear at the right position.
Comment 4 Robert Großkopf 2019-03-29 19:12:57 UTC
Bug fist appears here with LO 6.1.0.3. Will work well with LO 6.0.5.2 on OpenSUSE 15.
Comment 5 Robert Großkopf 2019-03-29 21:02:23 UTC
Isn't this a duplicate of bug 121528?
Comment 6 Drew Jensen 2019-03-29 22:31:11 UTC
(In reply to Robert Großkopf from comment #5)
> Isn't this a duplicate of bug 121528?

yes, I suppose checking with the SQL window shows that it is. 

@robert I'm curious when you run the query in the SQL window are the results using number formatting for de or en?

*** This bug has been marked as a duplicate of bug 121528 ***
Comment 7 Robert Großkopf 2019-03-30 07:48:19 UTC
(In reply to Drew Jensen from comment #6)> 
> @robert I'm curious when you run the query in the SQL window are the results
> using number formatting for de or en?

In SQL-window the original formatting of the database is used. I see a point as decimal-separator.
Comment 8 Drew Jensen 2019-03-30 11:38:56 UTC
(In reply to Robert Großkopf from comment #7)
> (In reply to Drew Jensen from comment #6)> 
> > @robert I'm curious when you run the query in the SQL window are the results
> > using number formatting for de or en?
> 
> In SQL-window the original formatting of the database is used. I see a point
> as decimal-separator.

As far as I can tell the original formatting of the example Base file in question is Norwegian. Though in the query in the example file some of the columns are formatted for Norwegian and some are formatted for English and I can't say how that happens.
Comment 9 Andreas Zieritz 2019-03-31 16:09:45 UTC
In my opinion related to this bug:

https://bugs.documentfoundation.org/show_bug.cgi?id=120149
Comment 10 Robert Großkopf 2019-03-31 16:25:20 UTC
(In reply to Andreas Zieritz from comment #9)
> In my opinion related to this bug:
> 
> https://bugs.documentfoundation.org/show_bug.cgi?id=120149

New informations to this bug wouldn't be read, because we decided it is a duplicate of bug 121528.

This bug is a special Firebird-bug. If you create an internal HSQLDB the query will work right. No problems with decimal-places there, independent of the language.
Comment 11 Andreas Zieritz 2019-03-31 16:27:22 UTC
I am running norwegian Windows 10, but have changed the decimal delimiter to point ".", due to requirements of other engineering software form the US. This has cause issues in other LibreOffice modules previously (see issue 120149).

Libreoffice setting however is decimal delimiter = same as local setting (,).

Unchecking this setting does not seem to change anything however (checked in Calc).

Did also a test, setting decimal delimiter to default ",", and generate new database. Result however is the same.

Doing the same operation in a report however gives the correct results.