Empty queries should get no results. My recent change
( http://www.sqlite.org/cvstrac/chngview?cn=3486 ) broke test fts2a-5.3. This change should make the expected result more obvious. (CVS 3489) FossilOrigin-Name: cde383eb467de0d752e94a22cd2f890c2dc599cc
This commit is contained in:
@@ -3289,6 +3289,12 @@ static int fulltextQuery(
|
||||
rc = parseQuery(v, zInput, nInput, iColumn, pQuery);
|
||||
if( rc!=SQLITE_OK ) return rc;
|
||||
|
||||
/* Empty or NULL queries return no results. */
|
||||
if( pQuery->nTerms==0 ){
|
||||
dataBufferInit(pResult, 0);
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
/* Merge AND terms. */
|
||||
/* TODO(shess) I think we can early-exit if( i>nNot && left.nData==0 ). */
|
||||
aTerm = pQuery->pTerms;
|
||||
|
||||
Reference in New Issue
Block a user