1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Make sure that the likelihood() function does not mess up generation of

result-set code when it is used (inappropropriately) in a result-set 
expression.

FossilOrigin-Name: 7cdbae625eb029538a693d2bebec465a6f65fb90
This commit is contained in:
drh
2015-06-20 13:18:34 +00:00
parent b11b0efde6
commit 5f02ab0976
4 changed files with 31 additions and 10 deletions

View File

@@ -2855,7 +2855,7 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
*/
if( pDef->funcFlags & SQLITE_FUNC_UNLIKELY ){
assert( nFarg>=1 );
sqlite3ExprCode(pParse, pFarg->a[0].pExpr, target);
inReg = sqlite3ExprCodeTarget(pParse, pFarg->a[0].pExpr, target);
break;
}