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

The sqlite3_value object now carries an sqlite3* pointer to use for

recording malloc failures.  This eliminates the need to pass sqlite3*
pointers into many internal interfaces.  Also added more mutexing. (CVS 4263)

FossilOrigin-Name: 9287276191a582c1cf7cf6b71d8399727d8e534d
This commit is contained in:
drh
2007-08-21 19:33:56 +00:00
parent e30f442622
commit b21c8cd4f6
26 changed files with 397 additions and 307 deletions

View File

@@ -16,7 +16,7 @@
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.70 2007/08/21 10:44:16 drh Exp $
** $Id: date.c,v 1.71 2007/08/21 19:33:56 drh Exp $
**
** SQLite processes all times and dates as Julian Day numbers. The
** dates and times are stored as the number of days since noon
@@ -905,7 +905,7 @@ static void ctimeFunc(
){
sqlite3_value *pVal = sqlite3ValueNew(0);
if( pVal ){
sqlite3ValueSetStr(0, pVal, -1, "now", SQLITE_UTF8, SQLITE_STATIC);
sqlite3ValueSetStr(pVal, -1, "now", SQLITE_UTF8, SQLITE_STATIC);
timeFunc(context, 1, &pVal);
sqlite3ValueFree(pVal);
}
@@ -923,7 +923,7 @@ static void cdateFunc(
){
sqlite3_value *pVal = sqlite3ValueNew(0);
if( pVal ){
sqlite3ValueSetStr(0, pVal, -1, "now", SQLITE_UTF8, SQLITE_STATIC);
sqlite3ValueSetStr(pVal, -1, "now", SQLITE_UTF8, SQLITE_STATIC);
dateFunc(context, 1, &pVal);
sqlite3ValueFree(pVal);
}
@@ -941,7 +941,7 @@ static void ctimestampFunc(
){
sqlite3_value *pVal = sqlite3ValueNew(0);
if( pVal ){
sqlite3ValueSetStr(0, pVal, -1, "now", SQLITE_UTF8, SQLITE_STATIC);
sqlite3ValueSetStr(pVal, -1, "now", SQLITE_UTF8, SQLITE_STATIC);
datetimeFunc(context, 1, &pVal);
sqlite3ValueFree(pVal);
}