Index: third_party/sqlite/src/test/schema.test |
diff --git a/third_party/sqlite/src/test/schema.test b/third_party/sqlite/src/test/schema.test |
index 66a59583840f06ce640378e58740a84ad002e83e..afca39ed60a484b3b3c2ff72e4351c3c26b9eeb0 100644 |
--- a/third_party/sqlite/src/test/schema.test |
+++ b/third_party/sqlite/src/test/schema.test |
@@ -364,4 +364,28 @@ do_test schema-12.1 { |
list [sqlite3_step $::STMT] [sqlite3_finalize $::STMT] |
} {SQLITE_ERROR SQLITE_SCHEMA} |
+ifcapable {auth} { |
+ |
+do_test schema-13.1 { |
+ set S [sqlite3_prepare_v2 db "SELECT * FROM sqlite_master" -1 dummy] |
+ db function hello hello |
+ db function hello {} |
+ db auth auth |
+ proc auth {args} { |
+ if {[lindex $args 0] == "SQLITE_READ"} {return SQLITE_DENY} |
+ return SQLITE_OK |
+ } |
+ sqlite3_step $S |
+} {SQLITE_AUTH} |
+ |
+do_test schema-13.2 { |
+ sqlite3_step $S |
+} {SQLITE_AUTH} |
+ |
+do_test schema-13.3 { |
+ sqlite3_finalize $S |
+} {SQLITE_AUTH} |
+ |
+} |
+ |
finish_test |