]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
First small steps toward brining trunk and apple-osx closer together.
authordrh <drh@noemail.net>
Thu, 19 Feb 2015 00:29:11 +0000 (00:29 +0000)
committerdrh <drh@noemail.net>
Thu, 19 Feb 2015 00:29:11 +0000 (00:29 +0000)
FossilOrigin-Name: 28284ccc0d7301503f6d2d7bee9093738d52e331

manifest
manifest.uuid
src/func.c
src/main.c
src/sqlite.h.in
src/test_backup.c
src/test_demovfs.c
src/test_rtree.c
src/test_superlock.c
test/incrvacuum2.test

index 9d690c65496793da29b10ed5c99d2758e24897b4..4f1e6dabe1beb683cb5ce2c2f4926e1afcceebdc 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Improvements\sto\sSQLITE_ENABLE_API_ARMOR.
-D 2015-02-13T16:36:14.430
+C First\ssmall\ssteps\stoward\sbrining\strunk\sand\sapple-osx\scloser\stogether.
+D 2015-02-19T00:29:11.820
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 6b9e7677829aa94b9f30949656e27312aefb9a46
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -185,7 +185,7 @@ F src/delete.c 37964e6c1d73ff49cbea9ff690c9605fb15f600e
 F src/expr.c 3ef111b88ae2941b84b6b6ea4be8d501ba1af0cb
 F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
 F src/fkey.c e0444b61bed271a76840cbe6182df93a9baa3f12
-F src/func.c 6d3c4ebd72aa7923ce9b110a7dc15f9b8c548430
+F src/func.c f7f0f44b0a2cb568a9c42b1b07e613380ee0b9c6
 F src/global.c 12561d70a1b25f67b21154622bb1723426724f75
 F src/hash.c 4263fbc955f26c2e8cdc0cf214bc42435aa4e4f5
 F src/hash.h c8f3c31722cf3277d03713909761e152a5b81094
@@ -195,7 +195,7 @@ F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
 F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e
 F src/lempar.c 7274c97d24bb46631e504332ccd3bd1b37841770
 F src/loadext.c 86bd4e2fccd520b748cba52492ab60c4a770f660
-F src/main.c 3780c966059a5fcb0afa42fd89e3b74ec1f72b9e
+F src/main.c 80edeba383aac89f72498b2572a115e21d0ecbbd
 F src/malloc.c 740db54387204c9a2eb67c6d98e68b08e9ef4eab
 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
 F src/mem1.c abe6ee469b6c5a35c7f22bfeb9c9bac664a1c987
@@ -232,7 +232,7 @@ F src/resolve.c f4d79e31ffa5820c2e3d1740baa5e9b190425f2b
 F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e
 F src/select.c e46cef4c224549b439384c88fc7f57ba064dad54
 F src/shell.c 6276582ee4e9114e0bb0795772414caaf21c0f8e
-F src/sqlite.h.in 54678c21401909f72b221344dd560d285a1ba5eb
+F src/sqlite.h.in b02d8d19c5adc73bd02b225054103247aff64425
 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad
 F src/sqlite3ext.h 17d487c3c91b0b8c584a32fbeb393f6f795eea7d
 F src/sqliteInt.h 57a405ae6d2ed10fff52de376d18f21e04d96609
@@ -251,11 +251,11 @@ F src/test8.c 610e3d523018ca63b08081795e76794a2121ec38
 F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60
 F src/test_async.c 21e11293a2f72080eda70e1124e9102044531cd8
 F src/test_autoext.c dea8a01a7153b9adc97bd26161e4226329546e12
-F src/test_backup.c 3875e899222b651e18b662f86e0e50daa946344e
+F src/test_backup.c 2e6e6a081870150f20c526a2e9d0d29cda47d803
 F src/test_blob.c 1f2e3e25255b731c4fcf15ee7990d06347cb6c09
 F src/test_btree.c 2e9978eca99a9a4bfa8cae949efb00886860a64f
 F src/test_config.c e7b2e1634324d746aa5e1c7e0929470e8be27953
-F src/test_demovfs.c 69b2085076654ebc18014cbc6386f04409c959a9
+F src/test_demovfs.c 0de72c2c89551629f58486fde5734b7d90758852
 F src/test_devsym.c e7498904e72ba7491d142d5c83b476c4e76993bc
 F src/test_fs.c ced436e3d4b8e4681328409b8081051ce614e28f
 F src/test_func.c 14e543ae4d905ee31dc322b2f8d31bfac1769d45
@@ -274,12 +274,12 @@ F src/test_osinst.c 3d0340bc31a9f3d8a3547e0272373e80f78dde25
 F src/test_pcache.c a5cd24730cb43c5b18629043314548c9169abb00
 F src/test_quota.c 180813f43683be5725458fc1ff13ac455d8e722d
 F src/test_quota.h 2a8ad1952d1d2ca9af0ce0465e56e6c023b5e15d
