Bug #91382 BeginExecuteReader fails on .net core

Submitted: 23 Jun 2018 0:04 Modified: 29 Jul 2018 9:37
Reporter: Paul Wheeler Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:8.0.11 OS:MacOS (10.13.4)
Assigned to: Assigned Account CPU Architecture:x86
Tags: async

[23 Jun 2018 0:04] Paul Wheeler
Description:
Attempting to call MySqlCommand.BeginExecuteReader fails with a PlatformNotSupportedException because it uses Delegate.BeginInvoke which is not supported in .net core. Delegate.BeginInvoke is a worthless function that should not be use because it only simulates asynchrony without actually utilizing asynchronous IO.

How to repeat:
Create an instance of MySqlCommand and call BeginExecuteReader.

Suggested fix:
Implement proper asynchronous IO, preferably using System.Threading.Tasks
[25 Jun 2018 7:57] Chiranjeevi Battula
Hello Paul Wheeler,

Thank you for the bug report.
Could you please provide repeatable steps (exact steps/sample project, full stack trace etc. - please make it as private if you prefer) to confirm this issue at our end?

Thanks,
Chiranjeevi.
[26 Jun 2018 14:20] Bradley Grainger
See bug #70111 for the feature request of adding true asynchronous methods to Connector/NET.

See https://github.com/mysql-net/MySqlConnector if you need a library that implements async I/O (and works on .NET Core) today.
[26 Jun 2018 14:23] Bradley Grainger
(Though note that MySqlConnector only supports the modern ExecuteReaderAsync API, not the APM-style Begin/EndExecuteReader.)
[28 Jun 2018 18:06] Paul Wheeler
Bradley,
Thank you for point out that package, I will definitely look into migrating to that!

-Paul
[30 Jul 2018 1: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".

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.061 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.