tkt3761.test 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # 2009 March 30
  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. # Ticket #3761: Make sure that an incremental vacuum on an in-memory
  13. # database can be rolled back.
  14. #
  15. # $Id: tkt3761.test,v 1.1 2009/03/31 02:54:40 drh Exp $
  16. set testdir [file dirname $argv0]
  17. source $testdir/tester.tcl
  18. do_test tkt3761-1.1 {
  19. db close
  20. sqlite3 db :memory:
  21. db eval {
  22. PRAGMA auto_vacuum=INCREMENTAL;
  23. CREATE TABLE t1(x);
  24. INSERT INTO t1 VALUES(zeroblob(900));
  25. INSERT INTO t1 VALUES(zeroblob(900));
  26. INSERT INTO t1 SELECT x FROM t1;
  27. INSERT INTO t1 SELECT x FROM t1;
  28. INSERT INTO t1 SELECT x FROM t1;
  29. INSERT INTO t1 SELECT x FROM t1;
  30. BEGIN;
  31. DELETE FROM t1 WHERE rowid%2;
  32. PRAGMA incremental_vacuum(4);
  33. ROLLBACK;
  34. }
  35. db eval {PRAGMA integrity_check}
  36. } {ok}
  37. finish_test