diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/os_unix.c | 21 | ||||
-rw-r--r-- | src/pragma.c | 4 | ||||
-rw-r--r-- | src/sqlite.h.in | 12 |
3 files changed, 27 insertions, 10 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 9087347fc..c096b6a00 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -607,17 +607,22 @@ int sqlite3OsSeek(OsFile *id, off_t offset){ int sqlite3OsSync(OsFile *id){ SimulateIOError(SQLITE_IOERR); TRACE2("SYNC %-3d\n", id->h); +{ +off_t sz; +sqlite3OsFileSize(id, &sz); +fprintf(stderr,"SYNC %d size=%lld... ", id->h, sz); +} if( fsync(id->h) ){ return SQLITE_IOERR; - }else{ - if( id->dirfd>=0 ){ - TRACE2("DIRSYNC %-3d\n", id->dirfd); - fsync(id->dirfd); - close(id->dirfd); /* Only need to sync once, so close the directory */ - id->dirfd = -1; /* when we are done. */ - } - return SQLITE_OK; } + if( id->dirfd>=0 ){ + TRACE2("DIRSYNC %-3d\n", id->dirfd); + fsync(id->dirfd); + close(id->dirfd); /* Only need to sync once, so close the directory */ + id->dirfd = -1; /* when we are done. */ + } +fprintf(stderr,"DONE\n"); + return SQLITE_OK; } /* diff --git a/src/pragma.c b/src/pragma.c index 8a9dabd59..2b5f91ca3 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code used to implement the PRAGMA command. ** -** $Id: pragma.c,v 1.45 2004/06/16 12:02:43 danielk1977 Exp $ +** $Id: pragma.c,v 1.46 2004/06/17 19:04:17 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -124,10 +124,12 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){ { "vdbe_trace", SQLITE_VdbeTrace }, { "sql_trace", SQLITE_SqlTrace }, { "vdbe_listing", SQLITE_VdbeListing }, +#if 1 /* FIX ME: Remove the following pragmas */ { "full_column_names", SQLITE_FullColNames }, { "short_column_names", SQLITE_ShortColNames }, { "count_changes", SQLITE_CountRows }, { "empty_result_callbacks", SQLITE_NullCallback }, +#endif }; int i; for(i=0; i<sizeof(aPragma)/sizeof(aPragma[0]); i++){ diff --git a/src/sqlite.h.in b/src/sqlite.h.in index a91aac972..5ddda29a7 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -12,7 +12,7 @@ ** This header file defines the interface that the SQLite library ** presents to client programs. ** -** @(#) $Id: sqlite.h.in,v 1.101 2004/06/12 09:25:20 danielk1977 Exp $ +** @(#) $Id: sqlite.h.in,v 1.102 2004/06/17 19:04:17 drh Exp $ */ #ifndef _SQLITE_H_ #define _SQLITE_H_ @@ -950,6 +950,16 @@ void *sqlite3_user_data(sqlite3_context*); void *sqlite3_get_auxdata(sqlite3_context*, int); void sqlite3_set_auxdata(sqlite3_context*, int, void*, void (*)(void*)); + +/* +** These are special value for the destructor that is passed in as the +** final argument to routines like sqlite3_result_blob(). If the destructor +** argument is SQLITE_STATIC, it means that the content pointer is constant +** and will never change. It does not need to be destroyed. The +** SQLITE_TRANSIENT value means that the content will likely change in +** the near future and that SQLite should make its own private copy of +** the content before returning. +*/ #define SQLITE_STATIC ((void(*)(void *))0) #define SQLITE_TRANSIENT ((void(*)(void *))-1) |