|Title:||Segfault while trying to prepare a malformed window-function query|
|Last Modified:||2020-04-03 13:19:17|
|Version Found In:||3.31.1|
drh added on 2020-04-03 11:45:52:
Henry Liu of Shenzhen Ankki Technologies Co.Ltd. sends in the following SQL snippet that causes a segfault while preparing.
CREATE TABLE a(b, c); SELECT c FROM a GROUP BY c HAVING(SELECT(sum(b) OVER(ORDER BY b), sum(b) OVER(PARTITION BY min(DISTINCT c), c ORDER BY b)));
This query has caused problems ever since support for window functions was added on 2018-06-30 (version 3.25.0). The problem expressed as an assertion fault up until check-in [712e47714863a8ed] (2019-08-10) at which point it began to segfault.