Bug #61561 Null reference exception thrown when using Skip / Take clauses
Submitted: 19 Jun 2011 8:25 Modified: 20 Jul 2011 9:57
Reporter: Wenbin Xu Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.4.1 Beta OS:Windows (Windows XP / 7)
Assigned to: CPU Architecture:Any
Tags: .Net 4.0, entity framework, Linq to Entity, vs2010

[19 Jun 2011 8:25] Wenbin Xu
Description:
-----------
Environment
-----------
OS: Windows XP SP3 or Windows 7 SP1
IDE: Visual Studio 2010 SP1
MySQL: Community Edition 5.5.13
Connector: MySQL .Net Connector 6.4.1 Beta

-------
Symptom
-------
Execute "LINQ to Entity" query against MySQL database with Skip() and Take() clauses. Though valid numeric numbers were passed in Skip() and Take() clauses, null reference exception was thrown upon execution. If Skip() and Take() clauses were commented out, the query completes successfully.

Please note,

1. The same query runs without error on MySQL .Net Connector 6.3.6 GA.
-- OR --
2. The Skip() and Take() clauses are not used together with Include() clauses that involve one-many or many-many tables.

----------
Resolution
----------
So far not found.

----------
Workaround
----------
So far not found.

How to repeat:
Build any query with Include, Skip and Take clauses. And, make sure Include() clause(s) involves one-many or many-many table(s).

Executing this type of query results in null reference exception.

Suggested fix:
Make MySQL .Net Connector 6.4.1 works the same way as 6.3.6.

Many Thanks!
[20 Jun 2011 9:57] Bogdan Degtyariov
Hi Wenbin,

Thanks for reporting problem with Connector/NET driver.
Do you think you could provide a small C#/VB test project?
[20 Jul 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".