1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Avoid unnecessary upper-to-lower case conversion for function names when

registering the built-in functions.

FossilOrigin-Name: 06269257647db51fbc9f8cda88abac5db28b6f917a509768af7686dfa2b94511
This commit is contained in:
drh
2017-07-06 13:23:26 +00:00
parent 3b02e0f615
commit ebaaa67db2
3 changed files with 9 additions and 8 deletions

View File

@@ -307,7 +307,8 @@ void sqlite3InsertBuiltinFuncs(
FuncDef *pOther;
const char *zName = aDef[i].zName;
int nName = sqlite3Strlen30(zName);
int h = (sqlite3UpperToLower[(u8)zName[0]] + nName) % SQLITE_FUNC_HASH_SZ;
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] );