aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-06-17 16:11:28 +0000
committerdrh <drh@noemail.net>2014-06-17 16:11:28 +0000
commit03202a97f83374ff51a763ce0bd131246708fae5 (patch)
treefcb37b49e9aebc3f14639b1bcfb41d38ddb5a775 /src/func.c
parente2bdf6e547a49eab641d328b9811cb0258195944 (diff)
downloadsqlite-03202a97f83374ff51a763ce0bd131246708fae5.tar.gz
sqlite-03202a97f83374ff51a763ce0bd131246708fae5.zip
Add the likely() function for symmetry with unlikely(). The likely(X)
function means the same thing as likelihood(X,0.9375). FossilOrigin-Name: 38965484199153e3e5b999f5196c1d66e5296f60
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c1
1 files changed, 1 insertions, 0 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 ),