tkt2285.test 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # 2005 September 17
  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 implements regression tests for SQLite library. Specifically.
  12. # it contains tests to verify that ticket #2285 has been fixed.
  13. #
  14. # $Id: tkt2285.test,v 1.2 2008/07/12 14:52:20 drh Exp $
  15. set testdir [file dirname $argv0]
  16. source $testdir/tester.tcl
  17. ifcapable !tempdb {
  18. finish_test
  19. return
  20. }
  21. do_test tkt2285-1.1 {
  22. execsql {
  23. PRAGMA locking_mode = EXCLUSIVE;
  24. }
  25. execsql {
  26. BEGIN;
  27. CREATE TABLE abc(a, b, c);
  28. ROLLBACK;
  29. }
  30. } {}
  31. do_test tkt2285-1.2 {
  32. execsql {
  33. SELECT * FROM sqlite_master;
  34. }
  35. } {}
  36. ifcapable tempdb {
  37. do_test tkt2285-2.1 {
  38. execsql {
  39. BEGIN;
  40. CREATE TEMP TABLE abc(a, b, c);
  41. ROLLBACK;
  42. }
  43. } {}
  44. do_test tkt2285-2.2 {
  45. execsql {
  46. SELECT * FROM sqlite_temp_master;
  47. }
  48. } {}
  49. }
  50. finish_test