[Libreoffice-bugs] [Bug 127040] HSQLDB to Firebird automated migration failure when record size exceeds 64k

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Sep 12 09:23:07 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=127040

--- Comment #28 from Julien Nabet <serval2412 at yahoo.fr> ---
Alex: I created a Firebird embedded database from scratch then just copied
pasted the 'CREATE TABLE "Table1" ( "ID" IN... ' 
from initial comment in Tools/SQL part in order to be sure we don't call
anything related to migration (except the request of course). I could reproduce
the error 
*unsuccessful metadata update
*new record size of 116772 bytes is too big

I took a look to
https://stackoverflow.com/questions/822837/firebird-utf8-varchar-size, we got
this:
"Using the UTF8 character set for VARCHAR(N) fields needs to reserve enough
space for any N UTF8 characters"
So even if in the insert requests you'll make, you won't fill each column
entirely, the total size of all columns (so record size) contained in your
table must be 64k max.


Then I thought perhaps migration code should generate a "Create table" request
by using another charset to avoid to use 4 bytes for each character.

So I tried to add "character set iso8859_1" to one of the line, eg:
"SongLyrics3" VARCHAR(5000) character set iso8859_1,

I got:
*unsuccessful metadata update
*Table1
*CHARACTER SET ISO8859_1 is not installed
caused by
'CREATE TABLE "Table1" (
...

Same result with "WIN1250"

Finally I tried the example of Uniloader link to try to reproduce the error, I
could create a table with:
CREATE TABLE TEST_SOURCE(
A VARCHAR(1400) DEFAULT '' ,
B INTEGER DEFAULT 0 );
then could insert a line with:
INSERT INTO TEST_SOURCE (A,B) VALUES('TOM',10);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190912/ea17496e/attachment-0001.html>


More information about the Libreoffice-bugs mailing list