mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
SUM returns NULL when it has no inputs. Ticket #1413. (CVS 2678)
FossilOrigin-Name: 6281859425d39c11d82875301fefafad1f08416d
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing built-in functions.
|
||||
#
|
||||
# $Id: func.test,v 1.39 2005/09/08 19:45:58 drh Exp $
|
||||
# $Id: func.test,v 1.40 2005/09/08 20:37:44 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -513,14 +513,14 @@ do_test func-18.2 {
|
||||
}
|
||||
} {9902.0}
|
||||
|
||||
# The sum of nothing is 0. But the sum of all NULLs is NULL.
|
||||
# The sum of nothing is NULL. But the sum of all NULLs is NULL.
|
||||
#
|
||||
do_test func-18.3 {
|
||||
execsql {
|
||||
DELETE FROM t5;
|
||||
SELECT sum(x) FROM t5;
|
||||
}
|
||||
} {0}
|
||||
} {{}}
|
||||
do_test func-18.4 {
|
||||
execsql {
|
||||
INSERT INTO t5 VALUES(NULL);
|
||||
|
Reference in New Issue
Block a user