List:Commits« Previous MessageNext Message »
From:Tatiana A. Nurnberg Date:May 29 2009 4:22pm
Subject:bzr commit into mysql-5.1-bugteam branch (azundris:2910) Bug#39200
View as plain text  
#At file:///misc/mysql/forest/39200k/51-39200k/ based on
revid:davi.arnaut@stripped

 2910 Tatiana A. Nurnberg	2009-05-29
      Bug#39200: optimize table does not recognize ROW_FORMAT=COMPRESSED
      
      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).

    modified:
      sql/sql_table.cc
=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2009-05-19 04:25:36 +0000
+++ b/sql/sql_table.cc	2009-05-29 14:22:24 +0000
@@ -5314,7 +5314,7 @@ compare_tables(TABLE *table,
       create_info->used_fields & HA_CREATE_USED_ENGINE ||
       create_info->used_fields & HA_CREATE_USED_CHARSET ||
       create_info->used_fields & HA_CREATE_USED_DEFAULT_CHARSET ||
-      create_info->used_fields & HA_CREATE_USED_ROW_FORMAT ||
+      (table->s->row_type != create_info->row_type) ||
       create_info->used_fields & HA_CREATE_USED_PACK_KEYS ||
       create_info->used_fields & HA_CREATE_USED_MAX_ROWS ||
       (alter_info->flags & (ALTER_RECREATE | ALTER_FOREIGN_KEY)) ||
@@ -6307,7 +6307,10 @@ view_err:
   }
 
   if (create_info->row_type == ROW_TYPE_NOT_USED)
+  {
     create_info->row_type= table->s->row_type;
+    create_info->used_fields |= HA_CREATE_USED_ROW_FORMAT;
+  }
 
   DBUG_PRINT("info", ("old type: %s  new type: %s",
              ha_resolve_storage_engine_name(old_db_type),


Attachment: [text/bzr-bundle] bzr/azundris@mysql.com-20090529142224-9a4f7dnjqhblbsok.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (azundris:2910) Bug#39200Tatiana A. Nurnberg29 May 2009