#127 mdb-export fails with large tables

open
nobody
5
2009-12-11
2009-12-11
Anonymous
No

The mdb-export command requests huge amounts of memory when used to export data
from a database table that has many string values.

Debugging this problem turned up the fact that throughout the mdbtools source
there are several places where MDB_BIND_SIZE bytes of memory are allocated,
even is the actual value to be stored is very small. This results in a huge
waste of memory, so that extracting a table from a database file that has a
total size of just some 50MB fails, even if the system has 2GB of physical
memory.

As a workaround I did

--- mdbtools.h.001 2007-03-06 00:34:47.000000000 +0100
+++ mdbtools.h 2009-11-04 14:33:43.000000000 +0100
@@ -45,7 +45,7 @@
#define MDB_MAX_IDX_COLS 10
#define MDB_CATALOG_PG 18
#define MDB_MEMO_OVERHEAD 12
-#define MDB_BIND_SIZE 16384
+#define MDB_BIND_SIZE 1024

enum {
MDB_PAGE_DB = 0,

which works for me, because I know that none of my fields is longer than 1024
byte.

However, a real fix should dynamically allocate this memory according to the
actual needs.

Klaus.Schmidinger@cadsoft.de

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks