SQLite

Check-in [c2ad691174]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c2ad691174b8af2e8b158d8840cfc93f75d7db71
User & Date: drh 2012-09-10 15:02:32.827
Context
2012-09-10
23:44
Correct two duplicated test names. (check-in: ced49974a9 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: c2ad691174 user: drh tags: trunk)
09:33
Avoid using the sqlite3ErrStr function in the Tcl package if USE_SYSTEM_SQLITE is defined. (check-in: a716b9a309 user: mistachkin tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/func.c.
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380

381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
        z1[i] = sqlite3Tolower(z2[i]);
      }
      sqlite3_result_text(context, z1, n, sqlite3_free);
    }
  }
}


#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.
*/
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 */

/*
** Implementation of random().  Return a random integer.  
*/
static void randomFunc(
  sqlite3_context *context,







<
<

|
|
|
<
<
<
|
<
>
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<







363
364
365
366
367
368
369


370
371
372
373



374

375
376
377














378
379
380
381
382
383
384
        z1[i] = sqlite3Tolower(z2[i]);
      }
      sqlite3_result_text(context, z1, n, sqlite3_free);
    }
  }
}



/*
** 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.
*/














#define ifnullFunc versionFunc   /* Substitute function - never called */

/*
** Implementation of random().  Return a random integer.  
*/
static void randomFunc(
  sqlite3_context *context,