[fdo-trac] #701: MySQL: use varchar for longer string properties

FDO trac_fdo at osgeo.org
Tue Sep 28 13:19:41 EDT 2010


#701: MySQL: use varchar for longer string properties
------------------------------+---------------------------------------------
   Reporter:  brentrobinson   |       Owner:  brentrobinson                    
       Type:  enhancement     |      Status:  new                              
   Priority:  major           |   Milestone:  3.6.0                            
  Component:  MySQL Provider  |     Version:                                   
   Severity:  3               |    Keywords:  String Data Property varchar text
External_id:                  |  
------------------------------+---------------------------------------------
 In pre-5.0.3 versions of MySQL, the limit for a varchar column is 255
 characters. Consequently, the MySQL Provider's FdoIApplySchema
 implementation does the following when creating a column for a new string
 data property:

  * if the length is 255 or less, a varchar column is created
  * otherwise, a text column is created.

 In version 5.0.3, the varchar limit was increased to 65535 characters.
 This means that the MySQL provider can also increase the threshold for
 creating a text column. This would resolve a current defect where an
 ApplySchema execution will fail if a new string property is has length 256
 or greater, and a default value, since default values are not allowed on
 MySQL text columns.

 One caveat is that the total number of bytes for all non-BLOB columns in a
 MySQL table cannot exceed 65535 bytes. This means that the above varchar
 vs. text threshold cannot be completely increased to 65535.

-- 
Ticket URL: <http://trac.osgeo.org/fdo/ticket/701>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list