1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

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
This commit is contained in:
drh
2019-11-07 14:51:24 +00:00
parent 4e8e533bf7
commit 1e7c00e695
4 changed files with 31 additions and 9 deletions

View File

@@ -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 ){