46 lines
1.8 KiB
Groff
46 lines
1.8 KiB
Groff
.Dd December 18, 2016
|
|
.Dt SQLITE3_DATA_DIRECTORY 3
|
|
.Os
|
|
.Sh NAME
|
|
.Nm sqlite3_data_directory
|
|
.Nd Name Of The Folder Holding Database Files
|
|
.Sh SYNOPSIS
|
|
.Vt char *sqlite3_data_directory;
|
|
.Sh DESCRIPTION
|
|
If this global variable is made to point to a string which is the name
|
|
of a folder (a.k.a.
|
|
directory), then all database files specified with a relative pathname
|
|
and created or accessed by SQLite when using a built-in windows VFS
|
|
will be assumed to be relative to that directory.
|
|
If this variable is a NULL pointer, then SQLite assumes that all database
|
|
files specified with a relative pathname are relative to the current
|
|
directory for the process.
|
|
Only the windows VFS makes use of this global variable; it is ignored
|
|
by the unix VFS.
|
|
.Pp
|
|
Changing the value of this variable while a database connection is
|
|
open can result in a corrupt database.
|
|
.Pp
|
|
It is not safe to read or modify this variable in more than one thread
|
|
at a time.
|
|
It is not safe to read or modify this variable if a database connection
|
|
is being used at the same time in a separate thread.
|
|
It is intended that this variable be set once as part of process initialization
|
|
and before any SQLite interface routines have been called and that
|
|
this variable remain unchanged thereafter.
|
|
.Pp
|
|
The data_store_directory pragma may modify
|
|
this variable and cause it to point to memory obtained from sqlite3_malloc.
|
|
Furthermore, the data_store_directory pragma
|
|
always assumes that any string that this variable points to is held
|
|
in memory obtained from sqlite3_malloc and the pragma
|
|
may attempt to free that memory using sqlite3_free.
|
|
Hence, if this variable is modified directly, either it should be made
|
|
NULL or made to point to memory obtained from sqlite3_malloc
|
|
or else the use of the data_store_directory pragma
|
|
should be avoided.
|
|
.Sh SEE ALSO
|
|
.Xr sqlite3 3 ,
|
|
.Xr sqlite3_malloc 3 ,
|
|
.Xr sqlite3_vfs 3
|