Bug 106866 - When I change the field length of the result is multiplied by 4 each time (firebird, varchar)
Summary: When I change the field length of the result is multiplied by 4 each time (fi...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
(earliest affected) release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
Whiteboard: target:5.4.0
Depends on:
Reported: 2017-03-30 07:50 UTC by avsharapov
Modified: 2022-03-10 11:08 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description avsharapov 2017-03-30 07:50:37 UTC
When I change the field length of the result is multiplied by 4 each time.
For example, when I enter a length equal to 100, it creates a field with a length of 400.
For information: Locale ru-RU

Actual Results:  
Creates a field of wrong length

Expected Results:
I would like to create a database field desired length

Reproducible: Always

User Profile Reset: No

Additional Info:

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Comment 1 avsharapov 2017-03-30 07:52:35 UTC
Base - Firebird
Comment 2 Robert Großkopf 2017-03-30 18:56:37 UTC
Opened a Firebird-Database with LO on OpenSUSE 64bit rpm Linux, German GUI-language.
Created a new table with an Integer and a Varchar-field. Varchar had length while creating the table.
Saved the table, closed the table, closed LO.
Then reopened the database, reopened the table for editing, ot for putting values in rows.
Length of Varchar-field is 100 as expected.

So I couldn't confirm this bug.

Might be a special effect while fixing bug 105142
Comment 3 avsharapov 2017-03-31 06:08:41 UTC
Version for Firebird I found a lot of problems.
I think it had something to do with an attempt to recalculate the lengths for the locales which are saved in UTF8, two bytes (in the previous version that I such attempts have not seen).
But if you try on the versions in Latin locale, you are unlikely to be able to confirm at least one.
Will have to wait for the opinions of Chinese users . :(
Anyway. Thank you for your work.
Good luck
Comment 4 Alex Thurgood 2017-04-07 08:13:49 UTC
Possibly linked to this bug :

Comment 5 Alex Thurgood 2017-04-07 08:28:06 UTC
As Robert has mentioned, it could also be a side effect of 


where these lines were added :

+            const char sCharset[] = "UTF8";
+            *dpb++ = isc_dpb_set_db_charset;
+            int nCharsetLength = sizeof(sCharset) - 1;
+            *dpb++ = (char) nCharsetLength;
+            strcpy(dpb, sCharset);
+            dpb+= nCharsetLength;
Comment 6 Alex Thurgood 2017-04-07 08:30:02 UTC
From comment 3, this would be a regression for users of such locales.
Comment 7 Commit Notification 2017-04-10 04:18:21 UTC
Tamás Bunth committed a patch related to this issue.
It has been pushed to "master":


tdf#106866 query character size instead of bytes

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.
Comment 8 Alex Thurgood 2017-04-10 07:00:34 UTC
Marking as resolved fixed, but needs verifying