mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
When a virtual table reports orderByConsumed, that tells us nothing about
whether or not the SQLITE_DISTINCTBY constraint is met. Fix for ticket [7e59041f9c4e5102]. Test cases in TH3. FossilOrigin-Name: b59f94e4da9b1653f2004b214407a50340dd476b27e6ec7e29e501a95db9c963
This commit is contained in:
@@ -3696,7 +3696,9 @@ static i8 wherePathSatisfiesOrderBy(
|
||||
pLoop = pLast;
|
||||
}
|
||||
if( pLoop->wsFlags & WHERE_VIRTUALTABLE ){
|
||||
if( pLoop->u.vtab.isOrdered ) obSat = obDone;
|
||||
if( pLoop->u.vtab.isOrdered && (wctrlFlags & WHERE_DISTINCTBY)==0 ){
|
||||
obSat = obDone;
|
||||
}
|
||||
break;
|
||||
}else if( wctrlFlags & WHERE_DISTINCTBY ){
|
||||
pLoop->u.btree.nDistinctCol = 0;
|
||||
|
||||
Reference in New Issue
Block a user