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

Add tests and minor fixes to the xFindFunction method of virtual tables. (CVS 3323)

FossilOrigin-Name: 3c4233e074cb016e2422b2e8f867c99217e9b10e
This commit is contained in:
drh
2006-07-08 18:09:15 +00:00
parent b7f6f68f3a
commit e94b0c3920
6 changed files with 103 additions and 22 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to help implement virtual tables.
**
** $Id: vtab.c,v 1.26 2006/07/08 17:06:44 drh Exp $
** $Id: vtab.c,v 1.27 2006/07/08 18:09:15 drh Exp $
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
#include "sqliteInt.h"
@@ -594,9 +594,8 @@ FuncDef *sqlite3VtabOverloadFunction(
Table *pTab;
sqlite3_vtab *pVtab;
sqlite3_module *pMod;
int (*xFunc)(sqlite3_context*,int,sqlite3_value**);
void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
void *pArg;
int iEnc;
int rc;
FuncDef *pNew;
@@ -614,7 +613,7 @@ FuncDef *sqlite3VtabOverloadFunction(
/* 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, &iEnc)==0 ){
if( pMod->xFindFunction(pVtab, nArg, pDef->zName, &xFunc, &pArg)==0 ){
return pDef;
}
@@ -628,7 +627,6 @@ FuncDef *sqlite3VtabOverloadFunction(
strcpy(pNew->zName, pDef->zName);
pNew->xFunc = xFunc;
pNew->pUserData = pArg;
pNew->iPrefEnc = iEnc;
pNew->flags |= SQLITE_FUNC_EPHEM;
return pNew;
}