@@ -2973,9 +2973,10 @@ static int whereLoopAddBtreeIndex(
29732973 assert ( pNew -> u .btree .nBtm == 0 );
29742974 opMask = WO_EQ |WO_IN |WO_GT |WO_GE |WO_LT |WO_LE |WO_ISNULL |WO_IS ;
29752975 }
2976- if ( pProbe -> bUnordered || pProbe -> bLowQual ){
2976+ if ( pProbe -> bUnordered || pProbe -> bLowQual || pProbe -> idxIsVector ){
29772977 if ( pProbe -> bUnordered ) opMask &= ~(WO_GT |WO_GE |WO_LT |WO_LE );
29782978 if ( pProbe -> bLowQual ) opMask &= ~(WO_EQ |WO_IN |WO_IS );
2979+ if ( pProbe -> idxIsVector ) opMask = 0 ;
29792980 }
29802981
29812982 assert ( pNew -> u .btree .nEq < pProbe -> nColumn );
@@ -3357,7 +3358,7 @@ static int indexMightHelpWithOrderBy(
33573358 ExprList * aColExpr ;
33583359 int ii , jj ;
33593360
3360- if ( pIndex -> bUnordered ) return 0 ;
3361+ if ( pIndex -> bUnordered || pIndex -> idxIsVector ) return 0 ;
33613362 if ( (pOB = pBuilder -> pWInfo -> pOrderBy )== 0 ) return 0 ;
33623363 for (ii = 0 ; ii < pOB -> nExpr ; ii ++ ){
33633364 Expr * pExpr = sqlite3ExprSkipCollateAndLikely (pOB -> a [ii ].pExpr );
@@ -3526,6 +3527,9 @@ static SQLITE_NOINLINE u32 whereIsCoveringIndex(
35263527 ** if pIdx is covering. Assume it is not. */
35273528 return 0 ;
35283529 }
3530+ if ( pIdx -> idxIsVector == 1 ){
3531+ return 0 ;
3532+ }
35293533 if ( pIdx -> bHasExpr == 0 ){
35303534 for (i = 0 ; i < pIdx -> nColumn ; i ++ ){
35313535 if ( pIdx -> aiColumn [i ]>=BMS - 1 ) break ;
@@ -3814,6 +3818,9 @@ static int whereLoopAddBtree(
38143818 testcase ( pNew -> iTab != pSrc -> iCursor ); /* See ticket [98d973b8f5] */
38153819 continue ; /* Partial index inappropriate for this query */
38163820 }
3821+ if ( pProbe -> idxIsVector != 0 ){
3822+ continue ; /* Vector index inappropriate for this query */
3823+ }
38173824 if ( pProbe -> bNoQuery ) continue ;
38183825 rSize = pProbe -> aiRowLogEst [0 ];
38193826 pNew -> u .btree .nEq = 0 ;
@@ -4817,7 +4824,7 @@ static i8 wherePathSatisfiesOrderBy(
48174824 pIndex = 0 ;
48184825 nKeyCol = 0 ;
48194826 nColumn = 1 ;
4820- }else if ( (pIndex = pLoop -> u .btree .pIndex )== 0 || pIndex -> bUnordered ){
4827+ }else if ( (pIndex = pLoop -> u .btree .pIndex )== 0 || pIndex -> bUnordered || pIndex -> idxIsVector ){
48214828 return 0 ;
48224829 }else {
48234830 nKeyCol = pIndex -> nKeyCol ;
0 commit comments