mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
In the xfer-optimization, do early detection of when the source and destination
index share the same btree, to avoid a long delay prior to reporting the database corruption. FossilOrigin-Name: af1e5873d44d31466023ae145bdfc6b4191eb48b62e5752c6e683bcf571980e7
This commit is contained in:
@@ -2275,6 +2275,9 @@ static int xferOptimization(
|
||||
if( pSrcIdx==0 ){
|
||||
return 0; /* pDestIdx has no corresponding index in pSrc */
|
||||
}
|
||||
if( pSrcIdx->tnum==pDestIdx->tnum && pSrc->pSchema==pDest->pSchema ){
|
||||
return 0; /* Corrupt schema - two indexes on the same btree */
|
||||
}
|
||||
}
|
||||
#ifndef SQLITE_OMIT_CHECK
|
||||
if( pDest->pCheck && sqlite3ExprListCompare(pSrc->pCheck,pDest->pCheck,-1) ){
|
||||
|
||||
Reference in New Issue
Block a user