aboutsummaryrefslogtreecommitdiff
path: root/test/view.test
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-08-15 21:27:20 +0000
committerdrh <drh@noemail.net>2019-08-15 21:27:20 +0000
commit11d88e68abdf23f131dca81ad8d3517a5cf8449b (patch)
tree8381b7ba81b7f17b2556a738718ab5ee4a369e8a /test/view.test
parent725dd72400872da94dcfb6af48128905b93d57fe (diff)
downloadsqlite-11d88e68abdf23f131dca81ad8d3517a5cf8449b.tar.gz
sqlite-11d88e68abdf23f131dca81ad8d3517a5cf8449b.zip
Add the SQLITE_DBCONFIG_ENABLE_VIEW option, together with a "db config"
command in the TCL interface that can access that option as well as all the other sqlite3_db_config() boolean options. FossilOrigin-Name: 61b4bccd2984f4c2cf50f58ef08677588e57aa7e079af07473b2e188d9ce4f52
Diffstat (limited to 'test/view.test')
-rw-r--r--test/view.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/view.test b/test/view.test
index 490dc65a6..b3f50dc00 100644
--- a/test/view.test
+++ b/test/view.test
@@ -38,6 +38,18 @@ do_test view-1.1 {
SELECT * FROM v1 ORDER BY a;
}
} {1 2 4 5 7 8}
+do_test view-1.1.100 {
+ db config enable_view off
+ catchsql {
+ SELECT * FROM v1 ORDER BY a;
+ }
+} {1 {access to view "v1" prohibited}}
+do_test view-1.1.110 {
+ db config enable_view on
+ catchsql {
+ SELECT * FROM v1 ORDER BY a;
+ }
+} {0 {1 2 4 5 7 8}}
do_test view-1.2 {
catchsql {
ROLLBACK;