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

--- Comment #6 from Julien Nabet <serval2...@yahoo.fr> ---
Created attachment 142167
  --> https://bugs.documentfoundation.org/attachment.cgi?id=142167&action=edit
bt about length of varbinary on hsqldb

Drew, what's the size of the image included in the table?

In hsqldb, VARBINARY is 8000 bytes max (see
https://www.tutorialspoint.com/hsqldb/hsqldb_data_types.htm) and
https://opengrok.libreoffice.org/xref/core/dbaccess/source/filter/hsqldb/createparser.cxx#148
shows that indeed, we retain 8000 bytes.

But it seems there are several varbinary types, images may be until
2,147,483,647 bytes! (see the same link)

In gdb, breaking in
/home/julien/lo/libreoffice/connectivity/source/drivers/firebird/PreparedStatement.cxx:844
gives:
Thread 1 "soffice.bin" hit Breakpoint 2,
connectivity::firebird::OPreparedStatement::setBytes (this=0x5555576bdcf0,
nParameterIndex=2, 
    xBytes=uno::Sequence of length 20897 = {...}) at
/home/julien/lo/libreoffice/connectivity/source/drivers/firebird/PreparedStatement.cxx:839
844                 Sequence<sal_Int8> xBytesCopy(xBytes);
(gdb) p xBytes
$1 = uno::Sequence of length 20897 = {-119 '\211', 80 'P', 78 'N', 71 'G', 13
'\r', 10 '\n', 26 '\032', 10 '\n', 0 '\000', 0 '\000', 0 '\000', 13 '\r', 73
'I', 72 'H', 
  68 'D', 82 'R', 0 '\000', 0 '\000', 3 '\003', 24 '\030', 0 '\000', 0 '\000',
0 '\000', -1 '\377', 8 '\b', 6 '\006', 0 '\000', 0 '\000', 0 '\000', 114 'r',
-44 '\324', 
  112 'p', -61 '\303', 0 '\000', 0 '\000', 0 '\000', 4 '\004', 115 's', 66 'B',
73 'I', 84 'T', 8 '\b', 8 '\b', 8 '\b', 8 '\b', 124 '|', 8 '\b', 100 'd', -120
'\210', 
  0 '\000', 0 '\000', 0 '\000', 25 '\031', 116 't', 69 'E', 88 'X', 116 't', 83
'S', 111 'o', 102 'f', 116 't', 119 'w', 97 'a', 114 'r', 101 'e', 0 '\000',
103 'g', 110 'n', 
  111 'o', 109 'm', 101 'e', 45 '-', 115 's', 99 'c', 114 'r', 101 'e', 101
'e', 110 'n', 115 's', 104 'h', 111 'o', 116 't', -17 '\357', 3 '\003', -65
'\277', 62 '>', 
  0 '\000', 0 '\000', 32 ' ', 0 '\000', 73 'I', 68 'D', 65 'A', 84 'T', 120
'x', -100 '\234', -20 '\354', -35 '\335', 123 '{', 88 'X', 85 'U', -25 '\347',
-99 '\235', 
  -9 '\367', -1 '\377', -9 '\367', 62 '>', -80 '\260', 1 '\001', -35 '\335', 91
'[', 97 'a', -125 '\203', -70 '\272', 73 'I', 4 '\004', 52 '4', 5 '\005', 91
'[', -95 '\241', 
  26 '\032', 49 '1', -115 '\215', 76 'L', 19 '\023', 73 'I', -46 '\322', 104
'h', 77 'M', 49 '1', 83 'S', 113 'q', -110 '\222', 106 'j', 58 ':', -43 '\325',
-103 '\231', 
  -44 '\324', -76 '\264', 83 'S', 109 'm', -89 '\247', 58 ':', -45 '\323', -122
'\206', 103 'g', -6 '\372', -124 '\204', -10 '\366', 55 '7', 33 '!', -41
'\327', -92 '\244', 
  -40 '\330', 105 'i', -75 '\265', -65 '\277', 62 '>', 58 ':', 79 'O', 11 '\v',
51 '3', -119 '\211', -74 '\266', -3 '\375', 73 'I', 103 'g', 18 '\022', 39
'\'', -87 '\251', 
  -104 '\230', 70 'F', -90 '\246', 105 'i', 72 'H', -109 '\223', -112 '\220',
-104 '\230', 66 'B', 90 'Z', -79 '\261', 90 'Z', 48 '0', 17 '\021', 26 '\032',
35 '#', 
  -102 '\232', -128 '\200', 81 'Q', -74 '\266', 7 '\a', -74 '\266', 2 '\002',
-101 '\233', 125 '}', -8 '\370', -3 '\375', -63 '\301', 65 'A', 78 'N'...}
(gdb) 

so we got here a sequence of 20897 values and since they're bytes, 20897 bytes
; to compare with the 8000 bytes allocated...

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to