Fix the generate_series virtual table so that it correctly returns no
rows if any of its constraints are NULL. Ticket [fac496b61722daf28]. FossilOrigin-Name: 3328e828e28ca7198fd1ce84503e649ab2278913a2cf85a0f0391f31d0c9c8d7
This commit is contained in:
@@ -270,6 +270,15 @@ static int seriesFilter(
|
||||
}else{
|
||||
pCur->iStep = 1;
|
||||
}
|
||||
for(i=0; i<argc; i++){
|
||||
if( sqlite3_value_type(argv[i])==SQLITE_NULL ){
|
||||
/* If any of the constraints have a NULL value, then return no rows.
|
||||
** See ticket https://www.sqlite.org/src/info/fac496b61722daf2 */
|
||||
pCur->mnValue = 1;
|
||||
pCur->mxValue = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( idxNum & 8 ){
|
||||
pCur->isDesc = 1;
|
||||
pCur->iValue = pCur->mxValue;
|
||||
|
||||
Reference in New Issue
Block a user