1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/tkt2285.test Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,56 @@
1.4 +# 2005 September 17
1.5 +#
1.6 +# The author disclaims copyright to this source code. In place of
1.7 +# a legal notice, here is a blessing:
1.8 +#
1.9 +# May you do good and not evil.
1.10 +# May you find forgiveness for yourself and forgive others.
1.11 +# May you share freely, never taking more than you give.
1.12 +#
1.13 +#***********************************************************************
1.14 +# This file implements regression tests for SQLite library. Specifically.
1.15 +# it contains tests to verify that ticket #2285 has been fixed.
1.16 +#
1.17 +# $Id: tkt2285.test,v 1.2 2008/07/12 14:52:20 drh Exp $
1.18 +
1.19 +set testdir [file dirname $argv0]
1.20 +source $testdir/tester.tcl
1.21 +
1.22 +ifcapable !tempdb {
1.23 + finish_test
1.24 + return
1.25 +}
1.26 +
1.27 +do_test tkt2285-1.1 {
1.28 + execsql {
1.29 + PRAGMA locking_mode = EXCLUSIVE;
1.30 + }
1.31 + execsql {
1.32 + BEGIN;
1.33 + CREATE TABLE abc(a, b, c);
1.34 + ROLLBACK;
1.35 + }
1.36 +} {}
1.37 +
1.38 +do_test tkt2285-1.2 {
1.39 + execsql {
1.40 + SELECT * FROM sqlite_master;
1.41 + }
1.42 +} {}
1.43 +
1.44 +ifcapable tempdb {
1.45 + do_test tkt2285-2.1 {
1.46 + execsql {
1.47 + BEGIN;
1.48 + CREATE TEMP TABLE abc(a, b, c);
1.49 + ROLLBACK;
1.50 + }
1.51 + } {}
1.52 + do_test tkt2285-2.2 {
1.53 + execsql {
1.54 + SELECT * FROM sqlite_temp_master;
1.55 + }
1.56 + } {}
1.57 +}
1.58 +
1.59 +finish_test