diff options
author | drh <drh@noemail.net> | 2017-03-17 03:21:14 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-03-17 03:21:14 +0000 |
commit | a3b2da9889ceb5ca041ca0eb2bc8d35190aae94c (patch) | |
tree | b118e24bd431462795e43d99a370bc00ab7de691 /src/pragma.c | |
parent | af3332989fb72fafd992f8d47f770226e8011713 (diff) | |
download | sqlite-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 'src/pragma.c')
-rw-r--r-- | src/pragma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pragma.c b/src/pragma.c index 488a1d194..6c27fdc5c 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -1505,6 +1505,7 @@ void sqlite3Pragma( int iDataCur, iIdxCur; int r1 = -1; + if( pTab->tnum<1 ) continue; /* Skip VIEWs or VIRTUAL TABLEs */ if( pTab->pCheck==0 && (pTab->tabFlags & TF_HasNotNull)==0 && (pTab->pIndex==0 || isQuick) |