Commit 7b13bdaa authored by unknown's avatar unknown

remove all the auto-generated files but NOT vxworks/* ones.

The reason is that vxworks files are most often, one file per directory,
and when such a file is removed directory is gone as well. Though files
are auto-generated, directories aren't.


BitKeeper/deleted/.del-btree_auto.h~94f1be726dad9aff:
  Delete: bdb/dbinc_auto/btree_auto.h
BitKeeper/deleted/.del-crdel_auto.h~e6710e96650dd20f:
  Delete: bdb/dbinc_auto/crdel_auto.h
BitKeeper/deleted/.del-db_auto.h~f994b15bd824ae9b:
  Delete: bdb/dbinc_auto/db_auto.h
BitKeeper/deleted/.del-db_config.h~60184629d0966584:
  Delete: bdb/build_win32/db_config.h
BitKeeper/deleted/.del-db_cxx.h~5ae7eca120f9e810:
  Delete: bdb/build_win32/db_cxx.h
BitKeeper/deleted/.del-db_perf.dsp~5984ea76dd378285:
  Delete: bdb/build_win32/db_perf.dsp
BitKeeper/deleted/.del-db_test.dsp~eb1dbc135441c71c:
  Delete: bdb/build_win32/db_test.dsp
BitKeeper/deleted/.del-dbreg_auto.c~c2549ec52200654b:
  Delete: bdb/dbreg/dbreg_auto.c
BitKeeper/deleted/.del-dbreg_auto.h~c074dd54cca3b504:
  Delete: bdb/dbinc_auto/dbreg_auto.h
BitKeeper/deleted/.del-fileops_auto.h~10df93de4b325f28:
  Delete: bdb/dbinc_auto/fileops_auto.h
BitKeeper/deleted/.del-hash_auto.h~a29a3d2157d8c2ed:
  Delete: bdb/dbinc_auto/hash_auto.h
BitKeeper/deleted/.del-libdb.def~301ea9487fa24bb1:
  Delete: bdb/build_win32/libdb.def
BitKeeper/deleted/.del-qam_auto.h~727bb6f1bc903af6:
  Delete: bdb/dbinc_auto/qam_auto.h
BitKeeper/deleted/.del-rec_dbreg~e359d26bb94bb1c3:
  Delete: bdb/dist/template/rec_dbreg
BitKeeper/deleted/.del-rec_fileops~ef167bd1b983a01:
  Delete: bdb/dist/template/rec_fileops
BitKeeper/deleted/.del-txn_auto.h~5c0ec531297454cf:
  Delete: bdb/dbinc_auto/txn_auto.h
BitKeeper/deleted/.del-DbBtreeStat.java~ae44f148e56d691e:
  Delete: bdb/java/src/com/sleepycat/db/DbBtreeStat.java
BitKeeper/deleted/.del-DbHashStat.java~712355915769120f:
  Delete: bdb/java/src/com/sleepycat/db/DbHashStat.java
BitKeeper/deleted/.del-DbLockStat.java~78219b0a1bd2f053:
  Delete: bdb/java/src/com/sleepycat/db/DbLockStat.java
BitKeeper/deleted/.del-DbLogStat.java~b9922e5d7f3a04aa:
  Delete: bdb/java/src/com/sleepycat/db/DbLogStat.java
BitKeeper/deleted/.del-DbMpoolFStat.java~1e69777aa623d5b4:
  Delete: bdb/java/src/com/sleepycat/db/DbMpoolFStat.java
BitKeeper/deleted/.del-DbQueueStat.java~e1632bb696810690:
  Delete: bdb/java/src/com/sleepycat/db/DbQueueStat.java
BitKeeper/deleted/.del-DbRepStat.java~5dc6f9d61f4ad890:
  Delete: bdb/java/src/com/sleepycat/db/DbRepStat.java
BitKeeper/deleted/.del-DbTxnStat.java~d4408e0452a8ef16:
  Delete: bdb/java/src/com/sleepycat/db/DbTxnStat.java
BitKeeper/deleted/.del-fileops_auto.c~f1dd08f372e83d35:
  Delete: bdb/fileops/fileops_auto.c
BitKeeper/deleted/.del-java_stat_auto.c~2199d8ff9d208c23:
  Delete: bdb/libdb_java/java_stat_auto.c
BitKeeper/deleted/.del-java_stat_auto.h~c2e9f743368f29fb:
  Delete: bdb/libdb_java/java_stat_auto.h
BitKeeper/etc/ignore:
  Added bdb/build_win32/db_config.h bdb/build_win32/db_cxx.h bdb/build_win32/db_perf.dsp bdb/build_win32/db_test.dsp bdb/build_win32/libdb.def bdb/dbinc_auto/btree_auto.h bdb/dbinc_auto/btree_ext.h bdb/dbinc_auto/clib_ext.h bdb/dbinc_auto/common_ext.h bdb/dbinc_auto/crdel_auto.h bdb/dbinc_auto/crypto_ext.h bdb/dbinc_auto/db_auto.h bdb/dbinc_auto/db_ext.h bdb/dbinc_auto/db_server.h bdb/dbinc_auto/dbreg_auto.h bdb/dbinc_auto/dbreg_ext.h bdb/dbinc_auto/env_ext.h bdb/dbinc_auto/ext_185_def.in bdb/dbinc_auto/ext_185_prot.in bdb/dbinc_auto/ext_def.in bdb/dbinc_auto/ext_prot.in bdb/dbinc_auto/fileops_auto.h bdb/dbinc_auto/fileops_ext.h bdb/dbinc_auto/hash_auto.h bdb/dbinc_auto/hash_ext.h bdb/dbinc_auto/hmac_ext.h bdb/dbinc_auto/int_def.in bdb/dbinc_auto/lock_ext.h bdb/dbinc_auto/log_ext.h bdb/dbinc_auto/mp_ext.h bdb/dbinc_auto/mutex_ext.h bdb/dbinc_auto/os_ext.h bdb/dbinc_auto/qam_auto.h bdb/dbinc_auto/qam_ext.h bdb/dbinc_auto/rep_ext.h bdb/dbinc_auto/rpc_client_ext.h bdb/dbinc_auto/rpc_defs.in bdb/dbinc_auto/rpc
parent 0c896bb9
......@@ -516,3 +516,137 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
bdb/build_win32/db_config.h
bdb/build_win32/db_cxx.h
bdb/build_win32/db_perf.dsp
bdb/build_win32/db_test.dsp
bdb/build_win32/libdb.def
bdb/dbinc_auto/btree_auto.h
bdb/dbinc_auto/btree_ext.h
bdb/dbinc_auto/clib_ext.h
bdb/dbinc_auto/common_ext.h
bdb/dbinc_auto/crdel_auto.h
bdb/dbinc_auto/crypto_ext.h
bdb/dbinc_auto/db_auto.h
bdb/dbinc_auto/db_ext.h
bdb/dbinc_auto/db_server.h
bdb/dbinc_auto/dbreg_auto.h
bdb/dbinc_auto/dbreg_ext.h
bdb/dbinc_auto/env_ext.h
bdb/dbinc_auto/ext_185_def.in
bdb/dbinc_auto/ext_185_prot.in
bdb/dbinc_auto/ext_def.in
bdb/dbinc_auto/ext_prot.in
bdb/dbinc_auto/fileops_auto.h
bdb/dbinc_auto/fileops_ext.h
bdb/dbinc_auto/hash_auto.h
bdb/dbinc_auto/hash_ext.h
bdb/dbinc_auto/hmac_ext.h
bdb/dbinc_auto/int_def.in
bdb/dbinc_auto/lock_ext.h
bdb/dbinc_auto/log_ext.h
bdb/dbinc_auto/mp_ext.h
bdb/dbinc_auto/mutex_ext.h
bdb/dbinc_auto/os_ext.h
bdb/dbinc_auto/qam_auto.h
bdb/dbinc_auto/qam_ext.h
bdb/dbinc_auto/rep_ext.h
bdb/dbinc_auto/rpc_client_ext.h
bdb/dbinc_auto/rpc_defs.in
bdb/dbinc_auto/rpc_server_ext.h
bdb/dbinc_auto/tcl_ext.h
bdb/dbinc_auto/txn_auto.h
bdb/dbinc_auto/txn_ext.h
bdb/dbinc_auto/xa_ext.h
bdb/dbreg/dbreg_auto.c
bdb/dist/bbb
bdb/dist/template/rec_dbreg
bdb/dist/template/rec_fileops
bdb/examples_c/ex_apprec/ex_apprec_auto.c
bdb/examples_c/ex_apprec/ex_apprec_auto.h
bdb/examples_c/ex_apprec/ex_apprec_template
bdb/fileops/fileops_auto.c
bdb/java/src/com/sleepycat/db/Db.java
bdb/java/src/com/sleepycat/db/DbBtreeStat.java
bdb/java/src/com/sleepycat/db/DbHashStat.java
bdb/java/src/com/sleepycat/db/DbLockStat.java
bdb/java/src/com/sleepycat/db/DbLogStat.java
bdb/java/src/com/sleepycat/db/DbMpoolFStat.java
bdb/java/src/com/sleepycat/db/DbQueueStat.java
bdb/java/src/com/sleepycat/db/DbRepStat.java
bdb/java/src/com/sleepycat/db/DbTxnStat.java
bdb/libdb_java/java_stat_auto.c
bdb/libdb_java/java_stat_auto.h
bdb/rpc_server/c/db_server_proc.c
bdb/rpc_server/c/db_server_proc.sed
bdb/rpc_server/c/db_server_svc.c
bdb/rpc_server/c/db_server_xdr.c
bdb/rpc_server/c/gen_db_server.c
bdb/test/TESTS
bdb/build_win32/db_config.h
bdb/build_win32/db_cxx.h
bdb/build_win32/db_perf.dsp
bdb/build_win32/db_test.dsp
bdb/build_win32/libdb.def
bdb/dbinc_auto/btree_auto.h
bdb/dbinc_auto/btree_ext.h
bdb/dbinc_auto/clib_ext.h
bdb/dbinc_auto/common_ext.h
bdb/dbinc_auto/crdel_auto.h
bdb/dbinc_auto/crypto_ext.h
bdb/dbinc_auto/db_auto.h
bdb/dbinc_auto/db_ext.h
bdb/dbinc_auto/db_server.h
bdb/dbinc_auto/dbreg_auto.h
bdb/dbinc_auto/dbreg_ext.h
bdb/dbinc_auto/env_ext.h
bdb/dbinc_auto/ext_185_def.in
bdb/dbinc_auto/ext_185_prot.in
bdb/dbinc_auto/ext_def.in
bdb/dbinc_auto/ext_prot.in
bdb/dbinc_auto/fileops_auto.h
bdb/dbinc_auto/fileops_ext.h
bdb/dbinc_auto/hash_auto.h
bdb/dbinc_auto/hash_ext.h
bdb/dbinc_auto/hmac_ext.h
bdb/dbinc_auto/int_def.in
bdb/dbinc_auto/lock_ext.h
bdb/dbinc_auto/log_ext.h
bdb/dbinc_auto/mp_ext.h
bdb/dbinc_auto/mutex_ext.h
bdb/dbinc_auto/os_ext.h
bdb/dbinc_auto/qam_auto.h
bdb/dbinc_auto/qam_ext.h
bdb/dbinc_auto/rep_ext.h
bdb/dbinc_auto/rpc_client_ext.h
bdb/dbinc_auto/rpc_defs.in
bdb/dbinc_auto/rpc_server_ext.h
bdb/dbinc_auto/tcl_ext.h
bdb/dbinc_auto/txn_auto.h
bdb/dbinc_auto/txn_ext.h
bdb/dbinc_auto/xa_ext.h
bdb/dbreg/dbreg_auto.c
bdb/dist/bbb
bdb/dist/template/rec_dbreg
bdb/dist/template/rec_fileops
bdb/examples_c/ex_apprec/ex_apprec_auto.c
bdb/examples_c/ex_apprec/ex_apprec_auto.h
bdb/examples_c/ex_apprec/ex_apprec_template
bdb/fileops/fileops_auto.c
bdb/java/src/com/sleepycat/db/Db.java
bdb/java/src/com/sleepycat/db/DbBtreeStat.java
bdb/java/src/com/sleepycat/db/DbHashStat.java
bdb/java/src/com/sleepycat/db/DbLockStat.java
bdb/java/src/com/sleepycat/db/DbLogStat.java
bdb/java/src/com/sleepycat/db/DbMpoolFStat.java
bdb/java/src/com/sleepycat/db/DbQueueStat.java
bdb/java/src/com/sleepycat/db/DbRepStat.java
bdb/java/src/com/sleepycat/db/DbTxnStat.java
bdb/libdb_java/java_stat_auto.c
bdb/libdb_java/java_stat_auto.h
bdb/rpc_server/c/db_server_proc.c
bdb/rpc_server/c/db_server_proc.sed
bdb/rpc_server/c/db_server_svc.c
bdb/rpc_server/c/db_server_xdr.c
bdb/rpc_server/c/gen_db_server.c
bdb/test/TESTS
/* DO NOT EDIT: automatically built by dist/s_win32. */
/* Define to 1 if you want to build a version for running the test suite. */
/* #undef CONFIG_TEST */
/* Define to 1 if you want a debugging version. */
/* #undef DEBUG */
#if defined(_DEBUG)
#if !defined(DEBUG)
#define DEBUG 1
#endif
#endif
/* Define to 1 if you want a version that logs read operations. */
/* #undef DEBUG_ROP */
/* Define to 1 if you want a version that logs write operations. */
/* #undef DEBUG_WOP */
/* Define to 1 if you want a version with run-time diagnostic checking. */
/* #undef DIAGNOSTIC */
/* Define to 1 if you have the `clock_gettime' function. */
/* #undef HAVE_CLOCK_GETTIME */
/* Define to 1 if Berkeley DB release includes strong cryptography. */
/* #undef HAVE_CRYPTO */
/* Define to 1 if you have the `directio' function. */
/* #undef HAVE_DIRECTIO */
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_DIRENT_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines. */
#define HAVE_EXIT_SUCCESS 1
/* Define to 1 if fcntl/F_SETFD denies child access to file descriptors. */
/* #undef HAVE_FCNTL_F_SETFD */
/* Define to 1 if allocated filesystem blocks are not zeroed. */
#define HAVE_FILESYSTEM_NOTZERO 1
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1
/* Define to 1 if you have the `getopt' function. */
/* #undef HAVE_GETOPT */
/* Define to 1 if you have the `gettimeofday' function. */
/* #undef HAVE_GETTIMEOFDAY */
/* Define to 1 if you have the `getuid' function. */
/* #undef HAVE_GETUID */
/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* Define to 1 if you have the `nsl' library (-lnsl). */
/* #undef HAVE_LIBNSL */
/* Define to 1 if you have the `memcmp' function. */
#define HAVE_MEMCMP 1
/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mlock' function. */
/* #undef HAVE_MLOCK */
/* Define to 1 if you have the `mmap' function. */
/* #undef HAVE_MMAP */
/* Define to 1 if you have the `munlock' function. */
/* #undef HAVE_MUNLOCK */
/* Define to 1 if you have the `munmap' function. */
/* #undef HAVE_MUNMAP */
/* Define to 1 to use the GCC compiler and 68K assembly language mutexes. */
/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */
/* Define to 1 to use the AIX _check_lock mutexes. */
/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */
/* Define to 1 to use the GCC compiler and Alpha assembly language mutexes. */
/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */
/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */
/* #undef HAVE_MUTEX_ARM_GCC_ASSEMBLY */
/* Define to 1 to use the UNIX fcntl system call mutexes. */
/* #undef HAVE_MUTEX_FCNTL */
/* Define to 1 to use the GCC compiler and PaRisc assembly language mutexes.
*/
/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */
/* Define to 1 to use the msem_XXX mutexes on HP-UX. */
/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */
/* Define to 1 to use the GCC compiler and IA64 assembly language mutexes. */
/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */
/* Define to 1 to use the msem_XXX mutexes on systems other than HP-UX. */
/* #undef HAVE_MUTEX_MSEM_INIT */
/* Define to 1 to use the GCC compiler and Apple PowerPC assembly language. */
/* #undef HAVE_MUTEX_PPC_APPLE_GCC_ASSEMBLY */
/* Define to 1 to use the GCC compiler and generic PowerPC assembly language.
*/
/* #undef HAVE_MUTEX_PPC_GENERIC_GCC_ASSEMBLY */
/* Define to 1 to use POSIX 1003.1 pthread_XXX mutexes. */
/* #undef HAVE_MUTEX_PTHREADS */
/* Define to 1 to use Reliant UNIX initspin mutexes. */
/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */
/* Define to 1 to use the GCC compiler and S/390 assembly language mutexes. */
/* #undef HAVE_MUTEX_S390_GCC_ASSEMBLY */
/* Define to 1 to use the SCO compiler and x86 assembly language mutexes. */
/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */
/* Define to 1 to use the obsolete POSIX 1003.1 sema_XXX mutexes. */
/* #undef HAVE_MUTEX_SEMA_INIT */
/* Define to 1 to use the SGI XXX_lock mutexes. */
/* #undef HAVE_MUTEX_SGI_INIT_LOCK */
/* Define to 1 to use the Solaris _lock_XXX mutexes. */
/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */
/* Define to 1 to use the Solaris lwp threads mutexes. */
/* #undef HAVE_MUTEX_SOLARIS_LWP */
/* Define to 1 to use the GCC compiler and Sparc assembly language mutexes. */
/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */
/* Define to 1 if mutexes hold system resources. */
/* #undef HAVE_MUTEX_SYSTEM_RESOURCES */
/* Define to 1 if fast mutexes are available. */
#define HAVE_MUTEX_THREADS 1
/* Define to 1 to configure mutexes intra-process only. */
/* #undef HAVE_MUTEX_THREAD_ONLY */
/* Define to 1 to use the UNIX International mutexes. */
/* #undef HAVE_MUTEX_UI_THREADS */
/* Define to 1 to use the UTS compiler and assembly language mutexes. */
/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */
/* Define to 1 to use VMS mutexes. */
/* #undef HAVE_MUTEX_VMS */
/* Define to 1 to use VxWorks mutexes. */
/* #undef HAVE_MUTEX_VXWORKS */
/* Define to 1 to use Windows mutexes. */
#define HAVE_MUTEX_WIN32 1
/* Define to 1 to use the GCC compiler and x86 assembly language mutexes. */
/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */
/* Define to 1 if you have the O_DIRECT flag. */
/* #undef HAVE_O_DIRECT */
/* Define to 1 if you have the `pread' function. */
/* #undef HAVE_PREAD */
/* Define to 1 if you have the `pstat_getdynamic' function. */
/* #undef HAVE_PSTAT_GETDYNAMIC */
/* Define to 1 if you have the `pwrite' function. */
/* #undef HAVE_PWRITE */
/* Define to 1 if building on QNX. */
/* #undef HAVE_QNX */
/* Define to 1 if you have the `qsort' function. */
#define HAVE_QSORT 1
/* Define to 1 if you have the `raise' function. */
#define HAVE_RAISE 1
/* Define to 1 if building RPC client/server. */
/* #undef HAVE_RPC */
/* Define to 1 if you have the `sched_yield' function. */
/* #undef HAVE_SCHED_YIELD */
/* Define to 1 if you have the `select' function. */
/* #undef HAVE_SELECT */
/* Define to 1 if you have the `shmget' function. */
/* #undef HAVE_SHMGET */
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
/* Define to 1 if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcasecmp' function. */
/* #undef HAVE_STRCASECMP */
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if `st_blksize' is member of `struct stat'. */
/* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */
/* Define to 1 if you have the `sysconf' function. */
/* #undef HAVE_SYSCONF */
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_DIR_H */
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
/* Define to 1 if you have the <sys/select.h> header file. */
/* #undef HAVE_SYS_SELECT_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
/* #undef HAVE_SYS_TIME_H */
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
/* Define to 1 if unlink of file with open file descriptors will fail. */
/* #undef HAVE_UNLINK_WITH_OPEN_FAILURE */
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
/* Define to 1 if building VxWorks. */
/* #undef HAVE_VXWORKS */
/* Define to 1 if you have the `yield' function. */
/* #undef HAVE_YIELD */
/* Define to 1 if you have the `_fstati64' function. */
#define HAVE__FSTATI64 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "support@sleepycat.com"
/* Define to the full name of this package. */
#define PACKAGE_NAME "Berkeley DB"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "Berkeley DB 4.1.24"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "db-4.1.24"
/* Define to the version of this package. */
#define PACKAGE_VERSION "4.1.24"
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* #undef STAT_MACROS_BROKEN */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #undef TIME_WITH_SYS_TIME */
/* Define to 1 to mask harmless unitialized memory read/writes. */
/* #undef UMRW */
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/*
* Exit success/failure macros.
*/
#ifndef HAVE_EXIT_SUCCESS
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#endif
/*
* Don't step on the namespace. Other libraries may have their own
* implementations of these functions, we don't want to use their
* implementations or force them to use ours based on the load order.
*/
#ifndef HAVE_GETCWD
#define getcwd __db_Cgetcwd
#endif
#ifndef HAVE_MEMCMP
#define memcmp __db_Cmemcmp
#endif
#ifndef HAVE_MEMCPY
#define memcpy __db_Cmemcpy
#endif
#ifndef HAVE_MEMMOVE
#define memmove __db_Cmemmove
#endif
#ifndef HAVE_RAISE
#define raise __db_Craise
#endif
#ifndef HAVE_SNPRINTF
#define snprintf __db_Csnprintf
#endif
#ifndef HAVE_STRCASECMP
#define strcasecmp __db_Cstrcasecmp
#define strncasecmp __db_Cstrncasecmp
#endif
#ifndef HAVE_STRERROR
#define strerror __db_Cstrerror
#endif
#ifndef HAVE_VSNPRINTF
#define vsnprintf __db_Cvsnprintf
#endif
/*
* XXX
* The following is not part of the automatic configuration setup, but
* provides the information necessary to build Berkeley DB on Windows.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <direct.h>
#include <fcntl.h>
#include <io.h>
#include <limits.h>
#include <memory.h>
#include <process.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>
/*
* To build Tcl interface libraries, the include path must be configured to
* use the directory containing <tcl.h>, usually the include directory in
* the Tcl distribution.
*/
#ifdef DB_TCL_SUPPORT
#include <tcl.h>
#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
/*
* All of the necessary includes have been included, ignore the #includes
* in the Berkeley DB source files.
*/
#define NO_SYSTEM_INCLUDES
/*
* Win32 has getcwd, snprintf and vsnprintf, but under different names.
*/
#define getcwd(buf, size) _getcwd(buf, size)
#define snprintf _snprintf
#define vsnprintf _vsnprintf
/*
* Win32 does not define getopt and friends in any header file, so we must.
*/
#if defined(__cplusplus)
extern "C" {
#endif
extern int optind;
extern char *optarg;
extern int getopt(int, char * const *, const char *);
#if defined(__cplusplus)
}
#endif
/*
* We use DB_WIN32 much as one would use _WIN32, to determine that we're
* using an operating system environment that supports Win32 calls
* and semantics. We don't use _WIN32 because cygwin/gcc also defines
* that, even though it closely emulates the Unix environment.
*/
#define DB_WIN32 1
/*
* This is a grievous hack -- once we've included windows.h, we have no choice
* but to use ANSI-style varargs (because it pulls in stdarg.h for us). DB's
* code decides which type of varargs to use based on the state of __STDC__.
* Sensible. Unfortunately, Microsoft's compiler _doesn't_ define __STDC__
* unless you invoke it with arguments turning OFF all vendor extensions. Even
* more unfortunately, if we do that, it fails to parse windows.h!!!!! So, we
* define __STDC__ here, after windows.h comes in. Note: the compiler knows
* we've defined it, and starts enforcing strict ANSI compilance from this point
* on.
*/
#define __STDC__ 1
/* DO NOT EDIT: automatically built by dist/s_win32. */
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1997-2002
* Sleepycat Software. All rights reserved.
*
* $Id: db_cxx.in,v 11.113 2002/08/23 13:02:27 mjc Exp $
*/
#ifndef _DB_CXX_H_
#define _DB_CXX_H_
//
// C++ assumptions:
//
// To ensure portability to many platforms, both new and old, we make
// few assumptions about the C++ compiler and library. For example,
// we do not expect STL, templates or namespaces to be available. The
// "newest" C++ feature used is exceptions, which are used liberally
// to transmit error information. Even the use of exceptions can be
// disabled at runtime, to do so, use the DB_CXX_NO_EXCEPTIONS flags
// with the DbEnv or Db constructor.
//
// C++ naming conventions:
//
// - All top level class names start with Db.
// - All class members start with lower case letter.
// - All private data members are suffixed with underscore.
// - Use underscores to divide names into multiple words.
// - Simple data accessors are named with get_ or set_ prefix.
// - All method names are taken from names of functions in the C
// layer of db (usually by dropping a prefix like "db_").
// These methods have the same argument types and order,
// other than dropping the explicit arg that acts as "this".
//
// As a rule, each DbFoo object has exactly one underlying DB_FOO struct
// (defined in db.h) associated with it. In some cases, we inherit directly
// from the DB_FOO structure to make this relationship explicit. Often,
// the underlying C layer allocates and deallocates these structures, so
// there is no easy way to add any data to the DbFoo class. When you see
// a comment about whether data is permitted to be added, this is what
// is going on. Of course, if we need to add data to such C++ classes
// in the future, we will arrange to have an indirect pointer to the
// DB_FOO struct (as some of the classes already have).
//
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
//
// Forward declarations
//
#include <stdarg.h>
#define HAVE_CXX_STDHEADERS 1
#ifdef HAVE_CXX_STDHEADERS
#include <iostream>
#define __DB_OSTREAMCLASS std::ostream
#else
#include <iostream.h>
#define __DB_OSTREAMCLASS ostream
#endif
#include "db.h"
#include "cxx_common.h"
#include "cxx_except.h"
class Db; // forward
class Dbc; // forward
class DbEnv; // forward
class DbInfo; // forward
class DbLock; // forward
class DbLogc; // forward
class DbLsn; // forward
class DbMpoolFile; // forward
class DbPreplist; // forward
class Dbt; // forward
class DbTxn; // forward
// These classes are not defined here and should be invisible
// to the user, but some compilers require forward references.
// There is one for each use of the DEFINE_DB_CLASS macro.
class DbImp;
class DbEnvImp;
class DbMpoolFileImp;
class DbTxnImp;
// DEFINE_DB_CLASS defines an imp_ data member and imp() accessor.
// The underlying type is a pointer to an opaque *Imp class, that
// gets converted to the correct implementation class by the implementation.
//
// Since these defines use "private/public" labels, and leave the access
// being "private", we always use these by convention before any data
// members in the private section of a class. Keeping them in the
// private section also emphasizes that they are off limits to user code.
//
#define DEFINE_DB_CLASS(name) \
public: class name##Imp* imp() { return (imp_); } \
public: const class name##Imp* constimp() const { return (imp_); } \
private: class name##Imp* imp_
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
//
// Turn off inappropriate compiler warnings
//
#ifdef _MSC_VER
// These are level 4 warnings that are explicitly disabled.
// With Visual C++, by default you do not see above level 3 unless
// you use /W4. But we like to compile with the highest level
// warnings to catch other errors.
//
// 4201: nameless struct/union
// triggered by standard include file <winnt.h>
//
// 4514: unreferenced inline function has been removed
// certain include files in MSVC define methods that are not called
//
#pragma warning(disable: 4201 4514)
#endif
// Some interfaces can be customized by allowing users to define
// callback functions. For performance and logistical reasons, some
// callback functions must be declared in extern "C" blocks. For others,
// we allow you to declare the callbacks in C++ or C (or an extern "C"
// block) as you wish. See the set methods for the callbacks for
// the choices.
//
extern "C" {
typedef void * (*db_malloc_fcn_type)
(size_t);
typedef void * (*db_realloc_fcn_type)
(void *, size_t);
typedef void (*db_free_fcn_type)
(void *);
typedef int (*bt_compare_fcn_type) /*C++ version available*/
(DB *, const DBT *, const DBT *);
typedef size_t (*bt_prefix_fcn_type) /*C++ version available*/
(DB *, const DBT *, const DBT *);
typedef int (*dup_compare_fcn_type) /*C++ version available*/
(DB *, const DBT *, const DBT *);
typedef u_int32_t (*h_hash_fcn_type) /*C++ version available*/
(DB *, const void *, u_int32_t);
typedef int (*pgin_fcn_type)
(DB_ENV *dbenv, db_pgno_t pgno, void *pgaddr, DBT *pgcookie);
typedef int (*pgout_fcn_type)
(DB_ENV *dbenv, db_pgno_t pgno, void *pgaddr, DBT *pgcookie);
};
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
//
// Lock classes
//
class _exported DbLock
{
friend class DbEnv;
public:
DbLock();
DbLock(const DbLock &);
DbLock &operator = (const DbLock &);
protected:
// We can add data to this class if needed
// since its contained class is not allocated by db.
// (see comment at top)
DbLock(DB_LOCK);
DB_LOCK lock_;
};
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
//
// Log classes
//
class _exported DbLsn : protected DB_LSN
{
friend class DbEnv; // friendship needed to cast to base class
friend class DbLogc; // friendship needed to cast to base class
};
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
//
// Memory pool classes
//
class _exported DbMpoolFile
{
friend class DbEnv;
private:
// Put this first to allow inlining with some C++ compilers (g++-2.95)
DEFINE_DB_CLASS(DbMpoolFile);
public:
int close(u_int32_t flags);
int get(db_pgno_t *pgnoaddr, u_int32_t flags, void *pagep);
void last_pgno(db_pgno_t *pgnoaddr);
int open(const char *file, u_int32_t flags, int mode, size_t pagesize);
int put(void *pgaddr, u_int32_t flags);
void refcnt(db_pgno_t *pgnoaddr);
int set(void *pgaddr, u_int32_t flags);
int set_clear_len(u_int32_t len);
int set_fileid(u_int8_t *fileid);
int set_ftype(int ftype);
int set_lsn_offset(int32_t offset);
int set_pgcookie(DBT *dbt);
void set_unlink(int);
int sync();
virtual DB_MPOOLFILE *get_DB_MPOOLFILE()
{
return (DB_MPOOLFILE *)imp();
}
virtual const DB_MPOOLFILE *get_const_DB_MPOOLFILE() const
{
return (const DB_MPOOLFILE *)constimp();
}
private:
// We can add data to this class if needed
// since it is implemented via a pointer.
// (see comment at top)
// Note: use DbEnv::memp_fcreate() to get pointers to a DbMpoolFile,
// and call DbMpoolFile::close() rather than delete to release them.
//
DbMpoolFile();
// Shut g++ up.
protected:
virtual ~DbMpoolFile();
private:
// no copying
DbMpoolFile(const DbMpoolFile &);
void operator = (const DbMpoolFile &);
};
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
//
// This is filled in and returned by the DbEnv::txn_recover() method.
//
class _exported DbPreplist
{
public:
DbTxn *txn;
u_int8_t gid[DB_XIDDATASIZE];
};
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
//
// Transaction classes
//
class _exported DbTxn
{
friend class DbEnv;
private:
// Put this first to allow inlining with some C++ compilers (g++-2.95)
DEFINE_DB_CLASS(DbTxn);
public:
int abort();
int commit(u_int32_t flags);
int discard(u_int32_t flags);
u_int32_t id();
int prepare(u_int8_t *gid);
int set_timeout(db_timeout_t timeout, u_int32_t flags);
virtual DB_TXN *get_DB_TXN()
{
return (DB_TXN *)imp();
}
virtual const DB_TXN *get_const_DB_TXN() const
{
return (const DB_TXN *)constimp();
}
static DbTxn* get_DbTxn(DB_TXN *txn)
{
return (DbTxn *)txn->api_internal;
}
static const DbTxn* get_const_DbTxn(const DB_TXN *txn)
{
return (const DbTxn *)txn->api_internal;
}
// For internal use only.
static DbTxn* wrap_DB_TXN(DB_TXN *txn);
private:
// We can add data to this class if needed
// since it is implemented via a pointer.
// (see comment at top)
// Note: use DbEnv::txn_begin() to get pointers to a DbTxn,
// and call DbTxn::abort() or DbTxn::commit rather than
// delete to release them.
//
DbTxn();
// For internal use only.
DbTxn(DB_TXN *txn);
virtual ~DbTxn();
// no copying
DbTxn(const DbTxn &);
void operator = (const DbTxn &);
};
//
// Berkeley DB environment class. Provides functions for opening databases.
// User of this library can use this class as a starting point for
// developing a DB application - derive their application class from
// this one, add application control logic.
//
// Note that if you use the default constructor, you must explicitly
// call appinit() before any other db activity (e.g. opening files)
//
class _exported DbEnv
{
friend class Db;
friend class DbLock;
friend class DbMpoolFile;
private:
// Put this first to allow inlining with some C++ compilers (g++-2.95)
DEFINE_DB_CLASS(DbEnv);
public:
// After using this constructor, you can set any needed
// parameters for the environment using the set_* methods.
// Then call open() to finish initializing the environment
// and attaching it to underlying files.
//
DbEnv(u_int32_t flags);
virtual ~DbEnv();
// These methods match those in the C interface.
//
virtual int close(u_int32_t);
virtual int dbremove(DbTxn *txn, const char *name, const char *subdb,
u_int32_t flags);
virtual int dbrename(DbTxn *txn, const char *name, const char *subdb,
const char *newname, u_int32_t flags);
virtual void err(int, const char *, ...);
virtual void errx(const char *, ...);
virtual void *get_app_private() const;
virtual int open(const char *, u_int32_t, int);
virtual int remove(const char *, u_int32_t);
virtual int set_alloc(db_malloc_fcn_type, db_realloc_fcn_type,
db_free_fcn_type);
virtual void set_app_private(void *);
virtual int set_cachesize(u_int32_t, u_int32_t, int);
virtual int set_data_dir(const char *);
virtual int set_encrypt(const char *, int);
virtual void set_errcall(void (*)(const char *, char *));
virtual void set_errfile(FILE *);
virtual void set_errpfx(const char *);
virtual int set_flags(u_int32_t, int);
virtual int set_feedback(void (*)(DbEnv *, int, int));
virtual int set_lg_bsize(u_int32_t);
virtual int set_lg_dir(const char *);
virtual int set_lg_max(u_int32_t);
virtual int set_lg_regionmax(u_int32_t);
virtual int set_lk_conflicts(u_int8_t *, int);
virtual int set_lk_detect(u_int32_t);
virtual int set_lk_max(u_int32_t);
virtual int set_lk_max_lockers(u_int32_t);
virtual int set_lk_max_locks(u_int32_t);
virtual int set_lk_max_objects(u_int32_t);
virtual int set_mp_mmapsize(size_t);
virtual int set_paniccall(void (*)(DbEnv *, int));
virtual int set_rpc_server(void *, char *, long, long, u_int32_t);
virtual int set_shm_key(long);
virtual int set_timeout(db_timeout_t timeout, u_int32_t flags);
virtual int set_tmp_dir(const char *);
virtual int set_tas_spins(u_int32_t);
virtual int set_tx_max(u_int32_t);
virtual int set_app_dispatch(int (*)(DbEnv *,
Dbt *, DbLsn *, db_recops));
virtual int set_tx_timestamp(time_t *);
virtual int set_verbose(u_int32_t which, int onoff);
// Version information. A static method so it can be obtained anytime.
//
static char *version(int *major, int *minor, int *patch);
// Convert DB errors to strings
static char *strerror(int);
// If an error is detected and the error call function
// or stream is set, a message is dispatched or printed.
// If a prefix is set, each message is prefixed.
//
// You can use set_errcall() or set_errfile() above to control
// error functionality. Alternatively, you can call
// set_error_stream() to force all errors to a C++ stream.
// It is unwise to mix these approaches.
//
virtual void set_error_stream(__DB_OSTREAMCLASS *);
// used internally
static void runtime_error(const char *caller, int err,
int error_policy);
static void runtime_error_dbt(const char *caller, Dbt *dbt,
int error_policy);
static void runtime_error_lock_get(const char *caller, int err,
db_lockop_t op, db_lockmode_t mode,
const Dbt *obj, DbLock lock, int index,
int error_policy);
// Lock functions
//
virtual int lock_detect(u_int32_t flags, u_int32_t atype, int *aborted);
virtual int lock_get(u_int32_t locker, u_int32_t flags, const Dbt *obj,
db_lockmode_t lock_mode, DbLock *lock);
virtual int lock_id(u_int32_t *idp);
virtual int lock_id_free(u_int32_t id);
virtual int lock_put(DbLock *lock);
virtual int lock_stat(DB_LOCK_STAT **statp, u_int32_t flags);
virtual int lock_vec(u_int32_t locker, u_int32_t flags, DB_LOCKREQ list[],
int nlist, DB_LOCKREQ **elistp);
// Log functions
//
virtual int log_archive(char **list[], u_int32_t flags);
static int log_compare(const DbLsn *lsn0, const DbLsn *lsn1);
virtual int log_cursor(DbLogc **cursorp, u_int32_t flags);
virtual int log_file(DbLsn *lsn, char *namep, size_t len);
virtual int log_flush(const DbLsn *lsn);
virtual int log_put(DbLsn *lsn, const Dbt *data, u_int32_t flags);
virtual int log_stat(DB_LOG_STAT **spp, u_int32_t flags);
// Mpool functions
//
virtual int memp_fcreate(DbMpoolFile **dbmfp, u_int32_t flags);
virtual int memp_register(int ftype,
pgin_fcn_type pgin_fcn,
pgout_fcn_type pgout_fcn);
virtual int memp_stat(DB_MPOOL_STAT
**gsp, DB_MPOOL_FSTAT ***fsp, u_int32_t flags);
virtual int memp_sync(DbLsn *lsn);
virtual int memp_trickle(int pct, int *nwrotep);
// Transaction functions
//
virtual int txn_begin(DbTxn *pid, DbTxn **tid, u_int32_t flags);
virtual int txn_checkpoint(u_int32_t kbyte, u_int32_t min, u_int32_t flags);
virtual int txn_recover(DbPreplist *preplist, long count,
long *retp, u_int32_t flags);
virtual int txn_stat(DB_TXN_STAT **statp, u_int32_t flags);
// Replication functions
//
virtual int rep_elect(int, int, u_int32_t, int *);
virtual int rep_process_message(Dbt *, Dbt *, int *);
virtual int rep_start(Dbt *, u_int32_t);
virtual int rep_stat(DB_REP_STAT **statp, u_int32_t flags);
virtual int set_rep_limit(u_int32_t, u_int32_t);
virtual int set_rep_transport(u_int32_t,
int (*)(DbEnv *, const Dbt *, const Dbt *, int, u_int32_t));
// Conversion functions
//
virtual DB_ENV *get_DB_ENV()
{
return (DB_ENV *)imp();
}
virtual const DB_ENV *get_const_DB_ENV() const
{
return (const DB_ENV *)constimp();
}
static DbEnv* get_DbEnv(DB_ENV *dbenv)
{
return (DbEnv *)dbenv->api1_internal;
}
static const DbEnv* get_const_DbEnv(const DB_ENV *dbenv)
{
return (const DbEnv *)dbenv->api1_internal;
}
// For internal use only.
static DbEnv* wrap_DB_ENV(DB_ENV *dbenv);
// These are public only because they need to be called
// via C functions. They should never be called by users
// of this class.
//
static void _stream_error_function(const char *, char *);
static int _app_dispatch_intercept(DB_ENV *env, DBT *dbt, DB_LSN *lsn,
db_recops op);
static void _paniccall_intercept(DB_ENV *env, int errval);
static void _feedback_intercept(DB_ENV *env, int opcode, int pct);
static int _rep_send_intercept(DB_ENV *env,
const DBT *cntrl, const DBT *data,
int id, u_int32_t flags);
private:
void cleanup();
int initialize(DB_ENV *env);
int error_policy();
// For internal use only.
DbEnv(DB_ENV *, u_int32_t flags);
// no copying
DbEnv(const DbEnv &);
void operator = (const DbEnv &);
// instance data
int construct_error_;
u_int32_t construct_flags_;
int (*app_dispatch_callback_)(DbEnv *, Dbt *, DbLsn *, db_recops);
void (*feedback_callback_)(DbEnv *, int, int);
void (*paniccall_callback_)(DbEnv *, int);
int (*pgin_callback_)(DbEnv *dbenv, db_pgno_t pgno,
void *pgaddr, Dbt *pgcookie);
int (*pgout_callback_)(DbEnv *dbenv, db_pgno_t pgno,
void *pgaddr, Dbt *pgcookie);
int (*rep_send_callback_)(DbEnv *,
const Dbt *, const Dbt *, int, u_int32_t);
// class data
static __DB_OSTREAMCLASS *error_stream_;
};
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
//
// Table access classes
//
//
// Represents a database table = a set of keys with associated values.
//
class _exported Db
{
friend class DbEnv;
private:
// Put this first to allow inlining with some C++ compilers (g++-2.95)
DEFINE_DB_CLASS(Db);
public:
Db(DbEnv*, u_int32_t); // create a Db object, then call open()
virtual ~Db(); // does *not* call close.
// These methods exactly match those in the C interface.
//
virtual int associate(DbTxn *txn, Db *secondary,
int (*callback)(Db *, const Dbt *, const Dbt *, Dbt *),
u_int32_t flags);
virtual int close(u_int32_t flags);
virtual int cursor(DbTxn *txnid, Dbc **cursorp, u_int32_t flags);
virtual int del(DbTxn *txnid, Dbt *key, u_int32_t flags);
virtual void err(int, const char *, ...);
virtual void errx(const char *, ...);
virtual int fd(int *fdp);
virtual int get(DbTxn *txnid, Dbt *key, Dbt *data, u_int32_t flags);
virtual void *get_app_private() const;
virtual int get_byteswapped(int *);
virtual int get_type(DBTYPE *);
virtual int join(Dbc **curslist, Dbc **dbcp, u_int32_t flags);
virtual int key_range(DbTxn *, Dbt *, DB_KEY_RANGE *, u_int32_t);
virtual int open(DbTxn *txnid,
const char *, const char *subname, DBTYPE, u_int32_t, int);
virtual int pget(DbTxn *txnid, Dbt *key, Dbt *pkey, Dbt *data,
u_int32_t flags);
virtual int put(DbTxn *, Dbt *, Dbt *, u_int32_t);
virtual int remove(const char *, const char *, u_int32_t);
virtual int rename(const char *, const char *, const char *, u_int32_t);
virtual int set_alloc(db_malloc_fcn_type, db_realloc_fcn_type,
db_free_fcn_type);
virtual void set_app_private(void *);
virtual int set_append_recno(int (*)(Db *, Dbt *, db_recno_t));
virtual int set_bt_compare(bt_compare_fcn_type); /*deprecated*/
virtual int set_bt_compare(int (*)(Db *, const Dbt *, const Dbt *));
virtual int set_bt_maxkey(u_int32_t);
virtual int set_bt_minkey(u_int32_t);
virtual int set_bt_prefix(bt_prefix_fcn_type); /*deprecated*/
virtual int set_bt_prefix(size_t (*)(Db *, const Dbt *, const Dbt *));
virtual int set_cachesize(u_int32_t, u_int32_t, int);
virtual int set_cache_priority(DB_CACHE_PRIORITY);
virtual int set_dup_compare(dup_compare_fcn_type); /*deprecated*/
virtual int set_dup_compare(int (*)(Db *, const Dbt *, const Dbt *));
virtual int set_encrypt(const char *, int);
virtual void set_errcall(void (*)(const char *, char *));
virtual void set_errfile(FILE *);
virtual void set_errpfx(const char *);
virtual int set_feedback(void (*)(Db *, int, int));
virtual int set_flags(u_int32_t);
virtual int set_h_ffactor(u_int32_t);
virtual int set_h_hash(h_hash_fcn_type); /*deprecated*/
virtual int set_h_hash(u_int32_t (*)(Db *, const void *, u_int32_t));
virtual int set_h_nelem(u_int32_t);
virtual int set_lorder(int);
virtual int set_pagesize(u_int32_t);
virtual int set_paniccall(void (*)(DbEnv *, int));
virtual int set_re_delim(int);
virtual int set_re_len(u_int32_t);
virtual int set_re_pad(int);
virtual int set_re_source(char *);
virtual int set_q_extentsize(u_int32_t);
virtual int stat(void *sp, u_int32_t flags);
virtual int sync(u_int32_t flags);
virtual int truncate(DbTxn *, u_int32_t *, u_int32_t);
virtual int upgrade(const char *name, u_int32_t flags);
virtual int verify(const char *, const char *, __DB_OSTREAMCLASS *, u_int32_t);
// These additional methods are not in the C interface, and
// are only available for C++.
//
virtual void set_error_stream(__DB_OSTREAMCLASS *);
virtual DB *get_DB()
{
return (DB *)imp();
}
virtual const DB *get_const_DB() const
{
return (const DB *)constimp();
}
static Db* get_Db(DB *db)
{
return (Db *)db->api_internal;
}
static const Db* get_const_Db(const DB *db)
{
return (const Db *)db->api_internal;
}
private:
// no copying
Db(const Db &);
Db &operator = (const Db &);
void cleanup();
int initialize();
int error_policy();
// instance data
DbEnv *env_;
int construct_error_;
u_int32_t flags_;
u_int32_t construct_flags_;
public:
// These are public only because they need to be called
// via C callback functions. They should never be used by
// external users of this class.
//
int (*append_recno_callback_)(Db *, Dbt *, db_recno_t);
int (*associate_callback_)(Db *, const Dbt *, const Dbt *, Dbt *);
int (*bt_compare_callback_)(Db *, const Dbt *, const Dbt *);
size_t (*bt_prefix_callback_)(Db *, const Dbt *, const Dbt *);
int (*dup_compare_callback_)(Db *, const Dbt *, const Dbt *);
void (*feedback_callback_)(Db *, int, int);
u_int32_t (*h_hash_callback_)(Db *, const void *, u_int32_t);
};
//
// A chunk of data, maybe a key or value.
//
class _exported Dbt : private DBT
{
friend class Dbc;
friend class Db;
friend class DbEnv;
friend class DbLogc;
public:
// key/data
void *get_data() const { return data; }
void set_data(void *value) { data = value; }
// key/data length
u_int32_t get_size() const { return size; }
void set_size(u_int32_t value) { size = value; }
// RO: length of user buffer.
u_int32_t get_ulen() const { return ulen; }
void set_ulen(u_int32_t value) { ulen = value; }
// RO: get/put record length.
u_int32_t get_dlen() const { return dlen; }
void set_dlen(u_int32_t value) { dlen = value; }
// RO: get/put record offset.
u_int32_t get_doff() const { return doff; }
void set_doff(u_int32_t value) { doff = value; }
// flags
u_int32_t get_flags() const { return flags; }
void set_flags(u_int32_t value) { flags = value; }
// Conversion functions
DBT *get_DBT() { return (DBT *)this; }
const DBT *get_const_DBT() const { return (const DBT *)this; }
static Dbt* get_Dbt(DBT *dbt) { return (Dbt *)dbt; }
static const Dbt* get_const_Dbt(const DBT *dbt)
{ return (const Dbt *)dbt; }
Dbt(void *data, u_int32_t size);
Dbt();
~Dbt();
Dbt(const Dbt &);
Dbt &operator = (const Dbt &);
private:
// Note: no extra data appears in this class (other than
// inherited from DBT) since we need DBT and Dbt objects
// to have interchangable pointers.
//
// When subclassing this class, remember that callback
// methods like bt_compare, bt_prefix, dup_compare may
// internally manufacture DBT objects (which later are
// cast to Dbt), so such callbacks might receive objects
// not of your subclassed type.
};
class _exported Dbc : protected DBC
{
friend class Db;
public:
int close();
int count(db_recno_t *countp, u_int32_t flags);
int del(u_int32_t flags);
int dup(Dbc** cursorp, u_int32_t flags);
int get(Dbt* key, Dbt *data, u_int32_t flags);
int pget(Dbt* key, Dbt* pkey, Dbt *data, u_int32_t flags);
int put(Dbt* key, Dbt *data, u_int32_t flags);
private:
// No data is permitted in this class (see comment at top)
// Note: use Db::cursor() to get pointers to a Dbc,
// and call Dbc::close() rather than delete to release them.
//
Dbc();
~Dbc();
// no copying
Dbc(const Dbc &);
Dbc &operator = (const Dbc &);
};
class _exported DbLogc : protected DB_LOGC
{
friend class DbEnv;
public:
int close(u_int32_t _flags);
int get(DbLsn *lsn, Dbt *data, u_int32_t _flags);
private:
// No data is permitted in this class (see comment at top)
// Note: use Db::cursor() to get pointers to a Dbc,
// and call Dbc::close() rather than delete to release them.
//
DbLogc();
~DbLogc();
// no copying
DbLogc(const Dbc &);
DbLogc &operator = (const Dbc &);
};
#endif /* !_DB_CXX_H_ */
# Microsoft Developer Studio Project File - Name="db_perf" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=db_perf - Win32 Debug Static
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "db_perf.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "db_perf.mak" CFG="db_perf - Win32 Debug Static"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "db_perf - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "db_perf - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "db_perf - Win32 Release Static" (based on "Win32 (x86) Console Application")
!MESSAGE "db_perf - Win32 Debug Static" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "db_perf - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I ".." /I "../dbinc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 Release/libdb41.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
!ELSEIF "$(CFG)" == "db_perf - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I ".." /I "../dbinc" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Debug/libdb41d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
!ELSEIF "$(CFG)" == "db_perf - Win32 Release Static"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_static"
# PROP Intermediate_Dir "Release_static"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I ".." /I "../dbinc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I ".." /I "../dbinc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 Release_static/libdb41.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 Release_static/libdb41s.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "db_perf - Win32 Debug Static"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_static"
# PROP Intermediate_Dir "Debug_static"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I ".." /I "../dbinc" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I ".." /I "../dbinc" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 Debug_static/libdb41d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
# ADD LINK32 Debug_static/libdb41sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
!ENDIF
# Begin Target
# Name "db_perf - Win32 Release"
# Name "db_perf - Win32 Debug"
# Name "db_perf - Win32 Release Static"
# Name "db_perf - Win32 Debug Static"
# Begin Source File
SOURCE=..\test_perf\db_perf.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_cache_check.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_checkpoint.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_config.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_dbs.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_debug.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_file.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_key.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_log.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_misc.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_op.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_parse.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_rand.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_spawn.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_thread.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_trickle.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_txn.c
# End Source File
# Begin Source File
SOURCE=..\test_perf\perf_util.c
# End Source File
# Begin Source File
SOURCE=..\clib\getopt.c
# End Source File
# End Target
# End Project
# Microsoft Developer Studio Project File - Name="db_test" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=db_test - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "db_test.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "db_test.mak" CFG="db_test - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "db_test - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "db_test - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "db_test - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I ".." /I "../dbinc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 Release/libdb41.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Desc=Copy built executable files.
PostBuild_Cmds=copy Release\*.exe .
# End Special Build Tool
!ELSEIF "$(CFG)" == "db_test - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I ".." /I "../dbinc" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Debug/libdb41d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"Debug/dbkill.exe" /fixed:no
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Desc=Copy built executable files.
PostBuild_Cmds=copy Debug\*.exe .
# End Special Build Tool
!ENDIF
# Begin Target
# Name "db_test - Win32 Release"
# Name "db_test - Win32 Debug"
# Begin Source File
SOURCE=.\dbkill.cpp
# End Source File
# End Target
# End Project
; DO NOT EDIT: automatically built by dist/s_win32.
DESCRIPTION 'Berkeley DB 4.1 Library'
EXPORTS
db_create @1
db_env_create @2
db_strerror @3
db_version @4
db_xa_switch @5
log_compare @6
txn_abort @7
txn_begin @8
txn_commit @9
db_env_set_func_close @10
db_env_set_func_dirfree @11
db_env_set_func_dirlist @12
db_env_set_func_exists @13
db_env_set_func_free @14
db_env_set_func_fsync @15
db_env_set_func_ioinfo @16
db_env_set_func_malloc @17
db_env_set_func_map @18
db_env_set_func_open @19
db_env_set_func_read @20
db_env_set_func_realloc @21
db_env_set_func_rename @22
db_env_set_func_seek @23
db_env_set_func_sleep @24
db_env_set_func_unlink @25
db_env_set_func_unmap @26
db_env_set_func_write @27
db_env_set_func_yield @28
__db_add_recovery @29
__db_dbm_close @30
__db_dbm_delete @31
__db_dbm_fetch @32
__db_dbm_firstkey @33
__db_dbm_init @34
__db_dbm_nextkey @35
__db_dbm_store @36
__db_hcreate @37
__db_hdestroy @38
__db_hsearch @39
__db_loadme @40
__db_ndbm_clearerr @41
__db_ndbm_close @42
__db_ndbm_delete @43
__db_ndbm_dirfno @44
__db_ndbm_error @45
__db_ndbm_fetch @46
__db_ndbm_firstkey @47
__db_ndbm_nextkey @48
__db_ndbm_open @49
__db_ndbm_pagfno @50
__db_ndbm_rdonly @51
__db_ndbm_store @52
__db_panic @53
__db_r_attach @54
__db_r_detach @55
__db_win32_mutex_init @56
__db_win32_mutex_lock @57
__db_win32_mutex_unlock @58
__ham_func2 @59
__ham_func3 @60
__ham_func4 @61
__ham_func5 @62
__ham_test @63
__lock_dump_region @64
__memp_dump_region @65
__os_calloc @66
__os_closehandle @67
__os_free @68
__os_ioinfo @69
__os_malloc @70
__os_open @71
__os_openhandle @72
__os_read @73
__os_realloc @74
__os_strdup @75
__os_umalloc @76
__os_write @77
__bam_init_print @78
__bam_pgin @79
__bam_pgout @80
__crdel_init_print @81
__db_dispatch @82
__db_dump @83
__db_e_stat @84
__db_err @85
__db_getlong @86
__db_getulong @87
__db_global_values @88
__db_init_print @89
__db_inmemdbflags @90
__db_isbigendian @91
__db_omode @92
__db_overwrite @93
__db_pgin @94
__db_pgout @95
__db_prdbt @96
__db_prfooter @97
__db_prheader @98
__db_rpath @99
__db_util_cache @100
__db_util_interrupted @101
__db_util_logset @102
__db_util_siginit @103
__db_util_sigresend @104
__db_verify_callback @105
__db_verify_internal @106
__dbreg_init_print @107
__fop_init_print @108
__ham_get_meta @109
__ham_init_print @110
__ham_pgin @111
__ham_pgout @112
__ham_release_meta @113
__os_clock @114
__os_get_errno @115
__os_id @116
__os_set_errno @117
__os_sleep @118
__os_ufree @119
__os_yield @120
__qam_init_print @121
__qam_pgin_out @122
__txn_init_print @123
/* Do not edit: automatically built by gen_rec.awk. */
#ifndef __bam_AUTO_H
#define __bam_AUTO_H
#define DB___bam_split 62
typedef struct ___bam_split_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t left;
DB_LSN llsn;
db_pgno_t right;
DB_LSN rlsn;
u_int32_t indx;
db_pgno_t npgno;
DB_LSN nlsn;
db_pgno_t root_pgno;
DBT pg;
u_int32_t opflags;
} __bam_split_args;
#define DB___bam_rsplit 63
typedef struct ___bam_rsplit_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
DBT pgdbt;
db_pgno_t root_pgno;
db_pgno_t nrec;
DBT rootent;
DB_LSN rootlsn;
} __bam_rsplit_args;
#define DB___bam_adj 55
typedef struct ___bam_adj_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
DB_LSN lsn;
u_int32_t indx;
u_int32_t indx_copy;
u_int32_t is_insert;
} __bam_adj_args;
#define DB___bam_cadjust 56
typedef struct ___bam_cadjust_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
DB_LSN lsn;
u_int32_t indx;
int32_t adjust;
u_int32_t opflags;
} __bam_cadjust_args;
#define DB___bam_cdel 57
typedef struct ___bam_cdel_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
DB_LSN lsn;
u_int32_t indx;
} __bam_cdel_args;
#define DB___bam_repl 58
typedef struct ___bam_repl_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
DB_LSN lsn;
u_int32_t indx;
u_int32_t isdeleted;
DBT orig;
DBT repl;
u_int32_t prefix;
u_int32_t suffix;
} __bam_repl_args;
#define DB___bam_root 59
typedef struct ___bam_root_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t meta_pgno;
db_pgno_t root_pgno;
DB_LSN meta_lsn;
} __bam_root_args;
#define DB___bam_curadj 64
typedef struct ___bam_curadj_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_ca_mode mode;
db_pgno_t from_pgno;
db_pgno_t to_pgno;
db_pgno_t left_pgno;
u_int32_t first_indx;
u_int32_t from_indx;
u_int32_t to_indx;
} __bam_curadj_args;
#define DB___bam_rcuradj 65
typedef struct ___bam_rcuradj_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
ca_recno_arg mode;
db_pgno_t root;
db_recno_t recno;
u_int32_t order;
} __bam_rcuradj_args;
#endif
/* Do not edit: automatically built by gen_rec.awk. */
#ifndef __crdel_AUTO_H
#define __crdel_AUTO_H
#define DB___crdel_metasub 142
typedef struct ___crdel_metasub_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
DBT page;
DB_LSN lsn;
} __crdel_metasub_args;
#endif
/* Do not edit: automatically built by gen_rec.awk. */
#ifndef __db_AUTO_H
#define __db_AUTO_H
#define DB___db_addrem 41
typedef struct ___db_addrem_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t opcode;
int32_t fileid;
db_pgno_t pgno;
u_int32_t indx;
u_int32_t nbytes;
DBT hdr;
DBT dbt;
DB_LSN pagelsn;
} __db_addrem_args;
#define DB___db_big 43
typedef struct ___db_big_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t opcode;
int32_t fileid;
db_pgno_t pgno;
db_pgno_t prev_pgno;
db_pgno_t next_pgno;
DBT dbt;
DB_LSN pagelsn;
DB_LSN prevlsn;
DB_LSN nextlsn;
} __db_big_args;
#define DB___db_ovref 44
typedef struct ___db_ovref_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
int32_t adjust;
DB_LSN lsn;
} __db_ovref_args;
#define DB___db_relink 45
typedef struct ___db_relink_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t opcode;
int32_t fileid;
db_pgno_t pgno;
DB_LSN lsn;
db_pgno_t prev;
DB_LSN lsn_prev;
db_pgno_t next;
DB_LSN lsn_next;
} __db_relink_args;
#define DB___db_debug 47
typedef struct ___db_debug_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
DBT op;
int32_t fileid;
DBT key;
DBT data;
u_int32_t arg_flags;
} __db_debug_args;
#define DB___db_noop 48
typedef struct ___db_noop_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
DB_LSN prevlsn;
} __db_noop_args;
#define DB___db_pg_alloc 49
typedef struct ___db_pg_alloc_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
DB_LSN meta_lsn;
db_pgno_t meta_pgno;
DB_LSN page_lsn;
db_pgno_t pgno;
u_int32_t ptype;
db_pgno_t next;
} __db_pg_alloc_args;
#define DB___db_pg_free 50
typedef struct ___db_pg_free_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
DB_LSN meta_lsn;
db_pgno_t meta_pgno;
DBT header;
db_pgno_t next;
} __db_pg_free_args;
#define DB___db_cksum 51
typedef struct ___db_cksum_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
} __db_cksum_args;
#endif
/* Do not edit: automatically built by gen_rec.awk. */
#ifndef __dbreg_AUTO_H
#define __dbreg_AUTO_H
#define DB___dbreg_register 2
typedef struct ___dbreg_register_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t opcode;
DBT name;
DBT uid;
int32_t fileid;
DBTYPE ftype;
db_pgno_t meta_pgno;
u_int32_t id;
} __dbreg_register_args;
#endif
/* Do not edit: automatically built by gen_rec.awk. */
#ifndef __fop_AUTO_H
#define __fop_AUTO_H
#define DB___fop_create 143
typedef struct ___fop_create_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
DBT name;
u_int32_t appname;
u_int32_t mode;
} __fop_create_args;
#define DB___fop_remove 144
typedef struct ___fop_remove_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
DBT name;
DBT fid;
u_int32_t appname;
} __fop_remove_args;
#define DB___fop_write 145
typedef struct ___fop_write_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
DBT name;
u_int32_t appname;
u_int32_t offset;
DBT page;
u_int32_t flag;
} __fop_write_args;
#define DB___fop_rename 146
typedef struct ___fop_rename_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
DBT oldname;
DBT newname;
DBT fileid;
u_int32_t appname;
} __fop_rename_args;
#define DB___fop_file_remove 141
typedef struct ___fop_file_remove_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
DBT real_fid;
DBT tmp_fid;
DBT name;
u_int32_t appname;
u_int32_t child;
} __fop_file_remove_args;
#endif
/* Do not edit: automatically built by gen_rec.awk. */
#ifndef __ham_AUTO_H
#define __ham_AUTO_H
#define DB___ham_insdel 21
typedef struct ___ham_insdel_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t opcode;
int32_t fileid;
db_pgno_t pgno;
u_int32_t ndx;
DB_LSN pagelsn;
DBT key;
DBT data;
} __ham_insdel_args;
#define DB___ham_newpage 22
typedef struct ___ham_newpage_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t opcode;
int32_t fileid;
db_pgno_t prev_pgno;
DB_LSN prevlsn;
db_pgno_t new_pgno;
DB_LSN pagelsn;
db_pgno_t next_pgno;
DB_LSN nextlsn;
} __ham_newpage_args;
#define DB___ham_splitdata 24
typedef struct ___ham_splitdata_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
u_int32_t opcode;
db_pgno_t pgno;
DBT pageimage;
DB_LSN pagelsn;
} __ham_splitdata_args;
#define DB___ham_replace 25
typedef struct ___ham_replace_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
u_int32_t ndx;
DB_LSN pagelsn;
int32_t off;
DBT olditem;
DBT newitem;
u_int32_t makedup;
} __ham_replace_args;
#define DB___ham_copypage 28
typedef struct ___ham_copypage_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
DB_LSN pagelsn;
db_pgno_t next_pgno;
DB_LSN nextlsn;
db_pgno_t nnext_pgno;
DB_LSN nnextlsn;
DBT page;
} __ham_copypage_args;
#define DB___ham_metagroup 29
typedef struct ___ham_metagroup_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
u_int32_t bucket;
db_pgno_t mmpgno;
DB_LSN mmetalsn;
db_pgno_t mpgno;
DB_LSN metalsn;
db_pgno_t pgno;
DB_LSN pagelsn;
u_int32_t newalloc;
} __ham_metagroup_args;
#define DB___ham_groupalloc 32
typedef struct ___ham_groupalloc_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
DB_LSN meta_lsn;
db_pgno_t start_pgno;
u_int32_t num;
db_pgno_t free;
} __ham_groupalloc_args;
#define DB___ham_curadj 33
typedef struct ___ham_curadj_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_pgno_t pgno;
u_int32_t indx;
u_int32_t len;
u_int32_t dup_off;
int add;
int is_dup;
u_int32_t order;
} __ham_curadj_args;
#define DB___ham_chgpg 34
typedef struct ___ham_chgpg_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_ham_mode mode;
db_pgno_t old_pgno;
db_pgno_t new_pgno;
u_int32_t old_indx;
u_int32_t new_indx;
} __ham_chgpg_args;
#endif
/* Do not edit: automatically built by gen_rec.awk. */
#ifndef __qam_AUTO_H
#define __qam_AUTO_H
#define DB___qam_incfirst 84
typedef struct ___qam_incfirst_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
db_recno_t recno;
db_pgno_t meta_pgno;
} __qam_incfirst_args;
#define DB___qam_mvptr 85
typedef struct ___qam_mvptr_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t opcode;
int32_t fileid;
db_recno_t old_first;
db_recno_t new_first;
db_recno_t old_cur;
db_recno_t new_cur;
DB_LSN metalsn;
db_pgno_t meta_pgno;
} __qam_mvptr_args;
#define DB___qam_del 79
typedef struct ___qam_del_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
DB_LSN lsn;
db_pgno_t pgno;
u_int32_t indx;
db_recno_t recno;
} __qam_del_args;
#define DB___qam_add 80
typedef struct ___qam_add_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
DB_LSN lsn;
db_pgno_t pgno;
u_int32_t indx;
db_recno_t recno;
DBT data;
u_int32_t vflag;
DBT olddata;
} __qam_add_args;
#define DB___qam_delext 83
typedef struct ___qam_delext_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
int32_t fileid;
DB_LSN lsn;
db_pgno_t pgno;
u_int32_t indx;
db_recno_t recno;
DBT data;
} __qam_delext_args;
#endif
/* Do not edit: automatically built by gen_rec.awk. */
#ifndef __txn_AUTO_H
#define __txn_AUTO_H
#define DB___txn_regop 10
typedef struct ___txn_regop_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t opcode;
int32_t timestamp;
} __txn_regop_args;
#define DB___txn_ckp 11
typedef struct ___txn_ckp_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
DB_LSN ckp_lsn;
DB_LSN last_ckp;
int32_t timestamp;
} __txn_ckp_args;
#define DB___txn_child 12
typedef struct ___txn_child_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t child;
DB_LSN c_lsn;
} __txn_child_args;
#define DB___txn_xa_regop 13
typedef struct ___txn_xa_regop_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t opcode;
DBT xid;
int32_t formatID;
u_int32_t gtrid;
u_int32_t bqual;
DB_LSN begin_lsn;
} __txn_xa_regop_args;
#define DB___txn_recycle 14
typedef struct ___txn_recycle_args {
u_int32_t type;
DB_TXN *txnid;
DB_LSN prev_lsn;
u_int32_t min;
u_int32_t max;
} __txn_recycle_args;
#endif
/* Do not edit: automatically built by gen_rec.awk. */
#include "db_config.h"
#ifndef NO_SYSTEM_INCLUDES
#include <sys/types.h>
#include <ctype.h>
#include <string.h>
#endif
#include "db_int.h"
#include "dbinc/crypto.h"
#include "dbinc/db_page.h"
#include "dbinc/db_dispatch.h"
#include "dbinc/db_am.h"
#include "dbinc/log.h"
#include "dbinc/rep.h"
#include "dbinc/txn.h"
/*
* PUBLIC: int __dbreg_register_log __P((DB_ENV *, DB_TXN *,
* PUBLIC: DB_LSN *, u_int32_t, u_int32_t, const DBT *, const DBT *,
* PUBLIC: int32_t, DBTYPE, db_pgno_t, u_int32_t));
*/
int
__dbreg_register_log(dbenv, txnid, ret_lsnp, flags,
opcode, name, uid, fileid, ftype, meta_pgno,
id)
DB_ENV *dbenv;
DB_TXN *txnid;
DB_LSN *ret_lsnp;
u_int32_t flags;
u_int32_t opcode;
const DBT *name;
const DBT *uid;
int32_t fileid;
DBTYPE ftype;
db_pgno_t meta_pgno;
u_int32_t id;
{
DBT logrec;
DB_LSN *lsnp, null_lsn;
u_int32_t zero;
u_int32_t uinttmp;
u_int32_t npad, rectype, txn_num;
int ret;
u_int8_t *bp;
rectype = DB___dbreg_register;
npad = 0;
if (txnid == NULL) {
txn_num = 0;
null_lsn.file = 0;
null_lsn.offset = 0;
lsnp = &null_lsn;
} else {
if (TAILQ_FIRST(&txnid->kids) != NULL &&
(ret = __txn_activekids(dbenv, rectype, txnid)) != 0)
return (ret);
txn_num = txnid->txnid;
lsnp = &txnid->last_lsn;
}
logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN)
+ sizeof(u_int32_t)
+ sizeof(u_int32_t) + (name == NULL ? 0 : name->size)
+ sizeof(u_int32_t) + (uid == NULL ? 0 : uid->size)
+ sizeof(u_int32_t)
+ sizeof(u_int32_t)
+ sizeof(u_int32_t)
+ sizeof(u_int32_t);
if (CRYPTO_ON(dbenv)) {
npad =
((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size);
logrec.size += npad;
}
if ((ret = __os_malloc(dbenv,
logrec.size, &logrec.data)) != 0)
return (ret);
if (npad > 0)
memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad);
bp = logrec.data;
memcpy(bp, &rectype, sizeof(rectype));
bp += sizeof(rectype);
memcpy(bp, &txn_num, sizeof(txn_num));
bp += sizeof(txn_num);
memcpy(bp, lsnp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
uinttmp = (u_int32_t)opcode;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
if (name == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &name->size, sizeof(name->size));
bp += sizeof(name->size);
memcpy(bp, name->data, name->size);
bp += name->size;
}
if (uid == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &uid->size, sizeof(uid->size));
bp += sizeof(uid->size);
memcpy(bp, uid->data, uid->size);
bp += uid->size;
}
uinttmp = (u_int32_t)fileid;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
uinttmp = (u_int32_t)ftype;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
uinttmp = (u_int32_t)meta_pgno;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
uinttmp = (u_int32_t)id;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size);
ret = dbenv->log_put(dbenv,
ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY);
if (txnid != NULL && ret == 0)
txnid->last_lsn = *ret_lsnp;
#ifdef LOG_DIAGNOSTIC
if (ret != 0)
(void)__dbreg_register_print(dbenv,
(DBT *)&logrec, ret_lsnp, NULL, NULL);
#endif
__os_free(dbenv, logrec.data);
return (ret);
}
/*
* PUBLIC: int __dbreg_register_getpgnos __P((DB_ENV *, DBT *,
* PUBLIC: DB_LSN *, db_recops, void *));
*/
int
__dbreg_register_getpgnos(dbenv, rec, lsnp, notused1, summary)
DB_ENV *dbenv;
DBT *rec;
DB_LSN *lsnp;
db_recops notused1;
void *summary;
{
TXN_RECS *t;
int ret;
COMPQUIET(rec, NULL);
COMPQUIET(notused1, DB_TXN_ABORT);
t = (TXN_RECS *)summary;
if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0)
return (ret);
t->array[t->npages].flags = LSN_PAGE_NOLOCK;
t->array[t->npages].lsn = *lsnp;
t->array[t->npages].fid = DB_LOGFILEID_INVALID;
memset(&t->array[t->npages].pgdesc, 0,
sizeof(t->array[t->npages].pgdesc));
t->npages++;
return (0);
}
/*
* PUBLIC: int __dbreg_register_print __P((DB_ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
int
__dbreg_register_print(dbenv, dbtp, lsnp, notused2, notused3)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops notused2;
void *notused3;
{
__dbreg_register_args *argp;
u_int32_t i;
int ch;
int ret;
notused2 = DB_TXN_ABORT;
notused3 = NULL;
if ((ret = __dbreg_register_read(dbenv, dbtp->data, &argp)) != 0)
return (ret);
(void)printf(
"[%lu][%lu]__dbreg_register: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
(u_long)lsnp->file,
(u_long)lsnp->offset,
(u_long)argp->type,
(u_long)argp->txnid->txnid,
(u_long)argp->prev_lsn.file,
(u_long)argp->prev_lsn.offset);
(void)printf("\topcode: %lu\n", (u_long)argp->opcode);
(void)printf("\tname: ");
for (i = 0; i < argp->name.size; i++) {
ch = ((u_int8_t *)argp->name.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tuid: ");
for (i = 0; i < argp->uid.size; i++) {
ch = ((u_int8_t *)argp->uid.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tfileid: %ld\n", (long)argp->fileid);
(void)printf("\tftype: 0x%lx\n", (u_long)argp->ftype);
(void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
(void)printf("\tid: 0x%lx\n", (u_long)argp->id);
(void)printf("\n");
__os_free(dbenv, argp);
return (0);
}
/*
* PUBLIC: int __dbreg_register_read __P((DB_ENV *, void *,
* PUBLIC: __dbreg_register_args **));
*/
int
__dbreg_register_read(dbenv, recbuf, argpp)
DB_ENV *dbenv;
void *recbuf;
__dbreg_register_args **argpp;
{
__dbreg_register_args *argp;
u_int32_t uinttmp;
u_int8_t *bp;
int ret;
if ((ret = __os_malloc(dbenv,
sizeof(__dbreg_register_args) + sizeof(DB_TXN), &argp)) != 0)
return (ret);
argp->txnid = (DB_TXN *)&argp[1];
bp = recbuf;
memcpy(&argp->type, bp, sizeof(argp->type));
bp += sizeof(argp->type);
memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid));
bp += sizeof(argp->txnid->txnid);
memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->opcode = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
memset(&argp->name, 0, sizeof(argp->name));
memcpy(&argp->name.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->name.data = bp;
bp += argp->name.size;
memset(&argp->uid, 0, sizeof(argp->uid));
memcpy(&argp->uid.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->uid.data = bp;
bp += argp->uid.size;
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->fileid = (int32_t)uinttmp;
bp += sizeof(uinttmp);
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->ftype = (DBTYPE)uinttmp;
bp += sizeof(uinttmp);
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->meta_pgno = (db_pgno_t)uinttmp;
bp += sizeof(uinttmp);
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->id = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
*argpp = argp;
return (0);
}
/*
* PUBLIC: int __dbreg_init_print __P((DB_ENV *, int (***)(DB_ENV *,
* PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *));
*/
int
__dbreg_init_print(dbenv, dtabp, dtabsizep)
DB_ENV *dbenv;
int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
size_t *dtabsizep;
{
int ret;
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__dbreg_register_print, DB___dbreg_register)) != 0)
return (ret);
return (0);
}
/*
* PUBLIC: int __dbreg_init_getpgnos __P((DB_ENV *,
* PUBLIC: int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *),
* PUBLIC: size_t *));
*/
int
__dbreg_init_getpgnos(dbenv, dtabp, dtabsizep)
DB_ENV *dbenv;
int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
size_t *dtabsizep;
{
int ret;
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__dbreg_register_getpgnos, DB___dbreg_register)) != 0)
return (ret);
return (0);
}
/*
* PUBLIC: int __dbreg_init_recover __P((DB_ENV *, int (***)(DB_ENV *,
* PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *));
*/
int
__dbreg_init_recover(dbenv, dtabp, dtabsizep)
DB_ENV *dbenv;
int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
size_t *dtabsizep;
{
int ret;
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__dbreg_register_recover, DB___dbreg_register)) != 0)
return (ret);
return (0);
}
#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/__dbreg.h"
#include "dbinc/log.h"
/*
* __dbreg_register_recover --
* Recovery function for register.
*
* PUBLIC: int __dbreg_register_recover
* PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
*/
int
__dbreg_register_recover(dbenv, dbtp, lsnp, op, info)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops op;
void *info;
{
__dbreg_register_args *argp;
DB *file_dbp;
DBC *dbc;
DB_MPOOLFILE *mpf;
PAGE *pagep;
int cmp_n, cmp_p, modified, ret;
REC_PRINT(__dbreg_register_print);
REC_INTRO(__dbreg_register_read, 1);
if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
if (DB_REDO(op)) {
if ((ret = mpf->get(mpf,
&argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
goto out;
} else {
*lsnp = argp->prev_lsn;
ret = 0;
goto out;
}
modified = 0;
cmp_n = log_compare(lsnp, &LSN(pagep));
/*
* Use this when there is something like "pagelsn" in the argp
* structure. Sometimes, you might need to compare meta-data
* lsn's instead.
*
* cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
*/
if (cmp_p == 0 && DB_REDO(op)) {
/* Need to redo update described. */
modified = 1;
} else if (cmp_n == 0 && !DB_REDO(op)) {
/* Need to undo update described. */
modified = 1;
}
if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
goto out;
*lsnp = argp->prev_lsn;
ret = 0;
out: REC_CLOSE;
}
#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/__fop.h"
#include "dbinc/log.h"
/*
* __fop_create_recover --
* Recovery function for create.
*
* PUBLIC: int __fop_create_recover
* PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
*/
int
__fop_create_recover(dbenv, dbtp, lsnp, op, info)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops op;
void *info;
{
__fop_create_args *argp;
DB *file_dbp;
DBC *dbc;
DB_MPOOLFILE *mpf;
PAGE *pagep;
int cmp_n, cmp_p, modified, ret;
REC_PRINT(__fop_create_print);
REC_INTRO(__fop_create_read, 1);
if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
if (DB_REDO(op)) {
if ((ret = mpf->get(mpf,
&argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
goto out;
} else {
*lsnp = argp->prev_lsn;
ret = 0;
goto out;
}
modified = 0;
cmp_n = log_compare(lsnp, &LSN(pagep));
/*
* Use this when there is something like "pagelsn" in the argp
* structure. Sometimes, you might need to compare meta-data
* lsn's instead.
*
* cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
*/
if (cmp_p == 0 && DB_REDO(op)) {
/* Need to redo update described. */
modified = 1;
} else if (cmp_n == 0 && !DB_REDO(op)) {
/* Need to undo update described. */
modified = 1;
}
if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
goto out;
*lsnp = argp->prev_lsn;
ret = 0;
out: REC_CLOSE;
}
/*
* __fop_remove_recover --
* Recovery function for remove.
*
* PUBLIC: int __fop_remove_recover
* PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
*/
int
__fop_remove_recover(dbenv, dbtp, lsnp, op, info)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops op;
void *info;
{
__fop_remove_args *argp;
DB *file_dbp;
DBC *dbc;
DB_MPOOLFILE *mpf;
PAGE *pagep;
int cmp_n, cmp_p, modified, ret;
REC_PRINT(__fop_remove_print);
REC_INTRO(__fop_remove_read, 1);
if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
if (DB_REDO(op)) {
if ((ret = mpf->get(mpf,
&argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
goto out;
} else {
*lsnp = argp->prev_lsn;
ret = 0;
goto out;
}
modified = 0;
cmp_n = log_compare(lsnp, &LSN(pagep));
/*
* Use this when there is something like "pagelsn" in the argp
* structure. Sometimes, you might need to compare meta-data
* lsn's instead.
*
* cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
*/
if (cmp_p == 0 && DB_REDO(op)) {
/* Need to redo update described. */
modified = 1;
} else if (cmp_n == 0 && !DB_REDO(op)) {
/* Need to undo update described. */
modified = 1;
}
if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
goto out;
*lsnp = argp->prev_lsn;
ret = 0;
out: REC_CLOSE;
}
/*
* __fop_write_recover --
* Recovery function for write.
*
* PUBLIC: int __fop_write_recover
* PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
*/
int
__fop_write_recover(dbenv, dbtp, lsnp, op, info)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops op;
void *info;
{
__fop_write_args *argp;
DB *file_dbp;
DBC *dbc;
DB_MPOOLFILE *mpf;
PAGE *pagep;
int cmp_n, cmp_p, modified, ret;
REC_PRINT(__fop_write_print);
REC_INTRO(__fop_write_read, 1);
if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
if (DB_REDO(op)) {
if ((ret = mpf->get(mpf,
&argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
goto out;
} else {
*lsnp = argp->prev_lsn;
ret = 0;
goto out;
}
modified = 0;
cmp_n = log_compare(lsnp, &LSN(pagep));
/*
* Use this when there is something like "pagelsn" in the argp
* structure. Sometimes, you might need to compare meta-data
* lsn's instead.
*
* cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
*/
if (cmp_p == 0 && DB_REDO(op)) {
/* Need to redo update described. */
modified = 1;
} else if (cmp_n == 0 && !DB_REDO(op)) {
/* Need to undo update described. */
modified = 1;
}
if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
goto out;
*lsnp = argp->prev_lsn;
ret = 0;
out: REC_CLOSE;
}
/*
* __fop_rename_recover --
* Recovery function for rename.
*
* PUBLIC: int __fop_rename_recover
* PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
*/
int
__fop_rename_recover(dbenv, dbtp, lsnp, op, info)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops op;
void *info;
{
__fop_rename_args *argp;
DB *file_dbp;
DBC *dbc;
DB_MPOOLFILE *mpf;
PAGE *pagep;
int cmp_n, cmp_p, modified, ret;
REC_PRINT(__fop_rename_print);
REC_INTRO(__fop_rename_read, 1);
if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
if (DB_REDO(op)) {
if ((ret = mpf->get(mpf,
&argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
goto out;
} else {
*lsnp = argp->prev_lsn;
ret = 0;
goto out;
}
modified = 0;
cmp_n = log_compare(lsnp, &LSN(pagep));
/*
* Use this when there is something like "pagelsn" in the argp
* structure. Sometimes, you might need to compare meta-data
* lsn's instead.
*
* cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
*/
if (cmp_p == 0 && DB_REDO(op)) {
/* Need to redo update described. */
modified = 1;
} else if (cmp_n == 0 && !DB_REDO(op)) {
/* Need to undo update described. */
modified = 1;
}
if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
goto out;
*lsnp = argp->prev_lsn;
ret = 0;
out: REC_CLOSE;
}
/*
* __fop_file_remove_recover --
* Recovery function for file_remove.
*
* PUBLIC: int __fop_file_remove_recover
* PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
*/
int
__fop_file_remove_recover(dbenv, dbtp, lsnp, op, info)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops op;
void *info;
{
__fop_file_remove_args *argp;
DB *file_dbp;
DBC *dbc;
DB_MPOOLFILE *mpf;
PAGE *pagep;
int cmp_n, cmp_p, modified, ret;
REC_PRINT(__fop_file_remove_print);
REC_INTRO(__fop_file_remove_read, 1);
if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
if (DB_REDO(op)) {
if ((ret = mpf->get(mpf,
&argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
goto out;
} else {
*lsnp = argp->prev_lsn;
ret = 0;
goto out;
}
modified = 0;
cmp_n = log_compare(lsnp, &LSN(pagep));
/*
* Use this when there is something like "pagelsn" in the argp
* structure. Sometimes, you might need to compare meta-data
* lsn's instead.
*
* cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
*/
if (cmp_p == 0 && DB_REDO(op)) {
/* Need to redo update described. */
modified = 1;
} else if (cmp_n == 0 && !DB_REDO(op)) {
/* Need to undo update described. */
modified = 1;
}
if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
goto out;
*lsnp = argp->prev_lsn;
ret = 0;
out: REC_CLOSE;
}
/* Do not edit: automatically built by gen_rec.awk. */
#include "db_config.h"
#ifndef NO_SYSTEM_INCLUDES
#include <sys/types.h>
#include <ctype.h>
#include <string.h>
#endif
#include "db_int.h"
#include "dbinc/crypto.h"
#include "dbinc/db_page.h"
#include "dbinc/db_dispatch.h"
#include "dbinc/db_am.h"
#include "dbinc/log.h"
#include "dbinc/rep.h"
#include "dbinc/txn.h"
#include "dbinc/fop.h"
/*
* PUBLIC: int __fop_create_log __P((DB_ENV *, DB_TXN *, DB_LSN *,
* PUBLIC: u_int32_t, const DBT *, u_int32_t, u_int32_t));
*/
int
__fop_create_log(dbenv, txnid, ret_lsnp, flags,
name, appname, mode)
DB_ENV *dbenv;
DB_TXN *txnid;
DB_LSN *ret_lsnp;
u_int32_t flags;
const DBT *name;
u_int32_t appname;
u_int32_t mode;
{
DBT logrec;
DB_LSN *lsnp, null_lsn;
u_int32_t zero;
u_int32_t uinttmp;
u_int32_t npad, rectype, txn_num;
int ret;
u_int8_t *bp;
rectype = DB___fop_create;
npad = 0;
if (txnid == NULL) {
txn_num = 0;
null_lsn.file = 0;
null_lsn.offset = 0;
lsnp = &null_lsn;
} else {
if (TAILQ_FIRST(&txnid->kids) != NULL &&
(ret = __txn_activekids(dbenv, rectype, txnid)) != 0)
return (ret);
txn_num = txnid->txnid;
lsnp = &txnid->last_lsn;
}
logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN)
+ sizeof(u_int32_t) + (name == NULL ? 0 : name->size)
+ sizeof(u_int32_t)
+ sizeof(u_int32_t);
if (CRYPTO_ON(dbenv)) {
npad =
((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size);
logrec.size += npad;
}
if ((ret = __os_malloc(dbenv,
logrec.size, &logrec.data)) != 0)
return (ret);
if (npad > 0)
memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad);
bp = logrec.data;
memcpy(bp, &rectype, sizeof(rectype));
bp += sizeof(rectype);
memcpy(bp, &txn_num, sizeof(txn_num));
bp += sizeof(txn_num);
memcpy(bp, lsnp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
if (name == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &name->size, sizeof(name->size));
bp += sizeof(name->size);
memcpy(bp, name->data, name->size);
bp += name->size;
}
uinttmp = (u_int32_t)appname;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
uinttmp = (u_int32_t)mode;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size);
ret = dbenv->log_put(dbenv,
ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY);
if (txnid != NULL && ret == 0)
txnid->last_lsn = *ret_lsnp;
#ifdef LOG_DIAGNOSTIC
if (ret != 0)
(void)__fop_create_print(dbenv,
(DBT *)&logrec, ret_lsnp, NULL, NULL);
#endif
__os_free(dbenv, logrec.data);
return (ret);
}
/*
* PUBLIC: int __fop_create_getpgnos __P((DB_ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
int
__fop_create_getpgnos(dbenv, rec, lsnp, notused1, summary)
DB_ENV *dbenv;
DBT *rec;
DB_LSN *lsnp;
db_recops notused1;
void *summary;
{
TXN_RECS *t;
int ret;
COMPQUIET(rec, NULL);
COMPQUIET(notused1, DB_TXN_ABORT);
t = (TXN_RECS *)summary;
if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0)
return (ret);
t->array[t->npages].flags = LSN_PAGE_NOLOCK;
t->array[t->npages].lsn = *lsnp;
t->array[t->npages].fid = DB_LOGFILEID_INVALID;
memset(&t->array[t->npages].pgdesc, 0,
sizeof(t->array[t->npages].pgdesc));
t->npages++;
return (0);
}
/*
* PUBLIC: int __fop_create_print __P((DB_ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
int
__fop_create_print(dbenv, dbtp, lsnp, notused2, notused3)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops notused2;
void *notused3;
{
__fop_create_args *argp;
u_int32_t i;
int ch;
int ret;
notused2 = DB_TXN_ABORT;
notused3 = NULL;
if ((ret = __fop_create_read(dbenv, dbtp->data, &argp)) != 0)
return (ret);
(void)printf(
"[%lu][%lu]__fop_create: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
(u_long)lsnp->file,
(u_long)lsnp->offset,
(u_long)argp->type,
(u_long)argp->txnid->txnid,
(u_long)argp->prev_lsn.file,
(u_long)argp->prev_lsn.offset);
(void)printf("\tname: ");
for (i = 0; i < argp->name.size; i++) {
ch = ((u_int8_t *)argp->name.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tappname: %lu\n", (u_long)argp->appname);
(void)printf("\tmode: %o\n", argp->mode);
(void)printf("\n");
__os_free(dbenv, argp);
return (0);
}
/*
* PUBLIC: int __fop_create_read __P((DB_ENV *, void *, __fop_create_args **));
*/
int
__fop_create_read(dbenv, recbuf, argpp)
DB_ENV *dbenv;
void *recbuf;
__fop_create_args **argpp;
{
__fop_create_args *argp;
u_int32_t uinttmp;
u_int8_t *bp;
int ret;
if ((ret = __os_malloc(dbenv,
sizeof(__fop_create_args) + sizeof(DB_TXN), &argp)) != 0)
return (ret);
argp->txnid = (DB_TXN *)&argp[1];
bp = recbuf;
memcpy(&argp->type, bp, sizeof(argp->type));
bp += sizeof(argp->type);
memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid));
bp += sizeof(argp->txnid->txnid);
memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
memset(&argp->name, 0, sizeof(argp->name));
memcpy(&argp->name.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->name.data = bp;
bp += argp->name.size;
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->appname = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->mode = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
*argpp = argp;
return (0);
}
/*
* PUBLIC: int __fop_remove_log __P((DB_ENV *, DB_TXN *, DB_LSN *,
* PUBLIC: u_int32_t, const DBT *, const DBT *, u_int32_t));
*/
int
__fop_remove_log(dbenv, txnid, ret_lsnp, flags,
name, fid, appname)
DB_ENV *dbenv;
DB_TXN *txnid;
DB_LSN *ret_lsnp;
u_int32_t flags;
const DBT *name;
const DBT *fid;
u_int32_t appname;
{
DBT logrec;
DB_LSN *lsnp, null_lsn;
u_int32_t zero;
u_int32_t uinttmp;
u_int32_t npad, rectype, txn_num;
int ret;
u_int8_t *bp;
rectype = DB___fop_remove;
npad = 0;
if (txnid == NULL) {
txn_num = 0;
null_lsn.file = 0;
null_lsn.offset = 0;
lsnp = &null_lsn;
} else {
if (TAILQ_FIRST(&txnid->kids) != NULL &&
(ret = __txn_activekids(dbenv, rectype, txnid)) != 0)
return (ret);
txn_num = txnid->txnid;
lsnp = &txnid->last_lsn;
}
logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN)
+ sizeof(u_int32_t) + (name == NULL ? 0 : name->size)
+ sizeof(u_int32_t) + (fid == NULL ? 0 : fid->size)
+ sizeof(u_int32_t);
if (CRYPTO_ON(dbenv)) {
npad =
((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size);
logrec.size += npad;
}
if ((ret = __os_malloc(dbenv,
logrec.size, &logrec.data)) != 0)
return (ret);
if (npad > 0)
memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad);
bp = logrec.data;
memcpy(bp, &rectype, sizeof(rectype));
bp += sizeof(rectype);
memcpy(bp, &txn_num, sizeof(txn_num));
bp += sizeof(txn_num);
memcpy(bp, lsnp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
if (name == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &name->size, sizeof(name->size));
bp += sizeof(name->size);
memcpy(bp, name->data, name->size);
bp += name->size;
}
if (fid == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &fid->size, sizeof(fid->size));
bp += sizeof(fid->size);
memcpy(bp, fid->data, fid->size);
bp += fid->size;
}
uinttmp = (u_int32_t)appname;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size);
ret = dbenv->log_put(dbenv,
ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY);
if (txnid != NULL && ret == 0)
txnid->last_lsn = *ret_lsnp;
#ifdef LOG_DIAGNOSTIC
if (ret != 0)
(void)__fop_remove_print(dbenv,
(DBT *)&logrec, ret_lsnp, NULL, NULL);
#endif
__os_free(dbenv, logrec.data);
return (ret);
}
/*
* PUBLIC: int __fop_remove_getpgnos __P((DB_ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
int
__fop_remove_getpgnos(dbenv, rec, lsnp, notused1, summary)
DB_ENV *dbenv;
DBT *rec;
DB_LSN *lsnp;
db_recops notused1;
void *summary;
{
TXN_RECS *t;
int ret;
COMPQUIET(rec, NULL);
COMPQUIET(notused1, DB_TXN_ABORT);
t = (TXN_RECS *)summary;
if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0)
return (ret);
t->array[t->npages].flags = LSN_PAGE_NOLOCK;
t->array[t->npages].lsn = *lsnp;
t->array[t->npages].fid = DB_LOGFILEID_INVALID;
memset(&t->array[t->npages].pgdesc, 0,
sizeof(t->array[t->npages].pgdesc));
t->npages++;
return (0);
}
/*
* PUBLIC: int __fop_remove_print __P((DB_ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
int
__fop_remove_print(dbenv, dbtp, lsnp, notused2, notused3)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops notused2;
void *notused3;
{
__fop_remove_args *argp;
u_int32_t i;
int ch;
int ret;
notused2 = DB_TXN_ABORT;
notused3 = NULL;
if ((ret = __fop_remove_read(dbenv, dbtp->data, &argp)) != 0)
return (ret);
(void)printf(
"[%lu][%lu]__fop_remove: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
(u_long)lsnp->file,
(u_long)lsnp->offset,
(u_long)argp->type,
(u_long)argp->txnid->txnid,
(u_long)argp->prev_lsn.file,
(u_long)argp->prev_lsn.offset);
(void)printf("\tname: ");
for (i = 0; i < argp->name.size; i++) {
ch = ((u_int8_t *)argp->name.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tfid: ");
for (i = 0; i < argp->fid.size; i++) {
ch = ((u_int8_t *)argp->fid.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tappname: %lu\n", (u_long)argp->appname);
(void)printf("\n");
__os_free(dbenv, argp);
return (0);
}
/*
* PUBLIC: int __fop_remove_read __P((DB_ENV *, void *, __fop_remove_args **));
*/
int
__fop_remove_read(dbenv, recbuf, argpp)
DB_ENV *dbenv;
void *recbuf;
__fop_remove_args **argpp;
{
__fop_remove_args *argp;
u_int32_t uinttmp;
u_int8_t *bp;
int ret;
if ((ret = __os_malloc(dbenv,
sizeof(__fop_remove_args) + sizeof(DB_TXN), &argp)) != 0)
return (ret);
argp->txnid = (DB_TXN *)&argp[1];
bp = recbuf;
memcpy(&argp->type, bp, sizeof(argp->type));
bp += sizeof(argp->type);
memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid));
bp += sizeof(argp->txnid->txnid);
memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
memset(&argp->name, 0, sizeof(argp->name));
memcpy(&argp->name.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->name.data = bp;
bp += argp->name.size;
memset(&argp->fid, 0, sizeof(argp->fid));
memcpy(&argp->fid.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->fid.data = bp;
bp += argp->fid.size;
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->appname = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
*argpp = argp;
return (0);
}
/*
* PUBLIC: int __fop_write_log __P((DB_ENV *, DB_TXN *, DB_LSN *,
* PUBLIC: u_int32_t, const DBT *, u_int32_t, u_int32_t, const DBT *,
* PUBLIC: u_int32_t));
*/
int
__fop_write_log(dbenv, txnid, ret_lsnp, flags,
name, appname, offset, page, flag)
DB_ENV *dbenv;
DB_TXN *txnid;
DB_LSN *ret_lsnp;
u_int32_t flags;
const DBT *name;
u_int32_t appname;
u_int32_t offset;
const DBT *page;
u_int32_t flag;
{
DBT logrec;
DB_LSN *lsnp, null_lsn;
u_int32_t zero;
u_int32_t uinttmp;
u_int32_t npad, rectype, txn_num;
int ret;
u_int8_t *bp;
rectype = DB___fop_write;
npad = 0;
if (txnid == NULL) {
txn_num = 0;
null_lsn.file = 0;
null_lsn.offset = 0;
lsnp = &null_lsn;
} else {
if (TAILQ_FIRST(&txnid->kids) != NULL &&
(ret = __txn_activekids(dbenv, rectype, txnid)) != 0)
return (ret);
txn_num = txnid->txnid;
lsnp = &txnid->last_lsn;
}
logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN)
+ sizeof(u_int32_t) + (name == NULL ? 0 : name->size)
+ sizeof(u_int32_t)
+ sizeof(u_int32_t)
+ sizeof(u_int32_t) + (page == NULL ? 0 : page->size)
+ sizeof(u_int32_t);
if (CRYPTO_ON(dbenv)) {
npad =
((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size);
logrec.size += npad;
}
if ((ret = __os_malloc(dbenv,
logrec.size, &logrec.data)) != 0)
return (ret);
if (npad > 0)
memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad);
bp = logrec.data;
memcpy(bp, &rectype, sizeof(rectype));
bp += sizeof(rectype);
memcpy(bp, &txn_num, sizeof(txn_num));
bp += sizeof(txn_num);
memcpy(bp, lsnp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
if (name == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &name->size, sizeof(name->size));
bp += sizeof(name->size);
memcpy(bp, name->data, name->size);
bp += name->size;
}
uinttmp = (u_int32_t)appname;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
uinttmp = (u_int32_t)offset;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
if (page == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &page->size, sizeof(page->size));
bp += sizeof(page->size);
memcpy(bp, page->data, page->size);
bp += page->size;
}
uinttmp = (u_int32_t)flag;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size);
ret = dbenv->log_put(dbenv,
ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY);
if (txnid != NULL && ret == 0)
txnid->last_lsn = *ret_lsnp;
#ifdef LOG_DIAGNOSTIC
if (ret != 0)
(void)__fop_write_print(dbenv,
(DBT *)&logrec, ret_lsnp, NULL, NULL);
#endif
__os_free(dbenv, logrec.data);
return (ret);
}
/*
* PUBLIC: int __fop_write_getpgnos __P((DB_ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
int
__fop_write_getpgnos(dbenv, rec, lsnp, notused1, summary)
DB_ENV *dbenv;
DBT *rec;
DB_LSN *lsnp;
db_recops notused1;
void *summary;
{
TXN_RECS *t;
int ret;
COMPQUIET(rec, NULL);
COMPQUIET(notused1, DB_TXN_ABORT);
t = (TXN_RECS *)summary;
if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0)
return (ret);
t->array[t->npages].flags = LSN_PAGE_NOLOCK;
t->array[t->npages].lsn = *lsnp;
t->array[t->npages].fid = DB_LOGFILEID_INVALID;
memset(&t->array[t->npages].pgdesc, 0,
sizeof(t->array[t->npages].pgdesc));
t->npages++;
return (0);
}
/*
* PUBLIC: int __fop_write_print __P((DB_ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
int
__fop_write_print(dbenv, dbtp, lsnp, notused2, notused3)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops notused2;
void *notused3;
{
__fop_write_args *argp;
u_int32_t i;
int ch;
int ret;
notused2 = DB_TXN_ABORT;
notused3 = NULL;
if ((ret = __fop_write_read(dbenv, dbtp->data, &argp)) != 0)
return (ret);
(void)printf(
"[%lu][%lu]__fop_write: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
(u_long)lsnp->file,
(u_long)lsnp->offset,
(u_long)argp->type,
(u_long)argp->txnid->txnid,
(u_long)argp->prev_lsn.file,
(u_long)argp->prev_lsn.offset);
(void)printf("\tname: ");
for (i = 0; i < argp->name.size; i++) {
ch = ((u_int8_t *)argp->name.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tappname: %lu\n", (u_long)argp->appname);
(void)printf("\toffset: %lu\n", (u_long)argp->offset);
(void)printf("\tpage: ");
for (i = 0; i < argp->page.size; i++) {
ch = ((u_int8_t *)argp->page.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tflag: %lu\n", (u_long)argp->flag);
(void)printf("\n");
__os_free(dbenv, argp);
return (0);
}
/*
* PUBLIC: int __fop_write_read __P((DB_ENV *, void *, __fop_write_args **));
*/
int
__fop_write_read(dbenv, recbuf, argpp)
DB_ENV *dbenv;
void *recbuf;
__fop_write_args **argpp;
{
__fop_write_args *argp;
u_int32_t uinttmp;
u_int8_t *bp;
int ret;
if ((ret = __os_malloc(dbenv,
sizeof(__fop_write_args) + sizeof(DB_TXN), &argp)) != 0)
return (ret);
argp->txnid = (DB_TXN *)&argp[1];
bp = recbuf;
memcpy(&argp->type, bp, sizeof(argp->type));
bp += sizeof(argp->type);
memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid));
bp += sizeof(argp->txnid->txnid);
memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
memset(&argp->name, 0, sizeof(argp->name));
memcpy(&argp->name.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->name.data = bp;
bp += argp->name.size;
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->appname = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->offset = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
memset(&argp->page, 0, sizeof(argp->page));
memcpy(&argp->page.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->page.data = bp;
bp += argp->page.size;
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->flag = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
*argpp = argp;
return (0);
}
/*
* PUBLIC: int __fop_rename_log __P((DB_ENV *, DB_TXN *, DB_LSN *,
* PUBLIC: u_int32_t, const DBT *, const DBT *, const DBT *, u_int32_t));
*/
int
__fop_rename_log(dbenv, txnid, ret_lsnp, flags,
oldname, newname, fileid, appname)
DB_ENV *dbenv;
DB_TXN *txnid;
DB_LSN *ret_lsnp;
u_int32_t flags;
const DBT *oldname;
const DBT *newname;
const DBT *fileid;
u_int32_t appname;
{
DBT logrec;
DB_LSN *lsnp, null_lsn;
u_int32_t zero;
u_int32_t uinttmp;
u_int32_t npad, rectype, txn_num;
int ret;
u_int8_t *bp;
rectype = DB___fop_rename;
npad = 0;
if (txnid == NULL) {
txn_num = 0;
null_lsn.file = 0;
null_lsn.offset = 0;
lsnp = &null_lsn;
} else {
if (TAILQ_FIRST(&txnid->kids) != NULL &&
(ret = __txn_activekids(dbenv, rectype, txnid)) != 0)
return (ret);
txn_num = txnid->txnid;
lsnp = &txnid->last_lsn;
}
logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN)
+ sizeof(u_int32_t) + (oldname == NULL ? 0 : oldname->size)
+ sizeof(u_int32_t) + (newname == NULL ? 0 : newname->size)
+ sizeof(u_int32_t) + (fileid == NULL ? 0 : fileid->size)
+ sizeof(u_int32_t);
if (CRYPTO_ON(dbenv)) {
npad =
((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size);
logrec.size += npad;
}
if ((ret = __os_malloc(dbenv,
logrec.size, &logrec.data)) != 0)
return (ret);
if (npad > 0)
memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad);
bp = logrec.data;
memcpy(bp, &rectype, sizeof(rectype));
bp += sizeof(rectype);
memcpy(bp, &txn_num, sizeof(txn_num));
bp += sizeof(txn_num);
memcpy(bp, lsnp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
if (oldname == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &oldname->size, sizeof(oldname->size));
bp += sizeof(oldname->size);
memcpy(bp, oldname->data, oldname->size);
bp += oldname->size;
}
if (newname == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &newname->size, sizeof(newname->size));
bp += sizeof(newname->size);
memcpy(bp, newname->data, newname->size);
bp += newname->size;
}
if (fileid == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &fileid->size, sizeof(fileid->size));
bp += sizeof(fileid->size);
memcpy(bp, fileid->data, fileid->size);
bp += fileid->size;
}
uinttmp = (u_int32_t)appname;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size);
ret = dbenv->log_put(dbenv,
ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY);
if (txnid != NULL && ret == 0)
txnid->last_lsn = *ret_lsnp;
#ifdef LOG_DIAGNOSTIC
if (ret != 0)
(void)__fop_rename_print(dbenv,
(DBT *)&logrec, ret_lsnp, NULL, NULL);
#endif
__os_free(dbenv, logrec.data);
return (ret);
}
/*
* PUBLIC: int __fop_rename_getpgnos __P((DB_ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
int
__fop_rename_getpgnos(dbenv, rec, lsnp, notused1, summary)
DB_ENV *dbenv;
DBT *rec;
DB_LSN *lsnp;
db_recops notused1;
void *summary;
{
TXN_RECS *t;
int ret;
COMPQUIET(rec, NULL);
COMPQUIET(notused1, DB_TXN_ABORT);
t = (TXN_RECS *)summary;
if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0)
return (ret);
t->array[t->npages].flags = LSN_PAGE_NOLOCK;
t->array[t->npages].lsn = *lsnp;
t->array[t->npages].fid = DB_LOGFILEID_INVALID;
memset(&t->array[t->npages].pgdesc, 0,
sizeof(t->array[t->npages].pgdesc));
t->npages++;
return (0);
}
/*
* PUBLIC: int __fop_rename_print __P((DB_ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
int
__fop_rename_print(dbenv, dbtp, lsnp, notused2, notused3)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops notused2;
void *notused3;
{
__fop_rename_args *argp;
u_int32_t i;
int ch;
int ret;
notused2 = DB_TXN_ABORT;
notused3 = NULL;
if ((ret = __fop_rename_read(dbenv, dbtp->data, &argp)) != 0)
return (ret);
(void)printf(
"[%lu][%lu]__fop_rename: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
(u_long)lsnp->file,
(u_long)lsnp->offset,
(u_long)argp->type,
(u_long)argp->txnid->txnid,
(u_long)argp->prev_lsn.file,
(u_long)argp->prev_lsn.offset);
(void)printf("\toldname: ");
for (i = 0; i < argp->oldname.size; i++) {
ch = ((u_int8_t *)argp->oldname.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tnewname: ");
for (i = 0; i < argp->newname.size; i++) {
ch = ((u_int8_t *)argp->newname.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tfileid: ");
for (i = 0; i < argp->fileid.size; i++) {
ch = ((u_int8_t *)argp->fileid.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tappname: %lu\n", (u_long)argp->appname);
(void)printf("\n");
__os_free(dbenv, argp);
return (0);
}
/*
* PUBLIC: int __fop_rename_read __P((DB_ENV *, void *, __fop_rename_args **));
*/
int
__fop_rename_read(dbenv, recbuf, argpp)
DB_ENV *dbenv;
void *recbuf;
__fop_rename_args **argpp;
{
__fop_rename_args *argp;
u_int32_t uinttmp;
u_int8_t *bp;
int ret;
if ((ret = __os_malloc(dbenv,
sizeof(__fop_rename_args) + sizeof(DB_TXN), &argp)) != 0)
return (ret);
argp->txnid = (DB_TXN *)&argp[1];
bp = recbuf;
memcpy(&argp->type, bp, sizeof(argp->type));
bp += sizeof(argp->type);
memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid));
bp += sizeof(argp->txnid->txnid);
memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
memset(&argp->oldname, 0, sizeof(argp->oldname));
memcpy(&argp->oldname.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->oldname.data = bp;
bp += argp->oldname.size;
memset(&argp->newname, 0, sizeof(argp->newname));
memcpy(&argp->newname.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->newname.data = bp;
bp += argp->newname.size;
memset(&argp->fileid, 0, sizeof(argp->fileid));
memcpy(&argp->fileid.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->fileid.data = bp;
bp += argp->fileid.size;
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->appname = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
*argpp = argp;
return (0);
}
/*
* PUBLIC: int __fop_file_remove_log __P((DB_ENV *, DB_TXN *,
* PUBLIC: DB_LSN *, u_int32_t, const DBT *, const DBT *, const DBT *,
* PUBLIC: u_int32_t, u_int32_t));
*/
int
__fop_file_remove_log(dbenv, txnid, ret_lsnp, flags,
real_fid, tmp_fid, name, appname, child)
DB_ENV *dbenv;
DB_TXN *txnid;
DB_LSN *ret_lsnp;
u_int32_t flags;
const DBT *real_fid;
const DBT *tmp_fid;
const DBT *name;
u_int32_t appname;
u_int32_t child;
{
DBT logrec;
DB_LSN *lsnp, null_lsn;
u_int32_t zero;
u_int32_t uinttmp;
u_int32_t npad, rectype, txn_num;
int ret;
u_int8_t *bp;
rectype = DB___fop_file_remove;
npad = 0;
if (txnid == NULL) {
txn_num = 0;
null_lsn.file = 0;
null_lsn.offset = 0;
lsnp = &null_lsn;
} else {
if (TAILQ_FIRST(&txnid->kids) != NULL &&
(ret = __txn_activekids(dbenv, rectype, txnid)) != 0)
return (ret);
txn_num = txnid->txnid;
lsnp = &txnid->last_lsn;
}
logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN)
+ sizeof(u_int32_t) + (real_fid == NULL ? 0 : real_fid->size)
+ sizeof(u_int32_t) + (tmp_fid == NULL ? 0 : tmp_fid->size)
+ sizeof(u_int32_t) + (name == NULL ? 0 : name->size)
+ sizeof(u_int32_t)
+ sizeof(u_int32_t);
if (CRYPTO_ON(dbenv)) {
npad =
((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size);
logrec.size += npad;
}
if ((ret = __os_malloc(dbenv,
logrec.size, &logrec.data)) != 0)
return (ret);
if (npad > 0)
memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad);
bp = logrec.data;
memcpy(bp, &rectype, sizeof(rectype));
bp += sizeof(rectype);
memcpy(bp, &txn_num, sizeof(txn_num));
bp += sizeof(txn_num);
memcpy(bp, lsnp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
if (real_fid == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &real_fid->size, sizeof(real_fid->size));
bp += sizeof(real_fid->size);
memcpy(bp, real_fid->data, real_fid->size);
bp += real_fid->size;
}
if (tmp_fid == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &tmp_fid->size, sizeof(tmp_fid->size));
bp += sizeof(tmp_fid->size);
memcpy(bp, tmp_fid->data, tmp_fid->size);
bp += tmp_fid->size;
}
if (name == NULL) {
zero = 0;
memcpy(bp, &zero, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
} else {
memcpy(bp, &name->size, sizeof(name->size));
bp += sizeof(name->size);
memcpy(bp, name->data, name->size);
bp += name->size;
}
uinttmp = (u_int32_t)appname;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
uinttmp = (u_int32_t)child;
memcpy(bp, &uinttmp, sizeof(uinttmp));
bp += sizeof(uinttmp);
DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size);
ret = dbenv->log_put(dbenv,
ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY);
if (txnid != NULL && ret == 0)
txnid->last_lsn = *ret_lsnp;
#ifdef LOG_DIAGNOSTIC
if (ret != 0)
(void)__fop_file_remove_print(dbenv,
(DBT *)&logrec, ret_lsnp, NULL, NULL);
#endif
__os_free(dbenv, logrec.data);
return (ret);
}
/*
* PUBLIC: int __fop_file_remove_getpgnos __P((DB_ENV *, DBT *,
* PUBLIC: DB_LSN *, db_recops, void *));
*/
int
__fop_file_remove_getpgnos(dbenv, rec, lsnp, notused1, summary)
DB_ENV *dbenv;
DBT *rec;
DB_LSN *lsnp;
db_recops notused1;
void *summary;
{
TXN_RECS *t;
int ret;
COMPQUIET(rec, NULL);
COMPQUIET(notused1, DB_TXN_ABORT);
t = (TXN_RECS *)summary;
if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0)
return (ret);
t->array[t->npages].flags = LSN_PAGE_NOLOCK;
t->array[t->npages].lsn = *lsnp;
t->array[t->npages].fid = DB_LOGFILEID_INVALID;
memset(&t->array[t->npages].pgdesc, 0,
sizeof(t->array[t->npages].pgdesc));
t->npages++;
return (0);
}
/*
* PUBLIC: int __fop_file_remove_print __P((DB_ENV *, DBT *,
* PUBLIC: DB_LSN *, db_recops, void *));
*/
int
__fop_file_remove_print(dbenv, dbtp, lsnp, notused2, notused3)
DB_ENV *dbenv;
DBT *dbtp;
DB_LSN *lsnp;
db_recops notused2;
void *notused3;
{
__fop_file_remove_args *argp;
u_int32_t i;
int ch;
int ret;
notused2 = DB_TXN_ABORT;
notused3 = NULL;
if ((ret = __fop_file_remove_read(dbenv, dbtp->data, &argp)) != 0)
return (ret);
(void)printf(
"[%lu][%lu]__fop_file_remove: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
(u_long)lsnp->file,
(u_long)lsnp->offset,
(u_long)argp->type,
(u_long)argp->txnid->txnid,
(u_long)argp->prev_lsn.file,
(u_long)argp->prev_lsn.offset);
(void)printf("\treal_fid: ");
for (i = 0; i < argp->real_fid.size; i++) {
ch = ((u_int8_t *)argp->real_fid.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\ttmp_fid: ");
for (i = 0; i < argp->tmp_fid.size; i++) {
ch = ((u_int8_t *)argp->tmp_fid.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tname: ");
for (i = 0; i < argp->name.size; i++) {
ch = ((u_int8_t *)argp->name.data)[i];
printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
}
(void)printf("\n");
(void)printf("\tappname: %lu\n", (u_long)argp->appname);
(void)printf("\tchild: 0x%lx\n", (u_long)argp->child);
(void)printf("\n");
__os_free(dbenv, argp);
return (0);
}
/*
* PUBLIC: int __fop_file_remove_read __P((DB_ENV *, void *,
* PUBLIC: __fop_file_remove_args **));
*/
int
__fop_file_remove_read(dbenv, recbuf, argpp)
DB_ENV *dbenv;
void *recbuf;
__fop_file_remove_args **argpp;
{
__fop_file_remove_args *argp;
u_int32_t uinttmp;
u_int8_t *bp;
int ret;
if ((ret = __os_malloc(dbenv,
sizeof(__fop_file_remove_args) + sizeof(DB_TXN), &argp)) != 0)
return (ret);
argp->txnid = (DB_TXN *)&argp[1];
bp = recbuf;
memcpy(&argp->type, bp, sizeof(argp->type));
bp += sizeof(argp->type);
memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid));
bp += sizeof(argp->txnid->txnid);
memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN));
bp += sizeof(DB_LSN);
memset(&argp->real_fid, 0, sizeof(argp->real_fid));
memcpy(&argp->real_fid.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->real_fid.data = bp;
bp += argp->real_fid.size;
memset(&argp->tmp_fid, 0, sizeof(argp->tmp_fid));
memcpy(&argp->tmp_fid.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->tmp_fid.data = bp;
bp += argp->tmp_fid.size;
memset(&argp->name, 0, sizeof(argp->name));
memcpy(&argp->name.size, bp, sizeof(u_int32_t));
bp += sizeof(u_int32_t);
argp->name.data = bp;
bp += argp->name.size;
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->appname = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
memcpy(&uinttmp, bp, sizeof(uinttmp));
argp->child = (u_int32_t)uinttmp;
bp += sizeof(uinttmp);
*argpp = argp;
return (0);
}
/*
* PUBLIC: int __fop_init_print __P((DB_ENV *, int (***)(DB_ENV *,
* PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *));
*/
int
__fop_init_print(dbenv, dtabp, dtabsizep)
DB_ENV *dbenv;
int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
size_t *dtabsizep;
{
int ret;
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_create_print, DB___fop_create)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_remove_print, DB___fop_remove)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_write_print, DB___fop_write)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_rename_print, DB___fop_rename)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_file_remove_print, DB___fop_file_remove)) != 0)
return (ret);
return (0);
}
/*
* PUBLIC: int __fop_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *,
* PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *));
*/
int
__fop_init_getpgnos(dbenv, dtabp, dtabsizep)
DB_ENV *dbenv;
int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
size_t *dtabsizep;
{
int ret;
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_create_getpgnos, DB___fop_create)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_remove_getpgnos, DB___fop_remove)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_write_getpgnos, DB___fop_write)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_rename_getpgnos, DB___fop_rename)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_file_remove_getpgnos, DB___fop_file_remove)) != 0)
return (ret);
return (0);
}
/*
* PUBLIC: int __fop_init_recover __P((DB_ENV *, int (***)(DB_ENV *,
* PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *));
*/
int
__fop_init_recover(dbenv, dtabp, dtabsizep)
DB_ENV *dbenv;
int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
size_t *dtabsizep;
{
int ret;
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_create_recover, DB___fop_create)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_remove_recover, DB___fop_remove)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_write_recover, DB___fop_write)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_rename_recover, DB___fop_rename)) != 0)
return (ret);
if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
__fop_file_remove_recover, DB___fop_file_remove)) != 0)
return (ret);
return (0);
}
/* DO NOT EDIT: automatically built by dist/s_java. */
package com.sleepycat.db;
public class DbBtreeStat
{
public int bt_magic;
public int bt_version;
public int bt_metaflags;
public int bt_nkeys;
public int bt_ndata;
public int bt_pagesize;
public int bt_maxkey;
public int bt_minkey;
public int bt_re_len;
public int bt_re_pad;
public int bt_levels;
public int bt_int_pg;
public int bt_leaf_pg;
public int bt_dup_pg;
public int bt_over_pg;
public int bt_free;
public int bt_int_pgfree;
public int bt_leaf_pgfree;
public int bt_dup_pgfree;
public int bt_over_pgfree;
}
// end of DbBtreeStat.java
/* DO NOT EDIT: automatically built by dist/s_java. */
package com.sleepycat.db;
public class DbHashStat
{
public int hash_magic;
public int hash_version;
public int hash_metaflags;
public int hash_nkeys;
public int hash_ndata;
public int hash_pagesize;
public int hash_ffactor;
public int hash_buckets;
public int hash_free;
public int hash_bfree;
public int hash_bigpages;
public int hash_big_bfree;
public int hash_overflows;
public int hash_ovfl_free;
public int hash_dup;
public int hash_dup_free;
}
// end of DbHashStat.java
/* DO NOT EDIT: automatically built by dist/s_java. */
package com.sleepycat.db;
public class DbLockStat
{
public int st_id;
public int st_cur_maxid;
public int st_maxlocks;
public int st_maxlockers;
public int st_maxobjects;
public int st_nmodes;
public int st_nlocks;
public int st_maxnlocks;
public int st_nlockers;
public int st_maxnlockers;
public int st_nobjects;
public int st_maxnobjects;
public int st_nconflicts;
public int st_nrequests;
public int st_nreleases;
public int st_nnowaits;
public int st_ndeadlocks;
public int st_locktimeout;
public int st_nlocktimeouts;
public int st_txntimeout;
public int st_ntxntimeouts;
public int st_region_wait;
public int st_region_nowait;
public int st_regsize;
}
// end of DbLockStat.java
/* DO NOT EDIT: automatically built by dist/s_java. */
package com.sleepycat.db;
public class DbLogStat
{
public int st_magic;
public int st_version;
public int st_mode;
public int st_lg_bsize;
public int st_lg_size;
public int st_w_bytes;
public int st_w_mbytes;
public int st_wc_bytes;
public int st_wc_mbytes;
public int st_wcount;
public int st_wcount_fill;
public int st_scount;
public int st_region_wait;
public int st_region_nowait;
public int st_cur_file;
public int st_cur_offset;
public int st_disk_file;
public int st_disk_offset;
public int st_regsize;
public int st_maxcommitperflush;
public int st_mincommitperflush;
}
// end of DbLogStat.java
/* DO NOT EDIT: automatically built by dist/s_java. */
package com.sleepycat.db;
public class DbMpoolFStat
{
public String file_name;
public int st_pagesize;
public int st_map;
public int st_cache_hit;
public int st_cache_miss;
public int st_page_create;
public int st_page_in;
public int st_page_out;
}
// end of DbMpoolFStat.java
/* DO NOT EDIT: automatically built by dist/s_java. */
package com.sleepycat.db;
public class DbQueueStat
{
public int qs_magic;
public int qs_version;
public int qs_metaflags;
public int qs_nkeys;
public int qs_ndata;
public int qs_pagesize;
public int qs_extentsize;
public int qs_pages;
public int qs_re_len;
public int qs_re_pad;
public int qs_pgfree;
public int qs_first_recno;
public int qs_cur_recno;
}
// end of DbQueueStat.java
/* DO NOT EDIT: automatically built by dist/s_java. */
package com.sleepycat.db;
public class DbRepStat
{
public int st_status;
public DbLsn st_next_lsn;
public DbLsn st_waiting_lsn;
public int st_dupmasters;
public int st_env_id;
public int st_env_priority;
public int st_gen;
public int st_log_duplicated;
public int st_log_queued;
public int st_log_queued_max;
public int st_log_queued_total;
public int st_log_records;
public int st_log_requested;
public int st_master;
public int st_master_changes;
public int st_msgs_badgen;
public int st_msgs_processed;
public int st_msgs_recover;
public int st_msgs_send_failures;
public int st_msgs_sent;
public int st_newsites;
public int st_nsites;
public int st_nthrottles;
public int st_outdated;
public int st_txns_applied;
public int st_elections;
public int st_elections_won;
public int st_election_cur_winner;
public int st_election_gen;
public DbLsn st_election_lsn;
public int st_election_nsites;
public int st_election_priority;
public int st_election_status;
public int st_election_tiebreaker;
public int st_election_votes;
}
// end of DbRepStat.java
/* DO NOT EDIT: automatically built by dist/s_java. */
package com.sleepycat.db;
public class DbTxnStat
{
public static class Active {
public int txnid;
public int parentid;
public DbLsn lsn;
};
public DbLsn st_last_ckp;
public long st_time_ckp;
public int st_last_txnid;
public int st_maxtxns;
public int st_naborts;
public int st_nbegins;
public int st_ncommits;
public int st_nactive;
public int st_nrestores;
public int st_maxnactive;
public Active st_txnarray[];
public int st_region_wait;
public int st_region_nowait;
public int st_regsize;
}
// end of DbTxnStat.java
/* DO NOT EDIT: automatically built by dist/s_java. */
#include "java_util.h"
int __jv_fill_bt_stat(JNIEnv *jnienv, jclass cl,
jobject jobj, struct __db_bt_stat *statp) {
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_magic);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_version);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_metaflags);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_nkeys);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_ndata);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_pagesize);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_maxkey);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_minkey);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_re_len);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_re_pad);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_levels);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_int_pg);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_leaf_pg);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_dup_pg);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_over_pg);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_free);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_int_pgfree);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_leaf_pgfree);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_dup_pgfree);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_over_pgfree);
return (0);
}
int __jv_fill_h_stat(JNIEnv *jnienv, jclass cl,
jobject jobj, struct __db_h_stat *statp) {
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_magic);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_version);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_metaflags);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_nkeys);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_ndata);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_pagesize);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_ffactor);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_buckets);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_free);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_bfree);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_bigpages);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_big_bfree);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_overflows);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_ovfl_free);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_dup);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_dup_free);
return (0);
}
int __jv_fill_lock_stat(JNIEnv *jnienv, jclass cl,
jobject jobj, struct __db_lock_stat *statp) {
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_id);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cur_maxid);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxlocks);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxlockers);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxobjects);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nmodes);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nlocks);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxnlocks);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nlockers);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxnlockers);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nobjects);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxnobjects);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nconflicts);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nrequests);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nreleases);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nnowaits);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ndeadlocks);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_locktimeout);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nlocktimeouts);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_txntimeout);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ntxntimeouts);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_wait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_nowait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_regsize);
return (0);
}
int __jv_fill_log_stat(JNIEnv *jnienv, jclass cl,
jobject jobj, struct __db_log_stat *statp) {
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_magic);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_version);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_mode);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_lg_bsize);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_lg_size);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_w_bytes);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_w_mbytes);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_wc_bytes);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_wc_mbytes);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_wcount);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_wcount_fill);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_scount);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_wait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_nowait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cur_file);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cur_offset);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_disk_file);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_disk_offset);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_regsize);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxcommitperflush);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_mincommitperflush);
return (0);
}
int __jv_fill_mpool_stat(JNIEnv *jnienv, jclass cl,
jobject jobj, struct __db_mpool_stat *statp) {
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_gbytes);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_bytes);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ncache);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_regsize);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_map);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cache_hit);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cache_miss);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_create);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_in);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_out);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ro_evict);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_rw_evict);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_trickle);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_pages);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_clean);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_dirty);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_buckets);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_searches);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_longest);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_examined);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_nowait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_wait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_max_wait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_nowait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_wait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc_buckets);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc_max_buckets);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc_pages);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc_max_pages);
return (0);
}
int __jv_fill_qam_stat(JNIEnv *jnienv, jclass cl,
jobject jobj, struct __db_qam_stat *statp) {
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_magic);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_version);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_metaflags);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_nkeys);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_ndata);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_pagesize);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_extentsize);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_pages);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_re_len);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_re_pad);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_pgfree);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_first_recno);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_cur_recno);
return (0);
}
int __jv_fill_rep_stat(JNIEnv *jnienv, jclass cl,
jobject jobj, struct __db_rep_stat *statp) {
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_status);
JAVADB_STAT_LSN(jnienv, cl, jobj, statp, st_next_lsn);
JAVADB_STAT_LSN(jnienv, cl, jobj, statp, st_waiting_lsn);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_dupmasters);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_env_id);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_env_priority);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_gen);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_duplicated);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_queued);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_queued_max);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_queued_total);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_records);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_requested);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_master);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_master_changes);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_badgen);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_processed);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_recover);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_send_failures);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_sent);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_newsites);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nsites);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nthrottles);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_outdated);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_txns_applied);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_elections);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_elections_won);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_cur_winner);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_gen);
JAVADB_STAT_LSN(jnienv, cl, jobj, statp, st_election_lsn);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_nsites);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_priority);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_status);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_tiebreaker);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_votes);
return (0);
}
int __jv_fill_txn_stat(JNIEnv *jnienv, jclass cl,
jobject jobj, struct __db_txn_stat *statp) {
JAVADB_STAT_LSN(jnienv, cl, jobj, statp, st_last_ckp);
JAVADB_STAT_LONG(jnienv, cl, jobj, statp, st_time_ckp);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_last_txnid);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxtxns);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_naborts);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nbegins);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ncommits);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nactive);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nrestores);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxnactive);
JAVADB_STAT_ACTIVE(jnienv, cl, jobj, statp, st_txnarray);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_wait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_nowait);
JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_regsize);
return (0);
}
/* DO NOT EDIT: automatically built by dist/s_java. */
extern int __jv_fill_bt_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_bt_stat *statp);
extern int __jv_fill_h_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_h_stat *statp);
extern int __jv_fill_lock_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_lock_stat *statp);
extern int __jv_fill_log_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_log_stat *statp);
extern int __jv_fill_mpool_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_mpool_stat *statp);
extern int __jv_fill_qam_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_qam_stat *statp);
extern int __jv_fill_rep_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_rep_stat *statp);
extern int __jv_fill_txn_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_txn_stat *statp);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment