Re: [sqlite] Incorrect results after upgrading to 3.28.0

2019-06-26 Thread Dan Kennedy
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
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Incorrect results after upgrading to 3.28.0

2019-06-25 Thread 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
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users