Bug Hunting Session
Bug 120945 - FIREBIRD: Relationship of tables isn't recognized by formwizard
Summary: FIREBIRD: Relationship of tables isn't recognized by formwizard
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:6.4.0 target:6.3.3
Keywords:
Depends on:
Blocks: Database-Firebird-Default
  Show dependency treegraph
 
Reported: 2018-10-26 19:40 UTC by Robert Großkopf
Modified: 2019-09-12 09:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Firebird database - test to create a form with subform by wizard (3.64 KB, application/vnd.oasis.opendocument.database)
2018-10-26 19:41 UTC, Robert Großkopf
Details
HSQLDB database - creating form with subform by wizard works (3.71 KB, application/vnd.oasis.opendocument.database)
2018-10-26 19:42 UTC, Robert Großkopf
Details
Prepared patch (2.91 KB, patch)
2019-09-11 08:42 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2018-10-26 19:40:42 UTC
Description:
There are two databases attached.
Both databases have declared a relationship between the tables.
Start the formwizard with the HSQLDB-database.
First choose table "Images" and all fields of the table.
Second try to add a subform.
Table "ImageCategories" will be shown and added to subform.

Works with the HSQLDB-Database, fails with internal Firebird-Database.

Steps to Reproduce:
see above

Actual Results:
Table for subform doesn't appear in Firebird, but relationship has been declared right.

Expected Results:
Table for subform has to appear if relationship has been saved to database.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Robert Großkopf 2018-10-26 19:41:32 UTC
Created attachment 146047 [details]
Firebird database - test to create a form with subform by wizard
Comment 2 Robert Großkopf 2018-10-26 19:42:27 UTC
Created attachment 146048 [details]
HSQLDB database - creating form with subform by wizard works
Comment 3 Drew Jensen 2018-10-26 21:29:37 UTC
Confirmed with Ubuntu 18.04 and LibreOffice 5.4.7 and 6.2Alpha1
Comment 4 Julien Nabet 2019-09-10 13:42:35 UTC
On Win10 with master sources updated today, I could reproduce this.

I noticed these logs:
warn:connectivity.firebird:13144:18512:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1468: Not yet implemented
warn:legacy.osl:13144:18512:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1469: Not implemented yet!

It corresponds to https://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/DatabaseMetaData.cxx?r=58bed4f3#1462
Comment 5 Julien Nabet 2019-09-11 08:42:39 UTC
Created attachment 154097 [details]
Prepared patch

I've prepared a patch that I'll submit tonight.

It implements getExportedKeys. The only diff with getImportedKeys is the fact that :
- in getImportedKeys, table name is the foreign key
- in getExportedKeys, table name is the primary key
Instead of duplicating the whole code of getImportedKeys , I created a local function which contains the main part.
Comment 6 Julien Nabet 2019-09-11 19:28:37 UTC
Patch submitted for review:
https://gerrit.libreoffice.org/#/c/78822/
Comment 7 Commit Notification 2019-09-11 21:11:20 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/7289828e106081ddae0e053d306fef5ffd0dee3b%5E%21

tdf#120945: Relationship of tables isn't recognized by formwizard

It will be available in 6.4.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 2019-09-12 09:33:41 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/c5b79cd7fd0f6f34d2275d659eb3fc763fc363db%5E%21

tdf#120945: Relationship of tables isn't recognized by formwizard

It will be available in 6.3.3.

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.