From: Dmitry Lenev Date: January 26 2012 8:28pm Subject: bzr push into mysql-trunk-wl5534 branch (Dmitry.Lenev:3471 to 3472) WL#5534 List-Archive: http://lists.mysql.com/commits/142593 Message-Id: <20120126202833.81AC04209E4@jubjub> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3472 Dmitry Lenev 2012-01-27 WL#5534 Online ALTER, Phase 1. Patch #79: Improved some comments. modified: sql/mdl.cc sql/sql_table.cc 3471 Jon Olav Hauglid 2012-01-26 WL#5534 Online ALTER, Phase 1. Patch #78: More review comments. modified: mysql-test/suite/innodb/r/innodb-index.result sql/sql_table.cc === modified file 'sql/mdl.cc' --- a/sql/mdl.cc 2012-01-25 16:40:54 +0000 +++ b/sql/mdl.cc 2012-01-26 20:25:39 +0000 @@ -2598,6 +2598,9 @@ void MDL_ticket::downgrade_lock(enum_mdl /* Do nothing if already downgraded. Used when we FLUSH TABLE under LOCK TABLES and a table is listed twice in LOCK TABLES list. + Note that this code might even try to "downgrade" a weak lock + (e.g. SW) to a stronger one (e.g SNRW). So we can't even assert + here that target lock is weaker than existing lock. */ if (m_type == type || !has_stronger_or_equal_type(type)) return; === modified file 'sql/sql_table.cc' --- a/sql/sql_table.cc 2012-01-26 16:00:10 +0000 +++ b/sql/sql_table.cc 2012-01-26 20:25:39 +0000 @@ -5548,7 +5548,13 @@ bool mysql_compare_tables(TABLE *table, (uint) (field->flags & NOT_NULL_FLAG)) DBUG_RETURN(false); - /* Don't pack rows in old tables if the user has requested this. */ + /* + mysql_prepare_alter_table() clears HA_OPTION_PACK_RECORD bit when + preparing description of existing table. In ALTER TABLE it is later + updated to correct value by mysql_create_table_no_lock() call. + So to get correct value of this bit in this function we have to + mimic behavior of mysql_create_table_no_lock(). + */ if (create_info->row_type == ROW_TYPE_DYNAMIC || (tmp_new_field->flags & BLOB_FLAG) || (tmp_new_field->sql_type == MYSQL_TYPE_VARCHAR && No bundle (reason: useless for push emails).