/ Check-in [c1aca18f]
Login

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

Overview
Comment:Coverage testing for a few lines in pager.c. (CVS 3770)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c1aca18fad35be60066a08f5bd09772d24375af6
User & Date: danielk1977 2007-03-30 18:21:53
Context
2007-03-30
18:42
Fix a memory leak in multi-database commit. Also enhance a comment that explains why a particular valgrind error is harmless. (CVS 3771) check-in: 28c7ed1e user: drh tags: trunk
18:21
Coverage testing for a few lines in pager.c. (CVS 3770) check-in: c1aca18f user: danielk1977 tags: trunk
17:18
Remove asserts on the existing of journal files in pager - asserts that are not valid for certain kinds of simulated I/O errors or for async I/O. (CVS 3769) check-in: f5fad52a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/misc7.test.

     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   # This file implements regression tests for SQLite library.
    12     12   #
    13         -# $Id: misc7.test,v 1.7 2007/03/30 17:11:13 danielk1977 Exp $
           13  +# $Id: misc7.test,v 1.8 2007/03/30 18:21:53 danielk1977 Exp $
    14     14   
    15     15   set testdir [file dirname $argv0]
    16     16   source $testdir/tester.tcl
    17     17   
    18     18   do_test misc7-1 {
    19     19     c_misuse_test
    20     20   } {}
................................................................................
   243    243     } {0 0 {TABLE abc AS t2 USING PRIMARY KEY}}
   244    244     do_test misc7-15 {
   245    245       execsql {
   246    246         EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 WHERE a = 1;
   247    247       }
   248    248     } {0 0 {TABLE abc AS t2 WITH INDEX sqlite_autoindex_abc_1}}
   249    249   }
          250  +
          251  +db close
          252  +file delete -force test.db
          253  +file delete -force test.db-journal
          254  +sqlite3 db test.db
          255  +
          256  +#--------------------------------------------------------------------
          257  +# This is all to force the pager_remove_from_stmt_list() function
          258  +# (inside pager.c) to remove a pager from the middle of the
          259  +# statement-list.
          260  +#
          261  +do_test misc7-15.1 {
          262  +  execsql {
          263  +    PRAGMA cache_size = 10;
          264  +    BEGIN;
          265  +    CREATE TABLE abc(a PRIMARY KEY, b, c);
          266  +    INSERT INTO abc 
          267  +    VALUES(randstr(100,100), randstr(100,100), randstr(100,100));
          268  +    INSERT INTO abc SELECT 
          269  +            randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
          270  +    INSERT INTO abc SELECT 
          271  +            randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
          272  +    INSERT INTO abc SELECT 
          273  +            randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
          274  +    INSERT INTO abc SELECT 
          275  +            randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
          276  +    INSERT INTO abc SELECT 
          277  +            randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
          278  +    INSERT INTO abc SELECT 
          279  +            randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
          280  +    INSERT INTO abc SELECT 
          281  +            randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
          282  +    INSERT INTO abc SELECT 
          283  +            randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
          284  +    COMMIT;
          285  +  }
          286  +  expr {[file size test.db]>10240}
          287  +} {1}
          288  +do_test misc7-15.2 {
          289  +  execsql {
          290  +    DELETE FROM abc WHERE rowid > 12;
          291  +    INSERT INTO abc SELECT 
          292  +            randstr(100,100), randstr(100,100), randstr(100,100) FROM abc;
          293  +  }
          294  +} {}
          295  +
          296  +
          297  +
   250    298   
   251    299   finish_test