1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Fix a problem causing a cursor to retain an out-of-date cell-info cache when processing a DISTINCT query on values that are identical according to their collation sequence, but different on disk. [forum:/forumpost/e132e6cde44fb505|Forum post e123e6cde4].

FossilOrigin-Name: 1b3abc1daeac29714256b5a1d5a07a75dc986f1089054a8bee44a00583b7383a
This commit is contained in:
dan
2023-03-20 14:59:19 +00:00
parent f3ddaaa89a
commit bb130c9223
4 changed files with 22 additions and 11 deletions

View File

@@ -9261,6 +9261,7 @@ int sqlite3BtreeInsert(
assert( szNew==pPage->xCellSize(pPage, newCell) );
assert( szNew <= MX_CELL_SIZE(p->pBt) );
idx = pCur->ix;
pCur->info.nSize = 0;
if( loc==0 ){
CellInfo info;
assert( idx>=0 );
@@ -9333,7 +9334,6 @@ int sqlite3BtreeInsert(
** larger than the largest existing key, it is possible to insert the
** row without seeking the cursor. This can be a big performance boost.
*/
pCur->info.nSize = 0;
if( pPage->nOverflow ){
assert( rc==SQLITE_OK );
pCur->curFlags &= ~(BTCF_ValidNKey);