Ticket Hash: | a7debbe0ad1cbe469159db7f8c4ba03fe7049c13 | |||
Title: | BETWEEN issue in view | |||
Status: | Closed | Type: | Code_Defect | |
Severity: | Critical | Priority: | Immediate | |
Subsystem: | Unknown | Resolution: | Fixed | |
Last Modified: | 2019-09-09 20:18:05 | |||
Version Found In: | 3.29.0 | |||
User Comments: | ||||
mrigger added on 2019-09-07 18:51:40:
(text/x-fossil-wiki)
Consider the following test case: <pre> CREATE TABLE t0(c0); INSERT INTO t0(c0) VALUES(''); CREATE VIEW v2(c0, c1) AS SELECT 'B' COLLATE NOCASE, 'a' FROM t0 ORDER BY t0.c0; SELECT SUM(count) FROM (SELECT v2.c1 BETWEEN v2.c0 AND v2.c1 as count FROM v2); -- expected: 0, actual: 1 </pre> I would expect SUM() to yield 0 since the condition evaluates to false: <pre> SELECT v2.c1 BETWEEN v2.c0 AND v2.c1 as count FROM v2; -- 0 </pre> dan added on 2019-09-09 20:18:05: (text/x-fossil-wiki) Fixed by [b9ec7220]. |