mypipe icon indicating copy to clipboard operation
mypipe copied to clipboard

MySql Unsigned Int treated as a normal Int

Open ildac opened this issue 8 years ago • 0 comments

I've a MySql table with a primary key of type Int (unsigned), when the id is bigger than the max Int value the id becomes a negative value, as expected.

I found what I think could be the root of the problem, the query on the information schema done by the MySQLMetadataManager, is using the DATA_TYPE column value, and this value is always int even for the unsigned kind.

I think an idea for a possible solution is to look also at the COLUMN_TYPE that is where the unsigned information is stored and cast this values to long?

ildac avatar Aug 31 '16 13:08 ildac