/ Check-in [a87305df]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge changes from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | memjournal-exp
Files: files | file ages | folders
SHA1: a87305dfd49ee17632d0bce66ce7c2e9407b7b3e
User & Date: drh 2016-03-04 13:08:35
Context
2016-03-04
14:23
Update test cases to taken deferred statement-journal opening into account. Closed-Leaf check-in: 5b2fe521 user: drh tags: memjournal-exp
13:08
Merge changes from trunk. check-in: a87305df user: drh tags: memjournal-exp
04:01
Change the default cache_size to -2000 (which means 2000*1024 bytes independent of page_size). check-in: 2682e8e4 user: drh tags: trunk
00:13
Get in-memory subjournals working for builds without SQLITE_ENABLE_ATOMIC_WRITE. check-in: b5378dce user: drh tags: memjournal-exp
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

   372    372     $(TOP)/src/test6.c \
   373    373     $(TOP)/src/test7.c \
   374    374     $(TOP)/src/test8.c \
   375    375     $(TOP)/src/test9.c \
   376    376     $(TOP)/src/test_autoext.c \
   377    377     $(TOP)/src/test_async.c \
   378    378     $(TOP)/src/test_backup.c \
          379  +  $(TOP)/src/test_bestindex.c \
   379    380     $(TOP)/src/test_blob.c \
   380    381     $(TOP)/src/test_btree.c \
   381    382     $(TOP)/src/test_config.c \
   382    383     $(TOP)/src/test_demovfs.c \
   383    384     $(TOP)/src/test_devsym.c \
   384    385     $(TOP)/src/test_fs.c \
   385    386     $(TOP)/src/test_func.c \
................................................................................
  1047   1048   # necessary because the test fixture requires non-API symbols which are
  1048   1049   # hidden when the library is built via the amalgamation).
  1049   1050   #
  1050   1051   TESTFIXTURE_FLAGS  = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
  1051   1052   TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE 
  1052   1053   TESTFIXTURE_FLAGS += -DBUILD_sqlite
  1053   1054   TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
         1055  +TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024
  1054   1056   
  1055   1057   TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlite3.la
  1056   1058   TESTFIXTURE_SRC1 = sqlite3.c
  1057   1059   TESTFIXTURE_SRC = $(TESTSRC) $(TOP)/src/tclsqlite.c
  1058   1060   TESTFIXTURE_SRC += $(TESTFIXTURE_SRC$(USE_AMALGAMATION))
  1059   1061   
  1060   1062   testfixture$(TEXE):	$(TESTFIXTURE_SRC)

Changes to Makefile.msc.

  1232   1232     $(TOP)\src\test6.c \
  1233   1233     $(TOP)\src\test7.c \
  1234   1234     $(TOP)\src\test8.c \
  1235   1235     $(TOP)\src\test9.c \
  1236   1236     $(TOP)\src\test_autoext.c \
  1237   1237     $(TOP)\src\test_async.c \
  1238   1238     $(TOP)\src\test_backup.c \
         1239  +  $(TOP)\src\test_bestindex.c \
  1239   1240     $(TOP)\src\test_blob.c \
  1240   1241     $(TOP)\src\test_btree.c \
  1241   1242     $(TOP)\src\test_config.c \
  1242   1243     $(TOP)\src\test_demovfs.c \
  1243   1244     $(TOP)\src\test_devsym.c \
  1244   1245     $(TOP)\src\test_fs.c \
  1245   1246     $(TOP)\src\test_func.c \
................................................................................
  1922   1923   # necessary because the test fixture requires non-API symbols which are
  1923   1924   # hidden when the library is built via the amalgamation).
  1924   1925   #
  1925   1926   TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
  1926   1927   TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
  1927   1928   TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
  1928   1929   TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
         1930  +TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
  1929   1931   
  1930   1932   TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
  1931   1933   TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
  1932   1934   !IF $(USE_AMALGAMATION)==0
  1933   1935   TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
  1934   1936   !ELSE
  1935   1937   TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)

Changes to config.h.in.

    40     40   #undef HAVE_MALLOC_H
    41     41   
    42     42   /* Define to 1 if you have the `malloc_usable_size' function. */
    43     43   #undef HAVE_MALLOC_USABLE_SIZE
    44     44   
    45     45   /* Define to 1 if you have the <memory.h> header file. */
    46     46   #undef HAVE_MEMORY_H
           47  +
           48  +/* Define to 1 if you have the pread() function. */
           49  +#undef HAVE_PREAD
           50  +
           51  +/* Define to 1 if you have the pread64() function. */
           52  +#undef HAVE_PREAD64
           53  +
           54  +/* Define to 1 if you have the pwrite() function. */
           55  +#undef HAVE_PWRITE
           56  +
           57  +/* Define to 1 if you have the pwrite64() function. */
           58  +#undef HAVE_PWRITE64
    47     59   
    48     60   /* Define to 1 if you have the <stdint.h> header file. */
    49     61   #undef HAVE_STDINT_H
    50     62   
    51     63   /* Define to 1 if you have the <stdlib.h> header file. */
    52     64   #undef HAVE_STDLIB_H
    53     65   

