mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
When using an index for both DISTINCT and ORDER BY, do not confuse the number of columns required for distinctness with the number required to get the correct sort order. Fix for [6749cb3c].
FossilOrigin-Name: b47169319ad88e8ffdbe8fbb91f4cced81ebd5c0ee1b018be2d0256c9a1c5159
This commit is contained in:
@@ -128,7 +128,7 @@ struct WhereLoop {
|
||||
u16 nEq; /* Number of equality constraints */
|
||||
u16 nBtm; /* Size of BTM vector */
|
||||
u16 nTop; /* Size of TOP vector */
|
||||
u16 nIdxCol; /* Index column used for ORDER BY */
|
||||
u16 nDistinctCol; /* Index columns used to sort for DISTINCT */
|
||||
Index *pIndex; /* Index used, or NULL */
|
||||
} btree;
|
||||
struct { /* Information for virtual tables */
|
||||
|
||||
Reference in New Issue
Block a user