Skip to content

Commit

Permalink
Merge pull request #2094 from pi-hole/update/sqlite_3.47.0
Browse files Browse the repository at this point in the history
Update embedded SQLite to 3.47.0
  • Loading branch information
DL6ER authored Oct 23, 2024
2 parents 2f02f5c + cd438d0 commit 8a95ce5
Show file tree
Hide file tree
Showing 7 changed files with 9,945 additions and 4,739 deletions.
5 changes: 5 additions & 0 deletions src/database/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
set(sqlite3_sources
shell.c
sqlite3.c
sqlite3.h
)

add_library(sqlite3 OBJECT ${sqlite3_sources})
# Define the function that will be called to initialize the sqlite3 shell
target_compile_definitions(sqlite3 PRIVATE "-DSQLITE_SHELL_INIT_PROC=pihole_sqlite3_initalize")
# Define that we want to statically link the percentile extension into the sqlite3 library
target_compile_definitions(sqlite3 PRIVATE "-DSQLITE_STATIC_PERCENTILE=1")
target_compile_options(sqlite3 PRIVATE -Wno-implicit-fallthrough -Wno-cast-function-type -Wno-sign-compare -Wno-implicit-function-declaration -Wno-int-conversion)

if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
Expand Down
5 changes: 3 additions & 2 deletions src/database/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,9 @@ void db_init(void)
// explicitly check for failures to have happened
sqlite3_config(SQLITE_CONFIG_LOG, SQLite3LogCallback, NULL);

// Register Pi-hole provided SQLite3 extensions (see sqlite3-ext.c)
sqlite3_auto_extension((void (*)(void))sqlite3_pihole_extensions_init);
// Register Pi-hole provided SQLite3 extensions (see sqlite3-ext.c) and
// initialize SQLite3 engine
pihole_sqlite3_initalize();

// Check if database exists, if not create empty database
if(!file_exists(config.files.database.v.s))
Expand Down
Loading

0 comments on commit 8a95ce5

Please sign in to comment.