1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a VDBE stack overflow that occurs when the left-hand side of an IN

expression is NULL and the result is stored on the stack rather than used
to control a jump.  Ticket #668. (CVS 1299)

FossilOrigin-Name: fc7a7975b03c144c2db3566facd008d3701c735e
This commit is contained in:
drh
2004-03-17 23:32:08 +00:00
parent 276fd588d8
commit 8b8891bf0a
4 changed files with 25 additions and 11 deletions

View File

@ -13,7 +13,7 @@
# This file implements tests for miscellanous features that were
# left out of other test files.
#
# $Id: misc3.test,v 1.9 2004/03/02 18:37:42 drh Exp $
# $Id: misc3.test,v 1.10 2004/03/17 23:32:08 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -286,5 +286,19 @@ do_test misc3-7.3 {
}
} 32
# Ticket #668: VDBE stack overflow occurs when the left-hand side
# of an IN expression is NULL and the result is used as an integer, not
# as a jump.
#
do_test misc-8.1 {
execsql {
SELECT count(CASE WHEN b IN ('abc','xyz') THEN 'x' END) FROM t3
}
} {2}
do_test misc-8.2 {
execsql {
SELECT count(*) FROM t3 WHERE 1+(b IN ('abc','xyz'))==2
}
} {2}
finish_test