1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Ensure the required VerifyCookie/Transaction/TableLock opcodes are added for "x

IN (SELECT c FROM t)" expressions. Ticket #3771. (CVS 6439)

FossilOrigin-Name: 058a2f20930d7707c03c3c27db8e761d5657ee46
This commit is contained in:
danielk1977
2009-04-02 17:23:32 +00:00
parent de46798569
commit e1fb65a0b8
4 changed files with 45 additions and 22 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the SELECT statement.
#
# $Id: select1.test,v 1.65 2008/08/04 03:51:24 danielk1977 Exp $
# $Id: select1.test,v 1.66 2009/04/02 17:23:33 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -1041,4 +1041,24 @@ do_test select1-14.2 {
}
} {0}
# Check that ticket #3771 has been fixed.
#
do_test select1-15.1 {
execsql {
CREATE TABLE t1(a);
CREATE INDEX i1 ON t1(a);
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(3);
}
} {}
do_test select1-15.2 {
sqlite3 db2 test.db
execsql { DROP INDEX i1 } db2
db2 close
} {}
do_test select1-15.3 {
execsql { SELECT 2 IN (SELECT a FROM t1) }
} {1}
finish_test