Incorrect results after upgrading to 3.28.0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Incorrect results after upgrading to 3.28.0

Brice Lambson
Hello,

We recently updated from version 3.26.0 to version 3.28.0. Now we're seeing different (incorrect) results for the following query. Our database is available here: https://github.com/aspnet/EntityFrameworkCore/raw/f386095005e46ea3aa4d677e4439cdac113dbfb1/test/EFCore.Sqlite.FunctionalTests/northwind.db

SELECT (
    SELECT "t"."CustomerID"
    FROM (
        SELECT "o"."CustomerID", "o"."OrderDate"
        FROM "Orders" AS "o"
        WHERE ("c"."CustomerID" = "o"."CustomerID") AND "o"."CustomerID" IS NOT NULL
        ORDER BY "o"."CustomerID", "o"."OrderDate" DESC
        LIMIT 2
    ) AS "t"
    ORDER BY "t"."CustomerID", "t"."OrderDate" DESC
    LIMIT 1)
FROM "Customers" AS "c";

Results in 3.26.0:

ALFKI
ANATR
ANTON
AROUT
...

Results in 3.28.0:

ALFKI
(NULL)
(NULL)
(NULL)
...

Thanks!

--
Brice Lambson
Senior Software Engineer
Microsoft
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect results after upgrading to 3.28.0

Dan Kennedy-4
Thanks for reporting this one. It is a bug. Now fixed here:

  https://sqlite.org/src/info/5fd20e09a522b62a

Ticket:

  https://sqlite.org/src/info/9cdc5c46

Dan.


> We recently updated from version 3.26.0 to version 3.28.0. Now we're seeing
> different (incorrect) results for the following query. Our database is
> available here:
> https://github.com/aspnet/EntityFrameworkCore/raw/f386095005e46ea3aa4d677e4439cdac113dbfb1/test/EFCore.Sqlite.FunctionalTests/northwind.db

> SELECT (
>    SELECT "t"."CustomerID"
>    FROM (
>        SELECT "o"."CustomerID", "o"."OrderDate"
>        FROM "Orders" AS "o"
>        WHERE ("c"."CustomerID" = "o"."CustomerID") AND "o"."CustomerID" IS NOT
> NULL
>       ORDER BY "o"."CustomerID", "o"."OrderDate" DESC
>        LIMIT 2
>    ) AS "t"
>    ORDER BY "t"."CustomerID", "t"."OrderDate" DESC
>    LIMIT 1)
> FROM "Customers" AS "c";
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users