SQLITE3_DATA_DIRECTORY(3) | Library Functions Manual | SQLITE3_DATA_DIRECTORY(3) |
sqlite3_data_directory
—
Changing the value of this variable while a database connection is open can result in a corrupt database.
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.
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.
December 19, 2018 | NetBSD 9.2 |