Bug 155443 - MySQL/MariaDB direct connection: Impossible to change a field name in a table.
Summary: MySQL/MariaDB direct connection: Impossible to change a field name in a table.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.5.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.6.0 target:7.5.5
Keywords: bibisectNotNeeded, regression
Depends on:
Blocks:
 
Reported: 2023-05-23 07:09 UTC by Robert Großkopf
Modified: 2023-06-19 08:28 UTC (History)
2 users (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 2023-05-23 07:09:37 UTC
Open a direct connection to MariaDB.
Open a table for editing, not for input data.
Try to change a name of a column.
An error appears:

The column "Name" could not be changed. 
Should the column instead be deleted and the new format appended?

Press "More".
Error Details will show:

SQL Status: 42S02
Error code: 1146
Table 'test.test.Table2' doesn't exist at /home/buildslave/source/libo-core/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:120

It is right. this table doesn't exist. It is table 'test.Table2', not something like a separate schema (which doesn't exist in MariaDB) 'test' inside the database 'test'.

This bug appears in LO 7.5.3.2. on OpenSUSE 15.4 64bit rpm Linux.
It doesn't appear in LO 7.1.5.2.
With LO 7.2.5.2 and LO 7.3.5.2 it is impossible to set a cursor in a field, which already exists. In LO 7.4.7.2 the bug is the same as in LO 7.5.3.2.
So it is a regression, might be started at LO 7.2.0.
Comment 1 Julien Nabet 2023-05-24 20:21:03 UTC
I've submitted this patch here:
https://gerrit.libreoffice.org/c/core/+/152247

BTW, I got an hang after having trying Yes/No (before patch) or after having confirmed (after patch). I must kill LO to quit.
But it's another bug since when reopening the odb file, I can see the renaming worked.
Comment 2 Commit Notification 2023-05-25 06:28:47 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c557b30df03cb09ca7133d6921ece09a2a10eb3c

tdf#155443: MySQL/MariaDB direct connect: pb to change fieldname in table

It will be available in 7.6.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 3 Julien Nabet 2023-05-25 06:59:52 UTC
About the lock, I've submitted a patch for review here:
https://gerrit.libreoffice.org/c/core/+/152258
Comment 4 Julien Nabet 2023-05-25 07:28:07 UTC
Noel: just for the record, here's the bugtracker which allowed me to find the pb with the lock (see https://gerrit.libreoffice.org/c/core/+/152258)
Comment 5 Commit Notification 2023-05-25 09:54:11 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/a8dd0dd684cf76570f7906793d2450357152e756

tdf#155443: MySQL/MariaDB direct connect: pb to change fieldname in table

It will be available in 7.5.5.

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 6 Julien Nabet 2023-05-25 10:33:54 UTC
(In reply to Julien Nabet from comment #3)
> About the lock, I've submitted a patch for review here:
> https://gerrit.libreoffice.org/c/core/+/152258

Robert: the patch has just been pushed (see https://cgit.freedesktop.org/libreoffice/core/commit/?id=fd113e2f44d4e821e829fb71ac51da33a3284b2f).
So to test the daily build, this one should also include this last patch.
Comment 7 Commit Notification 2023-05-25 14:36:40 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e4261e4733f795da33fe8e263cf092b509ff7b4b

Related tdf#155443: MySQL/MariaDB direct connect, use more of the new function

It will be available in 7.6.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 8 Commit Notification 2023-05-26 11:38:05 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/8e4c2af59ad4901842b831c3e220411995b964a1

Related tdf#155443: MySQL/MariaDB direct connect, use more of the new function

It will be available in 7.5.5.

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.