According to dbopen(3), the 'type' field of struct DB holds the "type of the underlying access method (and file format)." In __bt_open() it is set to DB_BTREE and in __hash_open() it is set to DB_HASH, so one might expect that in __rec_open() it is set to DB_RECNO. However, it is left untouched.

Index: rec_open.c
===================================================================
RCS file: /cvs/src/lib/libc/db/recno/rec_open.c,v
retrieving revision 1.13
diff -u -p -u -r1.13 rec_open.c
--- rec_open.c  21 Sep 2016 04:38:56 -0000      1.13
+++ rec_open.c  1 Dec 2020 13:01:37 -0000
@@ -154,6 +154,7 @@ slow:                       if ((t->bt_rfp = fdopen(rfd, "r"
        dbp->put = __rec_put;
        dbp->seq = __rec_seq;
        dbp->sync = __rec_sync;
+       dbp->type = DB_RECNO;

        /* If the root page was created, reset the flags. */
        if ((h = mpool_get(t->bt_mp, P_ROOT, 0)) == NULL)



--
Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/

Reply via email to