/ Check-in [1abf784f]
Login

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

Overview
Comment:Add some tests to verify that the parameter to the incremental_vacuum pragma is working. It is. (CVS 4039)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1abf784fe27cdc61b6b944b79d024ea98eb5289e
User & Date: danielk1977 2007-05-24 10:18:22
Context
2007-05-29
12:11
Consider explicit collate clauses when matching WHERE constraints to indices. Fix for #2391. (CVS 4040) check-in: f9a95e92 user: danielk1977 tags: trunk
2007-05-24
10:18
Add some tests to verify that the parameter to the incremental_vacuum pragma is working. It is. (CVS 4039) check-in: 1abf784f user: danielk1977 tags: trunk
09:44
Fix a typo in comments in sqlite.h.in. No code changes. Ticket #2384. (CVS 4038) check-in: e8ae6214 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/incrvacuum.test.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
494
495
496
497
498
499
500
501























































502
503
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this file is testing the incremental vacuum feature.
#
# Note: There are also some tests for incremental vacuum and IO 
# errors in incrvacuum_ioerr.test.
#
# $Id: incrvacuum.test,v 1.9 2007/05/24 07:22:42 danielk1977 Exp $

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

# If this build of the library does not support auto-vacuum, omit this
# whole file.
ifcapable {!autovacuum || !pragma} {
................................................................................
    BEGIN;
    UPDATE t1 SET a = a, b = b, c = c;
    DROP TABLE t2;
    PRAGMA incremental_vacuum(10);
    ROLLBACK;
  }
} {}
























































finish_test








|







 








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this file is testing the incremental vacuum feature.
#
# Note: There are also some tests for incremental vacuum and IO 
# errors in incrvacuum_ioerr.test.
#
# $Id: incrvacuum.test,v 1.10 2007/05/24 10:18:22 danielk1977 Exp $

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

# If this build of the library does not support auto-vacuum, omit this
# whole file.
ifcapable {!autovacuum || !pragma} {
................................................................................
    BEGIN;
    UPDATE t1 SET a = a, b = b, c = c;
    DROP TABLE t2;
    PRAGMA incremental_vacuum(10);
    ROLLBACK;
  }
} {}

#---------------------------------------------------------------------
# Test that the parameter to the incremental_vacuum pragma works. That
# is, if the user executes "PRAGMA incremental_vacuum(N)", at most
# N pages are vacuumed.
#
do_test incrvacuum-10.1 {
  execsql {
    DROP TABLE t1;
    DROP TABLE t2;
  }
  expr [file size test.db] / 1024
} {29}

do_test incrvacuum-10.2 {
  execsql {
    PRAGMA incremental_vacuum(1);
  }
  expr [file size test.db] / 1024
} {28}

do_test incrvacuum-10.3 {
  execsql {
    PRAGMA incremental_vacuum(5);
  }
  expr [file size test.db] / 1024
} {23}

do_test incrvacuum-10.4 {
  execsql {
    PRAGMA incremental_vacuum('1');
  }
  expr [file size test.db] / 1024
} {22}

do_test incrvacuum-10.5 {
  execsql {
    PRAGMA incremental_vacuum("3");
  }
  expr [file size test.db] / 1024
} {19}

do_test incrvacuum-10.6 {
  execsql {
    PRAGMA incremental_vacuum = 1;
  }
  expr [file size test.db] / 1024
} {18}

do_test incrvacuum-10.7 {
  execsql {
    PRAGMA incremental_vacuum(0);
  }
  expr [file size test.db] / 1024
} {1}

finish_test