https://bugs.documentfoundation.org/show_bug.cgi?id=150338
Bug ID: 150338
Summary: VARCHAR concatenation error with embedded Firebird
Base LO version 7.3.5 (Mac OS 'Catalina')
Product: LibreOffice
Version: 7.3.5.2 release
Hardware: Other
OS: macOS (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Base
Assignee: [email protected]
Reporter: [email protected]
Description:
I am using Base on Mac OS 'Catalina' version 10.15.7. Having just upgraded my
local LibreOffice instal from version 7.3.3 to v. 7.3.5 I find that one of my
Base FORMS with a LIST BOX throws an error when the form is opened. Basically,
the listbox allows a client name to be selected using a drop-down and the SQL
code for the listbox concatenates the client's last and first names and the
client ID (integer) is written to a filter table (to show that client's records
in the form.
The listbox code is:
SELECT COALESCE ( "lastname", '' ) || ', ' || COALESCE ( "firstname", '' ),
"id_cl" FROM "clients" ORDER BY "lastname" ASC
The above code worked fine with Base in LO 7.3.3 but throws the ERROR message
below with LO 7.3.5...
firebird_sdbc error:
*arithmetic exception, numeric overflow, or string truncation
*string right truncation
*expected length 34, actual 69
caused by
'isc_dsql_fetch'
The last name and first name columns of the clients table are both VCHAR(16).
If I change them both to VCHAR(50) the error changes also to..
*expected length 102, actual 205
So mathematically the 'actual' value in the error message above seems to be
twice expected length+1
.... which does seem little strange!
NOTE: The same error above occurs when I use the above-quoted query code just
as a normal query in the Base QUERIES list (i.e. not as a list-box code).
I have also tried simple concatenation of the last name and first name fields
which produce the same error.
When I revert back to LO v.7.3.3, the above problem goes away and the query
gives the correct concatenation of LASTNAME and FIRSTNAME. I will attach a
sample Firebird embedded Base file to demonstrate the problem.
I have posted a description of this problem on ask.libreoffice.org - see LINK
BELOW....
https://ask.libreoffice.org/t/form-listbox-firebird-sql-error-base-7-3-5/80265
....and tried all the things suggested there so far. The only thing that works
is reverting back to the earlier version of LibreOffice. So this does seem like
a bug only affecting the Mac version and versions of LO Base after version
7.3.3.
Steps to Reproduce:
1. Run query to concatenate lastname and firstname (for listbox) - see above in
my DESCRIPTION of the problem.
Actual Results:
Error message (see above in my description)
Expected Results:
Concatenation of lastname and firstname (with comma separation)
Reproducible: Always
User Profile Reset: No
Additional Info:
I tried all suggestions given by 'Ask LibreOffice' helpers and nothing worked.
I believe the problem might also be present in LO Bose 7.3.4.2 (only tested
once and didn't take notes).
--
You are receiving this mail because:
You are the assignee for the bug.