/ Check-in [05807c41]
Login

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

Overview
Comment:Merge the 3.8.6 release into the threads branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | threads
Files: files | file ages | folders
SHA1:05807c4122505567ec64fb2d142077f48a0a10b1
User & Date: drh 2014-08-15 15:46:21
Context
2014-08-25
13:27
Merge the recent performance enhancements implemented on trunk into the threads branch. check-in: dfdc900f user: drh tags: threads
2014-08-15
15:46
Merge the 3.8.6 release into the threads branch. check-in: 05807c41 user: drh tags: threads
11:46
Version 3.8.6 check-in: 9491ba7d user: drh tags: trunk, release, version-3.8.6
2014-08-14
14:02
Merge the pre-3.8.6 changes into the threads branch. check-in: a608fd1d user: drh tags: threads
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  5740   5740     int cellOffset;   /* Address of first cell pointer in data[] */
  5741   5741     u8 *data;         /* The content of the whole page */
  5742   5742     int nSkip = (iChild ? 4 : 0);
  5743   5743   
  5744   5744     if( *pRC ) return;
  5745   5745   
  5746   5746     assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
  5747         -  assert( pPage->nCell<=MX_CELL(pPage->pBt) && MX_CELL(pPage->pBt)<=10921 );
         5747  +  assert( MX_CELL(pPage->pBt)<=10921 );
         5748  +  assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
  5748   5749     assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) );
  5749   5750     assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) );
  5750   5751     assert( sqlite3_mutex_held(pPage->pBt->mutex) );
  5751   5752     /* The cell should normally be sized correctly.  However, when moving a
  5752   5753     ** malformed cell from a leaf page to an interior page, if the cell size
  5753   5754     ** wanted to be less than 4 but got rounded up to 4 on the leaf, then size
  5754   5755     ** might be less than 8 (leaf-size + pointer) on the interior node.  Hence

Changes to test/corruptI.test.

    71     71     catchsql { SELECT * FROM r WHERE x >= 10.0 }
    72     72   } {1 {database disk image is malformed}}
    73     73   
    74     74   do_test 2.2 {
    75     75     catchsql { SELECT * FROM r WHERE x >= 10 }
    76     76   } {1 {database disk image is malformed}}
    77     77   
           78  +reset_db
           79  +
           80  +do_execsql_test 3.1 {
           81  +  PRAGMA page_size = 512;
           82  +  CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
           83  +  WITH s(a, b) AS (
           84  +    SELECT 2, 'abcdefghij'
           85  +    UNION ALL
           86  +    SELECT a+2, b FROM s WHERe a < 40
           87  +  )
           88  +  INSERT INTO t1 SELECT * FROM s;
           89  +} {}
           90  +
           91  +do_test 3.2 {
           92  +  hexio_write test.db [expr 512+3] 0054
           93  +  db close
           94  +  sqlite3 db test.db
           95  +  execsql { INSERT INTO t1 VALUES(5, 'klmnopqrst') }
           96  +  execsql { INSERT INTO t1 VALUES(7, 'klmnopqrst') }
           97  +} {}
           98  +
           99  +db close
          100  +sqlite3 db test.db
          101  +do_catchsql_test 3.2 {
          102  +  INSERT INTO t1 VALUES(9, 'klmnopqrst');
          103  +} {1 {database disk image is malformed}}
    78    104   
    79    105   finish_test