• Tatiana A. Nurnberg's avatar
    Bug#39200: optimize table does not recognize ROW_FORMAT=COMPRESSED · a9fd3786
    Tatiana A. Nurnberg authored
    When doing ALTER TABLE, we forgot to point out that we actually have
    ROW_FORMAT information (from the original table), so we dropped to
    "sensible defaults". This affects both ALTER TABLE and OPTIMIZE TABLE
    which may fall back on ALTER TABLE for InnoDB.
    
    We now flag that we do indeed know the row-type, thereby preserving
    compression-type etc.
    
    No .test in 5.1 since we'd need a reasonable new plugin from InnoDB to
    show this properly; in higher versions, maria can demonstrate this.
    
    sql/sql_table.cc:
      In mysql_alter_table() flag that we have row-type info
      from old table. In compare_tables(), we must explicitly
      check whether row-type has changed (rather than rely on
      the flag which will always be set at this point now).
    a9fd3786
sql_table.cc 239 KB