Bug #40571 Add GetSByte to the list of public methods supported by MySqlDataReader
Submitted: 7 Nov 2008 4:31 Modified: 10 Nov 2008 15:58
Reporter: Christopher Jerdonek
Status: Closed
Category:Connector/Net Severity:S4 (Feature request)
Version:5.2.3.0 OS:Microsoft Windows
Assigned to: Target Version:
Tags: SByte, GetSByte, MySqlDataReader, DbDataReader, type
Triage: D5 (Feature request)

[7 Nov 2008 4:31] Christopher Jerdonek
Description:
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).

Thanks.

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();

		reader.GetByte(0);

		reader.GetSByte(0);
	}
}
[7 Nov 2008 19:53] Tonci Grgin
Hi Christopher and thanks for reasonable feature request. Let's see what Reggie will say.
[7 Nov 2008 20: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:

  http://lists.mysql.com/commits/58229
[7 Nov 2008 20:35] Reggie Burnett
fixed in 5.2.4+
[7 Nov 2008 22:39] Christopher Jerdonek
Wow, that was amazingly fast -- thank you!
[10 Nov 2008 15:58] Tony Bedford
An entry was added to the 5.2.4 changelog:

MySqlDataReader did not feature a GetSByte method.