/ Check-in [96453ca1]
Login

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

Overview
Comment:Minor changes to get memsys5 compiling and its tests passing. Ticket #3495. (CVS 5901)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 96453ca16e90bc0c0cbfb75b3e39899f56d6ea66
User & Date: danielk1977 2008-11-13 16:21:50
Context
2008-11-13
18:00
Avoid committing a transaction from within the xSync() method of a virtual table. Fix for #3497. (CVS 5902) check-in: eabb8b75 user: danielk1977 tags: trunk
16:21
Minor changes to get memsys5 compiling and its tests passing. Ticket #3495. (CVS 5901) check-in: 96453ca1 user: danielk1977 tags: trunk
14:42
Update mksqlite3c.tcl to include new file pcache1.c. (CVS 5900) check-in: 00442e0f user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/mem5.c.

    19     19   ** implementations. Once sqlite3_initialize() has been called,
    20     20   ** the amount of memory available to SQLite is fixed and cannot
    21     21   ** be changed.
    22     22   **
    23     23   ** This version of the memory allocation subsystem is included
    24     24   ** in the build only if SQLITE_ENABLE_MEMSYS5 is defined.
    25     25   **
    26         -** $Id: mem5.c,v 1.15 2008/10/28 18:58:20 drh Exp $
           26  +** $Id: mem5.c,v 1.16 2008/11/13 16:21:50 danielk1977 Exp $
    27     27   */
    28     28   #include "sqliteInt.h"
    29     29   
    30     30   /*
    31     31   ** This version of the memory allocator is used only when 
    32     32   ** SQLITE_ENABLE_MEMSYS5 is defined.
    33     33   */
................................................................................
   209    209     /* Keep track of the maximum allocation request.  Even unfulfilled
   210    210     ** requests are counted */
   211    211     if( nByte>mem5.maxRequest ){
   212    212       mem5.maxRequest = nByte;
   213    213     }
   214    214   
   215    215     /* Round nByte up to the next valid power of two */
   216         -  if( nByte>POW2_MAX ) return 0;
   217    216     for(iFullSz=mem5.nAtom, iLogsize=0; iFullSz<nByte; iFullSz *= 2, iLogsize++){}
   218    217   
   219    218     /* Make sure mem5.aiFreelist[iLogsize] contains at least one free
   220    219     ** block.  If not, then split a block of the next larger power of
   221    220     ** two in order to create a new free block of size iLogsize.
   222    221     */
   223    222     for(iBin=iLogsize; mem5.aiFreelist[iBin]<0 && iBin<=LOGMAX; iBin++){}

Changes to test/pcache2.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   # This file is focused on testing the pcache module.
    13     13   #
    14         -# $Id: pcache2.test,v 1.2 2008/10/14 19:21:52 danielk1977 Exp $
           14  +# $Id: pcache2.test,v 1.3 2008/11/13 16:21:50 danielk1977 Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   
    20     20   # Set up a pcache memory pool so that we can easily track how many
    21     21   # pages are being used for cache.
    22     22   #
    23     23   do_test pcache2-1.1 {
    24     24     db close
           25  +  sqlite3_reset_auto_extension
    25     26     sqlite3_shutdown
    26     27     sqlite3_config_pagecache 6000 100
    27     28     sqlite3_initialize
           29  +  autoinstall_test_functions
    28     30     sqlite3_status SQLITE_STATUS_PAGECACHE_USED 1
    29     31     sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0
    30     32   } {0 0 0}
    31     33   
    32     34   # Open up two database connections to separate files.
    33     35   #
    34     36   do_test pcache2-1.2 {
................................................................................
    64     66        INSERT INTO t1 SELECT x+1000, y FROM t2;
    65     67     }
    66     68     sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0
    67     69   } {0 13 13}
    68     70   
    69     71   db close
    70     72   catch {db2 close}
           73  +sqlite3_reset_auto_extension
    71     74   sqlite3_shutdown
    72     75   sqlite3_config_pagecache 0 0
           76  +sqlite3_initialize
           77  +autoinstall_test_functions
           78  +
    73     79   finish_test

Changes to test/permutations.test.

     5      5   #
     6      6   #    May you do good and not evil.
     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12         -# $Id: permutations.test,v 1.37 2008/11/10 18:05:36 shane Exp $
           12  +# $Id: permutations.test,v 1.38 2008/11/13 16:21:50 danielk1977 Exp $
    13     13   
    14     14   set testdir [file dirname $argv0]
    15     15   source $testdir/tester.tcl
    16     16   
    17     17   # Argument processing.
    18     18   #
    19     19   #puts "PERM-DEBUG: argv=$argv"
................................................................................
   501    501       Run tests using the allocator in mem5.c.
   502    502     } -exclude {
   503    503       autovacuum.test           delete3.test              manydb.test
   504    504       bigrow.test               incrblob2.test            memdb.test
   505    505       bitvec.test               index2.test               memsubsys1.test
   506    506       capi3c.test               ioerr.test                memsubsys2.test
   507    507       capi3.test                join3.test                pagesize.test
   508         -    collate5.test             limit.test
          508  +    collate5.test             limit.test                zeroblob.test
   509    509     } -initialize {
   510    510       catch {db close}
   511    511       sqlite3_reset_auto_extension
   512    512       sqlite3_shutdown
   513    513       sqlite3_config_heap 25000000 64
   514    514       sqlite3_config_lookaside 0 0
   515    515       install_malloc_faultsim 1