Bug 151875 - MySQL/MariaDB direct Connection: Column Description won't be saved
Summary: MySQL/MariaDB direct Connection: Column Description won't be saved
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2022-11-03 11:13 UTC by Robert Großkopf
Modified: 2023-10-18 08:31 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of "Description" (saved in *.odb) and "Column Description" (saved in MariaDB) (61.31 KB, image/png)
2022-11-03 11:13 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2022-11-03 11:13:04 UTC
Created attachment 183388 [details]
Screenshot of "Description" (saved in *.odb) and "Column Description" (saved in MariaDB)

Open a *.odb-file connected by direct connection to MySQL/MariaDB.
Create a new table.
In dialog you could see "Field Name", "Filed Type", "Description" and "Column Description".
Write down a "Description" and a "Column Description". Might be the same content, better is a different content for getting the difference.
Save the table.
The "Column Description" won't be saved, the description has been lost.

Do the same connecting with JDBC driver to MariaDB (here: mariadb-java-client-2.4.1.jar)
"Column Description" will be saved. 

"Column Description" is saved by the command COMMENT in MariaDB. So you could read this description when connecting to MariaDB with any other connector, not only (like "Description") with a special *.odb-file.

Close the JDBC-connected file and reopen the direct connection.
Open the new created table for editing, not for input data.
You could read the column description with direct connection. So only saving this description as COMMENT in the database has to be added.

Note: If you are using a LO-version from a Linus distribution could be the "Column Description" is missing. Special OpenSUSE doesn't show this, but LO directly from LibreOffice will show the content.
Comment 1 Alex Thurgood 2022-11-03 13:59:03 UTC
Confirming with

Version: 7.4.1.2 / LibreOffice Community (aarch64) MacOS Ventura M1
Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0
CPU threads: 8; OS: Mac OS X 13.0; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded

I used the following JDBC driver :
mysql-connector-java-8.0.27.jar

but the result is the same as reported, the descriptions get saved with the JDBC connector, and not with the direct/native connector.
Comment 2 Robert Großkopf 2022-11-03 14:19:46 UTC
This worked well in LO 7.1.5.2.
In LO 7.2.5.2 and LO 7.3.6.2 "Column Description" disappeared completely.
Had a comeback in LO 7.4.0.3, but content won't be saved.

So it is a regression to LO 7.1, but at this moment better than LO 7.2 and LO 7.3 …
Comment 3 Julien Nabet 2022-11-03 16:11:25 UTC
Just for information, if I add a comment in a field of a table with phpmyadmin, I can see it on LO (at least on pc Debian x86-64 with master sources updated today with Mysql/MariaDB direct connection).
So the pb seems only comment saving.
Comment 4 Robert Großkopf 2022-11-03 16:34:29 UTC
(In reply to Julien Nabet from comment #3)
> So the pb seems only comment saving.

Yes, problem is only saving. Works with LO 7.1, fails since LO 7.4. (Column Description not available in LO 7.2 and LO 7.3)
Did the first test like you did - with PHPMyAdmin
Comment 5 Julien Nabet 2022-11-03 17:12:19 UTC
Sorry, I tried to compare a bit 7.0 and master sources in connectivity/source/drivers/mysqlc but found no hint.
I can't help here=>uncc myself.
Comment 6 jcsanz 2023-10-17 21:24:07 UTC
Bibisected with bibisect-win64-7.2 repo, it seems that the "Column Description" disappears and after that, when reappears didn't work properly, in the next commit:

commit 2c370ceb462387c74878451e3bdf8c156175b4ea
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Jun 16 00:01:53 2021 -0700

    source ffc6d564b91692cd9d99a0eb3b1ceaf54f7db89e

commit ffc6d564b91692cd9d99a0eb3b1ceaf54f7db89e
author	Jan-Marek Glogowski <glogow@fbihome.de>	Tue Jun 01 07:40:12 2021 +0200
committer	Jan-Marek Glogowski <glogow@fbihome.de>	Tue Jun 01 20:04:56 2021 +0200
tree 802161bbd2537009992ee519b3aefc59ee054ca8
parent 7cdf74b305be14825c615b2abe6ab8d79fe858ff

Adding Cc: to Jan-Marek Glogowski
Could you possibly take a look at this one? Thanks