diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/func.c | 1 | ||||
-rw-r--r-- | src/resolve.c | 3 | ||||
-rw-r--r-- | src/where.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/func.c b/src/func.c index bc5c78981..efbb3efbb 100644 --- a/src/func.c +++ b/src/func.c @@ -1691,6 +1691,7 @@ void sqlite3RegisterGlobalFunctions(void){ FUNCTION2(ifnull, 2, 0, 0, noopFunc, SQLITE_FUNC_COALESCE), FUNCTION2(unlikely, 1, 0, 0, noopFunc, SQLITE_FUNC_UNLIKELY), FUNCTION2(likelihood, 2, 0, 0, noopFunc, SQLITE_FUNC_UNLIKELY), + FUNCTION2(likely, 1, 0, 0, noopFunc, SQLITE_FUNC_UNLIKELY), VFUNCTION(random, 0, 0, 0, randomFunc ), VFUNCTION(randomblob, 1, 0, 0, randomBlob ), FUNCTION(nullif, 2, 0, 1, nullifFunc ), diff --git a/src/resolve.c b/src/resolve.c index 86169c51c..ce26f00c6 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -711,7 +711,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ ** likelihood(X, 0.0625). ** EVIDENCE-OF: R-01283-11636 The unlikely(X) function is short-hand for ** likelihood(X,0.0625). */ - pExpr->iTable = 62; /* TUNING: Default 2nd arg to unlikely() is 0.0625 */ + /* TUNING: unlikely() probability is 0.0625. likely() is 0.9375 */ + pExpr->iTable = pDef->zName[0]=='u' ? 62 : 938; } } } diff --git a/src/where.c b/src/where.c index 20100662a..fd5831872 100644 --- a/src/where.c +++ b/src/where.c @@ -4064,7 +4064,7 @@ static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){ *ppTail = pToDel->pNextLoop; #if WHERETRACE_ENABLED /* 0x8 */ if( sqlite3WhereTrace & 0x8 ){ - sqlite3DebugPrintf("ins-del: "); + sqlite3DebugPrintf("ins-del: "); whereLoopPrint(pToDel, pBuilder->pWC); } #endif |