Bug #40571 Add GetSByte to the list of public methods supported by MySqlDataReader
Submitted: 7 Nov 2008 3:31 Modified: 10 Nov 2008 14:58
Reporter: Christopher Jerdonek Email Updates:
Status: Closed Impact on me:
Category:Connector / NET Severity:S4 (Feature request)
Version: OS:Windows
Assigned to: CPU Architecture:Any
Tags: DbDataReader, GetSByte, MySqlDataReader, SByte, type

[7 Nov 2008 3:31] Christopher Jerdonek
The MySqlDataReader class currently exposes a public "Get" method for nearly all .NET system types that have a corresponding representation in MySql.

For example, GetDecimal, GetDouble, GetByte, GetUInt64, etc. are all supported.

Given that some MySql columns can have a corresponding .NET system type of SByte, it would be consistent and natural also to expose GetSByte.  MySqlDataReader's GetFieldType method, for example, yields SByte for columns with a MySql data type of signed TINYINT(3).


How to repeat:
Try compiling the following program, and notice that it doesn't compile because of the final line:

class Program
	static void Main(string[] args)
		MySqlCommand command = new MySqlCommand();
		MySqlDataReader reader = command.ExecuteReader();


[7 Nov 2008 18:53] Tonci Grgin
Hi Christopher and thanks for reasonable feature request. Let's see what Reggie will say.
[7 Nov 2008 19:35] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[7 Nov 2008 19:35] Reggie Burnett
fixed in 5.2.4+
[7 Nov 2008 21:39] Christopher Jerdonek
Wow, that was amazingly fast -- thank you!
[10 Nov 2008 14:58] Tony Bedford
An entry was added to the 5.2.4 changelog:

MySqlDataReader did not feature a GetSByte method.