Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: third_party/sqlite/src/test/loadext.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/limit2.test ('k') | third_party/sqlite/src/test/lock.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/loadext.test
diff --git a/third_party/sqlite/src/test/loadext.test b/third_party/sqlite/src/test/loadext.test
index 7ba4c0cf77476fe98a6e9ba3ab0f5f6876879c75..24ee7a6802d11371c4cb0dcf0ba1e6085f5f1937 100644
--- a/third_party/sqlite/src/test/loadext.test
+++ b/third_party/sqlite/src/test/loadext.test
@@ -81,7 +81,7 @@ if {![file exists $testextension]} {
set testextsrc $srcdir/test_loadext.c
set cmdline [concat exec gcc $gcc_shared]
- lappend cmdline -Wall -I$srcdir -I. -g $testextsrc -o $testextension
+ lappend cmdline -Wall -I$srcdir -I. -I.. -g $testextsrc -o $testextension
if {[catch $cmdline msg]} {
puts "Skipping loadext tests: Test extension not built..."
@@ -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
« no previous file with comments | « third_party/sqlite/src/test/limit2.test ('k') | third_party/sqlite/src/test/lock.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698