Bug 150854 - LO Base Relationship->Relations dialog shows Delete Options wrongly, using MariaDB and direct connection (not JDBC)
Summary: LO Base Relationship->Relations dialog shows Delete Options wrongly, using Ma...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-08 06:35 UTC by tommy.rausberg
Modified: 2022-09-23 16:36 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 tommy.rausberg 2022-09-08 06:35:41 UTC
Description:
Database: tables book and author and a bookauthors table connecting the many to many relation between the two.

Base Tools->Relationships->Relations radio buttons does not indicate constraints set in database correctly, particularly 'delete options'.

Steps to Reproduce:
1. Set a fk constraint to "delete no action" in 'mysql' utility.
2. Open Base Relationships, dblklick 1->n relation.
3. Save relations in Base and run 'show create table <tablename>;' in 'mysql'.

Actual Results:
Step 2 above: Relations dialog erroneously shows radio button "delete cascade" active.

Step 3 above: Setting 'delete no action' is now absent.

Expected Results:
The state of Base Tools->Relationships radio buttons reflects constraints in database.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.5.2 / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 4; OS: Mac OS X 10.13.6; UI render: default; VCL: osx
Locale: sv-SE (en_SE.UTF-8); UI: en-US
Calc: threaded

Using MariaDB 10.5.16
Comment 1 tommy.rausberg 2022-09-08 08:31:14 UTC
There should have been a step 2.5 in the 'Steps to Reproduce' section: Click to activate the Delete options 'no action' radio button.

Sorry about that.
Comment 2 Robert Großkopf 2022-09-23 16:36:37 UTC
Have had a look at this with MariaDB on OpenSUSE 15.3
Direct connection from LO 7.3.6.2
When Base will show in relationships
"Update cascade" and "Delete cascade" it will both be shown in PHPMyAdmin as "No action"

If I try to Update a primary key, which is foreign key in the other table an error appers:
Cannot delete or update a parent row: a foreign key constraint fails ("test"."Person", CONSTRAINT "Person_ibfk_1" FOREIGN KEY ("Sport_ID") REFERENCES "Sport" ("ID") ON DELETE NO ACTION ON UPDATE NO ACTION) /home/buildslave/source/libo-core/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119

So the shown connection in Base for direct connection to MariaDB is wrong.

Tried the same with JDBC-connection (org.mariadb.jdbc.Driver, version mariadb-java-client-2.4.1.jar). Relation will be shown right way. So this seem to be a special bug of direct connection to MariaDB/MySQL.