1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Remove dataType and includeTypes flags from function definitions. Added new

P3_FUNCDEF type for P3 arguments on opcodes.  Fixes to several user functions.
28 tests fail now. (CVS 1464)

FossilOrigin-Name: 36e031625995b2f7baf7654d771ca8fb764a0085
This commit is contained in:
drh
2004-05-26 16:54:42 +00:00
parent b77f5dadbf
commit f9b596ebc0
13 changed files with 271 additions and 291 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.193 2004/05/26 10:11:06 danielk1977 Exp $
** $Id: main.c,v 1.194 2004/05/26 16:54:43 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -412,7 +412,7 @@ static int binaryCollatingFunc(
/*
** Return the ROWID of the most recent insert
*/
int sqlite3_last_insert_rowid(sqlite *db){
long long int sqlite3_last_insert_rowid(sqlite *db){
return db->lastRowid;
}
@@ -695,20 +695,6 @@ int sqlite3_create_function16(
return rc;
}
/*
** Change the datatype for all functions with a given name. See the
** header comment for the prototype of this function in sqlite.h for
** additional information.
*/
int sqlite3_function_type(sqlite *db, const char *zName, int dataType){
FuncDef *p = (FuncDef*)sqlite3HashFind(&db->aFunc, zName, strlen(zName));
while( p ){
p->dataType = dataType;
p = p->pNext;
}
return SQLITE_OK;
}
/*
** Register a trace function. The pArg from the previously registered trace
** is returned.
@@ -1028,7 +1014,7 @@ static int openDatabase(
db->aDb = db->aDbStatic;
db->enc = def_enc;
/* db->flags |= SQLITE_ShortColNames; */
sqlite3HashInit(&db->aFunc, SQLITE_HASH_STRING, 1);
sqlite3HashInit(&db->aFunc, SQLITE_HASH_STRING, 0);
sqlite3HashInit(&db->aCollSeq, SQLITE_HASH_STRING, 0);
for(i=0; i<db->nDb; i++){
sqlite3HashInit(&db->aDb[i].tblHash, SQLITE_HASH_STRING, 0);