https://bugs.documentfoundation.org/show_bug.cgi?id=152415
Bug ID: 152415 Summary: Different results when importing dates with JDBC than with direct connection (in all data engines) Product: LibreOffice Version: 7.4.2.3 release Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: medium Component: Base Assignee: libreoffice-bugs@lists.freedesktop.org Reporter: jcs...@libreoffice.org Description: If it is imported a Calc table with certain dates, you get different results if the import is done via direct connection or ODBC than if it is done via JDBC. The data imported via JDBC are wrong. No matter which database engine is used (tested with MariaDB, PostgreSQL and Firebird) the results are the same, always with the same errors in the JDBC import. In addition, the dates shown are different if the connection is with JDBC than with direct connection or ODBC. Steps to Reproduce: 1. Create a database on the server (or a Firebird database file) to perform the test. 2. Establish a direct connection (with the internal driver) to the created database. 3. Simultaneously open the Calc attachment with the example data. 4. Select all the data from the Calc table and drag it to the Tables area of the database to import the data. 5. In the import steps, assign the new table a meaningful name, e.g. tbl_direct 6. Assign the imported fields the following types: - ID--> INTEGER and primary key. - TEXT--> VARCHAR(10) - DATES--> DATE 7. Check that the data has been imported correctly. 8. Save the database and close the connection (close Base). ---------- 9. Open Base and establish a new connection via JDBC with the previously created database or Firebird file. 10. Follow steps 4, 5 and 6 above to import the data into a new table, called for example tbl_jdbc. 11. Check that in this case the imported data does not match the original data. 12. Open simultaneously the tables tbl_direct and tbl_jdbc and verify that with the JDBC connection the data imported previously with the direct connection, now appear as erroneous, the same as those imported with JDBC. ----------- 13. Open the database again with the direct connection and open the two tables simultaneously. Check the data. The tbl_direct table imported directly shows the correct data, but the tbl_jdbc table imported with JDBC shows it incorrectly. ----------- 14. To check the data actually saved, connect directly to the database on the command line with isql (isql-fb), mariadb or psql, depending on the database used for testing. 15. Connect to the database 16. Make select * from tbl_direc (depending on the database you may need to add quotes to the table name) and check the saved data, the data is correct (transformed to Proleptic Gregorian calendar). 17. Make select * from tbl_jdbc and check the saved data, in this case the data are incorrect with both the Julian calendar and the Proleptic Gregorian calendar. Actual Results: 1. The data imported with the JDBC connection is incorrect. 2. The data in the tables are displayed differently if a direct connection is made than if it is made through JDBC. Expected Results: Imported data should be correct regardless of the connection used to import it. 2. The data in the tables should be displayed in the same way regardless of the connection used. 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: es-ES Calc: CL ---------------- Version: 7.4.2.3 / LibreOffice Community Build ID: 40(Build:3) CPU threads: 2; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: es-ES Ubuntu package version: 1:7.4.2~rc3-0ubuntu1 Calc: threaded -- You are receiving this mail because: You are the assignee for the bug.