From: Nirgal V. <con...@ni...> - 2011-02-09 00:02:30
|
I spend quite some time today, trying to make ole fields work. We use them in 2 places: - mdb-export (but we only printed the first chunk of data). - mdb-prop (but it did not work when the props are in more than a chunk) In both cases, we need a loop like - Read the first chunk - While there are other chunks, get them. Attached is a patch I'm working on: A new function void *mdb_ole_read_full(MdbHandle *mdb, MdbColumn *col, size_t *size) reads all the chunks and return a plain buffer. Other major changes: - mdb_old_read_next now stops when col->cur_blob_pg_row becomes 0, as it should. - mdb_ole_read_first returns the real size read. It means -4 for type 2 chunks. It's more consistent with the other returned value. Having the extra 4 bytes was why mdb-prop was crashing. - Changed mdb-prop and mdb-export to use that new function. I played with catalog.c to automatically loads the LvProp, in yet another path, but it's crashing from time to time. So the included patch is for your information only, I'll fix it soon I hope. Comments are welcome of course! |