aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-11-07 14:51:24 +0000
committerdrh <drh@noemail.net>2019-11-07 14:51:24 +0000
commit1e7c00e695ff7fe8ab92e34e5793636b6cf3f420 (patch)
tree5f2f3e6ee585ced626231d59897b2725dc9ee7ae /src
parent4e8e533bf7ee9afd7f6a4d8899b891bbdbf9ac53 (diff)
downloadsqlite-1e7c00e695ff7fe8ab92e34e5793636b6cf3f420.tar.gz
sqlite-1e7c00e695ff7fe8ab92e34e5793636b6cf3f420.zip
Fix the xferCompatibleIndex() function so that it recognizes that a PRIMARY KEY
index for a WITHOUT ROWID table is different from a UNIQUE constraint index on the primary key. Ticket [302027baf1374498] FossilOrigin-Name: 34f64f11ca481996b1ff1686bdc5e278946635b6856cd1fe2355fce8e298e0f8
Diffstat (limited to 'src')
-rw-r--r--src/insert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/insert.c b/src/insert.c
index d8d369529..73f6bdb3e 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -2367,7 +2367,7 @@ static int xferCompatibleIndex(Index *pDest, Index *pSrc){
int i;
assert( pDest && pSrc );
assert( pDest->pTable!=pSrc->pTable );
- if( pDest->nKeyCol!=pSrc->nKeyCol ){
+ if( pDest->nKeyCol!=pSrc->nKeyCol || pDest->nColumn!=pSrc->nColumn ){
return 0; /* Different number of columns */
}
if( pDest->onError!=pSrc->onError ){