Skip to content
  • Nisha Gopalakrishnan's avatar
    e23b6cbd
    BUG#18985579: "CHECK TABLE .. FOR UPGRADE" FAILS TO · e23b6cbd
    Nisha Gopalakrishnan authored
                   REPORT OLD DATETIME FORMAT.
    
    Analysis:
    --------
    CHECK TABLE FOR UPGRADE does not detect temporal types of
    old format. As a result 'mysql_upgrade' does not REPAIR
    TABLE/ALTER TABLE FORCE for the tables containing columns
    of temporal types old format.
    
    The function 'check_old_type()' checks if the table
    contains data types of old format and reports an
    error to rebuild the table in order to upgrade the
    data types of old format. This function did not
    check for the old temporal types and hence did not
    report an error.
    
    Fix:
    ---
    a) The function 'check_old_type()' is modified to detect
       old temporal data types if the system variable
       'avoid_temporal_upgrade' is disabled. Hence CHECK TABLE
       FOR UPGRADE reports a rebuild error for upgrading the
       tables. This also helps the 'mysql_upgrade' utility to
       detect and upgrade the tables containing the old temporal
       columns.
    b) REPAIR TABLE upgrades the tables containing the old
       temporal types if the 'avoid_temporal_upgrade' system
       variable is disabled.
    c) The 'mysql_upgrade' tool has been modified to run the
       'mysql_fix_privilege_tables.sql' and then 'mysqlcheck'.
       This fixes any issues with the tables in the system
       database before running the 'mysqlcheck' on it.
    e23b6cbd
    BUG#18985579: "CHECK TABLE .. FOR UPGRADE" FAILS TO
    Nisha Gopalakrishnan authored
                   REPORT OLD DATETIME FORMAT.
    
    Analysis:
    --------
    CHECK TABLE FOR UPGRADE does not detect temporal types of
    old format. As a result 'mysql_upgrade' does not REPAIR
    TABLE/ALTER TABLE FORCE for the tables containing columns
    of temporal types old format.
    
    The function 'check_old_type()' checks if the table
    contains data types of old format and reports an
    error to rebuild the table in order to upgrade the
    data types of old format. This function did not
    check for the old temporal types and hence did not
    report an error.
    
    Fix:
    ---
    a) The function 'check_old_type()' is modified to detect
       old temporal data types if the system variable
       'avoid_temporal_upgrade' is disabled. Hence CHECK TABLE
       FOR UPGRADE reports a rebuild error for upgrading the
       tables. This also helps the 'mysql_upgrade' utility to
       detect and upgrade the tables containing the old temporal
       columns.
    b) REPAIR TABLE upgrades the tables containing the old
       temporal types if the 'avoid_temporal_upgrade' system
       variable is disabled.
    c) The 'mysql_upgrade' tool has been modified to run the
       'mysql_fix_privilege_tables.sql' and then 'mysqlcheck'.
       This fixes any issues with the tables in the system
       database before running the 'mysqlcheck' on it.
Loading