List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:December 21 2011 11:15am
Subject:bzr push into mysql-trunk-wl5534 branch (jon.hauglid:3458 to 3459) WL#5534
View as plain text  
 3459 Jon Olav Hauglid	2011-12-21
      WL#5534 Online ALTER, Phase 1.
      
      Patch #71: Review changes:
      - Use handler::notify_table_changed() instead of
        handler::ha_create_handler_files() to notify storage
        engine about updated table definition.
      - Remove commit between inplace_alter_table() and
        commit_inplace_alter_table() calls.

    modified:
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.cc
      sql/handler.h
      sql/sql_table.cc
 3458 Jon Olav Hauglid	2011-12-21 [merge]
      Merge from mysql-trunk to mysql-trunk-wl5534
      Text conflict in sql/ha_partition.cc
      Text conflict in sql/sql_admin.cc
      Text conflict in sql/sql_partition.cc

    added:
      mysql-test/extra/binlog_tests/mysqlbinlog_start_stop_1.inc
      mysql-test/extra/binlog_tests/mysqlbinlog_start_stop_2.inc
      mysql-test/suite/perfschema/r/start_server_disable_idle.result
      mysql-test/suite/perfschema/r/start_server_disable_stages.result
      mysql-test/suite/perfschema/r/start_server_disable_statements.result
      mysql-test/suite/perfschema/r/start_server_disable_waits.result
      mysql-test/suite/perfschema/t/start_server_disable_idle-master.opt
      mysql-test/suite/perfschema/t/start_server_disable_idle.test
      mysql-test/suite/perfschema/t/start_server_disable_stages-master.opt
      mysql-test/suite/perfschema/t/start_server_disable_stages.test
      mysql-test/suite/perfschema/t/start_server_disable_statements-master.opt
      mysql-test/suite/perfschema/t/start_server_disable_statements.test
      mysql-test/suite/perfschema/t/start_server_disable_waits-master.opt
      mysql-test/suite/perfschema/t/start_server_disable_waits.test
    renamed:
      mysql-test/r/mysqlbinlog2.result => mysql-test/r/mysqlbinlog_start_stop.result
      mysql-test/suite/rpl/r/rpl_mts_check_concurrency.result => mysql-test/suite/rpl/r/rpl_mts_debug.result
      mysql-test/suite/rpl/t/rpl_mts_check_concurrency-slave.opt => mysql-test/suite/rpl/t/rpl_mts_debug-slave.opt
      mysql-test/suite/rpl/t/rpl_mts_check_concurrency.test => mysql-test/suite/rpl/t/rpl_mts_debug.test
      mysql-test/t/mysqlbinlog2.test => mysql-test/t/mysqlbinlog_start_stop.test
    modified:
      mysql-test/include/order_by.inc
      mysql-test/r/order_by_all.result
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      mysql-test/r/partition_list.result
      mysql-test/r/partition_mgm.result
      mysql-test/r/ps_ddl.result
      mysql-test/r/type_temporal_fractional.result
      mysql-test/suite/innodb/r/innodb_buffer_pool_load.result
      mysql-test/suite/innodb/t/innodb_buffer_pool_load.test
      mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
      mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
      mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result
      mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result
      mysql-test/suite/sys_vars/r/slave_checkpoint_group_basic.result
      mysql-test/suite/sys_vars/r/slave_checkpoint_period_basic.result
      mysql-test/suite/sys_vars/r/slave_parallel_workers_basic.result
      mysql-test/suite/sys_vars/r/slave_pending_jobs_size_max_basic.result
      mysql-test/suite/sys_vars/t/innodb_adaptive_max_sleep_delay_basic.test
      mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test
      mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test
      mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test
      mysql-test/suite/sys_vars/t/slave_checkpoint_group_basic.test
      mysql-test/suite/sys_vars/t/slave_checkpoint_period_basic.test
      mysql-test/suite/sys_vars/t/slave_parallel_workers_basic.test
      mysql-test/suite/sys_vars/t/slave_pending_jobs_size_max_basic.test
      mysql-test/t/partition_list.test
      mysql-test/t/partition_mgm.test
      mysql-test/t/ps_ddl.test
      mysql-test/t/type_temporal_fractional.test
      sql/field.h
      sql/ha_partition.cc
      sql/item.h
      sql/item_func.cc
      sql/item_sum.cc
      sql/item_sum.h
      sql/item_timefunc.cc
      sql/item_timefunc.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/partition_element.h
      sql/partition_info.cc
      sql/partition_info.h
      sql/rpl_info_factory.cc
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/rpl_rli_pdb.cc
      sql/rpl_slave.cc
      sql/rpl_slave.h
      sql/sql_admin.cc
      sql/sql_base.cc
      sql/sql_executor.cc
      sql/sql_partition.cc
      sql/sql_partition.h
      sql/sql_select.cc
      sql/sql_view.cc
      sql/sql_yacc.yy
      sql/sys_vars.cc
      sql/table.h
      sql/unireg.h
      storage/innobase/buf/buf0flu.cc
      storage/innobase/include/trx0sys.h
      storage/innobase/trx/trx0sys.cc
      storage/perfschema/pfs.cc
      mysql-test/r/mysqlbinlog_start_stop.result
      mysql-test/suite/rpl/r/rpl_mts_debug.result
      mysql-test/suite/rpl/t/rpl_mts_debug.test
      mysql-test/t/mysqlbinlog_start_stop.test
