Bug 159010

Summary: FIREBIRD: Text in queries will be followed by many spaces
Product: LibreOffice Reporter: Robert Großkopf <robert>
Component: BaseAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: miguelangelrv
Priority: medium    
Version: 7.6.4.1 release   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: Testdatabase - execute queries in Tools → SQL. Let you show the output.

Description Robert Großkopf 2024-01-04 07:16:38 UTC
Created attachment 191747 [details]
Testdatabase - execute queries in Tools → SQL. Let you show the output.

Open the attached database.
Go to Tolls → SQL.
Press "Show output of "select" statements.
Run 
SELECT "ID", 'Street' "S", "Street", 'PC' "P", "Postcode", "Town" FROM "tbl_address"
You will see the folloing output:

1,Street                  ,Pappelallee 13a,PC      ,67891,Nowhere,

Direct input for text content will be followed by Spaces, which expands the text to 4* (2 charcters → 8 charactes with spaces …)

Run
SELECT "ID", TRIM ( BOTH FROM 'Street' ) "S", "Street", TRIM ( BOTH FROM 'PC' ) "P", "Postcode", "Town" FROM "tbl_address"

and the spaces have been gone.
The 2 queries will contain the code for this also.
Detected this problem while exporting queries into *.txt (*.xml) files.

Seems it is connected to the behavior of Firebird with character lengths. It had been a problem some times ago. The character length for Firebird in LO had been moved down from 32.767 bytes to 8.191 chars for UTF8 code (32.767/4 = 8.191).

Detected this here in all installed versions of LO, special LO 7.6.4.1 on OpenSUSE Linux.
Comment 1 m_a_riosv 2024-01-05 00:45:44 UTC
Reproducible
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded