I have switched from sql server 2005 to mysql which was not really a problem.
I have a slight issue with (n)varchar which exist in sql server. Usually I have used:
mapping.Map(x => x.bla).Length(10000);
to set bla to nvarchar(max). does this work in mysql? I believe there is no nvarchar in mysql and you have to use something like this:
alter table sometable modify bla VARCHAR(21844) CHARACTER SET utf8
to update an existing column to ‘nvarchar(max)’. Is this correct because I am getting:
“Row size too large. The maximum row size for the used table type”
If I am using:
alter table sometable modify bla VARCHAR(1000) CHARACTER SET utf8
things work but I am not sure whether this achieves ‘nvarchar(max)’ in mysql.
As explained in the manual:
You must therefore consider what other columns exist in your table and calculate the maximum size available for this
VARCHAR.However, if you require space for long text values, why not use the
TEXTdata types, which are not constrained by this limit (except for the 9 to 12 bytes they contribute toward it)?