[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 --- Comment #9 from Drew Jensen--- I created the test file with huge values for those columns 2 Million bytes. HSQL embedded in Base works just fine with that. The images were 20 K and 32 K in size, added by linking an image control in a form to them and using that to insert the image. The forms work as expected with the data and reports work with it also. The reason for a 20k and a 32K file was that I thought Firebird was going to impose a 32K limit for the fixed field. My plan was to first test the migration function with empty tables (seemed to pass) then with this data that would fit into FB and when this passes a test migration , check for error handling when the data exceeds the FB imposed limits. As for the 8000 byte limit, IIRC, that is for if you want to index that column or if you are using a character set that supports collating. -- 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
[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 --- Comment #8 from Julien Nabet--- I forgot to tell, I was investigating about where the value 8000 came from because it's used here: 285 case SQL_VARYING: 286 pVar->sqldata = static_cast(malloc(sizeof(char)*pVar->sqllen + 2)); (see https://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/Util.cxx#286) gdb indicated that pVar->sqllen = 8000 here. -- 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
[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 --- Comment #7 from Julien Nabet--- Here's a bandaid patch: iff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index 0a43d5c93851..61adf79b5637 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -843,6 +843,11 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex, xBytesCopy.realloc( nMaxSize ); } const short nSize = xBytesCopy.getLength(); +if (nSize > 8000) +{ +free(pVar->sqldata); +pVar->sqldata = static_cast(calloc(nSize + 2, sizeof(char))); +} memcpy(pVar->sqldata, , 2); // Actual data memcpy(pVar->sqldata + 2, xBytesCopy.getConstArray(), nSize); I use calloc to be sure not letting garbage in allocated memory. With this, it doesn't crash but I don't see the image in the form. BTW, I unzipped the odb file and don't see where the image is. Lionel/Tamas: any thoughts about this patch? -- 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
[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 --- Comment #6 from Julien Nabet--- Created attachment 142167 --> https://bugs.documentfoundation.org/attachment.cgi?id=142167=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=0x576bdcf0, nParameterIndex=2, xBytes=uno::Sequence of length 20897 = {...}) at /home/julien/lo/libreoffice/connectivity/source/drivers/firebird/PreparedStatement.cxx:839 844 Sequence 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
[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 --- Comment #5 from Julien Nabet--- Created attachment 142137 --> https://bugs.documentfoundation.org/attachment.cgi?id=142137=edit bt with debug symbols -- 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
[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 Julien Nabetchanged: What|Removed |Added CC||serval2...@yahoo.fr --- Comment #4 from Julien Nabet --- Created attachment 142136 --> https://bugs.documentfoundation.org/attachment.cgi?id=142136=edit valgrind trace On pc Debian x86-64 with master sources updated today, I could reproduce this. I also reproduced the pb when indicating Yes for the migration when opening form first time. I retrieved Valgrind trace. -- 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
[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 Xisco FaulĂchanged: What|Removed |Added CC||xiscofa...@libreoffice.org Blocks||116968 Depends on|116968 | Referenced Bugs: https://bugs.documentfoundation.org/show_bug.cgi?id=116968 [Bug 116968] [META] Migrating existing embedded HSQLDB databases to Firebird -- 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
[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 Alex Thurgoodchanged: What|Removed |Added Depends on||116968 Referenced Bugs: https://bugs.documentfoundation.org/show_bug.cgi?id=116968 [Bug 116968] [META] Migrating existing embedded HSQLDB databases to Firebird -- 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
[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 Alex Thurgoodchanged: What|Removed |Added Priority|medium |high Severity|normal |major -- 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
[Libreoffice-bugs] [Bug 117446] Firebird: Migration: LibO hangs with data type Binary[ VARBINARY] OR Binary(fix)[BINARY] AND image data in hsql database
https://bugs.documentfoundation.org/show_bug.cgi?id=117446 Drew Jensenchanged: What|Removed |Added Summary|Firebird: Migration: LibO |Firebird: Migration: LibO |hangs with data type |hangs with data type |binary[VARBINARY] and image |Binary[VARBINARY] OR |data in hsql database |Binary(fix)[BINARY] AND ||image data in hsql database -- 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