Bug #15143 select sum(intcolumn) returns a byte[]
Submitted: 22 Nov 2005 17:07 Modified: 30 Dec 2005 22:16
Reporter: Bryan Livingston Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:MySQL 5.0 OS:Windows (Windows Server 2003)
Assigned to: Bugs System CPU Architecture:Any

[22 Nov 2005 17:07] Bryan Livingston
Description:
When using .net connector 1.0.7 to connect to mysql 5 if you call EvaluateScalar("select sum(IntColumn) from Table"); then an unusable byte[] is returned when an Int64 or Decimal value should be returned.

This has been found by 3 users now.
http://forums.mysql.com/read.php?10,54817,54817#msg-54817
http://forums.mysql.com/read.php?38,52696,52696#msg-52696

My code was working fine with 4.1 but started returning the wrong data type when I upgraded the server.

I suspect there is something wrong with the connector mysql protocol implementation that is detecting the wrong data type.

It may only happen when the server is running on windows.

How to repeat:
((DbConnection)database).EvaluateScalar("select sum(IntColumn) from Table");
[23 Nov 2005 9:41] Vasily Kishkin
Sorry... I was not able to reproduce the bug.  I guess This is a problem in the 5.0 server and not in the connector.  Could you please say me version of mysql exactly ?
[24 Nov 2005 2:06] Bryan Livingston
MySQL 5.0.15-nt via TCP/IP

The query works fine in the query browser.

I was thinking this might be a byte order issue.
[24 Nov 2005 2:07] Bryan Livingston
Of course it's not a byte order issue.  Sorry.
[30 Nov 2005 22:16] Vasily Kishkin
As far as I can understand you have unexpected row array. How I can reproduce it ?
[1 Jan 2006 0: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".