1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix a use-after-free error that could occur when processing "SELECT aggregate(DISTINCT <expr>)..." queries.

FossilOrigin-Name: 0e4789860b81c31d3a6d1f9f8340042ce1d08a82bf6119c783fcab85180b1b63
This commit is contained in:
dan
2021-04-08 20:29:12 +00:00
parent 55938b5fa0
commit bfd6f1bcd5
4 changed files with 19 additions and 11 deletions

View File

@ -207,6 +207,11 @@ do_execsql_test 6.1 {
SELECT count(DISTINCT c) FROM t1 LEFT JOIN t2;
} {1}
do_execsql_test 7.0 {
CREATE TABLE v1 ( v2 UNIQUE, v3 AS( TYPEOF ( NULL ) ) UNIQUE );
SELECT COUNT ( DISTINCT TRUE ) FROM v1 GROUP BY likelihood ( v3 , 0.100000 );
}
finish_test