SQLite

Check-in [0626925764]
Login

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

Overview
Comment:Avoid unnecessary upper-to-lower case conversion for function names when registering the built-in functions.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 06269257647db51fbc9f8cda88abac5db28b6f917a509768af7686dfa2b94511
User & Date: drh 2017-07-06 13:23:26.761
Context
2017-07-06
13:51
More compact implementation of the typeof() SQL function. (check-in: efb4aab0ca user: drh tags: trunk)
13:23
Avoid unnecessary upper-to-lower case conversion for function names when registering the built-in functions. (check-in: 0626925764 user: drh tags: trunk)
03:06
Small size reduction in findCollSeqEntry(). (check-in: 55ecd30304 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/callback.c.
303
304
305
306
307
308
309
310

311
312
313
314
315
316
317
  int nDef            /* Length of the apDef[] list */
){
  int i;
  for(i=0; i<nDef; i++){
    FuncDef *pOther;
    const char *zName = aDef[i].zName;
    int nName = sqlite3Strlen30(zName);
    int h = (sqlite3UpperToLower[(u8)zName[0]] + nName) % SQLITE_FUNC_HASH_SZ;

    pOther = functionSearch(h, zName);
    if( pOther ){
      assert( pOther!=&aDef[i] && pOther->pNext!=&aDef[i] );
      aDef[i].pNext = pOther->pNext;
      pOther->pNext = &aDef[i];
    }else{
      aDef[i].pNext = 0;







|
>







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
  int nDef            /* Length of the apDef[] list */
){
  int i;
  for(i=0; i<nDef; i++){
    FuncDef *pOther;
    const char *zName = aDef[i].zName;
    int nName = sqlite3Strlen30(zName);
    int h = (zName[0] + nName) % SQLITE_FUNC_HASH_SZ;
    assert( zName[0]>='a' && zName[0]<='z' );
    pOther = functionSearch(h, zName);
    if( pOther ){
      assert( pOther!=&aDef[i] && pOther->pNext!=&aDef[i] );
      aDef[i].pNext = pOther->pNext;
      pOther->pNext = &aDef[i];
    }else{
      aDef[i].pNext = 0;