Fix an infinite loop in the code generator for INSERT. Ticket #1140. (CVS 2410)

FossilOrigin-Name: 876d09d9145775956913e975c29e81d7553839ac
This commit is contained in:
drh
2005-03-21 01:20:58 +00:00
parent 6841f162c6
commit 38fba69135
4 changed files with 22 additions and 11 deletions
+12 -1
View File
@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the INSERT statement.
#
# $Id: insert.test,v 1.23 2005/01/21 03:12:16 danielk1977 Exp $
# $Id: insert.test,v 1.24 2005/03/21 01:20:58 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -340,6 +340,17 @@ do_test insert-7.3 {
}
} {1 2 2}
# Ticket #1140: Check for an infinite loop in the algorithm that tests
# to see if the right-hand side of an INSERT...SELECT references the left-hand
# side.
#
do_test insert-8.1 {
execsql {
INSERT INTO t3 SELECT * FROM (SELECT * FROM t3 UNION ALL SELECT 1,2,3)
}
} {}
integrity_check insert-99.0
finish_test