/ Check-in [7dd9d4c1]
Login

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

Overview
Comment:Add extra tests to temptable2.test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tempfiles-lazy-open
Files: files | file ages | folders
SHA1:7dd9d4c15bb6b6ef9127dc7c80a189c55e714dc9
User & Date: dan 2016-04-11 18:49:37
Context
2016-04-11
18:50
Merge latest trunk changes with this branch. check-in: ffc62af1 user: dan tags: tempfiles-lazy-open
18:49
Add extra tests to temptable2.test. check-in: 7dd9d4c1 user: dan tags: tempfiles-lazy-open
18:07
Fixes for OOM and IO error handling with temp file databases. check-in: 4eb06e84 user: dan tags: tempfiles-lazy-open
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/temptable2.test.

   264    264   do_test 8.6 {
   265    265     sqlite3_backup B tmp main db main
   266    266     B step 1000
   267    267     B finish
   268    268   } {SQLITE_READONLY}
   269    269   
   270    270   tmp close
          271  +
          272  +#-------------------------------------------------------------------------
          273  +# Try inserts and deletes with a large db in auto-vacuum mode. Check
          274  +#
          275  +reset_db
          276  +do_execsql_test 9.1 {
          277  +  PRAGMA cache_size = 15;
          278  +  CREATE TABLE tx(a, b);
          279  +  CREATE INDEX i1 ON tx(a);
          280  +  CREATE INDEX i2 ON tx(b);
          281  +
          282  +  WITH x(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM x WHERE i<1000 )
          283  +  INSERT INTO tx SELECT randomblob(100), randomblob(100) FROM x;
          284  +}
          285  +for {set i 2} {$i<20} {incr i} {
          286  +
          287  +  do_execsql_test 9.$i.1 { DELETE FROM tx WHERE (random()%3)==0 }
          288  +
          289  +  do_execsql_test 9.$i.2 { PRAGMA integrity_check } ok
          290  +
          291  +  do_execsql_test 9.$i.3 { 
          292  +    WITH x(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM x WHERE i<400 )
          293  +      INSERT INTO tx SELECT randomblob(100), randomblob(100) FROM x;
          294  +  }
          295  +
          296  +  do_execsql_test 9.$i.4 { PRAGMA integrity_check } ok
          297  +
          298  +  do_execsql_test 9.$i.5 { 
          299  +    BEGIN;
          300  +      DELETE FROM tx WHERE (random()%3)==0;
          301  +      WITH x(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM x WHERE i<500 )
          302  +        INSERT INTO tx SELECT randomblob(100), randomblob(100) FROM x;
          303  +    COMMIT;
          304  +  }
          305  +
          306  +  do_execsql_test 9.$i.6 { PRAGMA integrity_check } ok
          307  +}
   271    308   
   272    309   finish_test
   273    310