Bug #67282 uint type error when add a new query in typed dataset
Submitted: 18 Oct 2012 7:45 Modified: 15 Feb 2013 3:14
Reporter: billy cat Email Updates:
Status: Verified Impact on me:
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.5.4 OS:Windows (XP sp3)
Assigned to: Assigned Account CPU Architecture:Any

[18 Oct 2012 7:45] billy cat
while using the MySQL Connector/Net to create the Typed Dataset from mysql, type uint may be error.

columns in mysql table defined with unsigned-integer, will be defined with uint(System.UInt32). When create the Typed Dataset, it will be mapped to uint, that's right.

but, if a new query, which get a column with unsigned-integer is be add to a exist data-adapter, the unsigned-integer column is seems to be mapped to int(System.Int32). 

How to repeat:
1. Create a Typed Dataset with MySQL Connector/Net 6.5.4 from a mysql database with a table that has a column defined unsigned-integer, it will create a DataAdapter like to the table.

2. Go to the "designer view" of the Typed Dataset.

3. Choose that DataAdapter, and add a new query(insert or update) to the dataadapter.

4. Just finish create the new query, and it seems that the unsigned-integer column will be mapped to int(System.Int32)

ps, this bug seem to be seen while adding a new query. Query created by the Typed Dataset itself can be correctly mapped the unsigned-integer to the uint(System.UInt32)
[15 Feb 2013 3:14] Fernando Gonzalez.Sanchez

For a table defined with 

create table `table_unsigned`( `id` int, `mydata` int unsigned ) engine = innodb,

the first data set maps mydata to uint (in C#) correctly, while a query for the update stmt "update table_unsigned set mydata = ? where id = ?" generates a method
UpdateQuery( int?, int? );   // converting second arg to 'int'.