Bug 159010 - FIREBIRD: Text in queries will be followed by many spaces
Summary: FIREBIRD: Text in queries will be followed by many spaces
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Queries
  Show dependency treegraph
 
Reported: 2024-01-04 07:16 UTC by Robert Großkopf
Modified: 2024-12-23 14:23 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Testdatabase - execute queries in Tools → SQL. Let you show the output. (4.64 KB, application/vnd.oasis.opendocument.database)
2024-01-04 07:16 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
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