Bug 158935 - Firebird: Decimal numbers add one decimal place, if input are integer values.
Summary: Firebird: Decimal numbers add one decimal place, if input are integer values.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-30 18:43 UTC by Robert Großkopf
Modified: 2024-07-21 18:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Open the database file and execute SELECT * FROM "tbl_One" in Tools → SQL (3.58 KB, application/vnd.oasis.opendocument.database)
2023-12-30 18:43 UTC, Robert Großkopf
Details
Have a look at the different decimal places for integer and decimal numbers (82.96 KB, image/png)
2023-12-30 18:44 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2023-12-30 18:43:42 UTC
Created attachment 191658 [details]
Open the database file and execute SELECT * FROM "tbl_One" in Tools → SQL

Open the attached database.
Go to Tools → SQL.

Start
SELECT * FROM "tbl_One"
and let show the output.

It will show for fields with 2 decimal places values like
1.000, 2.000, 10.000, 20.000
It will show the right decimal places for
1.10, 2.10, 10.10, 20.10

Screenshot will show the behavior also.
Query in the database file will show how many decimal places have been defined.

If you connect a subform with a form and use a numeric field with decimal places the connection wont work. When refreshing the subform all data input will disappear, because the connection will look, for example, for 2 decimal places while there appear 3 places as entry in the subform.

SO this behavior with wrong decimal places isn't only "cosmetical".
Comment 1 Robert Großkopf 2023-12-30 18:44:22 UTC
Created attachment 191659 [details]
Have a look at the different decimal places for integer and decimal numbers
Comment 2 m_a_riosv 2023-12-31 00:19:55 UTC
I test creating a new table and the issue is reproducible.
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0f6f5048d223731aa52b768a77244d0208711391
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 3 Mike Kaganski 2024-07-21 18:42:35 UTC
Fixed by a245fd604c11f4bdbd1fdc4dd52e2a7f3880d85b (tdf#156530: fix OPreparedStatement::setString).