Bug 149951 - MySQL/MariaDB: direct Connection → Impossible to save images in BLOB-fields
Summary: MySQL/MariaDB: direct Connection → Impossible to save images in BLOB-fields
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.3.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.5.0 target:7.4.0.2
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-11 14:37 UTC by Robert Großkopf
Modified: 2022-07-12 07:41 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2022-07-11 14:37:46 UTC
This Bug appears with the internal direct connection to MySQL/MariaDB:

Create a table in MySQL/MariaDB with a field, which should contain images. Have tested this with different types like BLOB, MEDIUMBLOB …
Create a form for input data into this table.
Open the form for input data. You could choose an image, see the image but the image won't be saved. You could move next row and back and image has been gone.

Close the Base file and connect through JDBC to MySQL. Create a new form for the same table. 
Open the form for input data. You could choose an image, see the image and the image will be saved. Move next row and back and you could see the image.

Close the Base file and reopen the Base file for direct connection.
Open the form you created.
You could see the image. Direct connection couldn't write the BLOB data, but could read it well.

Detected this with LO 7.3.5.1 on OpenSUSE 15.3 64bit rpm Linux.
Comment 1 Julien Nabet 2022-07-11 19:07:38 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 2 Julien Nabet 2022-07-11 19:19:00 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/136964
Comment 3 Commit Notification 2022-07-11 20:45:49 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/44eac6530c9692eeaf51efdbd2f5f37180c9c214

tdf#149951: MySQL/MariaDB (direct connection) save images in BLOB-fields

It will be available in 7.5.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.
Comment 4 Julien Nabet 2022-07-11 20:47:55 UTC
Cherry-pick for 7.4 waiting for review here:
https://gerrit.libreoffice.org/c/core/+/136974
Comment 5 Commit Notification 2022-07-12 07:41:26 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/6701e0ac8ad98586280f071fac9f3e094aed8ee8

tdf#149951: MySQL/MariaDB (direct connection) save images in BLOB-fields

It will be available in 7.4.0.2.

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.