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

            Bug ID: 152118
           Summary: Dates imported erroneously from Calc to a Firebird
                    database table
           Product: LibreOffice
           Version: 7.4.2.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: jcs...@libreoffice.org

Description:
When importing dates from a Calc test table to a Base Firebird database table,
some dates are imported erroneously and furthermore are shown in differently
depend on the way of view

Steps to Reproduce:
To perform this test, a Firebird database has been created in an external file.
This type of database has been chosen because of the ease of creating it and
accessing the data directly, without the need of a Base database. Although it
is needed a Firebird server in order to know what data has actually been saved
in the database.

-- Step 1. Creation of the database.
-------------------------------------------

    1. Open Base
    2. In the Database Wizard, select Connect to an existing database >
Firebird External and click Next.
    3. In step 2 of the wizard, Connection Settings, click the Create New
button
    4. In the Save As dialog, browse for a suitable location and name the FDB
file in the Firebird database, for example DATES1.FDB and click the Save button
    5. When you return to the Database Wizard, click the Next button
    6. In step 3 of the wizard, Set up user authentication, leave everything
blank, as is, and click the Next button
    7. In step 4, leave the default options for Base to register the database,
and then open the file. Click Finish
    8. In the Save As dialog, search for a suitable location and save the
database with the name Dates1.odb
    9. The database will be created and opened


-- Step 2. Import data from Calc to a Firebird table -----------------------

    1. With the database open, as we left it in the previous step, open the
Calc Dates.ods file with the sample data
    2. On Sheet1 containing the data, select all (Edit > Select All)
    3. Select Edit > Copy menu (or Ctrl+C)
    4. Switch to Base, and in the Tables section, right-click and select Paste
from the context menu.
    5. In the Copy Table dialog that appears, name the new table, for example
Table1. Under Options, select Definition and data and check the Use the first
line as column names box. and click Next.
    6. In the next step, Apply columns, move the three columns to the right
side. and click Next.
    7. In the next step:
         a) Column ID, assign Field type: INTEGER, and do it Primary key
(right-click over ID and select)
         b) Column TEXT, assign Field type VARCHAR and Length 12 
         c) Column DATE, assing Field type DATE
    8. Click Create
    9. A warning message appears “firebird_sdbc error: value exceeds the range
for valid dates caused by 'isc_dsql_execute' Continue any way?”. Click Yes 
    10. Table1 has been created


-- Step 3. View table data -------------------------------------

To view the table data:
    1. Double-click on the name of the newly created table
    2. To see the dates in the same format as they had in the Calc table,
right-click on the header of the DATE column and in the context menu select
Column Format
    3. In the Field Format dialog, on the Format tab, under Category, select
Date, and under Format, select 31/12/1999. Click OK.
    4. Observe the data.
    5. Fields with ID = 1 and ID = 2 have erroneous dates
    6. Field with ID = 3 has not been imported (maybe the warning message in
the step 9 above)

-- Step 4. View data in SQL command dialog --------------------
    1. In Base menu, select Tools > SQL
    2. In the box Command to execute write Select * from “Table1”
    3. Check Run SQL command directly
    4. Check Show output of “select” statements
    5. Click on Execute button
    6. Observe the results on Output box

--Step 5. View data directly in Firebird -------------------------
    1. On an operating system console run isql or isql-fb as needed
    2. Connect to the database: CONNECT /path/to/folder/DATES1.FDB;
    3. Show the data in the table Table1: SELECT * FROM "Table1";
    4. Observe the data.

Actual Results:
- Some dates are imported in an incorrect way
- Depends on the way of view the data, the dates showed are different
- Stored data are incorrect and are showed incorrectly

Expected Results:
The imported dates should be the same in any way of view and the stored data
should be the same that the original one


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL

Version: 7.4.2.3 / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 1; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: es-ES (es_ES.UTF-8); UI: es-ES
7.4.2-2
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to