Bug 130708 - Firebird: wrong precision and scale for DECIMAL and NUMERIC
Summary: Firebird: wrong precision and scale for DECIMAL and NUMERIC
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.0.0 target:6.4.2 target:6.3.6
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-16 12:33 UTC by Julien Nabet
Modified: 2020-02-17 14:29 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2020-02-16 12:33:55 UTC
Description:
On pc Debian x86-64 with master sources updated today, I noticed that max precision and scale were 15 instead of 18 and min scale was 1 instead of 0.
See https://firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-datatypes.html

Steps to Reproduce:
1. Launch Base
2. Create a brand new odb embedded Firebird file
3. Create a brand new table with wizard
4. create a decimal field or a numeric field and try to put precision or scale above 15 or try to put scale below 0

Actual Results:
Impossible to define these values

Expected Results:
Possible to define these values


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.0.alpha0+
Build ID: 9414882dc22899a3fe0e13294a1b68885f055538
CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Julien Nabet 2020-02-16 12:35:03 UTC
Also take a look from https://bugs.documentfoundation.org/show_bug.cgi?id=130593#c9
Comment 2 Commit Notification 2020-02-16 14:46:46 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4605dfa29649864638187940de4d1064ff056ac8

tdf#130708: Firebird: fix wrong precision and scale for DECIMAL and NUMERIC

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Robert Großkopf 2020-02-16 15:34:51 UTC
Could confirm the buggy behavior.
Note: HSQLDB doesn't show this behavior, because the min-value is 0 there.
Comment 4 Commit Notification 2020-02-17 10:26:39 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/08eede3a026e8d788a5f877c5fd646e685fd0d5e

tdf#130708: Firebird: fix wrong precision and scale for DECIMAL and NUMERIC

It will be available in 6.4.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2020-02-17 14:29:59 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/b0cdef796b235fdb7ed6414dba7499691ebd0b2c

tdf#130708: Firebird: fix wrong precision and scale for DECIMAL and NUMERIC

It will be available in 6.3.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.