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

Fix a problem with vector range constraints and mixed ASC/DESC indexes.

FossilOrigin-Name: e2ad30c8b5366fd8e50f36c62345ed03ec613c47
This commit is contained in:
dan
2016-08-02 17:07:51 +00:00
parent 080508a186
commit d05a7144cd
6 changed files with 88 additions and 22 deletions

View File

@@ -2226,11 +2226,13 @@ int whereRangeVectorLen(
}
/* Check that the LHS of the comparison is a column reference to
** the right column of the right source table.
*/
** the right column of the right source table. And that the sort
** order of the index column is the same as the sort order of the
** leftmost index column. */
if( pLhs->op!=TK_COLUMN
|| pLhs->iTable!=iCur
|| pLhs->iColumn!=pIdx->aiColumn[i+nEq]
|| pIdx->aSortOrder[i]!=pIdx->aSortOrder[0]
){
break;
}