Index: ext/fts1/fts1.c ================================================================== --- ext/fts1/fts1.c +++ ext/fts1/fts1.c @@ -2884,14 +2884,14 @@ int nArg, const char *zName, void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), void **ppArg ){ - if( strcasecmp(zName,"snippet")==0 ){ + if( strcmp(zName,"snippet")==0 ){ *pxFunc = snippetFunc; return 1; - }else if( strcasecmp(zName,"offsets")==0 ){ + }else if( strcmp(zName,"offsets")==0 ){ *pxFunc = snippetOffsetsFunc; return 1; } return 0; } Index: src/vtab.c ================================================================== --- src/vtab.c +++ src/vtab.c @@ -9,11 +9,11 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains code used to help implement virtual tables. ** -** $Id: vtab.c,v 1.36 2006/09/15 07:28:51 drh Exp $ +** $Id: vtab.c,v 1.37 2006/09/18 20:24:03 drh Exp $ */ #ifndef SQLITE_OMIT_VIRTUALTABLE #include "sqliteInt.h" /* @@ -646,10 +646,14 @@ sqlite3_vtab *pVtab; sqlite3_module *pMod; void (*xFunc)(sqlite3_context*,int,sqlite3_value**); void *pArg; FuncDef *pNew; + int rc; + char *zLowerName; + unsigned char *z; + /* Check to see the left operand is a column in a virtual table */ if( pExpr==0 ) return pDef; if( pExpr->op!=TK_COLUMN ) return pDef; pTab = pExpr->pTab; @@ -660,12 +664,19 @@ assert( pVtab->pModule!=0 ); pMod = (sqlite3_module *)pVtab->pModule; if( pMod->xFindFunction==0 ) return pDef; /* Call the xFuncFunction method on the virtual table implementation - ** to see if the implementation wants to overload this function */ - if( pMod->xFindFunction(pVtab, nArg, pDef->zName, &xFunc, &pArg)==0 ){ + ** to see if the implementation wants to overload this function + */ + zLowerName = sqlite3StrDup(pDef->zName); + for(z=(unsigned char*)zLowerName; *z; z++){ + *z = sqlite3UpperToLower[*z]; + } + rc = pMod->xFindFunction(pVtab, nArg, zLowerName, &xFunc, &pArg); + sqliteFree(zLowerName); + if( rc==0 ){ return pDef; } /* Create a new ephemeral function definition for the overloaded ** function */