[Libreoffice-bugs] [Bug 138238] New: Field length changes unintentionally when defining a composite key made of multiple non-consecutive fields

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Nov 15 16:22:27 UTC 2020


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

            Bug ID: 138238
           Summary: Field length changes unintentionally when defining a
                    composite key made of multiple non-consecutive fields
           Product: LibreOffice
           Version: 6.4.6.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: algonzal at uji.es

Description:
I faced this problem when creating a table in design mode with multiple columns
and different column types (more concretely, field lengths). Composite is made
of multiple columns, with columns in between composite key members (composite
key made of non-consecutive fields). If all fields are consecutive everything
works as expected.

The issue shows up in LO v6.4.6.2 (Linux), v6.4.7.2 (Windows 10, fresh install)
and v7.0.3.1 (again, Windows 10 fresh install). Using Java 8 (251). All systems
are 64 bits.

Steps to Reproduce:
1. Create a new database.
2. Create a new table in design mode (do not save it).
3. Define a column (e.g. name it "col1", name does not matter) with VARCHAR
type and length restricted to 9 characters.
4. Define another column (e.g. name it "col2", again, name does not matter)
with SMALLINT type.
5. Define another column (e.g. name it "col3") with FLOAT type.
6. Define another column (e.g. name it "col4") with TINYINT type.
7. Select columns: col1, col2 and col4 (skipping col3), in that concrete order
(when selecting them in reverse order, it works without issues).
8. Mark the 3 selected fields as primary key (composite key).
9. Check col1 length, it is 3, instead of 9.



Actual Results:
The length of col1 is 3, which matches the length of the last selected field.
When selecting columns in reverse order it is 9 (because it picks the length of
the latest selected column).

Expected Results:
The length of the first column should remain unchanged (9) after defining the
composite key of the table.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.7.2 (x64)
Build ID: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU threads: 24; OS: Windows 10.0 Build 19041; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: 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/20201115/12b48683/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list