Do not segfault after a parse error in a sub-select in a statement of the form "DELETE WHERE ... IN(sub-select)". Ticket #2991. (CVS 4854)

FossilOrigin-Name: 3f9f81e908aad6cdc0a16ec52f4ec46d89fd78bc
This commit is contained in:
danielk1977
2008-03-12 10:39:00 +00:00
parent f3868117f9
commit b2b95d41a1
4 changed files with 31 additions and 12 deletions
+20 -1
View File
@@ -13,7 +13,7 @@
#
# <value> IN (SELECT <column> FROM <table>)
#
# $Id: in3.test,v 1.3 2008/01/17 16:22:16 drh Exp $
# $Id: in3.test,v 1.4 2008/03/12 10:39:00 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -265,4 +265,23 @@ do_test in3-4.6 {
execsql { DROP INDEX t3_i2 }
} {}
# The following two test cases verify that ticket #2991 has been fixed.
#
do_test in3-5.1 {
execsql {
CREATE TABLE Folders(
folderid INTEGER PRIMARY KEY,
parentid INTEGER,
rootid INTEGER,
path VARCHAR(255)
);
}
} {}
do_test in3-5.2 {
catchsql {
DELETE FROM Folders WHERE folderid IN
(SELECT folderid FROM Folder WHERE path LIKE 'C:\MP3\Albums\' || '%');
}
} {1 {no such table: Folder}}
finish_test