Possible issue with 3.19.3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Possible issue with 3.19.3

Eric Sink
Greetings,

Version 3.19.3 is yielding different results than previous releases for a
query in the Entity Framework Core test suite.

The query looks like this:

SELECT [e].[Id], [e].[Discriminator], [e].[Name], [e].[BaseId], [t].[Id],
[t].[BaseParentId], [t].[Discriminator], [t].[Name], [t0].[Id],
[t0].[Discriminator], [t0].[Name], [t0].[ParentCollectionId],
[t0].[ParentReferenceId]
FROM [BaseInheritanceRelationshipEntity] AS [e]
LEFT JOIN (
    SELECT [e.BaseReferenceOnBase].*
    FROM [BaseReferenceOnBase] AS [e.BaseReferenceOnBase]
    WHERE [e.BaseReferenceOnBase].[Discriminator] IN
('DerivedReferenceOnBase', 'BaseReferenceOnBase')
) AS [t] ON [e].[Id] = [t].[BaseParentId]
LEFT JOIN (
    SELECT [e.BaseReferenceOnBase.NestedReference].*
    FROM [NestedReferenceBase] AS [e.BaseReferenceOnBase.NestedReference]
    WHERE [e.BaseReferenceOnBase.NestedReference].[Discriminator] IN
('NestedReferenceDerived', 'NestedReferenceBase')
) AS [t0] ON [t].[Id] = [t0].[ParentReferenceId]
WHERE [e].[Discriminator] = 'DerivedInheritanceRelationshipEntity';

I have a 143 KB input database that demonstrates the problem.  On 3.16.0
and 3.18.0, this query results in 3 rows.  On 3.19.3, it results in 6 rows.

Would it be appropriate for me to send the database file to someone for
further investigation?

--
E
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible issue with 3.19.3

Richard Hipp-3
On 6/20/17, Eric Sink <[hidden email]> wrote:
>
> Would it be appropriate for me to send the database file to someone for
> further investigation?
>

Yes, please.  Send the database directly to me via private email.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible issue with 3.19.3

Richard Hipp-3
In reply to this post by Eric Sink
On 6/20/17, Eric Sink <[hidden email]> wrote:
> Greetings,
>
> Version 3.19.3 is yielding different results than previous releases for a
> query in the Entity Framework Core test suite.
>

The results also differed from Postgres, which is our gold-standard.
So, yes, it was a problem.

The bug has now been fixed on trunk, as of a few minutes ago.

Trouble ticket: https://www.sqlite.org/src/info/892fc34f173e99d8
Proposed fix: https://www.sqlite.org/src/info/483462682d3a57fb

This is the third major malfunction in 3.19 to come out of the LEFT
JOIN query flattening optimization.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...