diff options
Diffstat (limited to 'db2')
79 files changed, 1313 insertions, 980 deletions
diff --git a/db2/Makefile b/db2/Makefile index 0ae06a3089..02f1b300e6 100644 --- a/db2/Makefile +++ b/db2/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. +# Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -58,7 +58,7 @@ libdb-routines := bt_close bt_compare bt_conv bt_cursor bt_delete \ bt_open bt_page bt_put bt_rec bt_recno bt_rsearch bt_search \ bt_split bt_stat btree_auto db db_appinit db_apprec \ db_auto \ - db_byteorder db_conv db_dispatch db_dup db_err db_log2 \ + db_byteorder db_conv db_dispatch db_dup db_err db_log2 os_alloc \ os_abs os_config os_dir os_fid os_fsync os_map os_oflags \ os_open os_rpath os_rw os_seek os_sleep os_stat os_unlink \ os_spin db_overflow db_pr db_rec db_region db_ret db_salloc \ diff --git a/db2/btree/bt_close.c b/db2/btree/bt_close.c index 7dd7139c66..ecccc9fe08 100644 --- a/db2/btree/bt_close.c +++ b/db2/btree/bt_close.c @@ -47,7 +47,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "@(#)bt_close.c 10.24 (Sleepycat) 9/17/97"; +static const char sccsid[] = "@(#)bt_close.c 10.25 (Sleepycat) 1/6/98"; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES @@ -144,7 +144,7 @@ __bam_upstat(dbp) { BTREE *t; BTMETA *meta; - DB_LOCK mlock; + DB_LOCK metalock; db_pgno_t pgno; int flags, ret; @@ -161,7 +161,7 @@ __bam_upstat(dbp) pgno = PGNO_METADATA; /* Lock and retrieve the page. */ - if (__bam_lget(dbp, 0, pgno, DB_LOCK_WRITE, &mlock) != 0) + if (__bam_lget(dbp, 0, pgno, DB_LOCK_WRITE, &metalock) != 0) return; if (__bam_pget(dbp, (PAGE **)&meta, &pgno, 0) == 0) { /* Log the change. */ @@ -178,5 +178,5 @@ __bam_upstat(dbp) } err: (void)memp_fput(dbp->mpf, (PAGE *)meta, flags); - (void)__BT_LPUT(dbp, mlock); + (void)__BT_LPUT(dbp, metalock); } diff --git a/db2/btree/bt_cursor.c b/db2/btree/bt_cursor.c index 47ecd7c66d..f526c965e5 100644 --- a/db2/btree/bt_cursor.c +++ b/db2/btree/bt_cursor.c @@ -8,7 +8,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "@(#)bt_cursor.c 10.37 (Sleepycat) 11/22/97"; +static const char sccsid[] = "@(#)bt_cursor.c 10.41 (Sleepycat) 1/8/98"; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES @@ -128,22 +128,25 @@ __bam_c_iclose(dbp, dbc) CURSOR *cp; int ret; - cp = dbc->internal; + /* + * All cursors are queued from the master DB structure. For + * now, discard the DB handle which triggered this call, and + * replace it with the cursor's reference. + */ + dbp = dbc->dbp; /* If a cursor key was deleted, perform the actual deletion. */ + cp = dbc->internal; ret = F_ISSET(cp, C_DELETED) ? __bam_c_physdel(dbp, cp, NULL) : 0; /* Discard a |
