Bug #41800 Unsigned int data types get incorrectly parse for windows 3.51 ODBS drivers
Submitted: 30 Dec 2008 23:15 Modified: 24 Feb 2010 14:46
Reporter: Pablo Redondo Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.27 OS:Windows (Windows XP and Linux as well)
Assigned to: CPU Architecture:Any

[30 Dec 2008 23:15] Pablo Redondo
Description:
When executing a select statement for a column with unsigned int data type the query returns the value -294967294 for numbers that exceed the max limit of the "int" type (e.g. 4000000002). However if you specificaly cast the value to an unsigned type the value returns correctly.

How to repeat:
AS an example if we have a column like this:
transaction_key 
4000000000
4000000001
4000000002
4000000003

and we run the following sql:
select	a11.transaction_key
from	mstr_view_transaction_shipping	a11
where	a11.transaction_key between 4000000000 and 4000000088

I get:
-294967294
-294967294
-294967294
-294967294

if I run

select	cast(a11.transaction_key as unsigned)
from	verifi.mstr_view_transaction_shipping	a11
where	a11.transaction_key between 4000000000 and 4000000088

I get:
4000000000
4000000001
4000000002
4000000003

Which confirms there is a parse issue .Although the last one is a nice work arround, there are additional issues on my implementation when doing this, thus is not an alternative.
[31 Dec 2008 8:08] Sveta Smirnova
Thank you for the report.

Most likely this was fixed with fix of bug #32171. Please upgrade and try.

Also I assume you don't have such issue if you run queries described in mysql command line client. Please correct me if I am wrong.
[31 Dec 2008 19:58] Pablo Redondo
I just upgraded the version to and I still see the bug. As you guys mentioned with MySQL query browser I don't see the issue reproduce, only while using the ODBC drivers.

I just updated the version field. But I also see the issue with 5.1.5.
[13 Jan 2009 16:48] Tonci Grgin
Pablo, this is in no way enough for me to start working on report.

  o Please use mysqldump to provide me with both DDL and DML statements needed to reproduce this behavior.
  o Please provide small but *complete* test case exhibiting this problem on data attached above.

I would especially like to see the connection string before proceeding.
[14 Feb 2009 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".
[24 Feb 2010 14:46] Tonci Grgin
This is a duplicate of Bug#32171.