sqlite3
sqlite3 copied to clipboard
Support loading extensions
Quick fix that I'm using: Add these lines after sqlite3_open() in main.c's sql_open() :
status = sqlite3_enable_load_extension(conn, 1);
if (status != SQLITE_OK) janet_panic(sqlite3_errmsg(conn));
This enables the SQL function load_extension().
Ideally, as per the security warning in https://sqlite.org/c3ref/enable_load_extension.html, the SQL function load_extension() should be disabled, and extension loading should only be done through these SQLite API functions:
-
sqlite3_db_config() -
sqlite3_load_extension()