Test cases for SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION.
FossilOrigin-Name: debafa5efd37ac60e030d0963ce8e7c4f51a0f10
This commit is contained in:
+11
-1
@@ -111,7 +111,7 @@ do_test loadext-1.2 {
|
||||
#
|
||||
do_test loadext-1.3 {
|
||||
sqlite3 db2 test.db
|
||||
sqlite3_enable_load_extension db2 1
|
||||
sqlite3_db_config db2 SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1
|
||||
catchsql {
|
||||
SELECT half(1.0);
|
||||
} db2
|
||||
@@ -256,6 +256,7 @@ do_test loadext-4.2 {
|
||||
}
|
||||
} {0 {{}}}
|
||||
|
||||
# disable all extension loading
|
||||
do_test loadext-4.3 {
|
||||
sqlite3_enable_load_extension db 0
|
||||
catchsql {
|
||||
@@ -263,6 +264,15 @@ do_test loadext-4.3 {
|
||||
}
|
||||
} {1 {not authorized}}
|
||||
|
||||
# enable C-api extension loading only. Show that the SQL function
|
||||
# still does not work.
|
||||
do_test loadext-4.4 {
|
||||
sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1
|
||||
catchsql {
|
||||
SELECT load_extension($::testextension,'testloadext_init')
|
||||
}
|
||||
} {1 {not authorized}}
|
||||
|
||||
source $testdir/malloc_common.tcl
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user