Changes to configure.

 10269  10269   
 10270  10270   done
 10271  10271   
 10272  10272   
 10273  10273   #########
 10274  10274   # Figure out whether or not we have these functions
 10275  10275   #
 10276         -for ac_func in fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime
        10276  +for ac_func in fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64
 10277  10277   do :
 10278  10278     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 10279  10279   ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 10280  10280   if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 10281  10281     cat >>confdefs.h <<_ACEOF
 10282  10282   #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 10283  10283   _ACEOF

Changes to configure.ac.

   104    104   #########
   105    105   # Check for needed/wanted headers
   106    106   AC_CHECK_HEADERS([sys/types.h stdlib.h stdint.h inttypes.h malloc.h])
   107    107   
   108    108   #########
   109    109   # Figure out whether or not we have these functions
   110    110   #
   111         -AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime])
          111  +AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
   112    112   
   113    113   #########
   114    114   # By default, we use the amalgamation (this may be changed below...)
   115    115   #
   116    116   USE_AMALGAMATION=1
   117    117   
   118    118   #########

Changes to main.mk.

   724    724   	$(TCCX) $(TCL_FLAGS) sqlite3_analyzer.c -o $@ $(LIBTCL) $(THREADLIB) 
   725    725   
   726    726   # Rules to build the 'testfixture' application.
   727    727   #
   728    728   TESTFIXTURE_FLAGS  = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
   729    729   TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
   730    730   TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
          731  +TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024
   731    732   
   732    733   testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
   733    734   	$(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS)                  \
   734    735   		$(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c                \
   735    736   		-o testfixture$(EXE) $(LIBTCL) libsqlite3.a $(THREADLIB)
   736    737   
   737    738   amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c

Changes to src/os_unix.c.

    66     66   #if !defined(SQLITE_ENABLE_LOCKING_STYLE)
    67     67   #  if defined(__APPLE__)
    68     68   #    define SQLITE_ENABLE_LOCKING_STYLE 1
    69     69   #  else
    70     70   #    define SQLITE_ENABLE_LOCKING_STYLE 0
    71     71   #  endif
    72     72   #endif
           73  +
           74  +/* Use pread() and pwrite() if they are available */
           75  +#if defined(__APPLE__)
           76  +# define HAVE_PREAD 1
           77  +# define HAVE_PWRITE 1
           78  +#endif
           79  +#if defined(HAVE_PREAD64) && defined(HAVE_PWRITE64)
           80  +# undef USE_PREAD
           81  +# define USE_PREAD64 1
           82  +#elif defined(HAVE_PREAD) && defined(HAVE_PWRITE)
           83  +# undef USE_PREAD64
           84  +# define USE_PREAD 1
           85  +#endif
    73     86   
    74     87   /*
    75     88   ** standard include files.
    76     89   */
    77     90   #include <sys/types.h>
    78     91   #include <sys/stat.h>
    79     92   #include <fcntl.h>

Changes to src/sqliteLimit.h.

    98     98   #endif
    99     99   
   100    100   /*
   101    101   ** The suggested maximum number of in-memory pages to use for
   102    102   ** the main database table and for temporary tables.
   103    103   **
   104    104   ** IMPLEMENTATION-OF: R-31093-59126 The default suggested cache size
   105         -** is 2000 pages.
          105  +** is 2000*1024 bytes.
   106    106   ** IMPLEMENTATION-OF: R-48205-43578 The default suggested cache size can be
   107    107   ** altered using the SQLITE_DEFAULT_CACHE_SIZE compile-time options.
   108    108   */
   109    109   #ifndef SQLITE_DEFAULT_CACHE_SIZE
   110         -# define SQLITE_DEFAULT_CACHE_SIZE  2000
          110  +# define SQLITE_DEFAULT_CACHE_SIZE  -2000
   111    111   #endif
   112    112   
   113    113   /*
   114    114   ** The default number of frames to accumulate in the log file before
   115    115   ** checkpointing the database in WAL mode.
   116    116   */
   117    117   #ifndef SQLITE_DEFAULT_WAL_AUTOCHECKPOINT
   118    118   # define SQLITE_DEFAULT_WAL_AUTOCHECKPOINT  1000
   119    119   #endif
   120    120   
   121    121   /*
   122    122   ** The maximum number of attached databases.  This must be between 0
   123         -** and 62.  The upper bound on 62 is because a 64-bit integer bitmap
   124         -** is used internally to track attached databases.
          123  +** and 125.  The upper bound of 125 is because the attached databases are
          124  +** counted using a signed 8-bit integer which has a maximum value of 127
          125  +** and we have to allow 2 extra counts for the "main" and "temp" databases.
   125    126   */
   126    127   #ifndef SQLITE_MAX_ATTACHED
   127    128   # define SQLITE_MAX_ATTACHED 10
   128    129   #endif
   129    130   
   130    131   
   131    132   /*
................................................................................
   152    153   #define SQLITE_MAX_PAGE_SIZE 65536
   153    154   
   154    155   
   155    156   /*
   156    157   ** The default size of a database page.
   157    158   */
   158    159   #ifndef SQLITE_DEFAULT_PAGE_SIZE
   159         -# define SQLITE_DEFAULT_PAGE_SIZE 1024
          160  +# define SQLITE_DEFAULT_PAGE_SIZE 4096
   160    161   #endif
   161    162   #if SQLITE_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE
   162    163   # undef SQLITE_DEFAULT_PAGE_SIZE
   163    164   # define SQLITE_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE
   164    165   #endif
   165    166   
   166    167   /*