Bug #43480 Error generating columns with data type 'mediumtext, longtext' and tinyint(1)
Submitted: 8 Mar 2009 10:46 Modified: 3 Apr 2009 16:08
Reporter: Andreas Winkler Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.0 OS:Windows (Vista)
Assigned to: CPU Architecture:Any
Tags: entity framework

[8 Mar 2009 10:46] Andreas Winkler
Description:
Generating EDM scheme with a table containing columns with data type mediumtext and longtext generates run time error with message '...Max value too long or too short for Int32...'.

TinyInt(1) is translated to Byte. It schould be the .NET Data type Boolean.

How to repeat:

CREATE TABLE  `test` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `STATION` int(11) DEFAULT NULL,
  `TEST1` smallint(5) DEFAULT NULL,
  `TEST2` longtext,
  `TEST3` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Suggested fix:
fix the generation scheme for this data type
[31 Mar 2009 18:55] Reggie Burnett
This fixes the medium and long text issue in 6.0.1.  We are taking the tinyint issue as separate and are not sure it is a bug.
[3 Apr 2009 16:08] Tony Bedford
An entry was added to the 6.0.1 changelog:

Generating an Entity Data Model (EDM) schema with a table containing columns with data types MEDIUMTEXT and LONGTEXT generated a runtime error message “Max value too long or too short for Int32”.