mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
storage/bdb/LICENSE: Import db-4.3.28 storage/bdb/btree/bt_compare.c: Import db-4.3.28 storage/bdb/btree/bt_conv.c: Import db-4.3.28 storage/bdb/btree/bt_curadj.c: Import db-4.3.28 storage/bdb/btree/bt_cursor.c: Import db-4.3.28 storage/bdb/btree/bt_delete.c: Import db-4.3.28 storage/bdb/btree/bt_method.c: Import db-4.3.28 storage/bdb/btree/bt_open.c: Import db-4.3.28 storage/bdb/btree/bt_put.c: Import db-4.3.28 storage/bdb/btree/bt_rec.c: Import db-4.3.28 storage/bdb/btree/bt_reclaim.c: Import db-4.3.28 storage/bdb/btree/bt_recno.c: Import db-4.3.28 storage/bdb/btree/bt_rsearch.c: Import db-4.3.28 storage/bdb/btree/bt_search.c: Import db-4.3.28 storage/bdb/btree/bt_split.c: Import db-4.3.28 storage/bdb/btree/bt_stat.c: Import db-4.3.28 storage/bdb/btree/bt_upgrade.c: Import db-4.3.28 storage/bdb/btree/bt_verify.c: Import db-4.3.28 storage/bdb/btree/btree.src: Import db-4.3.28 storage/bdb/build_win32/Berkeley_DB.dsw: Import db-4.3.28 storage/bdb/build_win32/app_dsp.src: Import db-4.3.28 storage/bdb/build_win32/db_test.src: Import db-4.3.28 storage/bdb/build_win32/dbkill.cpp: Import db-4.3.28 storage/bdb/build_win32/dynamic_dsp.src: Import db-4.3.28 storage/bdb/build_win32/java_dsp.src: Import db-4.3.28 storage/bdb/build_win32/libdb_tcl.def: Import db-4.3.28 storage/bdb/build_win32/libdbrc.src: Import db-4.3.28 storage/bdb/build_win32/static_dsp.src: Import db-4.3.28 storage/bdb/build_win32/tcl_dsp.src: Import db-4.3.28 storage/bdb/clib/getcwd.c: Import db-4.3.28 storage/bdb/clib/getopt.c: Import db-4.3.28 storage/bdb/clib/memcmp.c: Import db-4.3.28 storage/bdb/clib/memmove.c: Import db-4.3.28 storage/bdb/clib/raise.c: Import db-4.3.28 storage/bdb/clib/snprintf.c: Import db-4.3.28 storage/bdb/clib/strcasecmp.c: Import db-4.3.28 storage/bdb/clib/strdup.c: Import db-4.3.28 storage/bdb/clib/strerror.c: Import db-4.3.28 storage/bdb/common/db_byteorder.c: Import db-4.3.28 storage/bdb/common/db_err.c: Import db-4.3.28 storage/bdb/common/db_getlong.c: Import db-4.3.28 storage/bdb/common/db_idspace.c: Import db-4.3.28 storage/bdb/common/db_log2.c: Import db-4.3.28 storage/bdb/common/util_arg.c: Import db-4.3.28 storage/bdb/common/util_cache.c: Import db-4.3.28 storage/bdb/common/util_log.c: Import db-4.3.28 storage/bdb/common/util_sig.c: Import db-4.3.28 storage/bdb/cxx/cxx_db.cpp: Import db-4.3.28 storage/bdb/cxx/cxx_dbc.cpp: Import db-4.3.28 storage/bdb/cxx/cxx_dbt.cpp: Import db-4.3.28 storage/bdb/cxx/cxx_env.cpp: Import db-4.3.28 storage/bdb/cxx/cxx_except.cpp: Import db-4.3.28 storage/bdb/cxx/cxx_lock.cpp: Import db-4.3.28 storage/bdb/cxx/cxx_logc.cpp: Import db-4.3.28 storage/bdb/cxx/cxx_mpool.cpp: Import db-4.3.28 storage/bdb/cxx/cxx_txn.cpp: Import db-4.3.28 storage/bdb/db/crdel.src: Import db-4.3.28 storage/bdb/db/crdel_rec.c: Import db-4.3.28 storage/bdb/db/db.c: Import db-4.3.28 storage/bdb/db/db.src: Import db-4.3.28 storage/bdb/db/db_am.c: Import db-4.3.28 storage/bdb/db/db_cam.c: Import db-4.3.28 storage/bdb/db/db_conv.c: Import db-4.3.28 storage/bdb/db/db_dispatch.c: Import db-4.3.28 storage/bdb/db/db_dup.c: Import db-4.3.28 storage/bdb/db/db_iface.c: Import db-4.3.28 storage/bdb/db/db_join.c: Import db-4.3.28 storage/bdb/db/db_meta.c: Import db-4.3.28 storage/bdb/db/db_method.c: Import db-4.3.28 storage/bdb/db/db_open.c: Import db-4.3.28 storage/bdb/db/db_overflow.c: Import db-4.3.28 storage/bdb/db/db_pr.c: Import db-4.3.28 storage/bdb/db/db_rec.c: Import db-4.3.28 storage/bdb/db/db_reclaim.c: Import db-4.3.28 storage/bdb/db/db_remove.c: Import db-4.3.28 storage/bdb/db/db_rename.c: Import db-4.3.28 storage/bdb/db/db_ret.c: Import db-4.3.28 storage/bdb/db/db_truncate.c: Import db-4.3.28 storage/bdb/db/db_upg.c: Import db-4.3.28 storage/bdb/db/db_upg_opd.c: Import db-4.3.28 storage/bdb/db/db_vrfy.c: Import db-4.3.28 storage/bdb/db/db_vrfyutil.c: Import db-4.3.28 storage/bdb/db185/db185.c: Import db-4.3.28 storage/bdb/db185/db185_int.in: Import db-4.3.28 storage/bdb/db_archive/db_archive.c: Import db-4.3.28 storage/bdb/db_checkpoint/db_checkpoint.c: Import db-4.3.28 storage/bdb/db_deadlock/db_deadlock.c: Import db-4.3.28 storage/bdb/db_dump/db_dump.c: Import db-4.3.28 storage/bdb/db_dump185/db_dump185.c: Import db-4.3.28 storage/bdb/db_load/db_load.c: Import db-4.3.28 storage/bdb/db_printlog/README: Import db-4.3.28 storage/bdb/db_printlog/db_printlog.c: Import db-4.3.28 storage/bdb/db_printlog/dbname.awk: Import db-4.3.28 storage/bdb/db_printlog/rectype.awk: Import db-4.3.28 storage/bdb/db_printlog/status.awk: Import db-4.3.28 storage/bdb/db_recover/db_recover.c: Import db-4.3.28 storage/bdb/db_stat/db_stat.c: Import db-4.3.28 storage/bdb/db_upgrade/db_upgrade.c: Import db-4.3.28 storage/bdb/db_verify/db_verify.c: Import db-4.3.28 storage/bdb/dbinc/btree.h: Import db-4.3.28 storage/bdb/dbinc/crypto.h: Import db-4.3.28 storage/bdb/dbinc/cxx_int.h: Import db-4.3.28 storage/bdb/dbinc/db.in: Import db-4.3.28 storage/bdb/dbinc/db_185.in: Import db-4.3.28 storage/bdb/dbinc/db_am.h: Import db-4.3.28 storage/bdb/dbinc/db_cxx.in: Import db-4.3.28 storage/bdb/dbinc/db_dispatch.h: Import db-4.3.28 storage/bdb/dbinc/db_int.in: Import db-4.3.28 storage/bdb/dbinc/db_join.h: Import db-4.3.28 storage/bdb/dbinc/db_page.h: Import db-4.3.28 storage/bdb/dbinc/db_server_int.h: Import db-4.3.28 storage/bdb/dbinc/db_shash.h: Import db-4.3.28 storage/bdb/dbinc/db_swap.h: Import db-4.3.28 storage/bdb/dbinc/db_upgrade.h: Import db-4.3.28 storage/bdb/dbinc/db_verify.h: Import db-4.3.28 storage/bdb/dbinc/debug.h: Import db-4.3.28 storage/bdb/dbinc/fop.h: Import db-4.3.28 storage/bdb/dbinc/globals.h: Import db-4.3.28 storage/bdb/dbinc/hash.h: Import db-4.3.28 storage/bdb/dbinc/hmac.h: Import db-4.3.28 storage/bdb/dbinc/lock.h: Import db-4.3.28 storage/bdb/dbinc/log.h: Import db-4.3.28 storage/bdb/dbinc/mp.h: Import db-4.3.28 storage/bdb/dbinc/mutex.h: Import db-4.3.28 storage/bdb/dbinc/os.h: Import db-4.3.28 storage/bdb/dbinc/qam.h: Import db-4.3.28 storage/bdb/dbinc/queue.h: Import db-4.3.28 storage/bdb/dbinc/region.h: Import db-4.3.28 storage/bdb/dbinc/rep.h: Import db-4.3.28 storage/bdb/dbinc/shqueue.h: Import db-4.3.28 storage/bdb/dbinc/tcl_db.h: Import db-4.3.28 storage/bdb/dbinc/txn.h: Import db-4.3.28 storage/bdb/dbinc/xa.h: Import db-4.3.28 storage/bdb/dbm/dbm.c: Import db-4.3.28 storage/bdb/dbreg/dbreg.c: Import db-4.3.28 storage/bdb/dbreg/dbreg.src: Import db-4.3.28 storage/bdb/dbreg/dbreg_rec.c: Import db-4.3.28 storage/bdb/dbreg/dbreg_util.c: Import db-4.3.28 storage/bdb/dist/Makefile.in: Import db-4.3.28 storage/bdb/dist/RELEASE: Import db-4.3.28 storage/bdb/dist/aclocal/config.ac: Import db-4.3.28 storage/bdb/dist/aclocal/libtool.ac: Import db-4.3.28 storage/bdb/dist/aclocal/mutex.ac: Import db-4.3.28 storage/bdb/dist/aclocal/options.ac: Import db-4.3.28 storage/bdb/dist/aclocal/programs.ac: Import db-4.3.28 storage/bdb/dist/aclocal/sosuffix.ac: Import db-4.3.28 storage/bdb/dist/aclocal/tcl.ac: Import db-4.3.28 storage/bdb/dist/aclocal/types.ac: Import db-4.3.28 storage/bdb/dist/aclocal_java/ac_jni_include_dirs.ac: Import db-4.3.28 storage/bdb/dist/aclocal_java/ac_prog_java.ac: Import db-4.3.28 storage/bdb/dist/buildrel: Import db-4.3.28 storage/bdb/dist/configure.ac: Import db-4.3.28 storage/bdb/dist/gen_inc.awk: Import db-4.3.28 storage/bdb/dist/gen_rec.awk: Import db-4.3.28 storage/bdb/dist/gen_rpc.awk: Import db-4.3.28 storage/bdb/dist/ltmain.sh: Import db-4.3.28 storage/bdb/dist/pubdef.in: Import db-4.3.28 storage/bdb/dist/srcfiles.in: Import db-4.3.28 storage/bdb/dist/vx_2.0/BerkeleyDB.wpj: Import db-4.3.28 storage/bdb/dist/vx_2.0/wpj.in: Import db-4.3.28 storage/bdb/dist/vx_config.in: Import db-4.3.28 storage/bdb/dist/vx_setup/CONFIG.in: Import db-4.3.28 storage/bdb/dist/vx_setup/LICENSE.TXT: Import db-4.3.28 storage/bdb/dist/vx_setup/vx_allfile.in: Import db-4.3.28 storage/bdb/dist/vx_setup/vx_demofile.in: Import db-4.3.28 storage/bdb/dist/win_config.in: Import db-4.3.28 storage/bdb/dist/win_exports.in: Import db-4.3.28 storage/bdb/env/db_salloc.c: Import db-4.3.28 storage/bdb/env/db_shash.c: Import db-4.3.28 storage/bdb/env/env_file.c: Import db-4.3.28 storage/bdb/env/env_method.c: Import db-4.3.28 storage/bdb/env/env_open.c: Import db-4.3.28 storage/bdb/env/env_recover.c: Import db-4.3.28 storage/bdb/env/env_region.c: Import db-4.3.28 storage/bdb/fileops/fileops.src: Import db-4.3.28 storage/bdb/fileops/fop_basic.c: Import db-4.3.28 storage/bdb/fileops/fop_rec.c: Import db-4.3.28 storage/bdb/fileops/fop_util.c: Import db-4.3.28 storage/bdb/hash/hash.c: Import db-4.3.28 storage/bdb/hash/hash.src: Import db-4.3.28 storage/bdb/hash/hash_conv.c: Import db-4.3.28 storage/bdb/hash/hash_dup.c: Import db-4.3.28 storage/bdb/hash/hash_func.c: Import db-4.3.28 storage/bdb/hash/hash_meta.c: Import db-4.3.28 storage/bdb/hash/hash_method.c: Import db-4.3.28 storage/bdb/hash/hash_open.c: Import db-4.3.28 storage/bdb/hash/hash_page.c: Import db-4.3.28 storage/bdb/hash/hash_rec.c: Import db-4.3.28 storage/bdb/hash/hash_reclaim.c: Import db-4.3.28 storage/bdb/hash/hash_stat.c: Import db-4.3.28 storage/bdb/hash/hash_upgrade.c: Import db-4.3.28 storage/bdb/hash/hash_verify.c: Import db-4.3.28 storage/bdb/hmac/hmac.c: Import db-4.3.28 storage/bdb/hmac/sha1.c: Import db-4.3.28 storage/bdb/hsearch/hsearch.c: Import db-4.3.28 storage/bdb/lock/lock.c: Import db-4.3.28 storage/bdb/lock/lock_deadlock.c: Import db-4.3.28 storage/bdb/lock/lock_method.c: Import db-4.3.28 storage/bdb/lock/lock_region.c: Import db-4.3.28 storage/bdb/lock/lock_stat.c: Import db-4.3.28 storage/bdb/lock/lock_util.c: Import db-4.3.28 storage/bdb/log/log.c: Import db-4.3.28 storage/bdb/log/log_archive.c: Import db-4.3.28 storage/bdb/log/log_compare.c: Import db-4.3.28 storage/bdb/log/log_get.c: Import db-4.3.28 storage/bdb/log/log_method.c: Import db-4.3.28 storage/bdb/log/log_put.c: Import db-4.3.28 storage/bdb/mp/mp_alloc.c: Import db-4.3.28 storage/bdb/mp/mp_bh.c: Import db-4.3.28 storage/bdb/mp/mp_fget.c: Import db-4.3.28 storage/bdb/mp/mp_fopen.c: Import db-4.3.28 storage/bdb/mp/mp_fput.c: Import db-4.3.28 storage/bdb/mp/mp_fset.c: Import db-4.3.28 storage/bdb/mp/mp_method.c: Import db-4.3.28 storage/bdb/mp/mp_region.c: Import db-4.3.28 storage/bdb/mp/mp_register.c: Import db-4.3.28 storage/bdb/mp/mp_stat.c: Import db-4.3.28 storage/bdb/mp/mp_sync.c: Import db-4.3.28 storage/bdb/mp/mp_trickle.c: Import db-4.3.28 storage/bdb/mutex/mut_fcntl.c: Import db-4.3.28 storage/bdb/mutex/mut_pthread.c: Import db-4.3.28 storage/bdb/mutex/mut_tas.c: Import db-4.3.28 storage/bdb/mutex/mut_win32.c: Import db-4.3.28 storage/bdb/mutex/mutex.c: Import db-4.3.28 storage/bdb/mutex/tm.c: Import db-4.3.28 storage/bdb/mutex/uts4_cc.s: Import db-4.3.28 storage/bdb/os/os_abs.c: Import db-4.3.28 storage/bdb/os/os_alloc.c: Import db-4.3.28 storage/bdb/os/os_clock.c: Import db-4.3.28 storage/bdb/os/os_config.c: Import db-4.3.28 storage/bdb/os/os_dir.c: Import db-4.3.28 storage/bdb/os/os_errno.c: Import db-4.3.28 storage/bdb/os/os_fid.c: Import db-4.3.28 storage/bdb/os/os_fsync.c: Import db-4.3.28 storage/bdb/os/os_handle.c: Import db-4.3.28 storage/bdb/os/os_id.c: Import db-4.3.28 storage/bdb/os/os_map.c: Import db-4.3.28 storage/bdb/os/os_method.c: Import db-4.3.28 storage/bdb/os/os_oflags.c: Import db-4.3.28 storage/bdb/os/os_open.c: Import db-4.3.28 storage/bdb/os/os_region.c: Import db-4.3.28 storage/bdb/os/os_rename.c: Import db-4.3.28 storage/bdb/os/os_root.c: Import db-4.3.28 storage/bdb/os/os_rpath.c: Import db-4.3.28 storage/bdb/os/os_rw.c: Import db-4.3.28 storage/bdb/os/os_seek.c: Import db-4.3.28 storage/bdb/os/os_sleep.c: Import db-4.3.28 storage/bdb/os/os_spin.c: Import db-4.3.28 storage/bdb/os/os_stat.c: Import db-4.3.28 storage/bdb/os/os_tmpdir.c: Import db-4.3.28 storage/bdb/os/os_unlink.c: Import db-4.3.28 storage/bdb/os_vxworks/os_vx_abs.c: Import db-4.3.28 storage/bdb/os_vxworks/os_vx_config.c: Import db-4.3.28 storage/bdb/os_vxworks/os_vx_map.c: Import db-4.3.28 storage/bdb/os_win32/os_abs.c: Import db-4.3.28 storage/bdb/os_win32/os_clock.c: Import db-4.3.28 storage/bdb/os_win32/os_config.c: Import db-4.3.28 storage/bdb/os_win32/os_dir.c: Import db-4.3.28 storage/bdb/os_win32/os_errno.c: Import db-4.3.28 storage/bdb/os_win32/os_fid.c: Import db-4.3.28 storage/bdb/os_win32/os_fsync.c: Import db-4.3.28 storage/bdb/os_win32/os_handle.c: Import db-4.3.28 storage/bdb/os_win32/os_map.c: Import db-4.3.28 storage/bdb/os_win32/os_open.c: Import db-4.3.28 storage/bdb/os_win32/os_rename.c: Import db-4.3.28 storage/bdb/os_win32/os_rw.c: Import db-4.3.28 storage/bdb/os_win32/os_seek.c: Import db-4.3.28 storage/bdb/os_win32/os_sleep.c: Import db-4.3.28 storage/bdb/os_win32/os_spin.c: Import db-4.3.28 storage/bdb/os_win32/os_stat.c: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/BerkeleyDB.pm: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/BerkeleyDB.pod.P: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/BerkeleyDB.pod: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/BerkeleyDB.xs: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/Changes: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/MANIFEST: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/Makefile.PL: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/README: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/config.in: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/constants.h: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/mkconsts: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/patches/5.004: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/ppport.h: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/scan: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/btree.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/destroy.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/env.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/filter.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/hash.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/join.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/mldbm.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/queue.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/recno.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/strict.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/subdb.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/txn.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/util.pm: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/typemap: Import db-4.3.28 storage/bdb/perl/DB_File/Changes: Import db-4.3.28 storage/bdb/perl/DB_File/DB_File.pm: Import db-4.3.28 storage/bdb/perl/DB_File/DB_File.xs: Import db-4.3.28 storage/bdb/perl/DB_File/MANIFEST: Import db-4.3.28 storage/bdb/perl/DB_File/Makefile.PL: Import db-4.3.28 storage/bdb/perl/DB_File/README: Import db-4.3.28 storage/bdb/perl/DB_File/dbinfo: Import db-4.3.28 storage/bdb/perl/DB_File/patches/5.004: Import db-4.3.28 storage/bdb/perl/DB_File/ppport.h: Import db-4.3.28 storage/bdb/perl/DB_File/t/db-btree.t: Import db-4.3.28 storage/bdb/perl/DB_File/t/db-hash.t: Import db-4.3.28 storage/bdb/perl/DB_File/t/db-recno.t: Import db-4.3.28 storage/bdb/perl/DB_File/typemap: Import db-4.3.28 storage/bdb/qam/qam.c: Import db-4.3.28 storage/bdb/qam/qam.src: Import db-4.3.28 storage/bdb/qam/qam_conv.c: Import db-4.3.28 storage/bdb/qam/qam_files.c: Import db-4.3.28 storage/bdb/qam/qam_method.c: Import db-4.3.28 storage/bdb/qam/qam_open.c: Import db-4.3.28 storage/bdb/qam/qam_rec.c: Import db-4.3.28 storage/bdb/qam/qam_stat.c: Import db-4.3.28 storage/bdb/qam/qam_upgrade.c: Import db-4.3.28 storage/bdb/qam/qam_verify.c: Import db-4.3.28 storage/bdb/rep/rep_method.c: Import db-4.3.28 storage/bdb/rep/rep_record.c: Import db-4.3.28 storage/bdb/rep/rep_region.c: Import db-4.3.28 storage/bdb/rep/rep_util.c: Import db-4.3.28 storage/bdb/rpc_client/client.c: Import db-4.3.28 storage/bdb/rpc_client/gen_client_ret.c: Import db-4.3.28 storage/bdb/rpc_server/c/db_server_util.c: Import db-4.3.28 storage/bdb/rpc_server/cxx/db_server_cxxproc.cpp: Import db-4.3.28 storage/bdb/rpc_server/cxx/db_server_cxxutil.cpp: Import db-4.3.28 storage/bdb/rpc_server/java/FreeList.java: Import db-4.3.28 storage/bdb/rpc_server/java/LocalIterator.java: Import db-4.3.28 storage/bdb/rpc_server/java/README: Import db-4.3.28 storage/bdb/rpc_server/java/RpcDb.java: Import db-4.3.28 storage/bdb/rpc_server/java/RpcDbEnv.java: Import db-4.3.28 storage/bdb/rpc_server/java/RpcDbTxn.java: Import db-4.3.28 storage/bdb/rpc_server/java/RpcDbc.java: Import db-4.3.28 storage/bdb/rpc_server/java/Timer.java: Import db-4.3.28 storage/bdb/rpc_server/java/gen/__db_open_reply.java: Import db-4.3.28 storage/bdb/rpc_server/java/gen/__db_stat_msg.java: Import db-4.3.28 storage/bdb/rpc_server/java/gen/db_server.java: Import db-4.3.28 storage/bdb/rpc_server/java/s_jrpcgen: Import db-4.3.28 storage/bdb/rpc_server/rpc.src: Import db-4.3.28 storage/bdb/tcl/docs/db.html: Import db-4.3.28 storage/bdb/tcl/docs/env.html: Import db-4.3.28 storage/bdb/tcl/docs/historic.html: Import db-4.3.28 storage/bdb/tcl/docs/index.html: Import db-4.3.28 storage/bdb/tcl/docs/library.html: Import db-4.3.28 storage/bdb/tcl/docs/lock.html: Import db-4.3.28 storage/bdb/tcl/docs/log.html: Import db-4.3.28 storage/bdb/tcl/docs/mpool.html: Import db-4.3.28 storage/bdb/tcl/docs/rep.html: Import db-4.3.28 storage/bdb/tcl/docs/test.html: Import db-4.3.28 storage/bdb/tcl/docs/txn.html: Import db-4.3.28 storage/bdb/tcl/tcl_compat.c: Import db-4.3.28 storage/bdb/tcl/tcl_db.c: Import db-4.3.28 storage/bdb/tcl/tcl_db_pkg.c: Import db-4.3.28 storage/bdb/tcl/tcl_dbcursor.c: Import db-4.3.28 storage/bdb/tcl/tcl_env.c: Import db-4.3.28 storage/bdb/tcl/tcl_internal.c: Import db-4.3.28 storage/bdb/tcl/tcl_lock.c: Import db-4.3.28 storage/bdb/tcl/tcl_log.c: Import db-4.3.28 storage/bdb/tcl/tcl_mp.c: Import db-4.3.28 storage/bdb/tcl/tcl_rep.c: Import db-4.3.28 storage/bdb/tcl/tcl_txn.c: Import db-4.3.28 storage/bdb/tcl/tcl_util.c: Import db-4.3.28 storage/bdb/test/archive.tcl: Import db-4.3.28 storage/bdb/test/bigfile001.tcl: Import db-4.3.28 storage/bdb/test/bigfile002.tcl: Import db-4.3.28 storage/bdb/test/byteorder.tcl: Import db-4.3.28 storage/bdb/test/conscript.tcl: Import db-4.3.28 storage/bdb/test/dbm.tcl: Import db-4.3.28 storage/bdb/test/dbscript.tcl: Import db-4.3.28 storage/bdb/test/ddoyscript.tcl: Import db-4.3.28 storage/bdb/test/ddscript.tcl: Import db-4.3.28 storage/bdb/test/dead001.tcl: Import db-4.3.28 storage/bdb/test/dead002.tcl: Import db-4.3.28 storage/bdb/test/dead003.tcl: Import db-4.3.28 storage/bdb/test/dead004.tcl: Import db-4.3.28 storage/bdb/test/dead005.tcl: Import db-4.3.28 storage/bdb/test/dead006.tcl: Import db-4.3.28 storage/bdb/test/dead007.tcl: Import db-4.3.28 storage/bdb/test/env001.tcl: Import db-4.3.28 storage/bdb/test/env002.tcl: Import db-4.3.28 storage/bdb/test/env003.tcl: Import db-4.3.28 storage/bdb/test/env004.tcl: Import db-4.3.28 storage/bdb/test/env005.tcl: Import db-4.3.28 storage/bdb/test/env006.tcl: Import db-4.3.28 storage/bdb/test/env007.tcl: Import db-4.3.28 storage/bdb/test/env008.tcl: Import db-4.3.28 storage/bdb/test/env009.tcl: Import db-4.3.28 storage/bdb/test/env010.tcl: Import db-4.3.28 storage/bdb/test/env011.tcl: Import db-4.3.28 storage/bdb/test/hsearch.tcl: Import db-4.3.28 storage/bdb/test/join.tcl: Import db-4.3.28 storage/bdb/test/lock001.tcl: Import db-4.3.28 storage/bdb/test/lock002.tcl: Import db-4.3.28 storage/bdb/test/lock003.tcl: Import db-4.3.28 storage/bdb/test/lock004.tcl: Import db-4.3.28 storage/bdb/test/lock005.tcl: Import db-4.3.28 storage/bdb/test/lockscript.tcl: Import db-4.3.28 storage/bdb/test/log001.tcl: Import db-4.3.28 storage/bdb/test/log002.tcl: Import db-4.3.28 storage/bdb/test/log003.tcl: Import db-4.3.28 storage/bdb/test/log004.tcl: Import db-4.3.28 storage/bdb/test/log005.tcl: Import db-4.3.28 storage/bdb/test/logtrack.tcl: Import db-4.3.28 storage/bdb/test/mdbscript.tcl: Import db-4.3.28 storage/bdb/test/memp001.tcl: Import db-4.3.28 storage/bdb/test/memp002.tcl: Import db-4.3.28 storage/bdb/test/memp003.tcl: Import db-4.3.28 storage/bdb/test/mpoolscript.tcl: Import db-4.3.28 storage/bdb/test/mutex001.tcl: Import db-4.3.28 storage/bdb/test/mutex002.tcl: Import db-4.3.28 storage/bdb/test/mutex003.tcl: Import db-4.3.28 storage/bdb/test/mutexscript.tcl: Import db-4.3.28 storage/bdb/test/ndbm.tcl: Import db-4.3.28 storage/bdb/test/parallel.tcl: Import db-4.3.28 storage/bdb/test/recd001.tcl: Import db-4.3.28 storage/bdb/test/recd002.tcl: Import db-4.3.28 storage/bdb/test/recd003.tcl: Import db-4.3.28 storage/bdb/test/recd004.tcl: Import db-4.3.28 storage/bdb/test/recd005.tcl: Import db-4.3.28 storage/bdb/test/recd006.tcl: Import db-4.3.28 storage/bdb/test/recd007.tcl: Import db-4.3.28 storage/bdb/test/recd008.tcl: Import db-4.3.28 storage/bdb/test/recd009.tcl: Import db-4.3.28 storage/bdb/test/recd010.tcl: Import db-4.3.28 storage/bdb/test/recd011.tcl: Import db-4.3.28 storage/bdb/test/recd012.tcl: Import db-4.3.28 storage/bdb/test/recd013.tcl: Import db-4.3.28 storage/bdb/test/recd014.tcl: Import db-4.3.28 storage/bdb/test/recd015.tcl: Import db-4.3.28 storage/bdb/test/recd016.tcl: Import db-4.3.28 storage/bdb/test/recd017.tcl: Import db-4.3.28 storage/bdb/test/recd018.tcl: Import db-4.3.28 storage/bdb/test/recd019.tcl: Import db-4.3.28 storage/bdb/test/recd020.tcl: Import db-4.3.28 storage/bdb/test/recd15scr.tcl: Import db-4.3.28 storage/bdb/test/recdscript.tcl: Import db-4.3.28 storage/bdb/test/rep001.tcl: Import db-4.3.28 storage/bdb/test/rep002.tcl: Import db-4.3.28 storage/bdb/test/rep003.tcl: Import db-4.3.28 storage/bdb/test/rep005.tcl: Import db-4.3.28 storage/bdb/test/reputils.tcl: Import db-4.3.28 storage/bdb/test/rpc001.tcl: Import db-4.3.28 storage/bdb/test/rpc002.tcl: Import db-4.3.28 storage/bdb/test/rpc003.tcl: Import db-4.3.28 storage/bdb/test/rpc004.tcl: Import db-4.3.28 storage/bdb/test/rpc005.tcl: Import db-4.3.28 storage/bdb/test/rsrc001.tcl: Import db-4.3.28 storage/bdb/test/rsrc002.tcl: Import db-4.3.28 storage/bdb/test/rsrc003.tcl: Import db-4.3.28 storage/bdb/test/rsrc004.tcl: Import db-4.3.28 storage/bdb/test/scr001/chk.code: Import db-4.3.28 storage/bdb/test/scr003/chk.define: Import db-4.3.28 storage/bdb/test/scr004/chk.javafiles: Import db-4.3.28 storage/bdb/test/scr005/chk.nl: Import db-4.3.28 storage/bdb/test/scr006/chk.offt: Import db-4.3.28 storage/bdb/test/scr007/chk.proto: Import db-4.3.28 storage/bdb/test/scr008/chk.pubdef: Import db-4.3.28 storage/bdb/test/scr009/chk.srcfiles: Import db-4.3.28 storage/bdb/test/scr010/chk.str: Import db-4.3.28 storage/bdb/test/scr010/spell.ok: Import db-4.3.28 storage/bdb/test/scr011/chk.tags: Import db-4.3.28 storage/bdb/test/scr012/chk.vx_code: Import db-4.3.28 storage/bdb/test/scr013/chk.stats: Import db-4.3.28 storage/bdb/test/scr015/TestConstruct01.cpp: Import db-4.3.28 storage/bdb/test/scr015/TestConstruct01.testerr: Import db-4.3.28 storage/bdb/test/scr015/TestGetSetMethods.cpp: Import db-4.3.28 storage/bdb/test/scr015/TestKeyRange.cpp: Import db-4.3.28 storage/bdb/test/scr015/TestLogc.cpp: Import db-4.3.28 storage/bdb/test/scr015/TestSimpleAccess.cpp: Import db-4.3.28 storage/bdb/test/scr015/TestTruncate.cpp: Import db-4.3.28 storage/bdb/test/scr015/chk.cxxtests: Import db-4.3.28 storage/bdb/test/scr016/CallbackTest.java: Import db-4.3.28 storage/bdb/test/scr016/CallbackTest.testout: Import db-4.3.28 storage/bdb/test/scr016/TestAppendRecno.java: Import db-4.3.28 storage/bdb/test/scr016/TestAssociate.java: Import db-4.3.28 storage/bdb/test/scr016/TestClosedDb.java: Import db-4.3.28 storage/bdb/test/scr016/TestClosedDb.testout: Import db-4.3.28 storage/bdb/test/scr016/TestConstruct01.java: Import db-4.3.28 storage/bdb/test/scr016/TestConstruct01.testout: Import db-4.3.28 storage/bdb/test/scr016/TestConstruct02.java: Import db-4.3.28 storage/bdb/test/scr016/TestDbtFlags.java: Import db-4.3.28 storage/bdb/test/scr016/TestGetSetMethods.java: Import db-4.3.28 storage/bdb/test/scr016/TestKeyRange.java: Import db-4.3.28 storage/bdb/test/scr016/TestLockVec.java: Import db-4.3.28 storage/bdb/test/scr016/TestLogc.java: Import db-4.3.28 storage/bdb/test/scr016/TestOpenEmpty.java: Import db-4.3.28 storage/bdb/test/scr016/TestOpenEmpty.testerr: Import db-4.3.28 storage/bdb/test/scr016/TestReplication.java: Import db-4.3.28 storage/bdb/test/scr016/TestRpcServer.java: Import db-4.3.28 storage/bdb/test/scr016/TestSameDbt.java: Import db-4.3.28 storage/bdb/test/scr016/TestSimpleAccess.java: Import db-4.3.28 storage/bdb/test/scr016/TestStat.java: Import db-4.3.28 storage/bdb/test/scr016/TestStat.testout: Import db-4.3.28 storage/bdb/test/scr016/TestTruncate.java: Import db-4.3.28 storage/bdb/test/scr016/TestTruncate.testout: Import db-4.3.28 storage/bdb/test/scr016/TestUtil.java: Import db-4.3.28 storage/bdb/test/scr016/TestXAServlet.java: Import db-4.3.28 storage/bdb/test/scr016/chk.javatests: Import db-4.3.28 storage/bdb/test/scr016/ignore: Import db-4.3.28 storage/bdb/test/scr016/testone: Import db-4.3.28 storage/bdb/test/scr017/chk.db185: Import db-4.3.28 storage/bdb/test/scr019/chk.include: Import db-4.3.28 storage/bdb/test/scr020/chk.inc: Import db-4.3.28 storage/bdb/test/scr021/chk.flags: Import db-4.3.28 storage/bdb/test/scr022/chk.rr: Import db-4.3.28 storage/bdb/test/sdb001.tcl: Import db-4.3.28 storage/bdb/test/sdb002.tcl: Import db-4.3.28 storage/bdb/test/sdb003.tcl: Import db-4.3.28 storage/bdb/test/sdb004.tcl: Import db-4.3.28 storage/bdb/test/sdb005.tcl: Import db-4.3.28 storage/bdb/test/sdb006.tcl: Import db-4.3.28 storage/bdb/test/sdb007.tcl: Import db-4.3.28 storage/bdb/test/sdb008.tcl: Import db-4.3.28 storage/bdb/test/sdb009.tcl: Import db-4.3.28 storage/bdb/test/sdb010.tcl: Import db-4.3.28 storage/bdb/test/sdb011.tcl: Import db-4.3.28 storage/bdb/test/sdb012.tcl: Import db-4.3.28 storage/bdb/test/sdbscript.tcl: Import db-4.3.28 storage/bdb/test/sdbtest001.tcl: Import db-4.3.28 storage/bdb/test/sdbtest002.tcl: Import db-4.3.28 storage/bdb/test/sdbutils.tcl: Import db-4.3.28 storage/bdb/test/sec001.tcl: Import db-4.3.28 storage/bdb/test/sec002.tcl: Import db-4.3.28 storage/bdb/test/shelltest.tcl: Import db-4.3.28 storage/bdb/test/si001.tcl: Import db-4.3.28 storage/bdb/test/si002.tcl: Import db-4.3.28 storage/bdb/test/si003.tcl: Import db-4.3.28 storage/bdb/test/si004.tcl: Import db-4.3.28 storage/bdb/test/si005.tcl: Import db-4.3.28 storage/bdb/test/sysscript.tcl: Import db-4.3.28 storage/bdb/test/test.tcl: Import db-4.3.28 storage/bdb/test/test001.tcl: Import db-4.3.28 storage/bdb/test/test002.tcl: Import db-4.3.28 storage/bdb/test/test003.tcl: Import db-4.3.28 storage/bdb/test/test004.tcl: Import db-4.3.28 storage/bdb/test/test005.tcl: Import db-4.3.28 storage/bdb/test/test006.tcl: Import db-4.3.28 storage/bdb/test/test007.tcl: Import db-4.3.28 storage/bdb/test/test008.tcl: Import db-4.3.28 storage/bdb/test/test009.tcl: Import db-4.3.28 storage/bdb/test/test010.tcl: Import db-4.3.28 storage/bdb/test/test011.tcl: Import db-4.3.28 storage/bdb/test/test012.tcl: Import db-4.3.28 storage/bdb/test/test013.tcl: Import db-4.3.28 storage/bdb/test/test014.tcl: Import db-4.3.28 storage/bdb/test/test015.tcl: Import db-4.3.28 storage/bdb/test/test016.tcl: Import db-4.3.28 storage/bdb/test/test017.tcl: Import db-4.3.28 storage/bdb/test/test018.tcl: Import db-4.3.28 storage/bdb/test/test019.tcl: Import db-4.3.28 storage/bdb/test/test020.tcl: Import db-4.3.28 storage/bdb/test/test021.tcl: Import db-4.3.28 storage/bdb/test/test022.tcl: Import db-4.3.28 storage/bdb/test/test023.tcl: Import db-4.3.28 storage/bdb/test/test024.tcl: Import db-4.3.28 storage/bdb/test/test025.tcl: Import db-4.3.28 storage/bdb/test/test026.tcl: Import db-4.3.28 storage/bdb/test/test027.tcl: Import db-4.3.28 storage/bdb/test/test028.tcl: Import db-4.3.28 storage/bdb/test/test029.tcl: Import db-4.3.28 storage/bdb/test/test030.tcl: Import db-4.3.28 storage/bdb/test/test031.tcl: Import db-4.3.28 storage/bdb/test/test032.tcl: Import db-4.3.28 storage/bdb/test/test033.tcl: Import db-4.3.28 storage/bdb/test/test034.tcl: Import db-4.3.28 storage/bdb/test/test035.tcl: Import db-4.3.28 storage/bdb/test/test036.tcl: Import db-4.3.28 storage/bdb/test/test037.tcl: Import db-4.3.28 storage/bdb/test/test038.tcl: Import db-4.3.28 storage/bdb/test/test039.tcl: Import db-4.3.28 storage/bdb/test/test040.tcl: Import db-4.3.28 storage/bdb/test/test041.tcl: Import db-4.3.28 storage/bdb/test/test042.tcl: Import db-4.3.28 storage/bdb/test/test043.tcl: Import db-4.3.28 storage/bdb/test/test044.tcl: Import db-4.3.28 storage/bdb/test/test045.tcl: Import db-4.3.28 storage/bdb/test/test046.tcl: Import db-4.3.28 storage/bdb/test/test047.tcl: Import db-4.3.28 storage/bdb/test/test048.tcl: Import db-4.3.28 storage/bdb/test/test049.tcl: Import db-4.3.28 storage/bdb/test/test050.tcl: Import db-4.3.28 storage/bdb/test/test051.tcl: Import db-4.3.28 storage/bdb/test/test052.tcl: Import db-4.3.28 storage/bdb/test/test053.tcl: Import db-4.3.28 storage/bdb/test/test054.tcl: Import db-4.3.28 storage/bdb/test/test055.tcl: Import db-4.3.28 storage/bdb/test/test056.tcl: Import db-4.3.28 storage/bdb/test/test057.tcl: Import db-4.3.28 storage/bdb/test/test058.tcl: Import db-4.3.28 storage/bdb/test/test059.tcl: Import db-4.3.28 storage/bdb/test/test060.tcl: Import db-4.3.28 storage/bdb/test/test061.tcl: Import db-4.3.28 storage/bdb/test/test062.tcl: Import db-4.3.28 storage/bdb/test/test063.tcl: Import db-4.3.28 storage/bdb/test/test064.tcl: Import db-4.3.28 storage/bdb/test/test065.tcl: Import db-4.3.28 storage/bdb/test/test066.tcl: Import db-4.3.28 storage/bdb/test/test067.tcl: Import db-4.3.28 storage/bdb/test/test068.tcl: Import db-4.3.28 storage/bdb/test/test069.tcl: Import db-4.3.28 storage/bdb/test/test070.tcl: Import db-4.3.28 storage/bdb/test/test071.tcl: Import db-4.3.28 storage/bdb/test/test072.tcl: Import db-4.3.28 storage/bdb/test/test073.tcl: Import db-4.3.28 storage/bdb/test/test074.tcl: Import db-4.3.28 storage/bdb/test/test076.tcl: Import db-4.3.28 storage/bdb/test/test077.tcl: Import db-4.3.28 storage/bdb/test/test078.tcl: Import db-4.3.28 storage/bdb/test/test079.tcl: Import db-4.3.28 storage/bdb/test/test081.tcl: Import db-4.3.28 storage/bdb/test/test082.tcl: Import db-4.3.28 storage/bdb/test/test083.tcl: Import db-4.3.28 storage/bdb/test/test084.tcl: Import db-4.3.28 storage/bdb/test/test085.tcl: Import db-4.3.28 storage/bdb/test/test086.tcl: Import db-4.3.28 storage/bdb/test/test087.tcl: Import db-4.3.28 storage/bdb/test/test088.tcl: Import db-4.3.28 storage/bdb/test/test089.tcl: Import db-4.3.28 storage/bdb/test/test090.tcl: Import db-4.3.28 storage/bdb/test/test091.tcl: Import db-4.3.28 storage/bdb/test/test092.tcl: Import db-4.3.28 storage/bdb/test/test093.tcl: Import db-4.3.28 storage/bdb/test/test094.tcl: Import db-4.3.28 storage/bdb/test/test095.tcl: Import db-4.3.28 storage/bdb/test/test096.tcl: Import db-4.3.28 storage/bdb/test/test097.tcl: Import db-4.3.28 storage/bdb/test/test098.tcl: Import db-4.3.28 storage/bdb/test/test099.tcl: Import db-4.3.28 storage/bdb/test/test100.tcl: Import db-4.3.28 storage/bdb/test/test101.tcl: Import db-4.3.28 storage/bdb/test/testparams.tcl: Import db-4.3.28 storage/bdb/test/testutils.tcl: Import db-4.3.28 storage/bdb/test/txn001.tcl: Import db-4.3.28 storage/bdb/test/txn002.tcl: Import db-4.3.28 storage/bdb/test/txn003.tcl: Import db-4.3.28 storage/bdb/test/txn004.tcl: Import db-4.3.28 storage/bdb/test/txn005.tcl: Import db-4.3.28 storage/bdb/test/txn006.tcl: Import db-4.3.28 storage/bdb/test/txn007.tcl: Import db-4.3.28 storage/bdb/test/txn008.tcl: Import db-4.3.28 storage/bdb/test/txn009.tcl: Import db-4.3.28 storage/bdb/test/txnscript.tcl: Import db-4.3.28 storage/bdb/test/update.tcl: Import db-4.3.28 storage/bdb/test/upgrade.tcl: Import db-4.3.28 storage/bdb/test/wrap.tcl: Import db-4.3.28 storage/bdb/txn/txn.c: Import db-4.3.28 storage/bdb/txn/txn.src: Import db-4.3.28 storage/bdb/txn/txn_method.c: Import db-4.3.28 storage/bdb/txn/txn_rec.c: Import db-4.3.28 storage/bdb/txn/txn_recover.c: Import db-4.3.28 storage/bdb/txn/txn_region.c: Import db-4.3.28 storage/bdb/txn/txn_stat.c: Import db-4.3.28 storage/bdb/txn/txn_util.c: Import db-4.3.28 storage/bdb/xa/xa.c: Import db-4.3.28 storage/bdb/xa/xa_db.c: Import db-4.3.28 storage/bdb/xa/xa_map.c: Import db-4.3.28 storage/bdb/clib/strtol.c: Import db-4.3.28 storage/bdb/clib/strtoul.c: Import db-4.3.28 storage/bdb/common/crypto_stub.c: Import db-4.3.28 storage/bdb/crypto/aes_method.c: Import db-4.3.28 storage/bdb/crypto/crypto.c: Import db-4.3.28 storage/bdb/crypto/crypto.html: Import db-4.3.28 storage/bdb/crypto/mersenne/mt19937db.c: Import db-4.3.28 storage/bdb/crypto/rijndael/rijndael-alg-fst.c: Import db-4.3.28 storage/bdb/crypto/rijndael/rijndael-alg-fst.h: Import db-4.3.28 storage/bdb/crypto/rijndael/rijndael-api-fst.c: Import db-4.3.28 storage/bdb/crypto/rijndael/rijndael-api-fst.h: Import db-4.3.28 storage/bdb/cxx/cxx_multi.cpp: Import db-4.3.28 storage/bdb/cxx/cxx_seq.cpp: Import db-4.3.28 storage/bdb/db/db_ovfl_vrfy.c: Import db-4.3.28 storage/bdb/db/db_setid.c: Import db-4.3.28 storage/bdb/db/db_setlsn.c: Import db-4.3.28 storage/bdb/db/db_stati.c: Import db-4.3.28 storage/bdb/db/db_vrfy_stub.c: Import db-4.3.28 storage/bdb/db_stat/dd.sh: Import db-4.3.28 storage/bdb/dbreg/dbreg_stat.c: Import db-4.3.28 storage/bdb/dist/aclocal/rpc.ac: Import db-4.3.28 storage/bdb/dist/aclocal/sequence.ac: Import db-4.3.28 storage/bdb/dist/config.hin: Import db-4.3.28 storage/bdb/dist/s_java_const: Import db-4.3.28 storage/bdb/dist/s_java_stat: Import db-4.3.28 storage/bdb/dist/s_java_swig: Import db-4.3.28 storage/bdb/dist/s_je2db: Import db-4.3.28 storage/bdb/dist/s_winmsi: Import db-4.3.28 storage/bdb/dist/template/db_server_proc: Import db-4.3.28 storage/bdb/dist/template/gen_client_ret: Import db-4.3.28 storage/bdb/dist/template/rec_btree: Import db-4.3.28 storage/bdb/dist/template/rec_crdel: Import db-4.3.28 storage/bdb/dist/template/rec_dbreg: Import db-4.3.28 storage/bdb/dist/template/rec_db: Import db-4.3.28 storage/bdb/dist/template/rec_fileops: Import db-4.3.28 storage/bdb/dist/template/rec_hash: Import db-4.3.28 storage/bdb/dist/template/rec_qam: Import db-4.3.28 storage/bdb/dist/template/rec_rep: Import db-4.3.28 storage/bdb/dist/template/rec_txn: Import db-4.3.28 storage/bdb/dist/vx_2.0/BerkeleyDBsmall.wpj: Import db-4.3.28 storage/bdb/dist/vx_2.2/BerkeleyDB.wpj: Import db-4.3.28 storage/bdb/dist/vx_2.2/BerkeleyDBsmall.wpj: Import db-4.3.28 storage/bdb/dist/vx_2.2/wpj.in: Import db-4.3.28 storage/bdb/dist/win_db.in: Import db-4.3.28 storage/bdb/dist/winmsi/dbcorewix.in: Import db-4.3.28 storage/bdb/dist/winmsi/dbvarsbat.in: Import db-4.3.28 storage/bdb/dist/winmsi/dbwix.m4: Import db-4.3.28 storage/bdb/dist/winmsi/environment.in: Import db-4.3.28 storage/bdb/dist/winmsi/features.in: Import db-4.3.28 storage/bdb/dist/winmsi/files.in: Import db-4.3.28 storage/bdb/dist/winmsi/images/caticon.ibd: Import db-4.3.28 storage/bdb/dist/winmsi/images/foldernew.ibd: Import db-4.3.28 storage/bdb/dist/winmsi/images/folderup.ibd: Import db-4.3.28 storage/bdb/dist/winmsi/images/sleepycat.jpg: Import db-4.3.28 storage/bdb/dist/winmsi/images/topstripe.ibd: Import db-4.3.28 storage/bdb/dist/winmsi/images/webicon.ico: Import db-4.3.28 storage/bdb/dist/winmsi/links.in: Import db-4.3.28 storage/bdb/dist/winmsi/s_winmsi.fcn: Import db-4.3.28 storage/bdb/dist/winmsi/winbuild.bat: Import db-4.3.28 storage/bdb/env/env_stat.c: Import db-4.3.28 storage/bdb/hash/hash_stub.c: Import db-4.3.28 storage/bdb/lock/lock_id.c: Import db-4.3.28 storage/bdb/lock/lock_list.c: Import db-4.3.28 storage/bdb/lock/lock_timer.c: Import db-4.3.28 storage/bdb/log/log_stat.c: Import db-4.3.28 storage/bdb/mp/mp_fmethod.c: Import db-4.3.28 storage/bdb/os/os_truncate.c: Import db-4.3.28 storage/bdb/os_win32/os_truncate.c: Import db-4.3.28 storage/bdb/os_win32/os_unlink.c: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/META.yml: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/cds.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/encrypt.t: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/t/pod.t: Import db-4.3.28 storage/bdb/perl/DB_File/META.yml: Import db-4.3.28 storage/bdb/qam/qam_stub.c: Import db-4.3.28 storage/bdb/rep/rep.src: Import db-4.3.28 storage/bdb/rep/rep_backup.c: Import db-4.3.28 storage/bdb/rep/rep_stat.c: Import db-4.3.28 storage/bdb/rep/rep_stub.c: Import db-4.3.28 storage/bdb/rpc_client/gen_client.c: Import db-4.3.28 storage/bdb/rpc_server/c/db_server_proc.c: Import db-4.3.28 storage/bdb/rpc_server/c/gen_db_server.c: Import db-4.3.28 storage/bdb/rpc_server/db_server.x: Import db-4.3.28 storage/bdb/sequence/seq_stat.c: Import db-4.3.28 storage/bdb/sequence/sequence.c: Import db-4.3.28 storage/bdb/tcl/tcl_seq.c: Import db-4.3.28 storage/bdb/dist/config.guess: Import db-4.3.28 storage/bdb/dist/config.sub: Import db-4.3.28 storage/bdb/dist/s_all: Import db-4.3.28 storage/bdb/dist/s_config: Import db-4.3.28 storage/bdb/dist/s_crypto: Import db-4.3.28 storage/bdb/dist/s_include: Import db-4.3.28 storage/bdb/dist/s_java: Import db-4.3.28 storage/bdb/dist/s_perm: Import db-4.3.28 storage/bdb/dist/s_readme: Import db-4.3.28 storage/bdb/dist/s_recover: Import db-4.3.28 storage/bdb/dist/s_rpc: Import db-4.3.28 storage/bdb/dist/s_symlink: Import db-4.3.28 storage/bdb/dist/s_tags: Import db-4.3.28 storage/bdb/dist/s_test: Import db-4.3.28 storage/bdb/dist/s_vxworks: Import db-4.3.28 storage/bdb/dist/s_win32_dsp: Import db-4.3.28 storage/bdb/dist/s_win32: Import db-4.3.28 storage/bdb/perl/BerkeleyDB/dbinfo: Import db-4.3.28
1343 lines
34 KiB
C
1343 lines
34 KiB
C
/*-
|
|
* See the file LICENSE for redistribution information.
|
|
*
|
|
* Copyright (c) 1997-2004
|
|
* Sleepycat Software. All rights reserved.
|
|
*
|
|
* $Id: bt_recno.c,v 11.117 2004/03/28 17:01:01 bostic Exp $
|
|
*/
|
|
|
|
#include "db_config.h"
|
|
|
|
#ifndef NO_SYSTEM_INCLUDES
|
|
#include <sys/types.h>
|
|
|
|
#include <string.h>
|
|
#endif
|
|
|
|
#include "db_int.h"
|
|
#include "dbinc/db_page.h"
|
|
#include "dbinc/btree.h"
|
|
#include "dbinc/db_shash.h"
|
|
#include "dbinc/lock.h"
|
|
|
|
static int __ram_add __P((DBC *, db_recno_t *, DBT *, u_int32_t, u_int32_t));
|
|
static int __ram_source __P((DB *));
|
|
static int __ram_sread __P((DBC *, db_recno_t));
|
|
static int __ram_update __P((DBC *, db_recno_t, int));
|
|
|
|
/*
|
|
* In recno, there are two meanings to the on-page "deleted" flag. If we're
|
|
* re-numbering records, it means the record was implicitly created. We skip
|
|
* over implicitly created records if doing a cursor "next" or "prev", and
|
|
* return DB_KEYEMPTY if they're explicitly requested.. If not re-numbering
|
|
* records, it means that the record was implicitly created, or was deleted.
|
|
* We skip over implicitly created or deleted records if doing a cursor "next"
|
|
* or "prev", and return DB_KEYEMPTY if they're explicitly requested.
|
|
*
|
|
* If we're re-numbering records, then we have to detect in the cursor that
|
|
* a record was deleted, and adjust the cursor as necessary on the next get.
|
|
* If we're not re-numbering records, then we can detect that a record has
|
|
* been deleted by looking at the actual on-page record, so we completely
|
|
* ignore the cursor's delete flag. This is different from the B+tree code.
|
|
* It also maintains whether the cursor references a deleted record in the
|
|
* cursor, and it doesn't always check the on-page value.
|
|
*/
|
|
#define CD_SET(cp) { \
|
|
if (F_ISSET(cp, C_RENUMBER)) \
|
|
F_SET(cp, C_DELETED); \
|
|
}
|
|
#define CD_CLR(cp) { \
|
|
if (F_ISSET(cp, C_RENUMBER)) { \
|
|
F_CLR(cp, C_DELETED); \
|
|
cp->order = INVALID_ORDER; \
|
|
} \
|
|
}
|
|
#define CD_ISSET(cp) \
|
|
(F_ISSET(cp, C_RENUMBER) && F_ISSET(cp, C_DELETED) ? 1 : 0)
|
|
|
|
/*
|
|
* Macros for comparing the ordering of two cursors.
|
|
* cp1 comes before cp2 iff one of the following holds:
|
|
* cp1's recno is less than cp2's recno
|
|
* recnos are equal, both deleted, and cp1's order is less than cp2's
|
|
* recnos are equal, cp1 deleted, and cp2 not deleted
|
|
*/
|
|
#define C_LESSTHAN(cp1, cp2) \
|
|
(((cp1)->recno < (cp2)->recno) || \
|
|
(((cp1)->recno == (cp2)->recno) && \
|
|
((CD_ISSET((cp1)) && CD_ISSET((cp2)) && (cp1)->order < (cp2)->order) || \
|
|
(CD_ISSET((cp1)) && !CD_ISSET((cp2))))))
|
|
|
|
/*
|
|
* cp1 is equal to cp2 iff their recnos and delete flags are identical,
|
|
* and if the delete flag is set their orders are also identical.
|
|
*/
|
|
#define C_EQUAL(cp1, cp2) \
|
|
((cp1)->recno == (cp2)->recno && CD_ISSET((cp1)) == CD_ISSET((cp2)) && \
|
|
(!CD_ISSET((cp1)) || (cp1)->order == (cp2)->order))
|
|
|
|
/*
|
|
* Do we need to log the current cursor adjustment?
|
|
*/
|
|
#define CURADJ_LOG(dbc) \
|
|
(DBC_LOGGING((dbc)) && (dbc)->txn != NULL && (dbc)->txn->parent != NULL)
|
|
|
|
/*
|
|
* After a search, copy the found page into the cursor, discarding any
|
|
* currently held lock.
|
|
*/
|
|
#define STACK_TO_CURSOR(cp, ret) { \
|
|
int __t_ret; \
|
|
(cp)->page = (cp)->csp->page; \
|
|
(cp)->pgno = (cp)->csp->page->pgno; \
|
|
(cp)->indx = (cp)->csp->indx; \
|
|
if ((__t_ret = __TLPUT(dbc, (cp)->lock)) != 0 && (ret) == 0) \
|
|
ret = __t_ret; \
|
|
(cp)->lock = (cp)->csp->lock; \
|
|
(cp)->lock_mode = (cp)->csp->lock_mode; \
|
|
}
|
|
|
|
/*
|
|
* __ram_open --
|
|
* Recno open function.
|
|
*
|
|
* PUBLIC: int __ram_open __P((DB *,
|
|
* PUBLIC: DB_TXN *, const char *, db_pgno_t, u_int32_t));
|
|
*/
|
|
int
|
|
__ram_open(dbp, txn, name, base_pgno, flags)
|
|
DB *dbp;
|
|
DB_TXN *txn;
|
|
const char *name;
|
|
db_pgno_t base_pgno;
|
|
u_int32_t flags;
|
|
{
|
|
BTREE *t;
|
|
DBC *dbc;
|
|
int ret, t_ret;
|
|
|
|
COMPQUIET(name, NULL);
|
|
t = dbp->bt_internal;
|
|
|
|
/* Start up the tree. */
|
|
if ((ret = __bam_read_root(dbp, txn, base_pgno, flags)) != 0)
|
|
return (ret);
|
|
|
|
/*
|
|
* If the user specified a source tree, open it and map it in.
|
|
*
|
|
* !!!
|
|
* We don't complain if the user specified transactions or threads.
|
|
* It's possible to make it work, but you'd better know what you're
|
|
* doing!
|
|
*/
|
|
if (t->re_source != NULL && (ret = __ram_source(dbp)) != 0)
|
|
return (ret);
|
|
|
|
/* If we're snapshotting an underlying source file, do it now. */
|
|
if (F_ISSET(dbp, DB_AM_SNAPSHOT)) {
|
|
/* Allocate a cursor. */
|
|
if ((ret = __db_cursor(dbp, NULL, &dbc, 0)) != 0)
|
|
return (ret);
|
|
|
|
/* Do the snapshot. */
|
|
if ((ret = __ram_update(dbc,
|
|
DB_MAX_RECORDS, 0)) != 0 && ret == DB_NOTFOUND)
|
|
ret = 0;
|
|
|
|
/* Discard the cursor. */
|
|
if ((t_ret = __db_c_close(dbc)) != 0 && ret == 0)
|
|
ret = t_ret;
|
|
}
|
|
|
|
return (ret);
|
|
}
|
|
|
|
/*
|
|
* __ram_append --
|
|
* Recno append function.
|
|
*
|
|
* PUBLIC: int __ram_append __P((DBC *, DBT *, DBT *));
|
|
*/
|
|
int
|
|
__ram_append(dbc, key, data)
|
|
DBC *dbc;
|
|
DBT *key, *data;
|
|
{
|
|
BTREE_CURSOR *cp;
|
|
int ret;
|
|
|
|
cp = (BTREE_CURSOR *)dbc->internal;
|
|
|
|
/*
|
|
* Make sure we've read in all of the backing source file. If
|
|
* we found the record or it simply didn't exist, add the
|
|
* user's record.
|
|
*/
|
|
ret = __ram_update(dbc, DB_MAX_RECORDS, 0);
|
|
if (ret == 0 || ret == DB_NOTFOUND)
|
|
ret = __ram_add(dbc, &cp->recno, data, DB_APPEND, 0);
|
|
|
|
/* Return the record number. */
|
|
if (ret == 0)
|
|
ret = __db_retcopy(dbc->dbp->dbenv, key, &cp->recno,
|
|
sizeof(cp->recno), &dbc->rkey->data, &dbc->rkey->ulen);
|
|
|
|
return (ret);
|
|
}
|
|
|
|
/*
|
|
* __ram_c_del --
|
|
* Recno cursor->c_del function.
|
|
*
|
|
* PUBLIC: int __ram_c_del __P((DBC *));
|
|
*/
|
|
int
|
|
__ram_c_del(dbc)
|
|
DBC *dbc;
|
|
{
|
|
BKEYDATA bk;
|
|
BTREE *t;
|
|
BTREE_CURSOR *cp;
|
|
DB *dbp;
|
|
DB_LSN lsn;
|
|
DBT hdr, data;
|
|
EPG *epg;
|
|
int exact, ret, stack, t_ret;
|
|
|
|
dbp = dbc->dbp;
|
|
cp = (BTREE_CURSOR *)dbc->internal;
|
|
t = dbp->bt_internal;
|
|
stack = 0;
|
|
|
|
/*
|
|
* The semantics of cursors during delete are as follows: in
|
|
* non-renumbering recnos, records are replaced with a marker
|
|
* containing a delete flag. If the record referenced by this cursor
|
|
* has already been deleted, we will detect that as part of the delete
|
|
* operation, and fail.
|
|
*
|
|
* In renumbering recnos, cursors which represent deleted items
|
|
* are flagged with the C_DELETED flag, and it is an error to
|
|
* call c_del a second time without an intervening cursor motion.
|
|
*/
|
|
if (CD_ISSET(cp))
|
|
return (DB_KEYEMPTY);
|
|
|
|
/* Search the tree for the key; delete only deletes exact matches. */
|
|
if ((ret = __bam_rsearch(dbc, &cp->recno, S_DELETE, 1, &exact)) != 0)
|
|
goto err;
|
|
if (!exact) {
|
|
ret = DB_NOTFOUND;
|
|
goto err;
|
|
}
|
|
stack = 1;
|
|
|
|
/* Copy the page into the cursor. */
|
|
STACK_TO_CURSOR(cp, ret);
|
|
if (ret != 0)
|
|
goto err;
|
|
|
|
/*
|
|
* If re-numbering records, the on-page deleted flag can only mean
|
|
* that this record was implicitly created. Applications aren't
|
|
* permitted to delete records they never created, return an error.
|
|
*
|
|
* If not re-numbering records, the on-page deleted flag means that
|
|
* this record was implicitly created, or, was deleted at some time.
|
|
* The former is an error because applications aren't permitted to
|
|
* delete records they never created, the latter is an error because
|
|
* if the record was "deleted", we could never have found it.
|
|
*/
|
|
if (B_DISSET(GET_BKEYDATA(dbp, cp->page, cp->indx)->type)) {
|
|
ret = DB_KEYEMPTY;
|
|
goto err;
|
|
}
|
|
|
|
if (F_ISSET(cp, C_RENUMBER)) {
|
|
/* Delete the item, adjust the counts, adjust the cursors. */
|
|
if ((ret = __bam_ditem(dbc, cp->page, cp->indx)) != 0)
|
|
goto err;
|
|
if ((ret = __bam_adjust(dbc, -1)) != 0)
|
|
goto err;
|
|
if (__ram_ca(dbc, CA_DELETE) > 0 &&
|
|
CURADJ_LOG(dbc) && (ret = __bam_rcuradj_log(dbp, dbc->txn,
|
|
&lsn, 0, CA_DELETE, cp->root, cp->recno, cp->order)) != 0)
|
|
goto err;
|
|
|
|
/*
|
|
* If the page is empty, delete it.
|
|
*
|
|
* We never delete a root page. First, root pages of primary
|
|
* databases never go away, recno or otherwise. However, if
|
|
* it's the root page of an off-page duplicates database, then
|
|
* it can be deleted. We don't delete it here because we have
|
|
* no way of telling the primary database page holder (e.g.,
|
|
* the hash access method) that its page element should cleaned
|
|
* up because the underlying tree is gone. So, we keep the page
|
|
* around until the last cursor referencing the empty tree is
|
|
* are closed, and then clean it up.
|
|
*/
|
|
if (NUM_ENT(cp->page) == 0 && PGNO(cp->page) != cp->root) {
|
|
/*
|
|
* We already have a locked stack of pages. However,
|
|
* there are likely entries in the stack that aren't
|
|
* going to be emptied by removing the single reference
|
|
* to the emptied page (or one of its parents).
|
|
*/
|
|
for (epg = cp->csp; epg >= cp->sp; --epg)
|
|
if (NUM_ENT(epg->page) > 1)
|
|
break;
|
|
|
|
/*
|
|
* We want to delete a single item out of the last page
|
|
* that we're not deleting.
|
|
*/
|
|
ret = __bam_dpages(dbc, epg);
|
|
|
|
/*
|
|
* Regardless of the return from __bam_dpages, it will
|
|
* discard our stack and pinned page.
|
|
*/
|
|
stack = 0;
|
|
cp->page = NULL;
|
|
}
|
|
} else {
|
|
/* Use a delete/put pair to replace the record with a marker. */
|
|
if ((ret = __bam_ditem(dbc, cp->page, cp->indx)) != 0)
|
|
goto err;
|
|
|
|
B_TSET(bk.type, B_KEYDATA, 1);
|
|
bk.len = 0;
|
|
memset(&hdr, 0, sizeof(hdr));
|
|
hdr.data = &bk;
|
|
hdr.size = SSZA(BKEYDATA, data);
|
|
memset(&data, 0, sizeof(data));
|
|
data.data = (void *)"";
|
|
data.size = 0;
|
|
if ((ret = __db_pitem(dbc,
|
|
cp->page, cp->indx, BKEYDATA_SIZE(0), &hdr, &data)) != 0)
|
|
goto err;
|
|
}
|
|
|
|
t->re_modified = 1;
|
|
|
|
err: if (stack && (t_ret = __bam_stkrel(dbc, STK_CLRDBC)) != 0 && ret == 0)
|
|
ret = t_ret;
|
|
|
|
return (ret);
|
|
}
|
|
|
|
/*
|
|
* __ram_c_get --
|
|
* Recno cursor->c_get function.
|
|
*
|
|
* PUBLIC: int __ram_c_get
|
|
* PUBLIC: __P((DBC *, DBT *, DBT *, u_int32_t, db_pgno_t *));
|
|
*/
|
|
int
|
|
__ram_c_get(dbc, key, data, flags, pgnop)
|
|
DBC *dbc;
|
|
DBT *key, *data;
|
|
u_int32_t flags;
|
|
db_pgno_t *pgnop;
|
|
{
|
|
BTREE_CURSOR *cp;
|
|
DB *dbp;
|
|
int cmp, exact, ret;
|
|
|
|
COMPQUIET(pgnop, NULL);
|
|
|
|
dbp = dbc->dbp;
|
|
cp = (BTREE_CURSOR *)dbc->internal;
|
|
|
|
LF_CLR(DB_MULTIPLE|DB_MULTIPLE_KEY);
|
|
retry: switch (flags) {
|
|
case DB_CURRENT:
|
|
/*
|
|
* If we're using mutable records and the deleted flag is
|
|
* set, the cursor is pointing at a nonexistent record;
|
|
* return an error.
|
|
*/
|
|
if (CD_ISSET(cp))
|
|
return (DB_KEYEMPTY);
|
|
break;
|
|
case DB_NEXT_DUP:
|
|
/*
|
|
* If we're not in an off-page dup set, we know there's no
|
|
* next duplicate since recnos don't have them. If we
|
|
* are in an off-page dup set, the next item assuredly is
|
|
* a dup, so we set flags to DB_NEXT and keep going.
|
|
*/
|
|
if (!F_ISSET(dbc, DBC_OPD))
|
|
return (DB_NOTFOUND);
|
|
/* FALLTHROUGH */
|
|
case DB_NEXT_NODUP:
|
|
/*
|
|
* Recno databases don't have duplicates, set flags to DB_NEXT
|
|
* and keep going.
|
|
*/
|
|
/* FALLTHROUGH */
|
|
case DB_NEXT:
|
|
flags = DB_NEXT;
|
|
/*
|
|
* If record numbers are mutable: if we just deleted a record,
|
|
* we have to avoid incrementing the record number so that we
|
|
* return the right record by virtue of renumbering the tree.
|
|
*/
|
|
if (CD_ISSET(cp)) {
|
|
/*
|
|
* Clear the flag, we've moved off the deleted record.
|
|
*/
|
|
CD_CLR(cp);
|
|
break;
|
|
}
|
|
|
|
if (cp->recno != RECNO_OOB) {
|
|
++cp->recno;
|
|
break;
|
|
}
|
|
/* FALLTHROUGH */
|
|
case DB_FIRST:
|
|
flags = DB_NEXT;
|
|
cp->recno = 1;
|
|
break;
|
|
case DB_PREV_NODUP:
|
|
/*
|
|
* Recno databases don't have duplicates, set flags to DB_PREV
|
|
* and keep going.
|
|
*/
|
|
/* FALLTHROUGH */
|
|
case DB_PREV:
|
|
flags = DB_PREV;
|
|
if (cp->recno != RECNO_OOB) {
|
|
if (cp->recno == 1) {
|
|
ret = DB_NOTFOUND;
|
|
goto err;
|
|
}
|
|
--cp->recno;
|
|
break;
|
|
}
|
|
/* FALLTHROUGH */
|
|
case DB_LAST:
|
|
flags = DB_PREV;
|
|
if (((ret = __ram_update(dbc,
|
|
DB_MAX_RECORDS, 0)) != 0) && ret != DB_NOTFOUND)
|
|
goto err;
|
|
if ((ret = __bam_nrecs(dbc, &cp->recno)) != 0)
|
|
goto err;
|
|
if (cp->recno == 0) {
|
|
ret = DB_NOTFOUND;
|
|
goto err;
|
|
}
|
|
break;
|
|
case DB_GET_BOTHC:
|
|
/*
|
|
* If we're doing a join and these are offpage dups,
|
|
* we want to keep searching forward from after the
|
|
* current cursor position. Increment the recno by 1,
|
|
* then proceed as for a DB_SET.
|
|
*
|
|
* Otherwise, we know there are no additional matching
|
|
* data, as recnos don't have dups. return DB_NOTFOUND.
|
|
*/
|
|
if (F_ISSET(dbc, DBC_OPD)) {
|
|
cp->recno++;
|
|
break;
|
|
}
|
|
ret = DB_NOTFOUND;
|
|
goto err;
|
|
/* NOTREACHED */
|
|
case DB_GET_BOTH:
|
|
case DB_GET_BOTH_RANGE:
|
|
/*
|
|
* If we're searching a set of off-page dups, we start
|
|
* a new linear search from the first record. Otherwise,
|
|
* we compare the single data item associated with the
|
|
* requested record for a match.
|
|
*/
|
|
if (F_ISSET(dbc, DBC_OPD)) {
|
|
cp->recno = 1;
|
|
break;
|
|
}
|
|
/* FALLTHROUGH */
|
|
case DB_SET:
|
|
case DB_SET_RANGE:
|
|
if ((ret = __ram_getno(dbc, key, &cp->recno, 0)) != 0)
|
|
goto err;
|
|
break;
|
|
default:
|
|
ret = __db_unknown_flag(dbp->dbenv, "__ram_c_get", flags);
|
|
goto err;
|
|
}
|
|
|
|
/*
|
|
* For DB_PREV, DB_LAST, DB_SET and DB_SET_RANGE, we have already
|
|
* called __ram_update() to make sure sufficient records have been
|
|
* read from the backing source file. Do it now for DB_CURRENT (if
|
|
* the current record was deleted we may need more records from the
|
|
* backing file for a DB_CURRENT operation), DB_FIRST and DB_NEXT.
|
|
* (We don't have to test for flags == DB_FIRST, because the switch
|
|
* statement above re-set flags to DB_NEXT in that case.)
|
|
*/
|
|
if ((flags == DB_NEXT || flags == DB_CURRENT) && ((ret =
|
|
__ram_update(dbc, cp->recno, 0)) != 0) && ret != DB_NOTFOUND)
|
|
goto err;
|
|
|
|
for (;; ++cp->recno) {
|
|
/* Search the tree for the record. */
|
|
if ((ret = __bam_rsearch(dbc, &cp->recno,
|
|
F_ISSET(dbc, DBC_RMW) ? S_FIND_WR : S_FIND,
|
|
1, &exact)) != 0)
|
|
goto err;
|
|
if (!exact) {
|
|
ret = DB_NOTFOUND;
|
|
goto err;
|
|
}
|
|
|
|
/* Copy the page into the cursor. */
|
|
STACK_TO_CURSOR(cp, ret);
|
|
if (ret != 0)
|
|
goto err;
|
|
|
|
/*
|
|
* If re-numbering records, the on-page deleted flag means this
|
|
* record was implicitly created. If not re-numbering records,
|
|
* the on-page deleted flag means this record was implicitly
|
|
* created, or, it was deleted at some time. Regardless, we
|
|
* skip such records if doing cursor next/prev operations or
|
|
* walking through off-page duplicates, and fail if they were
|
|
* requested explicitly by the application.
|
|
*/
|
|
if (B_DISSET(GET_BKEYDATA(dbp, cp->page, cp->indx)->type))
|
|
switch (flags) {
|
|
case DB_NEXT:
|
|
case DB_PREV:
|
|
(void)__bam_stkrel(dbc, STK_CLRDBC);
|
|
goto retry;
|
|
case DB_GET_BOTH:
|
|
case DB_GET_BOTH_RANGE:
|
|
/*
|
|
* If we're an OPD tree, we don't care about
|
|
* matching a record number on a DB_GET_BOTH
|
|
* -- everything belongs to the same tree. A
|
|
* normal recno should give up and return
|
|
* DB_NOTFOUND if the matching recno is deleted.
|
|
*/
|
|
if (F_ISSET(dbc, DBC_OPD)) {
|
|
(void)__bam_stkrel(dbc, STK_CLRDBC);
|
|
continue;
|
|
}
|
|
ret = DB_NOTFOUND;
|
|
goto err;
|
|
default:
|
|
ret = DB_KEYEMPTY;
|
|
goto err;
|
|
}
|
|
|
|
if (flags == DB_GET_BOTH ||
|
|
flags == DB_GET_BOTHC || flags == DB_GET_BOTH_RANGE) {
|
|
if ((ret = __bam_cmp(dbp, data,
|
|
cp->page, cp->indx, __bam_defcmp, &cmp)) != 0)
|
|
return (ret);
|
|
if (cmp == 0)
|
|
break;
|
|
if (!F_ISSET(dbc, DBC_OPD)) {
|
|
ret = DB_NOTFOUND;
|
|
goto err;
|
|
}
|
|
(void)__bam_stkrel(dbc, STK_CLRDBC);
|
|
} else
|
|
break;
|
|
}
|
|
|
|
/* Return the key if the user didn't give us one. */
|
|
if (!F_ISSET(dbc, DBC_OPD)) {
|
|
if (flags != DB_GET_BOTH && flags != DB_GET_BOTH_RANGE &&
|
|
flags != DB_SET && flags != DB_SET_RANGE)
|
|
ret = __db_retcopy(dbp->dbenv,
|
|
key, &cp->recno, sizeof(cp->recno),
|
|
&dbc->rkey->data, &dbc->rkey->ulen);
|
|
F_SET(key, DB_DBT_ISSET);
|
|
}
|
|
|
|
/* The cursor was reset, no further delete adjustment is necessary. */
|
|
err: CD_CLR(cp);
|
|
|
|
return (ret);
|
|
}
|
|
|
|
/*
|
|
* __ram_c_put --
|
|
* Recno cursor->c_put function.
|
|
*
|
|
* PUBLIC: int __ram_c_put __P((DBC *, DBT *, DBT *, u_int32_t, db_pgno_t *));
|
|
*/
|
|
int
|
|
__ram_c_put(dbc, key, data, flags, pgnop)
|
|
DBC *dbc;
|
|
DBT *key, *data;
|
|
u_int32_t flags;
|
|
db_pgno_t *pgnop;
|
|
{
|
|
BTREE_CURSOR *cp;
|
|
DB *dbp;
|
|
DB_LSN lsn;
|
|
int exact, nc, ret, t_ret;
|
|
u_int32_t iiflags;
|
|
void *arg;
|
|
|
|
COMPQUIET(pgnop, NULL);
|
|
|
|
dbp = dbc->dbp;
|
|
cp = (BTREE_CURSOR *)dbc->internal;
|
|
|
|
/*
|
|
* DB_KEYFIRST and DB_KEYLAST mean different things if they're
|
|
* used in an off-page duplicate tree. If we're an off-page
|
|
* duplicate tree, they really mean "put at the beginning of the
|
|
* tree" and "put at the end of the tree" respectively, so translate
|
|
* them to something else.
|
|
*/
|
|
if (F_ISSET(dbc, DBC_OPD))
|
|
switch (flags) {
|
|
case DB_KEYFIRST:
|
|
cp->recno = 1;
|
|
flags = DB_BEFORE;
|
|
break;
|
|
case DB_KEYLAST:
|
|
if ((ret = __ram_add(dbc,
|
|
&cp->recno, data, DB_APPEND, 0)) != 0)
|
|
return (ret);
|
|
if (CURADJ_LOG(dbc) &&
|
|
(ret = __bam_rcuradj_log(dbp, dbc->txn, &lsn, 0,
|
|
CA_ICURRENT, cp->root, cp->recno, cp->order)) != 0)
|
|
return (ret);
|
|
return (0);
|
|
default:
|
|
break;
|
|
}
|
|
|
|
/*
|
|
* Handle normal DB_KEYFIRST/DB_KEYLAST; for a recno, which has
|
|
* no duplicates, these are identical and mean "put the given
|
|
* datum at the given recno".
|
|
*
|
|
* Note that the code here used to be in __ram_put; now, we
|
|
* go through the access-method-common __db_put function, which
|
|
* handles DB_NOOVERWRITE, so we and __ram_add don't have to.
|
|
*/
|
|
if (flags == DB_KEYFIRST || flags == DB_KEYLAST) {
|
|
ret = __ram_getno(dbc, key, &cp->recno, 1);
|
|
if (ret == 0 || ret == DB_NOTFOUND)
|
|
ret = __ram_add(dbc, &cp->recno, data, 0, 0);
|
|
return (ret);
|
|
}
|
|
|
|
/*
|
|
* If we're putting with a cursor that's marked C_DELETED, we need to
|
|
* take special care; the cursor doesn't "really" reference the item
|
|
* corresponding to its current recno, but instead is "between" that
|
|
* record and the current one. Translate the actual insert into
|
|
* DB_BEFORE, and let the __ram_ca work out the gory details of what
|
|
* should wind up pointing where.
|
|
*/
|
|
if (CD_ISSET(cp))
|
|
iiflags = DB_BEFORE;
|
|
else
|
|
iiflags = flags;
|
|
|
|
split: if ((ret = __bam_rsearch(dbc, &cp->recno, S_INSERT, 1, &exact)) != 0)
|
|
goto err;
|
|
/*
|
|
* An inexact match is okay; it just means we're one record past the
|
|
* end, which is reasonable if we're marked deleted.
|
|
*/
|
|
DB_ASSERT(exact || CD_ISSET(cp));
|
|
|
|
/* Copy the page into the cursor. */
|
|
STACK_TO_CURSOR(cp, ret);
|
|
if (ret != 0)
|
|
goto err;
|
|
|
|
ret = __bam_iitem(dbc, key, data, iiflags, 0);
|
|
t_ret = __bam_stkrel(dbc, STK_CLRDBC);
|
|
|
|
if (t_ret != 0 && (ret == 0 || ret == DB_NEEDSPLIT))
|
|
ret = t_ret;
|
|
else if (ret == DB_NEEDSPLIT) {
|
|
arg = &cp->recno;
|
|
if ((ret = __bam_split(dbc, arg, NULL)) != 0)
|
|
goto err;
|
|
goto split;
|
|
}
|
|
if (ret != 0)
|
|
goto err;
|
|
|
|
switch (flags) { /* Adjust the cursors. */
|
|
case DB_AFTER:
|
|
nc = __ram_ca(dbc, CA_IAFTER);
|
|
|
|
/*
|
|
* We only need to adjust this cursor forward if we truly added
|
|
* the item after the current recno, rather than remapping it
|
|
* to DB_BEFORE.
|
|
*/
|
|
if (iiflags == DB_AFTER)
|
|
++cp->recno;
|
|
|
|
/* Only log if __ram_ca found any relevant cursors. */
|
|
if (nc > 0 && CURADJ_LOG(dbc) &&
|
|
(ret = __bam_rcuradj_log(dbp, dbc->txn, &lsn, 0, CA_IAFTER,
|
|
cp->root, cp->recno, cp->order)) != 0)
|
|
goto err;
|
|
break;
|
|
case DB_BEFORE:
|
|
nc = __ram_ca(dbc, CA_IBEFORE);
|
|
--cp->recno;
|
|
|
|
/* Only log if __ram_ca found any relevant cursors. */
|
|
if (nc > 0 && CURADJ_LOG(dbc) &&
|
|
(ret = __bam_rcuradj_log(dbp, dbc->txn, &lsn, 0, CA_IBEFORE,
|
|
cp->root, cp->recno, cp->order)) != 0)
|
|
goto err;
|
|
break;
|
|
case DB_CURRENT:
|
|
/*
|
|
* We only need to do an adjustment if we actually
|
|
* added an item, which we only would have done if the
|
|
* cursor was marked deleted.
|
|
*
|
|
* Only log if __ram_ca found any relevant cursors.
|
|
*/
|
|
if (CD_ISSET(cp) && __ram_ca(dbc, CA_ICURRENT) > 0 &&
|
|
CURADJ_LOG(dbc) &&
|
|
(ret = __bam_rcuradj_log(dbp, dbc->txn, &lsn, 0,
|
|
CA_ICURRENT, cp->root, cp->recno, cp->order)) != 0)
|
|
goto err;
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
/* Return the key if we've created a new record. */
|
|
if (!F_ISSET(dbc, DBC_OPD) && (flags == DB_AFTER || flags == DB_BEFORE))
|
|
ret = __db_retcopy(dbp->dbenv, key, &cp->recno,
|
|
sizeof(cp->recno), &dbc->rkey->data, &dbc->rkey->ulen);
|
|
|
|
/* The cursor was reset, no further delete adjustment is necessary. */
|
|
err: CD_CLR(cp);
|
|
|
|
return (ret);
|
|
}
|
|
|
|
/*
|
|
* __ram_ca --
|
|
* Adjust cursors. Returns the number of relevant cursors.
|
|
*
|
|
* PUBLIC: int __ram_ca __P((DBC *, ca_recno_arg));
|
|
*/
|
|
int
|
|
__ram_ca(dbc_arg, op)
|
|
DBC *dbc_arg;
|
|
ca_recno_arg op;
|
|
{
|
|
BTREE_CURSOR *cp, *cp_arg;
|
|
DB *dbp, *ldbp;
|
|
DB_ENV *dbenv;
|
|
DBC *dbc;
|
|
db_recno_t recno;
|
|
int adjusted, found;
|
|
u_int32_t order;
|
|
|
|
dbp = dbc_arg->dbp;
|
|
dbenv = dbp->dbenv;
|
|
cp_arg = (BTREE_CURSOR *)dbc_arg->internal;
|
|
recno = cp_arg->recno;
|
|
|
|
found = 0;
|
|
|
|
/*
|
|
* It only makes sense to adjust cursors if we're a renumbering
|
|
* recno; we should only be called if this is one.
|
|
*/
|
|
DB_ASSERT(F_ISSET(cp_arg, C_RENUMBER));
|
|
|
|
MUTEX_THREAD_LOCK(dbenv, dbenv->dblist_mutexp);
|
|
/*
|
|
* Adjust the cursors. See the comment in __bam_ca_delete().
|
|
*/
|
|
/*
|
|
* If we're doing a delete, we need to find the highest
|
|
* order of any cursor currently pointing at this item,
|
|
* so we can assign a higher order to the newly deleted
|
|
* cursor. Unfortunately, this requires a second pass through
|
|
* the cursor list.
|
|
*/
|
|
if (op == CA_DELETE) {
|
|
order = 1;
|
|
for (ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
|
ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
|
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
|
MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
|
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
|
dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
|
|
cp = (BTREE_CURSOR *)dbc->internal;
|
|
if (cp_arg->root == cp->root &&
|
|
recno == cp->recno && CD_ISSET(cp) &&
|
|
order <= cp->order)
|
|
order = cp->order + 1;
|
|
}
|
|
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
|
}
|
|
} else
|
|
order = INVALID_ORDER;
|
|
|
|
/* Now go through and do the actual adjustments. */
|
|
for (ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
|
ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
|
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
|
MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
|
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
|
dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
|
|
cp = (BTREE_CURSOR *)dbc->internal;
|
|
if (cp_arg->root != cp->root)
|
|
continue;
|
|
++found;
|
|
adjusted = 0;
|
|
switch (op) {
|
|
case CA_DELETE:
|
|
if (recno < cp->recno) {
|
|
--cp->recno;
|
|
/*
|
|
* If the adjustment made them equal,
|
|
* we have to merge the orders.
|
|
*/
|
|
if (recno == cp->recno && CD_ISSET(cp))
|
|
cp->order += order;
|
|
} else if (recno == cp->recno &&
|
|
!CD_ISSET(cp)) {
|
|
CD_SET(cp);
|
|
cp->order = order;
|
|
}
|
|
break;
|
|
case CA_IBEFORE:
|
|
/*
|
|
* IBEFORE is just like IAFTER, except that we
|
|
* adjust cursors on the current record too.
|
|
*/
|
|
if (C_EQUAL(cp_arg, cp)) {
|
|
++cp->recno;
|
|
adjusted = 1;
|
|
}
|
|
goto iafter;
|
|
case CA_ICURRENT:
|
|
|
|
/*
|
|
* If the original cursor wasn't deleted, we
|
|
* just did a replacement and so there's no
|
|
* need to adjust anything--we shouldn't have
|
|
* gotten this far. Otherwise, we behave
|
|
* much like an IAFTER, except that all
|
|
* cursors pointing to the current item get
|
|
* marked undeleted and point to the new
|
|
* item.
|
|
*/
|
|
DB_ASSERT(CD_ISSET(cp_arg));
|
|
if (C_EQUAL(cp_arg, cp)) {
|
|
CD_CLR(cp);
|
|
break;
|
|
}
|
|
/* FALLTHROUGH */
|
|
case CA_IAFTER:
|
|
iafter: if (!adjusted && C_LESSTHAN(cp_arg, cp)) {
|
|
++cp->recno;
|
|
adjusted = 1;
|
|
}
|
|
if (recno == cp->recno && adjusted)
|
|
/*
|
|
* If we've moved this cursor's recno,
|
|
* split its order number--i.e.,
|
|
* decrement it by enough so that
|
|
* the lowest cursor moved has order 1.
|
|
* cp_arg->order is the split point,
|
|
* so decrement by one less than that.
|
|
*/
|
|
cp->order -= (cp_arg->order - 1);
|
|
break;
|
|
}
|
|
}
|
|
MUTEX_THREAD_UNLOCK(dbp->dbenv, dbp->mutexp);
|
|
}
|
|
MUTEX_THREAD_UNLOCK(dbenv, dbenv->dblist_mutexp);
|
|
|
|
return (found);
|
|
}
|
|
|
|
/*
|
|
* __ram_getno --
|
|
* Check the user's record number, and make sure we've seen it.
|
|
*
|
|
* PUBLIC: int __ram_getno __P((DBC *, const DBT *, db_recno_t *, int));
|
|
*/
|
|
int
|
|
__ram_getno(dbc, key, rep, can_create)
|
|
DBC *dbc;
|
|
const DBT *key;
|
|
db_recno_t *rep;
|
|
int can_create;
|
|
{
|
|
DB *dbp;
|
|
db_recno_t recno;
|
|
|
|
dbp = dbc->dbp;
|
|
|
|
/* Check the user's record number. */
|
|
if ((recno = *(db_recno_t *)key->data) == 0) {
|
|
__db_err(dbp->dbenv, "illegal record number of 0");
|
|
return (EINVAL);
|
|
}
|
|
if (rep != NULL)
|
|
*rep = recno;
|
|
|
|
/*
|
|
* Btree can neither create records nor read them in. Recno can
|
|
* do both, see if we can find the record.
|
|
*/
|
|
return (dbc->dbtype == DB_RECNO ?
|
|
__ram_update(dbc, recno, can_create) : 0);
|
|
}
|
|
|
|
/*
|
|
* __ram_update --
|
|
* Ensure the tree has records up to and including the specified one.
|
|
*/
|
|
static int
|
|
__ram_update(dbc, recno, can_create)
|
|
DBC *dbc;
|
|
db_recno_t recno;
|
|
int can_create;
|
|
{
|
|
BTREE *t;
|
|
DB *dbp;
|
|
DBT *rdata;
|
|
db_recno_t nrecs;
|
|
int ret;
|
|
|
|
dbp = dbc->dbp;
|
|
t = dbp->bt_internal;
|
|
|
|
/*
|
|
* If we can't create records and we've read the entire backing input
|
|
* file, we're done.
|
|
*/
|
|
if (!can_create && t->re_eof)
|
|
return (0);
|
|
|
|
/*
|
|
* If we haven't seen this record yet, try to get it from the original
|
|
* file.
|
|
*/
|
|
if ((ret = __bam_nrecs(dbc, &nrecs)) != 0)
|
|
return (ret);
|
|
if (!t->re_eof && recno > nrecs) {
|
|
if ((ret = __ram_sread(dbc, recno)) != 0 && ret != DB_NOTFOUND)
|
|
return (ret);
|
|
if ((ret = __bam_nrecs(dbc, &nrecs)) != 0)
|
|
return (ret);
|
|
}
|
|
|
|
/*
|
|
* If we can create records, create empty ones up to the requested
|
|
* record.
|
|
*/
|
|
if (!can_create || recno <= nrecs + 1)
|
|
return (0);
|
|
|
|
rdata = &dbc->my_rdata;
|
|
rdata->flags = 0;
|
|
rdata->size = 0;
|
|
|
|
while (recno > ++nrecs)
|
|
if ((ret = __ram_add(dbc,
|
|
&nrecs, rdata, 0, BI_DELETED)) != 0)
|
|
return (ret);
|
|
return (0);
|
|
}
|
|
|
|
/*
|
|
* __ram_source --
|
|
* Load information about the backing file.
|
|
*/
|
|
static int
|
|
__ram_source(dbp)
|
|
DB *dbp;
|
|
{
|
|
BTREE *t;
|
|
char *source;
|
|
int ret;
|
|
|
|
t = dbp->bt_internal;
|
|
|
|
/* Find the real name, and swap out the one we had before. */
|
|
if ((ret = __db_appname(dbp->dbenv,
|
|
DB_APP_DATA, t->re_source, 0, NULL, &source)) != 0)
|
|
return (ret);
|
|
__os_free(dbp->dbenv, t->re_source);
|
|
t->re_source = source;
|
|
|
|
/*
|
|
* !!!
|
|
* It's possible that the backing source file is read-only. We don't
|
|
* much care other than we'll complain if there are any modifications
|
|
* when it comes time to write the database back to the source.
|
|
*/
|
|
if ((t->re_fp = fopen(t->re_source, "r")) == NULL) {
|
|
ret = __os_get_errno();
|
|
__db_err(dbp->dbenv, "%s: %s", t->re_source, db_strerror(ret));
|
|
return (ret);
|
|
}
|
|
|
|
t->re_eof = 0;
|
|
return (0);
|
|
}
|
|
|
|
/*
|
|
* __ram_writeback --
|
|
* Rewrite the backing file.
|
|
*
|
|
* PUBLIC: int __ram_writeback __P((DB *));
|
|
*/
|
|
int
|
|
__ram_writeback(dbp)
|
|
DB *dbp;
|
|
{
|
|
BTREE *t;
|
|
DB_ENV *dbenv;
|
|
DBC *dbc;
|
|
DBT key, data;
|
|
FILE *fp;
|
|
db_recno_t keyno;
|
|
int ret, t_ret;
|
|
u_int8_t delim, *pad;
|
|
|
|
t = dbp->bt_internal;
|
|
dbenv = dbp->dbenv;
|
|
fp = NULL;
|
|
pad = NULL;
|
|
|
|
/* If the file wasn't modified, we're done. */
|
|
if (!t->re_modified)
|
|
return (0);
|
|
|
|
/* If there's no backing source file, we're done. */
|
|
if (t->re_source == NULL) {
|
|
t->re_modified = 0;
|
|
return (0);
|
|
}
|
|
|
|
/* Allocate a cursor. */
|
|
if ((ret = __db_cursor(dbp, NULL, &dbc, 0)) != 0)
|
|
return (ret);
|
|
|
|
/*
|
|
* Read any remaining records into the tree.
|
|
*
|
|
* !!!
|
|
* This is why we can't support transactions when applications specify
|
|
* backing (re_source) files. At this point we have to read in the
|
|
* rest of the records from the file so that we can write all of the
|
|
* records back out again, which could modify a page for which we'd
|
|
* have to log changes and which we don't have locked. This could be
|
|
* partially fixed by taking a snapshot of the entire file during the
|
|
* DB->open as DB->open is transaction protected. But, if a checkpoint
|
|
* occurs then, the part of the log holding the copy of the file could
|
|
* be discarded, and that would make it impossible to recover in the
|
|
* face of disaster. This could all probably be fixed, but it would
|
|
* require transaction protecting the backing source file.
|
|
*
|
|
* XXX
|
|
* This could be made to work now that we have transactions protecting
|
|
* file operations. Margo has specifically asked for the privilege of
|
|
* doing this work.
|
|
*/
|
|
if ((ret =
|
|
__ram_update(dbc, DB_MAX_RECORDS, 0)) != 0 && ret != DB_NOTFOUND)
|
|
return (ret);
|
|
|
|
/*
|
|
* Close any existing file handle and re-open the file, truncating it.
|
|
*/
|
|
if (t->re_fp != NULL) {
|
|
if (fclose(t->re_fp) != 0) {
|
|
ret = __os_get_errno();
|
|
goto err;
|
|
}
|
|
t->re_fp = NULL;
|
|
}
|
|
if ((fp = fopen(t->re_source, "w")) == NULL) {
|
|
ret = __os_get_errno();
|
|
__db_err(dbenv, "%s: %s", t->re_source, db_strerror(ret));
|
|
goto err;
|
|
}
|
|
|
|
/*
|
|
* We step through the records, writing each one out. Use the record
|
|
* number and the dbp->get() function, instead of a cursor, so we find
|
|
* and write out "deleted" or non-existent records. The DB handle may
|
|
* be threaded, so allocate memory as we go.
|
|
*/
|
|
memset(&key, 0, sizeof(key));
|
|
key.size = sizeof(db_recno_t);
|
|
key.data = &keyno;
|
|
memset(&data, 0, sizeof(data));
|
|
F_SET(&data, DB_DBT_REALLOC);
|
|
|
|
/*
|
|
* We'll need the delimiter if we're doing variable-length records,
|
|
* and the pad character if we're doing fixed-length records.
|
|
*/
|
|
delim = t->re_delim;
|
|
for (keyno = 1;; ++keyno) {
|
|
switch (ret = __db_get(dbp, NULL, &key, &data, 0)) {
|
|
case 0:
|
|
if (data.size != 0 &&
|
|
fwrite(data.data, 1, data.size, fp) != data.size)
|
|
goto write_err;
|
|
break;
|
|
case DB_KEYEMPTY:
|
|
if (F_ISSET(dbp, DB_AM_FIXEDLEN)) {
|
|
if (pad == NULL) {
|
|
if ((ret = __os_malloc(
|
|
dbenv, t->re_len, &pad)) != 0)
|
|
goto err;
|
|
memset(pad, t->re_pad, t->re_len);
|
|
}
|
|
if (fwrite(pad, 1, t->re_len, fp) != t->re_len)
|
|
goto write_err;
|
|
}
|
|
break;
|
|
case DB_NOTFOUND:
|
|
ret = 0;
|
|
goto done;
|
|
default:
|
|
goto err;
|
|
}
|
|
if (!F_ISSET(dbp, DB_AM_FIXEDLEN) &&
|
|
fwrite(&delim, 1, 1, fp) != 1) {
|
|
write_err: ret = __os_get_errno();
|
|
__db_err(dbenv,
|
|
"%s: write failed to backing file: %s",
|
|
t->re_source, strerror(ret));
|
|
goto err;
|
|
}
|
|
}
|
|
|
|
err:
|
|
done: /* Close the file descriptor. */
|
|
if (fp != NULL && fclose(fp) != 0) {
|
|
t_ret = __os_get_errno();
|
|
if (ret == 0)
|
|
ret = t_ret;
|
|
__db_err(dbenv, "%s: %s", t->re_source, db_strerror(t_ret));
|
|
}
|
|
|
|
/* Discard the cursor. */
|
|
if ((t_ret = __db_c_close(dbc)) != 0 && ret == 0)
|
|
ret = t_ret;
|
|
|
|
/* Discard memory allocated to hold the data items. */
|
|
if (data.data != NULL)
|
|
__os_ufree(dbenv, data.data);
|
|
if (pad != NULL)
|
|
__os_free(dbenv, pad);
|
|
|
|
if (ret == 0)
|
|
t->re_modified = 0;
|
|
|
|
return (ret);
|
|
}
|
|
|
|
/*
|
|
* __ram_sread --
|
|
* Read records from a source file.
|
|
*/
|
|
static int
|
|
__ram_sread(dbc, top)
|
|
DBC *dbc;
|
|
db_recno_t top;
|
|
{
|
|
BTREE *t;
|
|
DB *dbp;
|
|
DBT data, *rdata;
|
|
db_recno_t recno;
|
|
size_t len;
|
|
int ch, ret, was_modified;
|
|
|
|
t = dbc->dbp->bt_internal;
|
|
dbp = dbc->dbp;
|
|
was_modified = t->re_modified;
|
|
|
|
if ((ret = __bam_nrecs(dbc, &recno)) != 0)
|
|
return (ret);
|
|
|
|
/*
|
|
* Use the record key return memory, it's only a short-term use.
|
|
* The record data return memory is used by __bam_iitem, which
|
|
* we'll indirectly call, so use the key so as not to collide.
|
|
*/
|
|
len = F_ISSET(dbp, DB_AM_FIXEDLEN) ? t->re_len : 256;
|
|
rdata = &dbc->my_rkey;
|
|
if (rdata->ulen < len) {
|
|
if ((ret = __os_realloc(
|
|
dbp->dbenv, len, &rdata->data)) != 0) {
|
|
rdata->ulen = 0;
|
|
rdata->data = NULL;
|
|
return (ret);
|
|
}
|
|
rdata->ulen = (u_int32_t)len;
|
|
}
|
|
|
|
memset(&data, 0, sizeof(data));
|
|
while (recno < top) {
|
|
data.data = rdata->data;
|
|
data.size = 0;
|
|
if (F_ISSET(dbp, DB_AM_FIXEDLEN))
|
|
for (len = t->re_len; len > 0; --len) {
|
|
if ((ch = getc(t->re_fp)) == EOF) {
|
|
if (data.size == 0)
|
|
goto eof;
|
|
break;
|
|
}
|
|
((u_int8_t *)data.data)[data.size++] = ch;
|
|
}
|
|
else
|
|
for (;;) {
|
|
if ((ch = getc(t->re_fp)) == EOF) {
|
|
if (data.size == 0)
|
|
goto eof;
|
|
break;
|
|
}
|
|
if (ch == t->re_delim)
|
|
break;
|
|
|
|
((u_int8_t *)data.data)[data.size++] = ch;
|
|
if (data.size == rdata->ulen) {
|
|
if ((ret = __os_realloc(dbp->dbenv,
|
|
rdata->ulen *= 2,
|
|
&rdata->data)) != 0) {
|
|
rdata->ulen = 0;
|
|
rdata->data = NULL;
|
|
return (ret);
|
|
} else
|
|
data.data = rdata->data;
|
|
}
|
|
}
|
|
|
|
/*
|
|
* Another process may have read this record from the input
|
|
* file and stored it into the database already, in which
|
|
* case we don't need to repeat that operation. We detect
|
|
* this by checking if the last record we've read is greater
|
|
* or equal to the number of records in the database.
|
|
*/
|
|
if (t->re_last >= recno) {
|
|
++recno;
|
|
if ((ret = __ram_add(dbc, &recno, &data, 0, 0)) != 0)
|
|
goto err;
|
|
}
|
|
++t->re_last;
|
|
}
|
|
|
|
if (0) {
|
|
eof: t->re_eof = 1;
|
|
ret = DB_NOTFOUND;
|
|
}
|
|
err: if (!was_modified)
|
|
t->re_modified = 0;
|
|
|
|
return (ret);
|
|
}
|
|
|
|
/*
|
|
* __ram_add --
|
|
* Add records into the tree.
|
|
*/
|
|
static int
|
|
__ram_add(dbc, recnop, data, flags, bi_flags)
|
|
DBC *dbc;
|
|
db_recno_t *recnop;
|
|
DBT *data;
|
|
u_int32_t flags, bi_flags;
|
|
{
|
|
BTREE_CURSOR *cp;
|
|
int exact, ret, stack, t_ret;
|
|
|
|
cp = (BTREE_CURSOR *)dbc->internal;
|
|
|
|
retry: /* Find the slot for insertion. */
|
|
if ((ret = __bam_rsearch(dbc, recnop,
|
|
S_INSERT | (flags == DB_APPEND ? S_APPEND : 0), 1, &exact)) != 0)
|
|
return (ret);
|
|
stack = 1;
|
|
|
|
/* Copy the page into the cursor. */
|
|
STACK_TO_CURSOR(cp, ret);
|
|
if (ret != 0)
|
|
goto err;
|
|
|
|
/*
|
|
* The application may modify the data based on the selected record
|
|
* number.
|
|
*/
|
|
if (flags == DB_APPEND && dbc->dbp->db_append_recno != NULL &&
|
|
(ret = dbc->dbp->db_append_recno(dbc->dbp, data, *recnop)) != 0)
|
|
goto err;
|
|
|
|
/*
|
|
* Select the arguments for __bam_iitem() and do the insert. If the
|
|
* key is an exact match, or we're replacing the data item with a
|
|
* new data item, replace the current item. If the key isn't an exact
|
|
* match, we're inserting a new key/data pair, before the search
|
|
* location.
|
|
*/
|
|
switch (ret = __bam_iitem(dbc,
|
|
NULL, data, exact ? DB_CURRENT : DB_BEFORE, bi_flags)) {
|
|
case 0:
|
|
/*
|
|
* Don't adjust anything.
|
|
*
|
|
* If we inserted a record, no cursors need adjusting because
|
|
* the only new record it's possible to insert is at the very
|
|
* end of the tree. The necessary adjustments to the internal
|
|
* page counts were made by __bam_iitem().
|
|
*
|
|
* If we overwrote a record, no cursors need adjusting because
|
|
* future DBcursor->get calls will simply return the underlying
|
|
* record (there's no adjustment made for the DB_CURRENT flag
|
|
* when a cursor get operation immediately follows a cursor
|
|
* delete operation, and the normal adjustment for the DB_NEXT
|
|
* flag is still correct).
|
|
*/
|
|
break;
|
|
case DB_NEEDSPLIT:
|
|
/* Discard the stack of pages and split the page. */
|
|
(void)__bam_stkrel(dbc, STK_CLRDBC);
|
|
stack = 0;
|
|
|
|
if ((ret = __bam_split(dbc, recnop, NULL)) != 0)
|
|
goto err;
|
|
|
|
goto retry;
|
|
/* NOTREACHED */
|
|
default:
|
|
goto err;
|
|
}
|
|
|
|
err: if (stack && (t_ret = __bam_stkrel(dbc, STK_CLRDBC)) != 0 && ret == 0)
|
|
ret = t_ret;
|
|
|
|
return (ret);
|
|
}
|