-F src/test_rtree.c fdd8d29ca5165c7857987a2ba263fac5c69e231f
+F src/test_rtree.c bfe6f4386517f70054311109f3528adffec34485
 F src/test_schema.c 2bdba21b82f601da69793e1f1d11bf481a79b091
 F src/test_server.c a2615049954cbb9cfb4a62e18e2f0616e4dc38fe
 F src/test_sqllog.c b690c12933f50ff46491e0d56a251f84ae16e914
 F src/test_stat.c 9898687a6c2beca733b0dd6fe19163d987826d31
-F src/test_superlock.c 2b97936ca127d13962c3605dbc9a4ef269c424cd
+F src/test_superlock.c 06797157176eb7085027d9dd278c0d7a105e3ec9
 F src/test_syscall.c 2e21ca7f7dc54a028f1967b63f1e76155c356f9b
 F src/test_tclvar.c f4dc67d5f780707210d6bb0eb6016a431c04c7fa
 F src/test_thread.c af391ec03d23486dffbcc250b7e58e073f172af9
@@ -644,7 +644,7 @@ F test/incrblob4.test f26502a5697893e5acea268c910f16478c2f0fab
 F test/incrblob_err.test af1f12ba60d220c9752073ff2bda2ad59e88960d
 F test/incrblobfault.test 280474078f6da9e732cd2a215d3d854969014b6e
 F test/incrvacuum.test d2a6ddf5e429720b5fe502766af747915ccf6c32
-F test/incrvacuum2.test 379eeb8740b0ef60c372c439ad4cbea20b34bb9b
+F test/incrvacuum2.test 676c41428765d58f1da7dbe659ef27726d3d30ac
 F test/incrvacuum3.test 75256fb1377e7c39ef2de62bfc42bbff67be295a
 F test/incrvacuum_ioerr.test 6ae2f783424e47a0033304808fe27789cf93e635
 F test/index.test 4d990005a67a36984e4f1a5f1bdccea8d08da4ee
@@ -1239,7 +1239,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 3c6ca414879feb1f5d31d5fd95a1737530aca624
-R f6208f1be504ea76c76eb647c7a3e38c
+P 823ad40ccb5b51aaa0d5a48da63b465df9d0649a
+R 89f0ec75057f909c87616e4bd9a4303a
 U drh
-Z 5fa0aaf45cc565051b14e7b2d21a11e0
+Z a5ec369c1615e4ac0e151fe8f03569e6
index 2047ee0ac5bcbf47c4d3f1ef3539e8b859146bda..d18b48bb6fa6830512110e5783724a4d7ca609f4 100644 (file)
@@ -1 +1 @@
-823ad40ccb5b51aaa0d5a48da63b465df9d0649a
\ No newline at end of file
+28284ccc0d7301503f6d2d7bee9093738d52e331
\ No newline at end of file
index a057993413a70a30d89f9fd587e64cf318c2f8b7..30990a30f3f0b5bd3988838c2c97a59825327257 100644 (file)
@@ -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 ){
index d0bd55c1db9ca58cb6ae14d48cf2e78ebb0ecb75..371bb1fede6c2a07bc7542357df87b84e47a18db 100644 (file)
@@ -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;
 }
 
 /*
index f256cea45de74aa851572327f2c7a39e96ece57e..8a358dbb2f994d68d1118a3d7f87f4374e01c90c 100644 (file)
@@ -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.
 **
index e967424a290f738aecfdac578e9b87a4c4ae8d7f..6b4d6b9b1ce063b52eb2fb0211d27bbbd34fa55c 100644 (file)
@@ -14,7 +14,7 @@
 */
 
 #include "tcl.h"
-#include <sqlite3.h>
+#include "sqlite3.h"
 #include <assert.h>
 
 /* These functions are implemented in main.c. */
index c63b0a8b7a19bc398e1edb5d523757f2a0973e88..9410a309a6ef180a22953482ea0658841f3bddb2 100644 (file)
 
 #if !defined(SQLITE_TEST) || SQLITE_OS_UNIX
 
-#include <sqlite3.h>
+#include "sqlite3.h"
 
 #include <assert.h>
 #include <string.h>
index 9d19fa0e2c86657b56dc4c8a22cd37e5485c8cbb..7beec664556fdd90a5e02a5b8020f9369cfcecb4 100644 (file)
@@ -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. */
index 936fcad0c56f6bc85809742f6ae1c1eeb8b7d2f1..cac789842d328f30a647dd571aadeba41fb5fe45 100644 (file)
@@ -18,7 +18,7 @@
 **   sqlite3demo_superunlock()
 */
 
-#include <sqlite3.h>
+#include "sqlite3.h"
 #include <string.h>               /* memset(), strlen() */
 #include <assert.h>               /* assert() */
 
index 6e8e1bed5e14854bf0c908e938606757dcca795a..2219d541951f38d8a2029c3b2df7623ea92658ae 100644 (file)
@@ -188,8 +188,10 @@ ifcapable wal {
     execsql { 
       PRAGMA journal_mode = WAL;
       PRAGMA incremental_vacuum(1);
-      PRAGMA wal_checkpoint;
     }
+  } {wal}
+  do_test 4.2.1 {
+    execsql { PRAGMA wal_checkpoint }
     file size test.db-wal
   } [expr {32+2*(512+24)}]