Bug 56242

Summary: Libreoffice Base should handle tables without a primary key better
Product: LibreOffice Reporter: Rolf Leggewie <bugs.freedesktop.org>
Component: BaseAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: iplaw67, libreoffice13, robert
Priority: medium    
Version: 3.5.6.2 release   
Hardware: Other   
OS: All   
See Also: https://bugzilla.novell.com/show_bug.cgi?id=444129
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 56243    
Attachments: This is the https://bugzilla.novell.com/attachment.cgi?id=251407 test case
This is the https://bugzilla.novell.com/attachment.cgi?id=251613 screenshot

Description Rolf Leggewie 2012-10-21 05:49:51 UTC
originally reported as - https://bugzilla.novell.com/show_bug.cgi?id=444129

I think LO should handle tables without a primary key better (cf.
http://qa.openoffice.org/issues/show_bug.cgi?id=54168 as well)  Right now, when
you open such a table, it is opened as non-editable, leaving the user to wonder
about the reason.  I think the user should at least receive a warning about
this, possibly coupled with a suggestion to visit a website where more details
and possible solutions can be given (I understand there are some issues with
handling tables without primary keys and there is not one single, best answer)

Steps to reproduce:

1) Load https://bugzilla.novell.com/attachment.cgi?id=251407 into a MySQL
server of your choice
2) Create new database and connect to above database
3) optional: enable logging for your MySQL server
4) double click on table accounts which does have a primary key
5) double click on table accounts_ext which does not

Observe the difference between 4 and 5 in that cells in 4 are editable where
those from 5 are not.

FWIW, OOo/LO emits a useful warning when creating a table without a primary key: https://bugzilla.novell.com/attachment.cgi?id=251613
Comment 1 Robert Großkopf 2012-10-24 19:50:02 UTC
I have changed this bug to new. Its an enhancement, which isn't included yet. Also changed the Importance to "enhancement".
Comment 2 Alex Thurgood 2015-01-03 17:40:31 UTC Comment hidden (no-value)
Comment 3 Rolf Leggewie 2015-07-26 08:57:47 UTC
Created attachment 117443 [details]
This is the https://bugzilla.novell.com/attachment.cgi?id=251407 test case
Comment 4 Rolf Leggewie 2015-07-26 09:02:54 UTC
Created attachment 117444 [details]
This is the https://bugzilla.novell.com/attachment.cgi?id=251613 screenshot
Comment 5 Rolf Leggewie 2015-07-26 09:04:23 UTC
The situation in 4.2.8.2 is still as originally described
Comment 6 Rolf Leggewie 2015-08-03 13:31:54 UTC
I was trying to verify this today in 4.4.5 and 5.1.0.0.alpha1+ but I did not see how to connect to MySQL directly.  Only JDBC and ODBC were offered.  Is this something Ubuntu-specific, some kind of extension that needs to be added or something that was dropped since 4.2.8.2?
Comment 7 Robert Großkopf 2015-08-03 13:40:30 UTC
(In reply to Rolf Leggewie from comment #6)
> I was trying to verify this today in 4.4.5 and 5.1.0.0.alpha1+ but I did not
> see how to connect to MySQL directly.  Only JDBC and ODBC were offered.  Is
> this something Ubuntu-specific, some kind of extension that needs to be
> added or something that was dropped since 4.2.8.2?

You need an extension:
http://extensions.libreoffice.org/extension-center/mysql-native-connector

Works here also with LO 4.4. without problems.
Comment 8 Rolf Leggewie 2016-08-31 09:17:54 UTC
FWIW, I have version 1.0.2 of that extension since that is what's packaged for Ubuntu trusty.  Not sure if that's where the difference comes from.  I cannot activate the more recent 1.0.4_3 alongside.
Comment 9 Rolf Leggewie 2016-08-31 10:33:17 UTC
Where does that particular newer version come from anyhow?  LO itself still has only 1.0.2 as oneh can see from https://cgit.freedesktop.org/libreoffice/core/tree/mysqlc/source/description.xml#n23
Comment 10 Julien Nabet 2022-02-02 19:11:24 UTC
*** Bug 81430 has been marked as a duplicate of this bug. ***