diff options
author | Jan Mercl <0xjnml@gmail.com> | 2020-07-26 22:36:18 +0200 |
---|---|---|
committer | Jan Mercl <0xjnml@gmail.com> | 2020-07-26 22:36:18 +0200 |
commit | b406626c64313ae348996c243a0a05d3f6ed2c3c (patch) | |
tree | 0eaae4fa6348b150568725e6f2ec0b4c4203b5f8 /testdata/tcl/tkt2817.test | |
parent | d8d9f40ce80062793349c0ea47520b6878312f4a (diff) |
release v1.4.0-beta1v1.4.0-beta1
Diffstat (limited to 'testdata/tcl/tkt2817.test')
-rw-r--r-- | testdata/tcl/tkt2817.test | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/testdata/tcl/tkt2817.test b/testdata/tcl/tkt2817.test new file mode 100644 index 0000000..579cf2f --- /dev/null +++ b/testdata/tcl/tkt2817.test @@ -0,0 +1,72 @@ +# 2007 December 02 +# +# 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. +# +# Specifically, it tests that bug 2817 is fixed. +# +# $Id: tkt2817.test,v 1.2 2008/07/12 14:52:21 drh Exp $ + +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +do_test tkt2817-1.0 { + execsql { + CREATE TEMP TABLE tbl(a, b, c); + -- INSERT INTO tbl VALUES(1, 'abc', 'def'); + -- INSERT INTO tbl VALUES(2, 'ghi', 'jkl'); + } +} {} +do_test tkt2817-1.1 { + execsql { + CREATE TABLE main.tbl(a, b, c); + CREATE INDEX main.tbli ON tbl(a, b, c); + INSERT INTO main.tbl SELECT a, b, c FROM temp.tbl; + } +} {} + +# When bug #2817 existed, this test was failing. +# +integrity_check tkt2817-1.2 + +# So was this one. +# +db close +sqlite3 db test.db +integrity_check tkt2817-1.3 + + +# These tests - tkt2817-2.* - are the same as the previous block, except +# for the fact that the temp-table and the main table do not share the +# same name. #2817 did not cause a problem with these tests. +# +db close +forcedelete test.db +sqlite3 db test.db +do_test tkt2817-2.0 { + execsql { + CREATE TEMP TABLE tmp(a, b, c); + INSERT INTO tmp VALUES(1, 'abc', 'def'); + INSERT INTO tmp VALUES(2, 'ghi', 'jkl'); + } +} {} +do_test tkt2817-2.1 { + execsql { + CREATE TABLE main.tbl(a, b, c); + CREATE INDEX main.tbli ON tbl(a, b, c); + INSERT INTO main.tbl SELECT a, b, c FROM temp.tmp; + } +} {} +integrity_check tkt2817-2.2 +db close +sqlite3 db test.db +integrity_check tkt2817-2.3 + +finish_test |