diff options
author | drh <> | 2022-01-01 12:26:01 +0000 |
---|---|---|
committer | drh <> | 2022-01-01 12:26:01 +0000 |
commit | 3907560848c1b98b71f801968f54903ecb144412 (patch) | |
tree | 388d9cb1d118d48bace5e3767ae8521c24e2b51b /src/insert.c | |
parent | 017e36378716dade19b23bde94cd3678ca2fdd4c (diff) | |
download | sqlite-3907560848c1b98b71f801968f54903ecb144412.tar.gz sqlite-3907560848c1b98b71f801968f54903ecb144412.zip |
Fix a faulty assert() statement - adding a CORRUPT_DB term - based on a test
case derived from [562805cf488a455c]. Also add a test case to that prior
issue.
FossilOrigin-Name: 0dd6b5fccd554ebe4c0b081601863acd7b6ea81b51e14b508b23244f2a570e7e
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/insert.c b/src/insert.c index 6908aff4a..54592fd9c 100644 --- a/src/insert.c +++ b/src/insert.c @@ -43,7 +43,7 @@ void sqlite3OpenTable( }else{ Index *pPk = sqlite3PrimaryKeyIndex(pTab); assert( pPk!=0 ); - assert( pPk->tnum==pTab->tnum ); + assert( pPk->tnum==pTab->tnum || CORRUPT_DB ); sqlite3VdbeAddOp3(v, opcode, iCur, pPk->tnum, iDb); sqlite3VdbeSetP4KeyInfo(pParse, pPk); VdbeComment((v, "%s", pTab->zName)); |