Re: htdig: Sudden htdig problem...


Alexander Bergolth (leo@strike.wu-wien.ac.at)
Mon, 14 Sep 1998 23:52:31 +0200


Hi Dan!

At 22:02 14.09.98 , Dan Schleifer wrote:
> [...] The
>error occurs when running htmerge and here it is:
>
>%htmerge -sv
>
>Somewhere_deep_inside...: /usr/local/htdig/db/db.words.db: unexpected
>file format
>htmerge: Unable to create/open the word database
>'/usr/local/htdig/db/db.words.db'

I had the same problem, but I think it's a bug in the Berkeley DB library.
(Maybe only on some AIX machines?)
In my case the problem occurs when opening some existing database files
with db_open having set the DB_CREATE flag. Without DB_CREATE the database
can be opened.

I applied the following dirty hack on DB2_db::OpenReadWrite (in DB2_db.cc):

    // Create the database.
    //
    // <LEO> strange error opening existing database files
    //if ((errno = db_open(filename, DB_BTREE, DB_CREATE, mode, dbenv,
    // &dbinfo, &dbp)) == 0)
    if (access(filename, F_OK) == 0)
      errno = db_open(filename, DB_BTREE, 0, 0, dbenv, &dbinfo, &dbp);
    else
      errno = db_open(filename, DB_BTREE, DB_CREATE, mode, dbenv, &dbinfo,
&dbp);
    if (errno == 0)
    // </LEO>

Hope that helps,
                  Leo

-----------------------------------------------------------------------
Alexander (Leo) Bergolth leo@leo.wu-wien.ac.at
WU-Wien - Zentrum fuer Informatikdienste http://leo.wu-wien.ac.at
Info Center
In a world without walls and fences, who needs windows and gates?

----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:27:47 PST