Upgrade Guides for Genero BDL / 3.00 upgrade guide |
MySQL 5 VARCHAR columns can be used to store VARCHAR(N>255) values.
Before Genero 3.00, the MySQL driver converted a VARCHAR(N>255) type to a MySQL TEXT type, because MySQL versions before 5.0.3 only allowed up to 255 characters for a VARCHAR column. MySQL TEXT type is a large object type with specific semantics and constraints, but it was the only available type to store character data above the 255 character limit. As a result, data type information was lost when extracting the database schema with fgldbsch from a MySQL database: When creating a table in a Genero BDL program, the original VARCHAR(N>255) type was converted to TEXT (with a fixed size of 65535 characters), and then converted by fgldbsch back to a VARCHAR2(65535) type in the .sch file. The original size of the VARCHAR type was lost.
Starting with Genero 3.00, when creating a table in a BDL program with CREATE TABLE, the MySQL driver leaves any VARCHAR(N) as-is, even if the size is greater as 255.
If your application is using VARCHAR(N) types with N>255 and your MySQL server version is 5.0.3 or above, you should review your database creation scripts to use VARCHAR(N) instead of TEXT.