Trouble ticket here: www.sqlite.org/src/tktview/1a1a194d1e5f8

On Mon, Jan 20, 2014 at 1:38 PM, Mary Holstege
<mary.holst...@marklogic.com>wrote:

>
> The setup here is a virtual table with two columns
> and a query of the form:
>
> select c1,c2 from test where c1<c2;
>
> The code in exprAnalyze that used to say this:
>
>  if( pLeft->op==TK_COLUMN ){
>       pTerm->leftCursor = pLeft->iTable;
>       pTerm->u.leftColumn = pLeft->iColumn;
>       pTerm->eOperator = operatorMask(op);
>     }
>
> now says this:
>
>     u16 opMask = (pTerm->prereqRight & prereqLeft)==0 ? WO_ALL : WO_EQUIV;
>     if( pLeft->op==TK_COLUMN ){
>       pTerm->leftCursor = pLeft->iTable;
>       pTerm->u.leftColumn = pLeft->iColumn;
>       pTerm->eOperator = operatorMask(op) & opMask;
>     }
>
>
> with the result that pTerm->eOperator is 0
>
> This assertion in allocateIndexInfo then fails:
>
> assert( pTerm->eOperator & (WO_IN|WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_MATCH)
> );
>
> Any advice on a patch for this?
>
> I can, of course, remove the assertion and treat a 0 operator in my
> bestIndex method as
> an unusable constraint, but is there a better approach?
>
> //Mary
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to