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:
shess
2006-10-26 00:41:51 +00:00
parent 9d5586fc9f
commit 93d2a81401
3 changed files with 13 additions and 7 deletions
+6
View File
@@ -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;