/ Check-in [c2ad6911]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove the stale implementation of the ifnull and coalesce functions - code that has been commented out for ages. No functional changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c2ad691174b8af2e8b158d8840cfc93f75d7db71
User & Date: drh 2012-09-10 15:02:32
Context
2012-09-10
23:44
Correct two duplicated test names. check-in: ced49974 user: mistachkin tags: trunk
15:02
Remove the stale implementation of the ifnull and coalesce functions - code that has been commented out for ages. No functional changes. check-in: c2ad6911 user: drh tags: trunk
09:33
Avoid using the sqlite3ErrStr function in the Tcl package if USE_SYSTEM_SQLITE is defined. check-in: a716b9a3 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/func.c.

   363    363           z1[i] = sqlite3Tolower(z2[i]);
   364    364         }
   365    365         sqlite3_result_text(context, z1, n, sqlite3_free);
   366    366       }
   367    367     }
   368    368   }
   369    369   
   370         -
   371         -#if 0  /* This function is never used. */
   372    370   /*
   373         -** The COALESCE() and IFNULL() functions used to be implemented as shown
   374         -** here.  But now they are implemented as VDBE code so that unused arguments
   375         -** do not have to be computed.  This legacy implementation is retained as
   376         -** comment.
          371  +** The COALESCE() and IFNULL() functions are implemented as VDBE code so
          372  +** that unused argument values do not have to be computed.  However, we
          373  +** still need some kind of function implementation for this routines in
          374  +** the function table.  That function implementation will never be called
          375  +** so it doesn't matter what the implementation is.  We might as well use
          376  +** the "version()" function as a substitute.
   377    377   */
   378         -/*
   379         -** Implementation of the IFNULL(), NVL(), and COALESCE() functions.  
   380         -** All three do the same thing.  They return the first non-NULL
   381         -** argument.
   382         -*/
   383         -static void ifnullFunc(
   384         -  sqlite3_context *context,
   385         -  int argc,
   386         -  sqlite3_value **argv
   387         -){
   388         -  int i;
   389         -  for(i=0; i<argc; i++){
   390         -    if( SQLITE_NULL!=sqlite3_value_type(argv[i]) ){
   391         -      sqlite3_result_value(context, argv[i]);
   392         -      break;
   393         -    }
   394         -  }
   395         -}
   396         -#endif /* NOT USED */
   397    378   #define ifnullFunc versionFunc   /* Substitute function - never called */
   398    379   
   399    380   /*
   400    381   ** Implementation of random().  Return a random integer.  
   401    382   */
   402    383   static void randomFunc(
   403    384     sqlite3_context *context,