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

Bug fix: bad code was generated for when the first operand of a CASE

was NULL. (CVS 598)

FossilOrigin-Name: 4debc8db929fdc201759ba211acdeadc4e30e8af
This commit is contained in:
drh
2002-05-30 02:35:11 +00:00
parent 739105c72c
commit 461c281a2e
4 changed files with 17 additions and 14 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing expressions.
#
# $Id: expr.test,v 1.21 2002/05/27 01:04:51 drh Exp $
# $Id: expr.test,v 1.22 2002/05/30 02:35:12 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -352,7 +352,9 @@ test_expr expr-case.9 {i1=3} \
{CASE i1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'error' END} error
test_expr expr-case.10 {i1=3} \
{CASE i1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' END} {{}}
test_expr expr-case.11 {i1=7} \
test_expr expr-case.11 {i1=null} \
{CASE i1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 3 END} {{}}
test_expr expr-case.12 {i1=7} \
{ CASE WHEN i1 < 5 THEN 'low'
WHEN i1 < 10 THEN 'medium'
WHEN i1 < 15 THEN 'high' ELSE 'error' END} medium