003 File Manager
Current Path:
/usr/local/share/doc/db5/programmer_reference
usr
/
local
/
share
/
doc
/
db5
/
programmer_reference
/
📁
..
📄
BDB_Prog_Reference.pdf
(1.9 MB)
📄
am.html
(13.27 KB)
📄
am_close.html
(4.17 KB)
📄
am_conf.html
(13.76 KB)
📄
am_conf_logrec.html
(7.32 KB)
📄
am_conf_select.html
(24.85 KB)
📄
am_cursor.html
(36.58 KB)
📄
am_delete.html
(2.95 KB)
📄
am_foreign.html
(9.84 KB)
📄
am_get.html
(4.07 KB)
📄
am_misc.html
(6.3 KB)
📄
am_misc_bulk.html
(17.31 KB)
📄
am_misc_db_sql.html
(4.79 KB)
📄
am_misc_dbsizes.html
(4.06 KB)
📄
am_misc_diskspace.html
(11.57 KB)
📄
am_misc_error.html
(4.83 KB)
📄
am_misc_faq.html
(10.34 KB)
📄
am_misc_partial.html
(7.81 KB)
📄
am_misc_perm.html
(4.19 KB)
📄
am_misc_stability.html
(4.82 KB)
📄
am_misc_struct.html
(5.06 KB)
📄
am_misc_tune.html
(9.91 KB)
📄
am_opensub.html
(7.84 KB)
📄
am_partition.html
(17.19 KB)
📄
am_put.html
(4.68 KB)
📄
am_second.html
(14.76 KB)
📄
am_stat.html
(3.11 KB)
📄
am_sync.html
(3.63 KB)
📄
am_truncate.html
(2.54 KB)
📄
am_upgrade.html
(4.72 KB)
📄
am_verify.html
(4.77 KB)
📄
apprec.html
(8.14 KB)
📄
apprec_auto.html
(12.16 KB)
📄
apprec_config.html
(10 KB)
📄
apprec_def.html
(9.13 KB)
📄
arch.html
(11.09 KB)
📄
arch_apis.html
(10.27 KB)
📄
arch_bigpic.gif
(2.53 KB)
📄
arch_progmodel.html
(3.1 KB)
📄
arch_script.html
(4.39 KB)
📄
arch_smallpic.gif
(1.58 KB)
📄
arch_utilities.html
(8 KB)
📄
bdb_usenix.pdf
(79.81 KB)
📄
bt_conf.html
(29.94 KB)
📄
cam.html
(11.77 KB)
📄
cam_app.html
(16.91 KB)
📄
cam_fail.html
(7.77 KB)
📄
ch13s02.html
(4.19 KB)
📄
csharp.html
(7.48 KB)
📄
dumpload.html
(5.42 KB)
📄
dumpload_format.html
(6.58 KB)
📄
dumpload_text.html
(3.39 KB)
📄
embedded.html
(31.62 KB)
📄
env.html
(7.43 KB)
📄
env_create.html
(10.06 KB)
📄
env_db_config.html
(4.21 KB)
📄
env_encrypt.html
(10.19 KB)
📄
env_error.html
(4.77 KB)
📄
env_faq.html
(5.54 KB)
📄
env_naming.html
(15.54 KB)
📄
env_open.html
(4.95 KB)
📄
env_region.html
(8.11 KB)
📄
env_remote.html
(5.28 KB)
📄
env_security.html
(5.64 KB)
📄
env_size.html
(8.11 KB)
📄
ext.html
(7.13 KB)
📄
ext_perl.html
(3.84 KB)
📄
ext_php.html
(5.47 KB)
📄
general_am_conf.html
(21.43 KB)
📄
gettingStarted.css
(1.13 KB)
📄
group_membership.html
(20.37 KB)
📄
hash_conf.html
(6.96 KB)
📄
hash_usenix.pdf
(256.14 KB)
📄
heap_conf.html
(4.14 KB)
📄
index.html
(77.48 KB)
📄
intro.html
(9.57 KB)
📄
intro_dbis.html
(15.02 KB)
📄
intro_dbisnot.html
(13.49 KB)
📄
intro_distrib.html
(2.92 KB)
📄
intro_need.html
(5.06 KB)
📄
intro_products.html
(14.3 KB)
📄
intro_terrain.html
(19.43 KB)
📄
intro_what.html
(4.94 KB)
📄
intro_where.html
(3.75 KB)
📄
java.html
(7.62 KB)
📄
java_compat.html
(2.57 KB)
📄
java_faq.html
(7.5 KB)
📄
java_program.html
(6.69 KB)
📄
libtp_usenix.pdf
(243.14 KB)
📄
lock.html
(11.29 KB)
📄
lock_am_conv.html
(10.62 KB)
📄
lock_cam_conv.html
(4.95 KB)
📄
lock_config.html
(4.67 KB)
📄
lock_dead.html
(7.25 KB)
📄
lock_deaddbg.html
(10.32 KB)
📄
lock_max.html
(11.04 KB)
📄
lock_nondb.html
(4.94 KB)
📄
lock_notxn.html
(4.55 KB)
📄
lock_page.html
(5.71 KB)
📄
lock_stdmode.html
(5.27 KB)
📄
lock_timeout.html
(6.16 KB)
📄
lock_twopl.html
(4.48 KB)
📄
log.html
(7.08 KB)
📄
log_config.html
(5.06 KB)
📄
log_limits.html
(4.24 KB)
📄
magic.s5.be.txt
(3.54 KB)
📄
magic.s5.le.txt
(3.56 KB)
📄
magic.txt
(1.98 KB)
📄
moreinfo.html
(7.45 KB)
📄
mp.html
(8.86 KB)
📄
mp_config.html
(6.08 KB)
📄
mp_warm.html
(13.45 KB)
📄
preface.html
(5.1 KB)
📄
program.html
(7.21 KB)
📄
program_cache.html
(3.3 KB)
📄
program_compatible.html
(3.66 KB)
📄
program_copy.html
(7.35 KB)
📄
program_environ.html
(3.58 KB)
📄
program_errorret.html
(10.38 KB)
📄
program_faq.html
(4.58 KB)
📄
program_mt.html
(7.54 KB)
📄
program_namespace.html
(5.66 KB)
📄
program_perfmon.html
(32.07 KB)
📄
program_ram.html
(12.58 KB)
📄
program_runtime.html
(7.09 KB)
📄
program_scope.html
(9.8 KB)
📄
refs.html
(11.84 KB)
📄
rep.html
(16.57 KB)
📄
rep_app.html
(9.75 KB)
📄
rep_base_meth.html
(8.59 KB)
📄
rep_bulk.html
(4.01 KB)
📄
rep_clock_skew.html
(5.38 KB)
📄
rep_comm.html
(11.28 KB)
📄
rep_elect.html
(13.17 KB)
📄
rep_ex.html
(9.64 KB)
📄
rep_ex_chan.html
(8.52 KB)
📄
rep_ex_comm.html
(7.58 KB)
📄
rep_ex_rq.html
(5.52 KB)
📄
rep_faq.html
(9.2 KB)
📄
rep_filename.html
(7.7 KB)
📄
rep_id.html
(4.76 KB)
📄
rep_init.html
(5.14 KB)
📄
rep_lease.html
(18.32 KB)
📄
rep_mastersync.html
(11.24 KB)
📄
rep_mgr_ack.html
(8.5 KB)
📄
rep_mgr_meth.html
(11.06 KB)
📄
rep_mgrmulti.html
(10.28 KB)
📄
rep_newsite.html
(5.29 KB)
📄
rep_partition.html
(9.21 KB)
📄
rep_pri.html
(3.64 KB)
📄
rep_replicate.html
(18.8 KB)
📄
rep_ryw.html
(9.82 KB)
📄
rep_trans.html
(21.58 KB)
📄
rep_twosite.html
(6.76 KB)
📄
repmgr_channels.html
(13.34 KB)
📄
rq_conf.html
(18.29 KB)
📄
second.javas
(3.87 KB)
📄
sequence.html
(4.43 KB)
📄
solaris.txt
(5.62 KB)
📄
stl.html
(16.28 KB)
📄
stl_complex_rw.html
(19.31 KB)
📄
stl_container_specific.html
(9.04 KB)
📄
stl_db_advanced_usage.html
(9.68 KB)
📄
stl_db_usage.html
(13.27 KB)
📄
stl_efficienct_use.html
(11.87 KB)
📄
stl_examples.html
(8.24 KB)
📄
stl_known_issues.html
(4.54 KB)
📄
stl_memory_mgmt.html
(9.22 KB)
📄
stl_misc.html
(8.22 KB)
📄
stl_mt_usage.html
(9.06 KB)
📄
stl_persistence.html
(14.74 KB)
📄
stl_primitive_rw.html
(8.18 KB)
📄
stl_txn_usage.html
(4.88 KB)
📄
stl_usecase.html
(3.67 KB)
📄
tcl.html
(7.88 KB)
📄
tcl_error.html
(5.2 KB)
📄
tcl_faq.html
(4.89 KB)
📄
tcl_program.html
(3.78 KB)
📄
tcl_using.html
(4.43 KB)
📄
transapp.cs
(10.34 KB)
📄
transapp.html
(8.55 KB)
📄
transapp_admin.html
(4.8 KB)
📄
transapp_app.html
(25.08 KB)
📄
transapp_archival.html
(15.5 KB)
📄
transapp_atomicity.html
(5.46 KB)
📄
transapp_checkpoint.html
(6.18 KB)
📄
transapp_cursor.html
(6.79 KB)
📄
transapp_data_open.html
(7.52 KB)
📄
transapp_deadlock.html
(7.35 KB)
📄
transapp_env_open.html
(8.39 KB)
📄
transapp_fail.html
(6.8 KB)
📄
transapp_faq.html
(11.26 KB)
📄
transapp_filesys.html
(5.89 KB)
📄
transapp_hotfail.html
(10.54 KB)
📄
transapp_inc.html
(8.09 KB)
📄
transapp_journal.html
(4.72 KB)
📄
transapp_logfile.html
(5.3 KB)
📄
transapp_nested.html
(5.42 KB)
📄
transapp_put.html
(12.47 KB)
📄
transapp_read.html
(9.9 KB)
📄
transapp_reclimit.html
(12.6 KB)
📄
transapp_recovery.html
(8.74 KB)
📄
transapp_term.html
(6.02 KB)
📄
transapp_throughput.html
(9.06 KB)
📄
transapp_tune.html
(13.99 KB)
📄
transapp_why.html
(3.94 KB)
📄
txn.html
(8.63 KB)
📄
txn_config.html
(4.5 KB)
📄
txn_limits.html
(5.77 KB)
📄
witold.html
(745 B)
📄
writetest.cs
(2.26 KB)
📄
xa.html
(6.69 KB)
📄
xa_build.html
(19.12 KB)
📄
xa_faq.html
(7.27 KB)
📄
xa_xa_config.html
(8.1 KB)
📄
xa_xa_intro.html
(4.46 KB)
📄
xa_xa_restrict.html
(6.02 KB)
Editing: solaris.txt
#ifdef OS_solaris * This is all for Solaris 2.6. * * Sun defined a new API in Solaris2.6 to be used when manipulating large * (>2Gbyte) files. This API isn't present in 2.5.x, so we can't simply * call it -- that would mean two binaries, one for 2.5.x and the other for * 2.6. Not pretty. So, what we do here is determine the OS on which we're * running at runtime, and adjust the underlying Berkeley DB calls to use * the new API if it's there. */ /* This must match the definition of stat64 in Solaris2.6 */ struct our_stat64 { dev_t st_dev; long st_pad1[3]; /* reserve for dev expansion */ u_longlong_t st_ino; mode_t st_mode; nlink_t st_nlink; uid_t st_uid; gid_t st_gid; dev_t st_rdev; long st_pad2[2]; longlong_t st_size; timestruc_t mst_atime; timestruc_t mst_mtime; timestruc_t mst_ctime; long st_blksize; longlong_t st_blocks; /* large file support */ char st_fstype[_ST_FSTYPSZ]; long st_pad4[8]; /* expansion area */ }; #define MEGABYTE (1024 * 1024) typedef int (*open_fn)(const char *path, int flags, ...); typedef longlong_t (*lseek64_fn)(int fildes, longlong_t offset, int whence); typedef longlong_t (*fstat64_fn)(int fildes, struct our_stat64 *s); typedef void* (*mmap64_fn)(void* addr, size_t len, int prot, int flags, int filedes, longlong_t off); static fstat64_fn os_fstat64_fn = NULL; static lseek64_fn os_lseek64_fn = NULL; static mmap64_fn os_mmap64_fn = NULL; static open_fn os_open64_fn = NULL; static int dblayer_load_largefile_fns() { void *lib_handle = NULL; void *function_found = NULL; int ret = 0; lib_handle = dlopen(NULL, RTLD_NOW); if (NULL == lib_handle) return (-1); function_found = dlsym(lib_handle,"open64"); if (NULL == function_found) return (-1); os_open64_fn = (open_fn)function_found; function_found = dlsym(lib_handle,"lseek64"); if (NULL == function_found) return (-1); os_lseek64_fn = (lseek64_fn)function_found; function_found = dlsym(lib_handle,"fstat64"); if (NULL == function_found) return (-1); os_fstat64_fn = (fstat64_fn)function_found; function_found = dlsym(lib_handle,"mmap64"); if (NULL == function_found) return (-1); os_mmap64_fn = (mmap64_fn)function_found; return 0; } /* Helper function for large seeks */ static int dblayer_seek_fn_solaris(int fd, size_t pgsize, db_pgno_t pageno, u_long relative, int whence) { longlong_t offset = 0; longlong_t ret = 0; if (NULL == os_lseek64_fn) { return -1; } offset = (longlong_t)pgsize * pageno + relative; ret = (*os_lseek64_fn)(fd,offset,whence); return (ret == -1) ? errno : 0; } /* Helper function for large file mmap */ static int dblayer_map_solaris(fd, len, is_private, is_rdonly, addr) int fd, is_private, is_rdonly; size_t len; void **addr; { void *p; int flags, prot; flags = is_private ? MAP_PRIVATE : MAP_SHARED; prot = PROT_READ | (is_rdonly ? 0 : PROT_WRITE); if ((p = (*os_mmap64_fn)(NULL, len, prot, flags, fd, (longlong_t)0)) == (void *)MAP_FAILED) return (errno); *addr = p; return (0); } /* Helper function for large fstat */ static int dblayer_ioinfo_solaris(const char *path, int fd, u_int32_t *mbytesp, u_int32_t *bytesp, u_int32_t *iosizep) { struct our_stat64 sb; if (NULL == os_fstat64_fn) { return -1; } if ((*os_fstat64_fn)(fd, &sb) == -1) return (errno); /* Return the size of the file. */ if (mbytesp != NULL) *mbytesp = (u_int32_t) (sb.st_size / (longlong_t)MEGABYTE); if (bytesp != NULL) *bytesp = (u_int32_t) (sb.st_size % (longlong_t)MEGABYTE); /* * Return the underlying filesystem blocksize, if available. Default * to 8K on the grounds that most OS's use less than 8K as their VM * page size. */ if (iosizep != NULL) *iosizep = sb.st_blksize; return (0); } #endif #ifdef irix * A similar mess to Solaris: a new API added in IRIX6.2 to support large * files. We always build on 6.2 or later, so no need to do the same song * and dance as on Solaris -- we always have the header files for the * 64-bit API. */ /* Helper function for large seeks */ static int dblayer_seek_fn_irix(int fd, size_t pgsize, db_pgno_t pageno, u_long relative, int whence) { off64_t offset = 0; off64_t ret = 0; offset = (off64_t)pgsize * pageno + relative; ret = lseek64(fd,offset,whence); return (ret == -1) ? errno : 0; } /* Helper function for large fstat */ static int dblayer_ioinfo_irix(const char *path, int fd, u_int32_t *mbytesp, u_int32_t *bytesp, u_int32_t *iosizep) { struct stat64 sb; if (fstat64(fd, &sb) == -1) { return (errno); } /* Return the size of the file. */ if (mbytesp != NULL) *mbytesp = (u_int32_t) (sb.st_size / (off64_t)MEGABYTE); if (bytesp != NULL) *bytesp = (u_int32_t) (sb.st_size % (off64_t)MEGABYTE); if (iosizep != NULL) *iosizep = sb.st_blksize; return (0); } #endif /* irix */ static int dblayer_override_libdb_functions(dblayer_private *priv) { #if defined(OS_solaris) int ret = 0; ret = dblayer_load_largefile_fns(); if (0 != ret) { Debug("Not Solaris2.6: no large file support enabled\n"); } else { /* Means we did get the XXX64 functions, so let's use them */ db_jump_set((void*)os_open64_fn, DB_FUNC_OPEN); db_jump_set((void*)dblayer_seek_fn_solaris, DB_FUNC_SEEK); db_jump_set((void*)dblayer_ioinfo_solaris, DB_FUNC_IOINFO); db_jump_set((void*)dblayer_map_solaris, DB_FUNC_MAP); Debug("Solaris2.6: selected 64-bit file handling.\n"); } #else #if defined (irix) db_jump_set((void*)dblayer_seek_fn_irix, DB_FUNC_SEEK); db_jump_set((void*)dblayer_ioinfo_irix, DB_FUNC_IOINFO); #endif /* irix */ #endif /* OS_solaris */ return 0; }
Upload File
Create Folder