SQLite

Check-in [ce624e39c2]
Login

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

Overview
Comment:Merge in the fix for VACUUM on auto_vacuumed databases with large schemas. Check-in [86d50ce57f]. Ticket [da1151f97df].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | branch-3.6.22
Files: files | file ages | folders
SHA1: ce624e39c2f7c5480937a8d2007e7ebd684665dc
User & Date: drh 2010-02-25 01:54:07.000
Context
2010-02-25
02:04
Enhance integrity_check to detect out-of-order rowids. This is a cherrypick merge of check-in [cae47c5b09]. (check-in: ecd22ef34d user: drh tags: branch-3.6.22)
01:54
Merge in the fix for VACUUM on auto_vacuumed databases with large schemas. Check-in [86d50ce57f]. Ticket [da1151f97df]. (check-in: ce624e39c2 user: drh tags: branch-3.6.22)
01:47
Start a new branch for release 3.6.22 plus limited enhancements and fixes. This first check-in includes the performance enhancements of check-ins [26cb1df735], [61a2c8d4d6], and [27dc5b1c52] (check-in: 9588259882 user: drh tags: branch-3.6.22)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/pager.c.
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
    }

    rc = sqlite3PagerPagecount(pPager, &nMax);
    if( rc!=SQLITE_OK ){
      goto pager_acquire_err;
    }

    if( MEMDB || nMax<(int)pgno || noContent ){
      if( pgno>pPager->mxPgno ){
	rc = SQLITE_FULL;
	goto pager_acquire_err;
      }
      if( noContent ){
        /* Failure to set the bits in the InJournal bit-vectors is benign.
        ** It merely means that we might do some extra work to journal a 







|







3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
    }

    rc = sqlite3PagerPagecount(pPager, &nMax);
    if( rc!=SQLITE_OK ){
      goto pager_acquire_err;
    }

    if( MEMDB || nMax<(int)pgno || noContent || !isOpen(pPager->fd) ){
      if( pgno>pPager->mxPgno ){
	rc = SQLITE_FULL;
	goto pager_acquire_err;
      }
      if( noContent ){
        /* Failure to set the bits in the InJournal bit-vectors is benign.
        ** It merely means that we might do some extra work to journal a 
Added test/vacuum4.test.






































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 2010 February 21
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# 
# This file implements a test of ticket [da1151f97df244a1]:  An
# assertion fault while VACUUMing an auto_vacuumed database with
# large schema.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# If the VACUUM statement is disabled in the current build, skip all
# the tests in this file.
#
ifcapable !vacuum {
  finish_test
  return
}

do_test vacuum4-1.1 {
  db eval {
    PRAGMA auto_vacuum=FULL;
    CREATE TABLE t1(
      c000, c001, c002, c003, c004, c005, c006, c007, c008, c009,
      c010, c011, c012, c013, c014, c015, c016, c017, c018, c019,
      c020, c021, c022, c023, c024, c025, c026, c027, c028, c029,
      c030, c031, c032, c033, c034, c035, c036, c037, c038, c039,
      c040, c041, c042, c043, c044, c045, c046, c047, c048, c049,
      c050, c051, c052, c053, c054, c055, c056, c057, c058, c059,
      c060, c061, c062, c063, c064, c065, c066, c067, c068, c069,
      c070, c071, c072, c073, c074, c075, c076, c077, c078, c079,
      c080, c081, c082, c083, c084, c085, c086, c087, c088, c089,
      c090, c091, c092, c093, c094, c095, c096, c097, c098, c099,
      c100, c101, c102, c103, c104, c105, c106, c107, c108, c109,
      c110, c111, c112, c113, c114, c115, c116, c117, c118, c119,
      c120, c121, c122, c123, c124, c125, c126, c127, c128, c129,
      c130, c131, c132, c133, c134, c135, c136, c137, c138, c139,
      c140, c141, c142, c143, c144, c145, c146, c147, c148, c149
    );
    CREATE TABLE t2(
      c000, c001, c002, c003, c004, c005, c006, c007, c008, c009,
      c010, c011, c012, c013, c014, c015, c016, c017, c018, c019,
      c020, c021, c022, c023, c024, c025, c026, c027, c028, c029,
      c030, c031, c032, c033, c034, c035, c036, c037, c038, c039,
      c040, c041, c042, c043, c044, c045, c046, c047, c048, c049,
      c050, c051, c052, c053, c054, c055, c056, c057, c058, c059,
      c060, c061, c062, c063, c064, c065, c066, c067, c068, c069,
      c070, c071, c072, c073, c074, c075, c076, c077, c078, c079,
      c080, c081, c082, c083, c084, c085, c086, c087, c088, c089,
      c090, c091, c092, c093, c094, c095, c096, c097, c098, c099,
      c100, c101, c102, c103, c104, c105, c106, c107, c108, c109,
      c110, c111, c112, c113, c114, c115, c116, c117, c118, c119,
      c120, c121, c122, c123, c124, c125, c126, c127, c128, c129,
      c130, c131, c132, c133, c134, c135, c136, c137, c138, c139,
      c140, c141, c142, c143, c144, c145, c146, c147, c148, c149
    );
    VACUUM;
  }
} {}