tkt-5e10420e8d.test 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # 2010 August 23
  2. #
  3. # The author disclaims copyright to this source code. In place of
  4. # a legal notice, here is a blessing:
  5. #
  6. # May you do good and not evil.
  7. # May you find forgiveness for yourself and forgive others.
  8. # May you share freely, never taking more than you give.
  9. #
  10. #***********************************************************************
  11. #
  12. set testdir [file dirname $argv0]
  13. source $testdir/tester.tcl
  14. do_execsql_test tkt-5e10420e8d.1 {
  15. PRAGMA page_size = 1024;
  16. PRAGMA auto_vacuum = incremental;
  17. CREATE TABLE t1(x);
  18. CREATE TABLE t2(x);
  19. CREATE TABLE t3(x);
  20. } {}
  21. do_execsql_test tkt-5e10420e8d.2 {
  22. INSERT INTO t3 VALUES(randomblob(500 + 1024*248));
  23. INSERT INTO t1 VALUES(randomblob(1500));
  24. INSERT INTO t2 VALUES(randomblob(500 + 1024*248));
  25. DELETE FROM t3;
  26. DELETE FROM t2;
  27. DELETE FROM t1;
  28. } {}
  29. do_execsql_test tkt-5e10420e8d.3 {
  30. PRAGMA incremental_vacuum(248)
  31. } {}
  32. do_execsql_test tkt-5e10420e8d.4 {
  33. PRAGMA incremental_vacuum(1)
  34. } {}
  35. db close
  36. sqlite3 db test.db
  37. do_execsql_test tkt-5e10420e8d.5 {
  38. PRAGMA integrity_check;
  39. } {ok}
  40. finish_test