tkt-9d68c883.test 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # 2010 April 10
  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. # This file tests that bug 9d68c883132c8e9ffcd5b0c148c990807b5df1b7
  12. # is fixed.
  13. #
  14. set testdir [file dirname $argv0]
  15. source $testdir/tester.tcl
  16. do_test tkt-9d68c88-1.1 {
  17. execsql {
  18. PRAGMA page_size = 1024;
  19. PRAGMA auto_vacuum = 2;
  20. CREATE TABLE t3(x);
  21. CREATE TABLE t4(x);
  22. CREATE TABLE t5(x);
  23. INSERT INTO t5 VALUES(randomblob(1500));
  24. CREATE TABLE t7(x);
  25. CREATE TABLE t8(x);
  26. }
  27. } {}
  28. for {set i 0} {$i < 100} {incr i} {
  29. db close
  30. sqlite3_simulate_device -sectorsize 8192
  31. sqlite3 db test.db -vfs devsym
  32. do_test tkt-9d68c88-2.$i {
  33. execsql {
  34. BEGIN;
  35. DELETE FROM t5;
  36. INSERT INTO t8 VALUES('hello world');
  37. }
  38. sqlite3_memdebug_fail $i -repeat 0
  39. catchsql { DROP TABLE t7; }
  40. sqlite3_memdebug_fail -1
  41. catchsql { ROLLBACK }
  42. execsql { PRAGMA integrity_check }
  43. } {ok}
  44. }
  45. finish_test