SQLite

View Ticket
Login
Ticket Hash: f09fcd17810f65f71789525680051d11f5058953
Title: Assertion fault when window functions are used.
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2018-12-07 01:56:46
Version Found In: 3.26.0
User Comments:
drh added on 2018-12-06 17:17:39:

The following SQL leads to an assertion fault.

SELECT * FROM(
    SELECT * FROM (SELECT 1 AS c) WHERE c IN (
        SELECT (row_number() OVER()) FROM (VALUES (0))
    )
);

This problem has existed since window functions were added in 3.25.0. Incorrect bytecode is being generated for the row_number() function.

This problem was originally reported on the mailing list Gene Sacky.