On Jan 23, 2009, at 5:37 PM, Jens Miltner wrote: > Hi, > > I filed ticket #3602 a couple of days ago: > > Essentially, when using empty test sets ("IN ()" / "NOT IN ()") in the > WHERE expression of a query, an assert() fires inside the bestIndex > function. The assert expects pExpr->pList to be non-NULL and the code > actually checks for this to be non-NULL, so apart from the assert() > firing, nothing bad seems to happen. > [Just in case you're going to ask why we would use empty test sets - > these are queries generated by code] > > Since we're using the debug build of sqlite in our debug builds of our > app, we stumble across this this assert() firing every now and then, > which is somewhat annoying. > While I could remove the assert in our code, I'm hesitating to do so, > because my assumption is the assert() is there for a reason... > Unfortunately, I don't know the parser well enough to decide whether > this assert() is something that's pointing out potential trouble or > whether it's just an incorrect assumption at this point. > > Can somebody with more knowledge of the parse please check whether > this assert() is correct or whether either a NULL pExpr->pList is ok > at this point or maybe pExpr->pList should be an empty list when > passing an empty test sets (it's quick and easy to reproduce - see the > ticket description)? > > I'd appreciate some input on the severity of this assertion.
Initially it looks like the ALWAYS(pExpr->pList) can be replaced with just pExpr->pList. The assert() is wrong. Dan. > > > Thanks, > -jens > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users