Description: 1) Create the following mysql/mariadb table from the mysql command line : create table employee (ID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, fname varchar(30), lname varchar(50), ts timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); Add some data to the table : INSERT into employee vALUES (NULL,'Peter','Haven',NULL); INSERT into employee vALUES (NULL,'Anne','Jones',NULL); INSERT into employee vALUES (NULL,'Lars','Hedegaard',NULL); 2) Create an ODB file that connects to the database containing the table. Double-click on the table entry 'employee' in the list of tables. 3) Notice how the timestamp fields are displayed as a DECIMAL value and is incorrect as it clearly represents a rounded value. 4) The display format can be changed for the current session to display the timestamp values, but this is not saved on shutdown and reload of the ODB file. 5) Point (4) is at best a temporary and transitory workaround, as the grid view should display the timestamp value rather than some converted decimal value. Steps to Reproduce: See above Actual Results: Incorrect (and inprecise) conversion of timestamp values to decimal value in table data entry mode (grid view). Expected Results: The timestamp values should be displayed as they actually exist in the DB. Reproducible: Always User Profile Reset: Yes Additional Info:
On pc Debian x86-64 with master sources updated yesterday, I gave it a try and indeed reproduced this. I noticed this on console: warn:legacy.osl:7537:7537:connectivity/source/drivers/mysqlc/mysqlc_general.cxx:224: Unknown type name from string, failing back to varchar. warn:dbaccess.core:7537:7537:dbaccess/source/core/api/RowSetCache.cxx:140: ORowSetCache: N3com3sun4star3uno9ExceptionE msg: OPreparedResultSet::beforeFirst: feature not implemented.
Tamas/Lionel: I submitted this patch on gerrit: https://gerrit.libreoffice.org/66495
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/5d1a654a14696e181b49f18ea4d685d78fb1a516%5E%21 tdf#122516: fix timestamp in MariaDb/mysql It will be available in 6.3.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.
Cherry-pick for 6.2 on gerrit review: https://gerrit.libreoffice.org/#/c/66497/
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-6-2": https://git.libreoffice.org/core/+/78335b8848ed95c978b9c23639ec7711fec1c1b8%5E%21 tdf#122516: fix timestamp in MariaDb/mysql It will be available in 6.2.1. 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.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-6-2-0": https://git.libreoffice.org/core/+/6d38c3088532959e1d7ffd4e4714b5ad39b02685%5E%21 tdf#122516: fix timestamp in MariaDb/mysql It will be available in 6.2.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.