| Summary: | MariaDB/MySQL direct connection: Trying to insert NULL in NOT NULL fields will automatically changed in empty text or 0 | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Robert Großkopf <robert> |
| Component: | Base | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | NEW --- | ||
| Severity: | normal | CC: | adamseskunas, iplaw67, lionel |
| Priority: | medium | Keywords: | bibisectRequest |
| Version: | 6.3.0.4 release | ||
| Hardware: | x86-64 (AMD64) | ||
| OS: | All | ||
| See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=116253 https://bugs.documentfoundation.org/show_bug.cgi?id=157357 https://bugs.documentfoundation.org/show_bug.cgi?id=157909 |
||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 104790 | ||
|
Description
Robert Großkopf
2023-05-28 08:00:07 UTC
Confirming the bug is present when using a MariaDB direct connection in: Version: 7.5.3.2 (X86_64) Build ID: 50(Build:2) CPU threads: 1; OS: Linux 6.3; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded and Version: 7.7.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 5a2c6f4df7149f8c1f543f120fe19bd66abfc189 CPU threads: 1; OS: Linux 6.3; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded The bug is not present when using a JDBC connection, so this might have something to do with the MariaDB direct connection. A JDBC connection will open the original table with blank fields, but will enforce the NOT NULL condition on newly input data. I can reproduce this in a direct connection against a MySQL server instance with Version: 7.5.1.2 (AARCH64) / LibreOffice Community Build ID: fcbaee479e84c6cd81291587d2ee68cba099e129 CPU threads: 8; OS: Mac OS X 13.4; UI render: Skia/Raster; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR Calc: threaded I don't recall this behaviour in older versions of LO, but can not test them on macOS. This would appear to be a regression. Tested also with a date: Will insert '0000-00-00', which is a wrong date and will be shown in Base frontend as '03.01.-1' (In reply to Robert Großkopf from comment #4) > Tested also with a date: Will insert '0000-00-00', which is a wrong date and > will be shown in Base frontend as '03.01.-1' Let me guess, is that date display the default date which is set in Calc? This whole thing smells like a problem with the number formatter from Calc's dateutils. In bug 157909, I wondered whether a related issue was due to the type conversion call in: formattedcolumnvalue.cxx lines 78-79: FormattedColumnValue_Data() :m_aNullDate( DBTypeConversion::getStandardDate() ) (In reply to Alex Thurgood from comment #5) > (In reply to Robert Großkopf from comment #4) > > Tested also with a date: Will insert '0000-00-00', which is a wrong date and > > will be shown in Base frontend as '03.01.-1' > > Let me guess, is that date display the default date which is set in Calc? Don't know where the formatting comes from. Just tested with LO 24.2.3.2 and the formatting changed a little bit. Now I get '02.01.1' instead. Last version with '03.01.-1' is LO 7.4.7.2 here. Showing totally wrong content is another bug. Let's first get it working to send NULL for an empty field to the database. |