aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/func.c1
-rw-r--r--src/resolve.c3
2 files changed, 3 insertions, 1 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;
}
}
}