/ Check-in [06269257]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 06269257647db51fbc9f8cda88abac5db28b6f917a509768af7686dfa2b94511
User & Date: drh 2017-07-06 13:23:26
Context
2017-07-06
13:51
More compact implementation of the typeof() SQL function. check-in: efb4aab0 user: drh tags: trunk
13:23
Avoid unnecessary upper-to-lower case conversion for function names when registering the built-in functions. check-in: 06269257 user: drh tags: trunk
03:06
Small size reduction in findCollSeqEntry(). check-in: 55ecd303 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/callback.c.

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