diff options
author | drh <drh@noemail.net> | 2012-09-10 15:02:32 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2012-09-10 15:02:32 +0000 |
commit | 0fdbdbea038527a9c739ff0c785a61e4fea4e738 (patch) | |
tree | c5132055a59cf84d5ab1ff470580e21498a6549a /src/func.c | |
parent | 9dc2a7366229218173c64b47341b7f6ce437c939 (diff) | |
download | sqlite-0fdbdbea038527a9c739ff0c785a61e4fea4e738.tar.gz sqlite-0fdbdbea038527a9c739ff0c785a61e4fea4e738.zip |
Remove the stale implementation of the ifnull and coalesce functions - code
that has been commented out for ages. No functional changes.
FossilOrigin-Name: c2ad691174b8af2e8b158d8840cfc93f75d7db71
Diffstat (limited to 'src/func.c')
-rw-r--r-- | src/func.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/src/func.c b/src/func.c index e56561e4e..9d81d0c74 100644 --- a/src/func.c +++ b/src/func.c @@ -367,33 +367,14 @@ static void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ } } - -#if 0 /* This function is never used. */ -/* -** The COALESCE() and IFNULL() functions used to be implemented as shown -** here. But now they are implemented as VDBE code so that unused arguments -** do not have to be computed. This legacy implementation is retained as -** comment. -*/ /* -** Implementation of the IFNULL(), NVL(), and COALESCE() functions. -** All three do the same thing. They return the first non-NULL -** argument. +** The COALESCE() and IFNULL() functions are implemented as VDBE code so +** that unused argument values do not have to be computed. However, we +** still need some kind of function implementation for this routines in +** the function table. That function implementation will never be called +** so it doesn't matter what the implementation is. We might as well use +** the "version()" function as a substitute. */ -static void ifnullFunc( - sqlite3_context *context, - int argc, - sqlite3_value **argv -){ - int i; - for(i=0; i<argc; i++){ - if( SQLITE_NULL!=sqlite3_value_type(argv[i]) ){ - sqlite3_result_value(context, argv[i]); - break; - } - } -} -#endif /* NOT USED */ #define ifnullFunc versionFunc /* Substitute function - never called */ /* |