1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Fix problem with DESC indexes on this branch.

FossilOrigin-Name: b49df1fe9b7174ebc60023179e8da628c926e59df3dc01b15d4a28e17807bb97
This commit is contained in:
dan
2019-08-17 17:55:54 +00:00
parent 5b32bdff80
commit cc491f4b1b
3 changed files with 9 additions and 9 deletions

View File

@@ -1602,7 +1602,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
** it is not. For an ASC sort, the non-NULL entries are scanned first.
** For DESC, NULL entries are scanned first.
*/
addrNxt = pLevel->addrNxt;
if( (pLoop->wsFlags & (WHERE_TOP_LIMIT|WHERE_BTM_LIMIT))==0
&& (pLoop->wsFlags & WHERE_BIGNULL_SORT)!=0
){
@@ -1612,7 +1611,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
nExtraReg = 1;
bSeekPastNull = 1;
pLevel->regBignull = regBignull = ++pParse->nMem;
addrNxt = pLevel->addrBignull = sqlite3VdbeMakeLabel(pParse);
pLevel->addrBignull = sqlite3VdbeMakeLabel(pParse);
}
/* If we are doing a reverse order scan on an ascending index, or
@@ -1637,6 +1636,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
if( zStartAff && nTop ){
zEndAff = sqlite3DbStrDup(db, &zStartAff[nEq]);
}
addrNxt = (regBignull ? pLevel->addrBignull : pLevel->addrNxt);
testcase( pRangeStart && (pRangeStart->eOperator & WO_LE)!=0 );
testcase( pRangeStart && (pRangeStart->eOperator & WO_GE)!=0 );