SQLite

Check-in [7dd9d4c15b]
Login

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

Overview
Comment:Add extra tests to temptable2.test.
Downloads: Tarball | ZIP 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.527
Context
2016-04-11
18:50
Merge latest trunk changes with this branch. (check-in: ffc62af1d5 user: dan tags: tempfiles-lazy-open)
18:49
Add extra tests to temptable2.test. (check-in: 7dd9d4c15b user: dan tags: tempfiles-lazy-open)
18:07
Fixes for OOM and IO error handling with temp file databases. (check-in: 4eb06e843a user: dan tags: tempfiles-lazy-open)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/temptable2.test.
264
265
266
267
268
269
270





































271
272
273
do_test 8.6 {
  sqlite3_backup B tmp main db main
  B step 1000
  B finish
} {SQLITE_READONLY}

tmp close






































finish_test








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



264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
do_test 8.6 {
  sqlite3_backup B tmp main db main
  B step 1000
  B finish
} {SQLITE_READONLY}

tmp close

#-------------------------------------------------------------------------
# Try inserts and deletes with a large db in auto-vacuum mode. Check
#
reset_db
do_execsql_test 9.1 {
  PRAGMA cache_size = 15;
  CREATE TABLE tx(a, b);
  CREATE INDEX i1 ON tx(a);
  CREATE INDEX i2 ON tx(b);

  WITH x(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM x WHERE i<1000 )
  INSERT INTO tx SELECT randomblob(100), randomblob(100) FROM x;
}
for {set i 2} {$i<20} {incr i} {

  do_execsql_test 9.$i.1 { DELETE FROM tx WHERE (random()%3)==0 }

  do_execsql_test 9.$i.2 { PRAGMA integrity_check } ok

  do_execsql_test 9.$i.3 { 
    WITH x(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM x WHERE i<400 )
      INSERT INTO tx SELECT randomblob(100), randomblob(100) FROM x;
  }

  do_execsql_test 9.$i.4 { PRAGMA integrity_check } ok

  do_execsql_test 9.$i.5 { 
    BEGIN;
      DELETE FROM tx WHERE (random()%3)==0;
      WITH x(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM x WHERE i<500 )
        INSERT INTO tx SELECT randomblob(100), randomblob(100) FROM x;
    COMMIT;
  }

  do_execsql_test 9.$i.6 { PRAGMA integrity_check } ok
}

finish_test