diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/func.c | 8 | ||||
-rw-r--r-- | src/main.c | 5 | ||||
-rw-r--r-- | src/sqlite.h.in | 17 | ||||
-rw-r--r-- | src/test_backup.c | 2 | ||||
-rw-r--r-- | src/test_demovfs.c | 2 | ||||
-rw-r--r-- | src/test_rtree.c | 2 | ||||
-rw-r--r-- | src/test_superlock.c | 2 |
7 files changed, 30 insertions, 8 deletions
diff --git a/src/func.c b/src/func.c index a05799341..30990a30f 100644 --- a/src/func.c +++ b/src/func.c @@ -291,6 +291,14 @@ static void substrFunc( } } } +#ifdef SQLITE_SUBSTR_COMPATIBILITY + /* If SUBSTR_COMPATIBILITY is defined then substr(X,0,N) work the same as + ** as substr(X,1,N) - it returns the first N characters of X. This + ** is essentially a back-out of the bug-fix in check-in [5fc125d362df4b8] + ** from 2009-02-02 for compatibility of applications that exploited the + ** old buggy behavior. */ + if( p1==0 ) p1 = 1; /* <rdar://problem/6778339> */ +#endif if( argc==3 ){ p2 = sqlite3_value_int(argv[2]); if( p2<0 ){ diff --git a/src/main.c b/src/main.c index d0bd55c1d..371bb1fed 100644 --- a/src/main.c +++ b/src/main.c @@ -2707,6 +2707,9 @@ static int openDatabase( #if !defined(SQLITE_DEFAULT_AUTOMATIC_INDEX) || SQLITE_DEFAULT_AUTOMATIC_INDEX | SQLITE_AutoIndex #endif +#if SQLITE_DEFAULT_CKPTFULLFSYNC + | SQLITE_CkptFullFSync +#endif #if SQLITE_DEFAULT_FILE_FORMAT<4 | SQLITE_LegacyFileFmt #endif @@ -3301,7 +3304,7 @@ int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ sqlite3BtreeLeave(pBtree); } sqlite3_mutex_leave(db->mutex); - return rc; + return rc; } /* diff --git a/src/sqlite.h.in b/src/sqlite.h.in index f256cea45..8a358dbb2 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -944,9 +944,9 @@ struct sqlite3_io_methods { ** </ul> */ #define SQLITE_FCNTL_LOCKSTATE 1 -#define SQLITE_GET_LOCKPROXYFILE 2 -#define SQLITE_SET_LOCKPROXYFILE 3 -#define SQLITE_LAST_ERRNO 4 +#define SQLITE_FCNTL_GET_LOCKPROXYFILE 2 +#define SQLITE_FCNTL_SET_LOCKPROXYFILE 3 +#define SQLITE_FCNTL_LAST_ERRNO 4 #define SQLITE_FCNTL_SIZE_HINT 5 #define SQLITE_FCNTL_CHUNK_SIZE 6 #define SQLITE_FCNTL_FILE_POINTER 7 @@ -966,6 +966,12 @@ struct sqlite3_io_methods { #define SQLITE_FCNTL_COMMIT_PHASETWO 22 #define SQLITE_FCNTL_WIN32_SET_HANDLE 23 +/* deprecated names */ +#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE +#define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE +#define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO + + /* ** CAPI3REF: Mutex Handle ** @@ -5061,6 +5067,11 @@ void *sqlite3_update_hook( ** future releases of SQLite. Applications that care about shared ** cache setting should set it explicitly. ** +** Note: This method is disabled on MacOS X 10.7 and iOS version 5.0 +** and will always return SQLITE_MISUSE. On those systems, +** shared cache mode should be enabled per-database connection via +** [sqlite3_open_v2()] with [SQLITE_OPEN_SHAREDCACHE]. +** ** This interface is threadsafe on processors where writing a ** 32-bit integer is atomic. ** diff --git a/src/test_backup.c b/src/test_backup.c index e967424a2..6b4d6b9b1 100644 --- a/src/test_backup.c +++ b/src/test_backup.c @@ -14,7 +14,7 @@ */ #include "tcl.h" -#include <sqlite3.h> +#include "sqlite3.h" #include <assert.h> /* These functions are implemented in main.c. */ diff --git a/src/test_demovfs.c b/src/test_demovfs.c index c63b0a8b7..9410a309a 100644 --- a/src/test_demovfs.c +++ b/src/test_demovfs.c @@ -115,7 +115,7 @@ #if !defined(SQLITE_TEST) || SQLITE_OS_UNIX -#include <sqlite3.h> +#include "sqlite3.h" #include <assert.h> #include <string.h> diff --git a/src/test_rtree.c b/src/test_rtree.c index 9d19fa0e2..7beec6645 100644 --- a/src/test_rtree.c +++ b/src/test_rtree.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. */ -#include <sqlite3.h> +#include "sqlite3.h" #include <tcl.h> /* Solely for the UNUSED_PARAMETER() macro. */ diff --git a/src/test_superlock.c b/src/test_superlock.c index 936fcad0c..cac789842 100644 --- a/src/test_superlock.c +++ b/src/test_superlock.c @@ -18,7 +18,7 @@ ** sqlite3demo_superunlock() */ -#include <sqlite3.h> +#include "sqlite3.h" #include <string.h> /* memset(), strlen() */ #include <assert.h> /* assert() */ |