=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2011-12-21 08:49:47 +0000
+++ b/sql/ha_partition.cc	2011-12-21 09:35:29 +0000
@@ -7132,14 +7132,14 @@ err:
 }
 
 
-void ha_partition::notify_table_changed(TABLE *altered_table)
+void ha_partition::notify_table_changed()
 {
   handler **file;
 
   DBUG_ENTER("ha_partition::notify_table_changed");
 
   for (file= m_file; *file; file++)
-    (*file)->ha_notify_table_changed(altered_table);
+    (*file)->ha_notify_table_changed();
 
   DBUG_VOID_RETURN;
 }

=== modified file 'sql/ha_partition.h'
--- a/sql/ha_partition.h	2011-12-16 16:40:15 +0000
+++ b/sql/ha_partition.h	2011-12-21 09:35:29 +0000
@@ -1070,7 +1070,7 @@ public:
                                             HA_CREATE_INFO *create_info,
                                             Alter_inplace_info *ha_alter_info,
                                             bool commit);
-    virtual void notify_table_changed(TABLE *altered_table);
+    virtual void notify_table_changed();
 
   /*
     -------------------------------------------------------------------------

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2011-12-16 16:40:15 +0000
+++ b/sql/handler.cc	2011-12-21 09:35:29 +0000
@@ -4108,6 +4108,18 @@ bool handler::commit_inplace_alter_table
   DBUG_RETURN(false);
 }
 
+
+/*
+   Default implementation to support in-place alter table
+   and old online add/drop index API
+*/
+
+void handler::notify_table_changed()
+{
+  ha_create_handler_files(table->s->path.str, NULL, CHF_INDEX_FLAG, NULL);
+}
+
+
 /**
   Rename table: public interface.
 

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2011-12-16 15:08:54 +0000
+++ b/sql/handler.h	2011-12-21 09:35:29 +0000
@@ -2508,9 +2508,9 @@ public:
  }
 
 
- void ha_notify_table_changed(TABLE *altered_table)
+ void ha_notify_table_changed()
  {
-   notify_table_changed(altered_table);
+   notify_table_changed();
  }
 
 
@@ -2589,11 +2589,9 @@ protected:
  /**
     Notify the storage engine that the table structure (.FRM) has been updated.
 
-    @param  altered_table  Table that has been changed.
-
     @note No errors are allowed during notify_table_changed().
  */
- virtual void notify_table_changed(TABLE *altered_table) { }
+ virtual void notify_table_changed();
 
 public:
  /* End of On-line/in-place ALTER TABLE interface. */

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2011-12-20 12:49:28 +0000
+++ b/sql/sql_table.cc	2011-12-21 09:35:29 +0000
@@ -5858,9 +5858,6 @@ static bool mysql_inplace_alter_table(TH
     goto rollback;
   }
 
-  if (trans_commit_stmt(thd) || trans_commit_implicit(thd))
-    goto rollback;
-
   // Upgrade to EXCLUSIVE before commit.
   if (wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_RENAME))
     goto rollback;
@@ -5911,9 +5908,7 @@ static bool mysql_inplace_alter_table(TH
     Tell the handler that the changed frm is on disk and table
     has been re-opened
   */
-  table_list->table->file->ha_create_handler_files(alter_ctx->get_path(),
-                                                   NULL, CHF_INDEX_FLAG,
-                                                   create_info);
+  table_list->table->file->ha_notify_table_changed();
 
   /*
     We might be going to reopen table down on the road, so we have to

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5534 branch (jon.hauglid:3458 to 3459) WL#5534Jon Olav Hauglid21 Dec