From: Alex H. <ba...@gm...> - 2008-07-24 23:27:19
|
On Thu, Jul 24, 2008 at 8:14 AM, Brett Hutley <br...@hu...> wrote: > I've attached a patch for data.c that should fix the problem. It increases > the size of the "text" buffer if the memo is larger than MDB_BIND_SIZE > bytes. I was wondering why the function always seems to allocate > MDB_BIND_SIZE bytes though? It seems as though a little later in the > function we actually read the size of the memo field, and we can then just > allocate the right number of bytes directly. (Although I guess there is > potentially a bit mask encoded in the length, which you'd need to mask out > in order to get the actual length). Sweet this patch also happens to fix this segfault I was getting (not related to memo fields just a text column). Thanks a lot Brett! *** glibc detected *** mdb-export: munmap_chunk(): invalid pointer: 0x0000000000883f00 *** ======= Backtrace: ========= /lib/libc.so.6[0x7ffd8e87bff8] /usr/local/lib/libmdb.so.1(mdb_col_to_string+0x201)[0x7ffd8ee25521] /usr/local/lib/libmdb.so.1[0x7ffd8ee25bd8] /usr/local/lib/libmdb.so.1(mdb_read_row+0x1cb)[0x7ffd8ee25eab] /usr/local/lib/libmdb.so.1(mdb_fetch_row+0x81)[0x7ffd8ee25f81] mdb-export[0x401538] /lib/libc.so.6(__libc_start_main+0xe6)[0x7ffd8e8263f6] mdb-export[0x400dd9] |