Bug 166329 - FIREBIRD Migration Wizard: Parametrized Queries won't work, work well in internal HSQLDB and also in directly created internal Firebird DB
Summary: FIREBIRD Migration Wizard: Parametrized Queries won't work, work well in inte...
Status: RESOLVED DUPLICATE of bug 117589
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-24 16:20 UTC by Tony Chapman
Modified: 2025-04-25 21:01 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Open the attached database. Execute the query and input a number for parameter. (5.36 KB, application/vnd.oasis.opendocument.database)
2025-04-25 07:26 UTC, Robert Großkopf
Details
Test Database (2.53 MB, application/vnd.oasis.opendocument.database)
2025-04-25 16:05 UTC, Tony Chapman
Details
Further Test Databases (1.76 KB, application/vnd.oasis.opendocument.database)
2025-04-25 16:28 UTC, Tony Chapman
Details
AJC Test1a DB attached (2.53 MB, application/vnd.oasis.opendocument.database)
2025-04-25 16:30 UTC, Tony Chapman
Details
Database migrated by wizard - parameter fails (6.58 KB, application/vnd.oasis.opendocument.database)
2025-04-25 17:39 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chapman 2025-04-24 16:20:03 UTC
Description:
When using a user entry field for a filter criteria results in a failure (i.e using :InputField). Th parameter entry box is displayed, but then fails with the following:

The data content could not be loaded
firebird_sdbc error:
*Dynamic SQL Error
*SQL error code = -206
*Column unknown
*INPUTFIELD
*At line 1, column 944
caused by
'isc_dsql_prepare'

This worked when the database was HSQLDB but now fails after converting to firebird embedded.

Filter works when entering text in the criterion field

Steps to Reproduce:
1. entering a user input (i.e. :InputField) in the "Criterion" field on the query consistency produces the above error
2.
3.

Actual Results:
error as above

Expected Results:
query should execute as documented


Reproducible: Always


User Profile Reset: Yes

Additional Info:
None, failure as described above

Version: 25.2.2.2 (AARCH64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 8; OS: macOS 15.5; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Robert Großkopf 2025-04-25 07:26:41 UTC
Created attachment 200507 [details]
Open the attached database. Execute the query and input a number for parameter.

Couldn't confirm the buggy behavior.
Open the database and try.
Works here without any problem.

Version: 25.2.3.1 (X86_64) / LibreOffice Community
Build ID: d8d1af5f77df955194e52baabe19324532ac8e8b
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 2 Alex Thurgood 2025-04-25 10:19:43 UTC
@Tony: we need more information, preferably your own sample embedded Firebird file to test.

I tested with Robert's file, and the filter worked (with the condition specified) against the integer values of the field.

You mention that filtering works with a text field, so which field type/content does it not work with ?
Comment 3 Alex Thurgood 2025-04-25 10:24:30 UTC
Tested on

Version: 25.2.2.2 (AARCH64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 8; OS: macOS 15.4.1; UI render: Skia/Metal; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 4 Alex Thurgood 2025-04-25 10:27:13 UTC
I also created a query paramater based on the boolean field in Robert's test file, and could filter correctly on that field by entering 0 or 1 in the query parameter dialog when it was displayed.
Comment 5 Tony Chapman 2025-04-25 15:45:27 UTC
Thanks, so that works.
So what could be wrong with my DB?
I have copied the table to a new one, and created another query. Same result.
I have created a new query against another existing  simple 2 field table in the same database, with the same result.
Comment 6 Robert Großkopf 2025-04-25 16:01:10 UTC
(In reply to Tony Chapman from comment #5)
> Thanks, so that works.
> So what could be wrong with my DB?
> I have copied the table to a new one, and created another query. Same result.
> I have created a new query against another existing  simple 2 field table in
> the same database, with the same result.

Try to reproduce the behavior with a Base/Firebird-file you created on your system. 
Could you reproduce the bug with this file?
If not: Might be your system isn't using same Firebird connection to the internal driver. Have seen this on some special Linux installations: Packages of the distributions run with Firebird 4, which isn't the internal Firebird version.
Comment 7 Tony Chapman 2025-04-25 16:05:54 UTC
Created attachment 200521 [details]
Test Database

See the attached database. I contains a simple 2 column table "Continent LookUp". I have created 2 queries:
Query1 uses a fixed criteria of NA and works correctly
Query2 uses user input. The user input pop up appears correctly, but when entering NA in the entry field, the same error as reported initially is produced.
Comment 8 Tony Chapman 2025-04-25 16:28:22 UTC
Created attachment 200525 [details]
Further Test Databases

So some further tests:

The previous test database (AJC Test) was created from my ori=ginal DB but I deleted tables, queries and reports.. I created the new query as described.
Test database "AJC Test1a" is teh dsame DB, but I created a new table (Table2) and associated query (Query3) and exhibits the same behaviour

Database "AJC Test2" was created from scratch with Table "Table1" and new query "Query1" and works as expected.
Comment 9 Tony Chapman 2025-04-25 16:30:31 UTC
Created attachment 200526 [details]
AJC Test1a DB attached

I don't this DB got uploaded (can you only upload 1 attachment at a time?)
Comment 10 Tony Chapman 2025-04-25 16:50:32 UTC
OK, So I have created a new database shell and then copied all the tables, queries, reports etc. from the original and this seems to have resolved the issue.
Something with the original conversion from HSQLDB, which was performed automatically by the system?
Comment 11 Robert Großkopf 2025-04-25 17:39:17 UTC
Created attachment 200530 [details]
Database migrated by wizard - parameter fails

It's the migration wizard, which produces this wrong behavior in Firebird databases.

Open the attached database.
Execute the query and write something like 'a' for the parameter.
Parameter fails.

This database has first been created as internal HSQLDB, then the experimental features had been activated and the resulting Firebird database you could see.

Directly creating a internal Firebird database will be working with the table and the query.

Attachment created with
Version: 25.2.3.1 (X86_64) / LibreOffice Community
Build ID: d8d1af5f77df955194e52baabe19324532ac8e8b
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 12 Robert Großkopf 2025-04-25 17:46:21 UTC
I got the duplicate:
https://bugs.documentfoundation.org/show_bug.cgi?id=117589

Its the "ParameterNameSubstitution", which isn't set by the Wizard.

*** This bug has been marked as a duplicate of bug 117589 ***
Comment 13 Alex Thurgood 2025-04-25 21:01:21 UTC
LOL, bitten by a 7 year old bug that's still not fixed, despite its "major" status.

I suppose if anything, it brings home the reminder not to use the migration wizard for anything but the simplest of hsqldb embedded databases.