Files
sqlite/test/misc4.test
T
drh 5f6a87b3dd When comparing two expressions do not apply affinity to either operand.
Ticket #805. (CVS 1810)

FossilOrigin-Name: 88a4e400f916d7af088b39a9653d6452b3666577
2004-07-19 00:39:45 +00:00

47 lines
1.2 KiB
Plaintext

# 2004 Jun 27
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests for miscellanous features that were
# left out of other test files.
#
# $Id: misc4.test,v 1.2 2004/07/19 00:39:46 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
# Prepare a statement that will create a temporary table. Then do
# a rollback. Then try to execute the prepared statement.
#
do_test misc4-1.1 {
db close
set DB [sqlite3 db test.db]
execsql {
CREATE TABLE t1(x);
INSERT INTO t1 VALUES(1);
}
set sql {CREATE TEMP TABLE t2 AS SELECT * FROM t1}
set stmt [sqlite3_prepare $DB $sql -1 TAIL]
execsql {
BEGIN;
CREATE TABLE t3(a,b,c);
INSERT INTO t1 SELECT * FROM t1;
ROLLBACK;
}
sqlite3_step $stmt
execsql {
SELECT * FROM temp.t2;
}
} {1}
catch {sqlite3_finalize $stmt}
finish_test