aboutsummaryrefslogtreecommitdiff
path: root/test/check.test
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-03-17 03:21:14 +0000
committerdrh <drh@noemail.net>2017-03-17 03:21:14 +0000
commita3b2da9889ceb5ca041ca0eb2bc8d35190aae94c (patch)
treeb118e24bd431462795e43d99a370bc00ab7de691 /test/check.test
parentaf3332989fb72fafd992f8d47f770226e8011713 (diff)
downloadsqlite-a3b2da9889ceb5ca041ca0eb2bc8d35190aae94c.tar.gz
sqlite-a3b2da9889ceb5ca041ca0eb2bc8d35190aae94c.zip
Fix a problem in the enhanced PRAGMA integrity_check where it verifies
CHECK constraints: Do not be confused by the reuse of the Table.pCheck field by VIEWs with named columns. Problem discovered by OSS-Fuzz. FossilOrigin-Name: 019dd3d5ba4a596c4ec3b5f0de8402c72196af0faca9138edbc0f1f4957cae60
Diffstat (limited to 'test/check.test')
-rw-r--r--test/check.test11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/check.test b/test/check.test
index 19f252677..2100aebb8 100644
--- a/test/check.test
+++ b/test/check.test
@@ -481,6 +481,15 @@ do_catchsql_test 9.3 {
UPDATE t1 SET c=a*2 WHERE a=1;
} {1 {CHECK constraint failed: c-check}}
-
+# Integrity check on a VIEW with columns.
+#
+db close
+forcedelete test.db
+sqlite3 db test.db
+do_execsql_test 10.1 {
+ CREATE TABLE t1(x);
+ CREATE VIEW v1(y) AS SELECT x FROM t1;
+ PRAGMA integrity_check;
+} {ok}
finish_test