summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/sqlite3_enable_shared_cache.3
diff options
context:
space:
mode:
Diffstat (limited to 'static/netbsd/man3/sqlite3_enable_shared_cache.3')
-rw-r--r--static/netbsd/man3/sqlite3_enable_shared_cache.373
1 files changed, 73 insertions, 0 deletions
diff --git a/static/netbsd/man3/sqlite3_enable_shared_cache.3 b/static/netbsd/man3/sqlite3_enable_shared_cache.3
new file mode 100644
index 00000000..8f78fd11
--- /dev/null
+++ b/static/netbsd/man3/sqlite3_enable_shared_cache.3
@@ -0,0 +1,73 @@
+.Dd January 24, 2024
+.Dt SQLITE3_ENABLE_SHARED_CACHE 3
+.Os
+.Sh NAME
+.Nm sqlite3_enable_shared_cache
+.Nd enable or disable shared pager cache
+.Sh SYNOPSIS
+.In sqlite3.h
+.Ft int
+.Fo sqlite3_enable_shared_cache
+.Fa "int"
+.Fc
+.Sh DESCRIPTION
+This routine enables or disables the sharing of the database cache
+and schema data structures between connections to the same
+database.
+Sharing is enabled if the argument is true and disabled if the argument
+is false.
+.Pp
+This interface is omitted if SQLite is compiled with -DSQLITE_OMIT_SHARED_CACHE.
+The -DSQLITE_OMIT_SHARED_CACHE compile-time
+option is recommended because the use of shared cache mode is discouraged.
+.Pp
+Cache sharing is enabled and disabled for an entire process.
+This is a change as of SQLite version 3.5.0 (dateof:3.5.0).
+In prior versions of SQLite, sharing was enabled or disabled for each
+thread separately.
+.Pp
+The cache sharing mode set by this interface effects all subsequent
+calls to
+.Fn sqlite3_open ,
+.Fn sqlite3_open_v2 ,
+and
+.Fn sqlite3_open16 .
+Existing database connections continue to use the sharing mode that
+was in effect at the time they were opened.
+.Pp
+This routine returns SQLITE_OK if shared cache was enabled
+or disabled successfully.
+An error code is returned otherwise.
+.Pp
+Shared cache is disabled by default.
+It is recommended that it stay that way.
+In other words, do not use this routine.
+This interface continues to be provided for historical compatibility,
+but its use is discouraged.
+Any use of shared cache is discouraged.
+If shared cache must be used, it is recommended that shared cache only
+be enabled for individual database connections using the
+.Fn sqlite3_open_v2
+interface with the SQLITE_OPEN_SHAREDCACHE flag.
+.Pp
+Note: This method is disabled on MacOS X 10.7 and iOS version 5.0 and
+will always return SQLITE_MISUSE.
+On those systems, shared cache mode should be enabled per-database
+connection via
+.Fn sqlite3_open_v2
+with SQLITE_OPEN_SHAREDCACHE.
+.Pp
+This interface is threadsafe on processors where writing a 32-bit integer
+is atomic.
+.Pp
+.Sh IMPLEMENTATION NOTES
+These declarations were extracted from the
+interface documentation at line 6893.
+.Bd -literal
+SQLITE_API int sqlite3_enable_shared_cache(int);
+.Ed
+.Sh SEE ALSO
+.Xr sqlite3 3 ,
+.Xr sqlite3_open 3 ,
+.Xr SQLITE_OK 3 ,
+.Xr SQLITE_OPEN_READONLY 3