Bug #67901 GetSchema returns a MySqlException

Submitted: 13 Dec 2012 23:02 Modified: 20 Feb 2013 0:09
Reporter: John Carroll Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.3.8.0 OS:Windows
Assigned to: Fernando Gonzalez.Sanchez CPU Architecture:Any

[13 Dec 2012 23:02] John Carroll
Description:
All providers other than the MySql provider throw an ArgumentException when an invalid collection is passed to the GetSchema method. MySql throws a MySqlException. This a real annoyance when attempting to write a multi-provider data access layer. 

Other providers include ADO.Net, Oracle, and Devart for MySql.

How to repeat:
Call the GetSchema method with an invalid collection parameter (eg, "Table" vice "Tables"

Suggested fix:
Throw a GetSchemaException for this error condition.
[13 Dec 2012 23:04] John Carroll
Sorry, suggested fix should have said ArgumentException not GetSchemaException.
[20 Feb 2013 0:09] John Russell
Added to changelog for 6.5.6, 6.6.6: 

Connector/Net would throw a MySqlException exception when an invalid
collection was passed to the GetSchema method. Now it throws an
ArgumentException when an invalid collection name is passed to
GetSchema, to be compliant with the API spec of
System.Data.Common.DbConnection.GetSchema. The new behavior provides
better compatibility with other data access providers such as
ADO.Net.

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

Page generated in 0.050 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.