Skip to content
  • Gleb Shchepa's avatar
    86384e79
    WL#6219: Deprecate and remove YEAR(2) type · 86384e79
    Gleb Shchepa authored
    YEAR(2) is a subject to deprecation since it has ill design.
    The replacement is YEAR(4) or just "YEAR" type.
    
    * This patch forbids new YEAR(2) column creation:
      CREATE TABLE and ALTER TABLE create YEAR(4) instead.
    
    * For tables with YEAR(2) columns the CHECK TABLE ...
      FOR UPGRADE command returns:
    
        "Table upgrade required.
         Please do "REPAIR TABLE `...`" or dump/reload to fix it!"
    
      or
    
        "Table rebuild required.
         Please do "ALTER TABLE `...` FORCE" or dump/reload to fix it!"
    
    * For tables with YEAR(2) columns the "REPAIR TABLE" command
      calls "ALTER TABLE ... FORCE" where applicable.
    
    * From now any effective ALTER TABLE command application
      converts YEAR(2) columns to YEAR(4) columns.
    86384e79
    WL#6219: Deprecate and remove YEAR(2) type
    Gleb Shchepa authored
    YEAR(2) is a subject to deprecation since it has ill design.
    The replacement is YEAR(4) or just "YEAR" type.
    
    * This patch forbids new YEAR(2) column creation:
      CREATE TABLE and ALTER TABLE create YEAR(4) instead.
    
    * For tables with YEAR(2) columns the CHECK TABLE ...
      FOR UPGRADE command returns:
    
        "Table upgrade required.
         Please do "REPAIR TABLE `...`" or dump/reload to fix it!"
    
      or
    
        "Table rebuild required.
         Please do "ALTER TABLE `...` FORCE" or dump/reload to fix it!"
    
    * For tables with YEAR(2) columns the "REPAIR TABLE" command
      calls "ALTER TABLE ... FORCE" where applicable.
    
    * From now any effective ALTER TABLE command application
      converts YEAR(2) columns to YEAR(4) columns.
Loading