Bug 35375 - Database error when date field empty.
Summary: Database error when date field empty.
Status: CLOSED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 16:57 UTC by Rodney
Modified: 2011-09-02 03:37 UTC (History)
0 users

See Also:
Crash report or crash signature:
Regression By:


Attachments
Error screenshot (13.46 KB, image/png)
2011-03-16 16:57 UTC, Rodney
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rodney 2011-03-16 16:57:09 UTC
Created attachment 44531 [details]
Error screenshot

When a date field is empty (most likely null) in a table, LibreOffice errors that it cannot convert value '0000-00-00 00:00:00' to TIMESTAMP (in my case it is a time stamp, but a date field has the same error).  A colleague thinks it might a JDBC error - I am connecting with the latest (mysql-connector-java-5.1.15-bin.jar) connector.
Comment 1 Alex Thurgood 2011-03-16 17:41:54 UTC
This is an old JDBC driver error, which is further compounded by the version of mysql server that you happen to be using, as date and time handling has changed with the move to the 5.x series of mysql servers. By default, a null timestamp field like the one you mention will be created in mysql if such a field is not filled with data, eg. with CURRENT_TIMESTAMP or user input. If you then access the database with the JDBC driver and OOo/LibO, you will encounter this error frequently.

Until Oracle fix the problem in the JDBC driver, then nothing will change for OOo/LibO.

With ODBC, or the native mysql connector driver for OOo/LibO, you don't get these error messages (however ODBC has other drawbacks, like no support for binary objects). 


So not really a LibO bug as far as I can tell.

Alex