Every day when I run my test.pl program for the first time, I see this:
DbEnv::open: DB_VERSION_MISMATCH: Database environment version mismatch in test.pl,
line 35
The docs say that this error means "The version of the Berkeley DB library doesn't match the version that created the database environment". But I haven't changed my BDB XML installation.
If I delete all the files in my test database directory and reload my test data, everything is fine. I can run my test program again and again all day long. But when I come in next morning, I get the error! This is the code I'm using:
my $ENVIRONMENT = 'test-env';
my $ENV_FLAGS = Db::DB_CREATE | Db::DB_INIT_LOCK | Db::DB_INIT_LOG
| Db::DB_INIT_MPOOL | Db::DB_INIT_TXN;
my $env = new DbEnv;
x eval { $env->open($ENVIRONMENT, $ENV_FLAGS, 0) };
'x' is just a function that traps the exception. Line 35 is the line with the open() call.
Does anybody know what I'm doing wrong?
Thanks, Dave