Bug 117589 - Firebird: set the "ParameterNameSubstitution" parameter at migration time
Summary: Firebird: set the "ParameterNameSubstitution" parameter at migration time
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
(earliest affected)
Hardware: All All
: high major
Assignee: Not Assigned
: 121477 122515 (view as bug list)
Depends on:
Blocks: Database-Firebird-Migration
  Show dependency treegraph
Reported: 2018-05-12 18:44 UTC by Stang
Modified: 2019-01-06 17:08 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:

Converted to Firebird Base file (14.30 KB, application/vnd.oasis.opendocument.database)
2018-05-12 18:45 UTC, Stang
Error generated (20.56 KB, image/png)
2018-05-12 18:45 UTC, Stang

Note You need to log in before you can comment on or make changes to this bug.
Description Stang 2018-05-12 18:44:10 UTC
After migrating an HSQLDB Base file to Firebird, a link present (master/slave) generates an error in LO 6.1 alpha1.  This same converted Base file can be opened in LO v6.02 and works.

Steps to Reproduce:
1.  Use Base file converted to Firebird
2.  Open form containing master/slave link

Actual Results:  
Error generated (see attached)

Expected Results:
Link data between form and subform

Reproducible: Always

User Profile Reset: No

Additional Info:
Base file used was that generated after conversion (see bug 117588)  Copy attached.

LO version used:

Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

error generated - see attachment.

This same Base file can be opened using:

Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

and the form works without error.

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36
Comment 1 Stang 2018-05-12 18:45:08 UTC
Created attachment 142060 [details]
Converted to Firebird Base file
Comment 2 Stang 2018-05-12 18:45:42 UTC
Created attachment 142061 [details]
Error generated
Comment 3 Drew Jensen 2018-05-12 19:32:32 UTC
I can confirm that the form does work in 6.1, and that it does work as expected under 6.0.3. (64bit linux both)

Attempting to create a form in 6.1 (firebird sdbc) from scratch fails also, so not really a migration script error IMO.

I think there is an issue for the sub form bug already, I'll look for it and tag this to that if so.
Comment 4 Drew Jensen 2018-05-12 19:40:20 UTC
I don't see an earlier bug report for this, so setting this to new.

Same error code is displayed whether the form was made before migration or a simpler form using a link field afterwards: 
firebird_sdbc error:
*Dynamic SQL Error
*SQL error code = -206
*Column unknown
*At line 1, column 72
caused by
Comment 5 Lionel Elie Mamane 2018-05-30 14:35:59 UTC
Hmm... /me thinks the migration needs to set the "ParameterNameSubstitution" parameter.

See https://bugs.documentfoundation.org/show_bug.cgi?id=117053#c15
Comment 6 Drew Jensen 2018-05-30 14:40:22 UTC
*** Bug 117856 has been marked as a duplicate of this bug. ***
Comment 7 Xisco Faulí 2018-06-06 18:11:29 UTC
This is basically the same problem as in bug 117053.

based on comment 5, adjusting summary...
Comment 8 Xisco Faulí 2018-06-14 09:40:18 UTC
Hi Julien,
is this issue also fixed by https://cgit.freedesktop.org/libreoffice/core/commit/?id=c179e8a7ea273a48713192c3ba7dfea313149cd8 ??
Comment 9 Julien Nabet 2018-06-14 09:49:17 UTC
(In reply to Xisco Faulí from comment #8)
> Hi Julien,
> is this issue also fixed by
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=c179e8a7ea273a48713192c3ba7dfea313149cd8 ??

To sum up Lionel's comments here or on gerrit
1) I must check that if I change the substitution parameter for the file either by unzipping the file, changing a content, rezipping... or by using the macro proposed by Lionel, I won't reproduce the buggy behaviour.
If this is ok, it means the patch is ok but only for the new created files.

2) Lionel proposed another idea which consists to bypass the value in the file. This must be tested.
It'd allow to have the right result even with old files (I mean files created before the patch pushed on master, so 99,99999999999% of them :-) )

3) Finally, this patch or the both patch should be at minimum on master + 6.1 branch. I'd like also see this/them on 6.0 branch.

In brief, I'd say it's not yet fixed.

Hope it's clear + I didn't misunderstand Lionel's view :-)
Comment 10 Julien Nabet 2018-06-14 09:50:38 UTC
Argh! thought it was 118112 (so for mysql)
Forget my previous message, I must take a real look here.
Comment 11 Julien Nabet 2018-06-14 09:58:03 UTC
Xisco: The quoted patch concerns odb linked with Mysql DBs only so it doesn't fix this one.
I don't know how to fix this but according to Lionel's comment 5, the patch is expected to be quite different as the one you quoted since it's the migration part which must be changed.

Very sorry for the confusion triggered by my comment 9.
Comment 12 Lionel Elie Mamane 2018-12-24 16:25:44 UTC
*** Bug 121477 has been marked as a duplicate of this bug. ***
Comment 13 Drew Jensen 2019-01-06 17:08:43 UTC
*** Bug 122515 has been marked as a duplicate of this bug. ***