List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:November 16 2011 11:30am
Subject:bzr push into mysql-trunk-wl5534 branch (jon.hauglid:3421 to 3422) WL#5534
View as plain text  
 3422 Jon Olav Hauglid	2011-11-16
      WL#5534 Online ALTER, Phase 1.
        
      Patch #46: Review fixes, part 4.
      - Renamed Alter_inplace_information to Alter_inplace_info
      - Moved parser flags to Alter_info and documented them
      - Moved handler flags to Alter_inplace_info, removed HA_ prefix
        and added documentation
      - Removed unused parser and handler flags
      - Added HA_ALTER_FLAGS member to Alter_inplace_info and
        removed it as an explicit parameter in Online alter API calls
      - Removed const from ha_alter_info parameter in
        handler::check_if_supported_inplace_alter()
      - Converted HA_ALTER_FLAGS from Bitmap to ulong and 
        reverted changes introduced to sql_bitmap
      - Added missing DROP_PK_INDEX flag to compatibilty layer
        checks.
      - Removed setup_ha_alter_flags()
      - Renamed compare_tables() to fill_alter_inplace_info()
      - Added is_inplace_alter_impossible() to check for operations
        that by design cannot be performed using in-place alter.

    modified:
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.cc
      sql/handler.h
      sql/sql_admin.cc
      sql/sql_alter.cc
      sql/sql_alter.h
      sql/sql_bitmap.h
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_partition.cc
      sql/sql_partition_admin.cc
      sql/sql_table.cc
      sql/sql_yacc.yy
 3421 Jon Olav Hauglid	2011-11-14 [merge]
      Merge from mysql-trunk to mysql-trunk-wl5534
      Text conflict in sql/share/errmsg-utf8.txt
      Text conflict in sql/sql_table.cc

    removed:
      BUILD/compile-alpha-debug
      BUILD/compile-darwin-mwcc
      BUILD/compile-irix-mips64-mipspro
      BUILD/compile-pentium-icc
      BUILD/compile-pentium-icc-valgrind-max
      BUILD/compile-pentium-icc-yassl
      BUILD/compile-pentium-pgcc
      mysql-test/suite/binlog/r/binlog_truncate_innodb.result
      mysql-test/suite/binlog/t/binlog_truncate_innodb.test
      mysys/my_new.cc
    added:
      include/mysql/psi/psi_abi_v0.h
      include/mysql/psi/psi_abi_v0.h.pp
      include/mysql_com_server.h
      mysql-test/suite/innodb/r/innodb-restart.result
      mysql-test/suite/innodb/r/innodb_replace.result
      mysql-test/suite/innodb/t/innodb-restart.test
      mysql-test/suite/innodb/t/innodb_replace.test
      mysql-test/suite/perfschema/r/nesting.result
      mysql-test/suite/perfschema/t/nesting.test
      mysql-test/suite/rpl/r/rpl_master_connection.result
      mysql-test/suite/rpl/t/rpl_master_connection-master.opt
      mysql-test/suite/rpl/t/rpl_master_connection-slave.opt
      mysql-test/suite/rpl/t/rpl_master_connection.test
      mysys/my_isnan.c
      unittest/gunit/cost_estimate-t.cc
      unittest/gunit/filesort_buffer-t.cc
      unittest/gunit/stdcxx-t.cc
    renamed:
      mysys/psi_noop.cc => mysys/psi_noop.c
      sql/udf_example.c => sql/udf_example.cc
    modified:
      BUILD/SETUP.sh
      BUILD/build_mccge.sh
      BUILD/compile-dist
      BUILD/compile-solaris-amd64
      BUILD/compile-solaris-amd64-forte
      BUILD/compile-solaris-amd64-forte-debug
      BUILD/compile-solaris-sparc
      BUILD/compile-solaris-sparc-debug
      BUILD/compile-solaris-sparc-forte
      BUILD/compile-solaris-sparc-purify
      VERSION
      client/CMakeLists.txt
      client/mysql.cc
      client/mysql_plugin.c
      client/mysql_upgrade.c
      client/mysqlbinlog.cc
      client/mysqldump.c
      client/mysqltest.cc
      client/sql_string.cc
      cmake/abi_check.cmake
      cmake/build_configurations/mysql_release.cmake
      cmake/configure.pl
      cmake/info_macros.cmake.in
      cmake/os/Windows.cmake
      cmake/readline.cmake
      config.h.cmake
      configure.cmake
      dbug/dbug.c
      include/CMakeLists.txt
      include/m_string.h
      include/my_global.h
      include/my_pthread.h
      include/mysql.h
      include/mysql.h.pp
      include/mysql/psi/mysql_idle.h
      include/mysql/psi/mysql_socket.h
      include/mysql/psi/mysql_thread.h
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v1.h
      include/mysql/psi/psi_abi_v1.h.pp
      include/mysql/psi/psi_abi_v2.h.pp
      include/mysql_com.h
      include/waiting_threads.h
      libmysql/libmysql.c
      libmysqld/lib_sql.cc
      mysql-test/CMakeLists.txt
      mysql-test/collections/default.experimental
      mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
      mysql-test/include/join_cache.inc
      mysql-test/include/mrr_tests.inc
      mysql-test/include/mtr_warnings.sql
      mysql-test/include/subquery_sj.inc
      mysql-test/include/subquery_sj_innodb.inc
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/mysql-test-run.pl
      mysql-test/r/alter_table-big.result
      mysql-test/r/auth_rpl.result
      mysql-test/r/case.result
      mysql-test/r/derived.result
      mysql-test/r/distinct.result
      mysql-test/r/events_2.result
      mysql-test/r/events_bugs.result
      mysql-test/r/filesort_debug.result
      mysql-test/r/func_analyse.result
      mysql-test/r/func_time.result
      mysql-test/r/gis.result
      mysql-test/r/group_by.result
      mysql-test/r/innodb_explain_non_select_all.result
      mysql-test/r/innodb_mrr.result
      mysql-test/r/innodb_mrr_all.result
      mysql-test/r/innodb_mrr_cost.result
      mysql-test/r/innodb_mrr_cost_all.result
      mysql-test/r/innodb_mrr_cost_icp.result
      mysql-test/r/innodb_mrr_icp.result
      mysql-test/r/innodb_mrr_none.result
      mysql-test/r/join_cache_bka.result
      mysql-test/r/join_cache_bka_nixbnl.result
      mysql-test/r/join_cache_bkaunique.result
      mysql-test/r/join_cache_bnl.result
      mysql-test/r/join_cache_nojb.result
      mysql-test/r/myisam_explain_non_select_all.result
      mysql-test/r/myisam_mrr.result
      mysql-test/r/myisam_mrr_all.result
      mysql-test/r/myisam_mrr_cost.result
      mysql-test/r/myisam_mrr_cost_all.result
      mysql-test/r/myisam_mrr_cost_icp.result
      mysql-test/r/myisam_mrr_icp.result
      mysql-test/r/myisam_mrr_none.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqltest.result
      mysql-test/r/query_cache.result
      mysql-test/r/rpl_mysqldump_slave.result
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_bka.result
      mysql-test/r/subquery_mat_all.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_bka.result
      mysql-test/r/subquery_sj_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_all_bkaunique.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_bka.result
      mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result
      mysql-test/r/subquery_sj_dupsweed_bkaunique.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_bka.result
      mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result
      mysql-test/r/subquery_sj_firstmatch_bkaunique.result
      mysql-test/r/subquery_sj_innodb_all.result
      mysql-test/r/subquery_sj_innodb_all_bka.result
      mysql-test/r/subquery_sj_innodb_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_innodb_all_bkaunique.result
      mysql-test/r/subquery_sj_innodb_none.result
      mysql-test/r/subquery_sj_innodb_none_bka.result
      mysql-test/r/subquery_sj_innodb_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_innodb_none_bkaunique.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_bka.result
      mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result
      mysql-test/r/subquery_sj_loosescan_bkaunique.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_bka.result
      mysql-test/r/subquery_sj_mat_bka_nixbnl.result
      mysql-test/r/subquery_sj_mat_bkaunique.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_bka.result
      mysql-test/r/subquery_sj_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_none_bkaunique.result
      mysql-test/r/udf.result
      mysql-test/r/variables.result
      mysql-test/r/view.result
      mysql-test/suite/binlog/r/binlog_rewrite.result
      mysql-test/suite/binlog/t/disabled.def
      mysql-test/suite/funcs_1/t/storedproc.test
      mysql-test/suite/innodb/r/innodb-lock.result
      mysql-test/suite/innodb/t/innodb-lock.test
      mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
      mysql-test/suite/opt_trace/include/general.inc
      mysql-test/suite/opt_trace/include/general2.inc
      mysql-test/suite/opt_trace/include/subquery.inc
      mysql-test/suite/opt_trace/r/bugs_no_prot_all.result
      mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result
      mysql-test/suite/opt_trace/r/charset.result
      mysql-test/suite/opt_trace/r/filesort_pq.result
      mysql-test/suite/opt_trace/r/general2_no_prot.result
      mysql-test/suite/opt_trace/r/general2_ps_prot.result
      mysql-test/suite/opt_trace/r/general_no_prot_all.result
      mysql-test/suite/opt_trace/r/general_no_prot_none.result
      mysql-test/suite/opt_trace/r/general_ps_prot_all.result
      mysql-test/suite/opt_trace/r/general_ps_prot_none.result
      mysql-test/suite/opt_trace/r/range_no_prot.result
      mysql-test/suite/opt_trace/r/range_ps_prot.result
      mysql-test/suite/opt_trace/r/subquery_no_prot.result
      mysql-test/suite/opt_trace/r/subquery_ps_prot.result
      mysql-test/suite/parts/r/rpl-partition-dml-1-1-innodb.result
      mysql-test/suite/parts/r/rpl-partition-dml-1-1-myisam.result
      mysql-test/suite/parts/r/rpl_partition.result
      mysql-test/suite/perfschema/include/event_aggregate_setup.inc
      mysql-test/suite/perfschema/r/event_aggregate.result
      mysql-test/suite/perfschema/r/event_aggregate_no_a.result
      mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
      mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
      mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
      mysql-test/suite/perfschema/r/event_aggregate_no_h.result
      mysql-test/suite/perfschema/r/event_aggregate_no_u.result
      mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
      mysql-test/suite/perfschema/r/ortho_iter.result
      mysql-test/suite/perfschema/r/privilege_table_io.result
      mysql-test/suite/perfschema/r/relaylog.result
      mysql-test/suite/perfschema/r/start_server_innodb.result
      mysql-test/suite/perfschema/r/start_server_no_account.result
      mysql-test/suite/perfschema/r/start_server_no_cond_class.result
      mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
      mysql-test/suite/perfschema/r/start_server_no_file_class.result
      mysql-test/suite/perfschema/r/start_server_no_file_inst.result
      mysql-test/suite/perfschema/r/start_server_no_host.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
      mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
      mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
      mysql-test/suite/perfschema/r/start_server_no_socket_class.result
      mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
      mysql-test/suite/perfschema/r/start_server_no_stage_class.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
      mysql-test/suite/perfschema/r/start_server_no_table_inst.result
      mysql-test/suite/perfschema/r/start_server_no_thread_class.result
      mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
      mysql-test/suite/perfschema/r/start_server_no_user.result
      mysql-test/suite/perfschema/r/start_server_no_waits_history.result
      mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
      mysql-test/suite/perfschema/r/start_server_off.result
      mysql-test/suite/perfschema/r/start_server_on.result
      mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_off.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
      mysql-test/suite/perfschema/t/socket_instances_func.test
      mysql-test/suite/rpl/r/rpl_000010.result
      mysql-test/suite/rpl/r/rpl_000011.result
      mysql-test/suite/rpl/r/rpl_000013.result
      mysql-test/suite/rpl/r/rpl_000017.result
      mysql-test/suite/rpl/r/rpl_DML_error.result
      mysql-test/suite/rpl/r/rpl_EE_err.result
      mysql-test/suite/rpl/r/rpl_LD_INFILE.result
      mysql-test/suite/rpl/r/rpl_alter.result
      mysql-test/suite/rpl/r/rpl_alter_db.result
      mysql-test/suite/rpl/r/rpl_alter_repository.result
      mysql-test/suite/rpl/r/rpl_auto_increment.result
      mysql-test/suite/rpl/r/rpl_auto_increment_11932.result
      mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result
      mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result
      mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result
      mysql-test/suite/rpl/r/rpl_binlog_corruption.result
      mysql-test/suite/rpl/r/rpl_binlog_errors.result
      mysql-test/suite/rpl/r/rpl_binlog_grant.result
      mysql-test/suite/rpl/r/rpl_bit.result
      mysql-test/suite/rpl/r/rpl_bit_npk.result
      mysql-test/suite/rpl/r/rpl_blackhole.result
      mysql-test/suite/rpl/r/rpl_bug26395.result
      mysql-test/suite/rpl/r/rpl_bug31076.result
      mysql-test/suite/rpl/r/rpl_bug33931.result
      mysql-test/suite/rpl/r/rpl_bug37426.result
      mysql-test/suite/rpl/r/rpl_bug38694.result
      mysql-test/suite/rpl/r/rpl_bug41902.result
      mysql-test/suite/rpl/r/rpl_change_master.result
      mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result
      mysql-test/suite/rpl/r/rpl_change_master_dbug.result
      mysql-test/suite/rpl/r/rpl_charset.result
      mysql-test/suite/rpl/r/rpl_charset_sjis.result
      mysql-test/suite/rpl/r/rpl_checksum.result
      mysql-test/suite/rpl/r/rpl_checksum_cache.result
      mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
      mysql-test/suite/rpl/r/rpl_colSize.result
      mysql-test/suite/rpl/r/rpl_commit_after_flush.result
      mysql-test/suite/rpl/r/rpl_concurrency_error.result
      mysql-test/suite/rpl/r/rpl_conditional_comments.result
      mysql-test/suite/rpl/r/rpl_corruption.result
      mysql-test/suite/rpl/r/rpl_crash_safe_master.result
      mysql-test/suite/rpl/r/rpl_create_database.result
      mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
      mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result
      mysql-test/suite/rpl/r/rpl_cross_version.result
      mysql-test/suite/rpl/r/rpl_current_user.result
      mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
      mysql-test/suite/rpl/r/rpl_delete_no_where.result
      mysql-test/suite/rpl/r/rpl_do_db_filter.result
      mysql-test/suite/rpl/r/rpl_do_grant.result
      mysql-test/suite/rpl/r/rpl_do_table_filter_insensitive.result
      mysql-test/suite/rpl/r/rpl_do_table_filter_sensitive.result
      mysql-test/suite/rpl/r/rpl_drop.result
      mysql-test/suite/rpl/r/rpl_drop_db.result
      mysql-test/suite/rpl/r/rpl_drop_temp.result
      mysql-test/suite/rpl/r/rpl_drop_view.result
      mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
      mysql-test/suite/rpl/r/rpl_empty_master_host.result
      mysql-test/suite/rpl/r/rpl_err_ignoredtable.result
      mysql-test/suite/rpl/r/rpl_events.result
      mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
      mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
      mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
      mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
      mysql-test/suite/rpl/r/rpl_failed_optimize.result
      mysql-test/suite/rpl/r/rpl_filter_database.result
      mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
      mysql-test/suite/rpl/r/rpl_flush_logs.result
      mysql-test/suite/rpl/r/rpl_flushlog_loop.result
      mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result
      mysql-test/suite/rpl/r/rpl_free_items.result
      mysql-test/suite/rpl/r/rpl_general_log.result
      mysql-test/suite/rpl/r/rpl_geometry.result
      mysql-test/suite/rpl/r/rpl_get_lock.result
      mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
      mysql-test/suite/rpl/r/rpl_grant.result
      mysql-test/suite/rpl/r/rpl_grant_plugin.result
      mysql-test/suite/rpl/r/rpl_heartbeat.result
      mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result
      mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
      mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result
      mysql-test/suite/rpl/r/rpl_idempotency.result
      mysql-test/suite/rpl/r/rpl_ignore_db_filter.result
      mysql-test/suite/rpl/r/rpl_ignore_grant.result
      mysql-test/suite/rpl/r/rpl_ignore_revoke.result
      mysql-test/suite/rpl/r/rpl_ignore_table.result
      mysql-test/suite/rpl/r/rpl_ignore_table_filter_insensitive.result
      mysql-test/suite/rpl/r/rpl_ignore_table_filter_sensitive.result
      mysql-test/suite/rpl/r/rpl_ignore_table_update.result
      mysql-test/suite/rpl/r/rpl_incident.result
      mysql-test/suite/rpl/r/rpl_init_slave.result
      mysql-test/suite/rpl/r/rpl_init_slave_errors.result
      mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
      mysql-test/suite/rpl/r/rpl_innodb_bug30888.result
      mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
      mysql-test/suite/rpl/r/rpl_insert.result
      mysql-test/suite/rpl/r/rpl_insert_id.result
      mysql-test/suite/rpl/r/rpl_insert_id_pk.result
      mysql-test/suite/rpl/r/rpl_insert_ignore.result
      mysql-test/suite/rpl/r/rpl_invoked_features.result
      mysql-test/suite/rpl/r/rpl_ip_mix.result
      mysql-test/suite/rpl/r/rpl_ip_mix2.result
      mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result
      mysql-test/suite/rpl/r/rpl_ipv6.result
      mysql-test/suite/rpl/r/rpl_killed_ddl.result
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/r/rpl_lcase_tblnames_rewrite_db.result
      mysql-test/suite/rpl/r/rpl_loaddata.result
      mysql-test/suite/rpl/r/rpl_loaddata_charset.result
      mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
      mysql-test/suite/rpl/r/rpl_loaddata_m.result
      mysql-test/suite/rpl/r/rpl_loaddata_map.result
      mysql-test/suite/rpl/r/rpl_loaddata_s.result
      mysql-test/suite/rpl/r/rpl_loaddata_simple.result
      mysql-test/suite/rpl/r/rpl_loaddata_symlink.result
      mysql-test/suite/rpl/r/rpl_loaddatalocal.result
      mysql-test/suite/rpl/r/rpl_loadfile.result
      mysql-test/suite/rpl/r/rpl_locale.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_many_optimize.result
      mysql-test/suite/rpl/r/rpl_master_pos_wait.result
      mysql-test/suite/rpl/r/rpl_migration_crash_safe.result
      mysql-test/suite/rpl/r/rpl_misc_functions.result
      mysql-test/suite/rpl/r/rpl_mix_found_rows.result
      mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result
      mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
      mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
      mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
      mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_mixed_mts_crash_safe.result
      mysql-test/suite/rpl/r/rpl_mixed_mts_rec_crash_safe.result
      mysql-test/suite/rpl/r/rpl_mixed_mts_rec_crash_safe_checksum.result
      mysql-test/suite/rpl/r/rpl_mts_check_concurrency.result
      mysql-test/suite/rpl/r/rpl_multi_delete.result
      mysql-test/suite/rpl/r/rpl_multi_delete2.result
      mysql-test/suite/rpl/r/rpl_multi_engine.result
      mysql-test/suite/rpl/r/rpl_multi_update.result
      mysql-test/suite/rpl/r/rpl_multi_update2.result
      mysql-test/suite/rpl/r/rpl_multi_update3.result
      mysql-test/suite/rpl/r/rpl_multi_update4.result
      mysql-test/suite/rpl/r/rpl_mysql_upgrade.result
      mysql-test/suite/rpl/r/rpl_name_const.result
      mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result
      mysql-test/suite/rpl/r/rpl_not_null_innodb.result
      mysql-test/suite/rpl/r/rpl_not_null_myisam.result
      mysql-test/suite/rpl/r/rpl_optimize.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_parallel.result
      mysql-test/suite/rpl/r/rpl_parallel_benchmark.result
      mysql-test/suite/rpl/r/rpl_parallel_conf_limits.result
      mysql-test/suite/rpl/r/rpl_parallel_conflicts.result
      mysql-test/suite/rpl/r/rpl_parallel_ddl.result
      mysql-test/suite/rpl/r/rpl_parallel_innodb.result
      mysql-test/suite/rpl/r/rpl_parallel_multi_db.result
      mysql-test/suite/rpl/r/rpl_parallel_seconds_behind_master.result
      mysql-test/suite/rpl/r/rpl_parallel_start_stop.result
      mysql-test/suite/rpl/r/rpl_parallel_switch_sequential.result
      mysql-test/suite/rpl/r/rpl_parallel_temp_query.result
      mysql-test/suite/rpl/r/rpl_partition_archive.result
      mysql-test/suite/rpl/r/rpl_partition_innodb.result
      mysql-test/suite/rpl/r/rpl_partition_memory.result
      mysql-test/suite/rpl/r/rpl_partition_myisam.result
      mysql-test/suite/rpl/r/rpl_plugin_load.result
      mysql-test/suite/rpl/r/rpl_ps.result
      mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
      mysql-test/suite/rpl/r/rpl_read_old_relay_log_info.result
      mysql-test/suite/rpl/r/rpl_read_only.result
      mysql-test/suite/rpl/r/rpl_relay_space_innodb.result
      mysql-test/suite/rpl/r/rpl_relay_space_myisam.result
      mysql-test/suite/rpl/r/rpl_relayrotate.result
      mysql-test/suite/rpl/r/rpl_relayspace.result
      mysql-test/suite/rpl/r/rpl_replicate_do.result
      mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result
      mysql-test/suite/rpl/r/rpl_report.result
      mysql-test/suite/rpl/r/rpl_rewrite_db_filter.result
      mysql-test/suite/rpl/r/rpl_rewrt_db.result
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result
      mysql-test/suite/rpl/r/rpl_row_001.result
      mysql-test/suite/rpl/r/rpl_row_4_bytes.result
      mysql-test/suite/rpl/r/rpl_row_NOW.result
      mysql-test/suite/rpl/r/rpl_row_USER.result
      mysql-test/suite/rpl/r/rpl_row_UUID.result
      mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
      mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
      mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
      mysql-test/suite/rpl/r/rpl_row_basic_8partition.result
      mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_row_blob_innodb.result
      mysql-test/suite/rpl/r/rpl_row_blob_myisam.result
      mysql-test/suite/rpl/r/rpl_row_colSize.result
      mysql-test/suite/rpl/r/rpl_row_conflicts.result
      mysql-test/suite/rpl/r/rpl_row_corruption.result
      mysql-test/suite/rpl/r/rpl_row_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_delayed_ins.result
      mysql-test/suite/rpl/r/rpl_row_drop.result
      mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
      mysql-test/suite/rpl/r/rpl_row_event_max_size.result
      mysql-test/suite/rpl/r/rpl_row_find_row.result
      mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
      mysql-test/suite/rpl/r/rpl_row_func001.result
      mysql-test/suite/rpl/r/rpl_row_func002.result
      mysql-test/suite/rpl/r/rpl_row_func003.result
      mysql-test/suite/rpl/r/rpl_row_idempotency.result
      mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
      mysql-test/suite/rpl/r/rpl_row_img_blobs.result
      mysql-test/suite/rpl/r/rpl_row_img_eng_full.result
      mysql-test/suite/rpl/r/rpl_row_img_eng_min.result
      mysql-test/suite/rpl/r/rpl_row_img_eng_noblob.result
      mysql-test/suite/rpl/r/rpl_row_img_idx_full.result
      mysql-test/suite/rpl/r/rpl_row_img_idx_min.result
      mysql-test/suite/rpl/r/rpl_row_img_idx_noblob.result
      mysql-test/suite/rpl/r/rpl_row_img_misc.result
      mysql-test/suite/rpl/r/rpl_row_img_sanity.result
      mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
      mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result
      mysql-test/suite/rpl/r/rpl_row_insert_delayed.result
      mysql-test/suite/rpl/r/rpl_row_lcase_tblnames.result
      mysql-test/suite/rpl/r/rpl_row_log.result
      mysql-test/suite/rpl/r/rpl_row_log_innodb.result
      mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
      mysql-test/suite/rpl/r/rpl_row_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_row_mts_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_mts_rec_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
      mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result
      mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result
      mysql-test/suite/rpl/r/rpl_row_record_find_myisam.result
      mysql-test/suite/rpl/r/rpl_row_reset_slave.result
      mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result
      mysql-test/suite/rpl/r/rpl_row_sp001.result
      mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result
      mysql-test/suite/rpl/r/rpl_row_sp003.result
      mysql-test/suite/rpl/r/rpl_row_sp005.result
      mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result
      mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result
      mysql-test/suite/rpl/r/rpl_row_sp008.result
      mysql-test/suite/rpl/r/rpl_row_sp009.result
      mysql-test/suite/rpl/r/rpl_row_sp010.result
      mysql-test/suite/rpl/r/rpl_row_sp011.result
      mysql-test/suite/rpl/r/rpl_row_sp012.result
      mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
      mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
      mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result
      mysql-test/suite/rpl/r/rpl_row_trig001.result
      mysql-test/suite/rpl/r/rpl_row_trig002.result
      mysql-test/suite/rpl/r/rpl_row_trig003.result
      mysql-test/suite/rpl/r/rpl_row_trig004.result
      mysql-test/suite/rpl/r/rpl_row_trunc_temp.result
      mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result
      mysql-test/suite/rpl/r/rpl_row_utf16.result
      mysql-test/suite/rpl/r/rpl_row_utf32.result
      mysql-test/suite/rpl/r/rpl_row_view01.result
      mysql-test/suite/rpl/r/rpl_row_wide_table.result
      mysql-test/suite/rpl/r/rpl_savepoint.result
      mysql-test/suite/rpl/r/rpl_seconds_behind_master.result
      mysql-test/suite/rpl/r/rpl_semi_sync.result
      mysql-test/suite/rpl/r/rpl_semi_sync_event.result
      mysql-test/suite/rpl/r/rpl_sequential.result
      mysql-test/suite/rpl/r/rpl_server_id1.result
      mysql-test/suite/rpl/r/rpl_server_id2.result
      mysql-test/suite/rpl/r/rpl_server_id_ignore.result
      mysql-test/suite/rpl/r/rpl_server_uuid.result
      mysql-test/suite/rpl/r/rpl_session_var.result
      mysql-test/suite/rpl/r/rpl_set_charset.result
      mysql-test/suite/rpl/r/rpl_set_null_innodb.result
      mysql-test/suite/rpl/r/rpl_set_null_myisam.result
      mysql-test/suite/rpl/r/rpl_show_errors.result
      mysql-test/suite/rpl/r/rpl_show_master_info_file.result
      mysql-test/suite/rpl/r/rpl_show_slave_hosts.result
      mysql-test/suite/rpl/r/rpl_show_slave_running.result
      mysql-test/suite/rpl/r/rpl_skip_error.result
      mysql-test/suite/rpl/r/rpl_skip_incident.result
      mysql-test/suite/rpl/r/rpl_slave_grp_exec.result
      mysql-test/suite/rpl/r/rpl_slave_load_in.result
      mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
      mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result
      mysql-test/suite/rpl/r/rpl_slave_skip.result
      mysql-test/suite/rpl/r/rpl_slave_start.result
      mysql-test/suite/rpl/r/rpl_slave_status.result
      mysql-test/suite/rpl/r/rpl_slow_query_log.result
      mysql-test/suite/rpl/r/rpl_sp.result
      mysql-test/suite/rpl/r/rpl_sp004.result
      mysql-test/suite/rpl/r/rpl_sp_effects.result
      mysql-test/suite/rpl/r/rpl_spec_variables.result
      mysql-test/suite/rpl/r/rpl_sporadic_master.result
      mysql-test/suite/rpl/r/rpl_ssl.result
      mysql-test/suite/rpl/r/rpl_ssl1.result
      mysql-test/suite/rpl/r/rpl_stm_000001.result
      mysql-test/suite/rpl/r/rpl_stm_EE_err2.result
      mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_stm_conflicts.result
      mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
      mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
      mysql-test/suite/rpl/r/rpl_stm_found_rows.result
      mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
      mysql-test/suite/rpl/r/rpl_stm_innodb.result
      mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result
      mysql-test/suite/rpl/r/rpl_stm_lcase_tblnames.result
      mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
      mysql-test/suite/rpl/r/rpl_stm_loadfile.result
      mysql-test/suite/rpl/r/rpl_stm_log.result
      mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
      mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result
      mysql-test/suite/rpl/r/rpl_stm_mixed_crash_safe.result
      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_stm_mts_crash_safe.result
      mysql-test/suite/rpl/r/rpl_stm_mts_rec_crash_safe.result
      mysql-test/suite/rpl/r/rpl_stm_multi_query.result
      mysql-test/suite/rpl/r/rpl_stm_no_op.result
      mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
      mysql-test/suite/rpl/r/rpl_stm_sql_mode.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result
      mysql-test/suite/rpl/r/rpl_stm_user_variables.result
      mysql-test/suite/rpl/r/rpl_stop_slave.result
      mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
      mysql-test/suite/rpl/r/rpl_sync.result
      mysql-test/suite/rpl/r/rpl_temp_table.result
      mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
      mysql-test/suite/rpl/r/rpl_temporary.result
      mysql-test/suite/rpl/r/rpl_temporary_errors.result
      mysql-test/suite/rpl/r/rpl_test_framework.result
      mysql-test/suite/rpl/r/rpl_timezone.result
      mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
      mysql-test/suite/rpl/r/rpl_trigger.result
      mysql-test/suite/rpl/r/rpl_trunc_temp.result
      mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
      mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
      mysql-test/suite/rpl/r/rpl_typeconv.result
      mysql-test/suite/rpl/r/rpl_typeconv_innodb.result
      mysql-test/suite/rpl/r/rpl_udf.result
      mysql-test/suite/rpl/r/rpl_user.result
      mysql-test/suite/rpl/r/rpl_user_variables.result
      mysql-test/suite/rpl/r/rpl_variables.result
      mysql-test/suite/rpl/r/rpl_variables_stm.result
      mysql-test/suite/rpl/r/rpl_view.result
      mysql-test/suite/rpl/r/rpl_view_multi.result
      mysql-test/suite/rpl/t/rpl_packet.test
      mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
      mysql-test/suite/rpl/t/rpl_temporary.test
      mysql-test/suite/sys_vars/inc/log_warnings_basic.inc
      mysql-test/suite/sys_vars/r/log_warnings_basic_32.result
      mysql-test/suite/sys_vars/r/log_warnings_basic_64.result
      mysql-test/suite/sys_vars/r/relay_log_basename_basic.result
      mysql-test/suite/sys_vars/r/relay_log_index_basic.result
      mysql-test/suite/sys_vars/r/rpl_init_slave_func.result
      mysql-test/t/alter_table-big.test
      mysql-test/t/case.test
      mysql-test/t/csv.test
      mysql-test/t/derived.test
      mysql-test/t/disabled.def
      mysql-test/t/distinct.test
      mysql-test/t/filesort_debug.test
      mysql-test/t/func_analyse.test
      mysql-test/t/func_time.test
      mysql-test/t/gis.test
      mysql-test/t/group_by.test
      mysql-test/t/information_schema_parameters.test
      mysql-test/t/information_schema_routines.test
      mysql-test/t/lock.test
      mysql-test/t/mysql_plugin.test
      mysql-test/t/mysqlbinlog2.test
      mysql-test/t/mysqltest.test
      mysql-test/t/ps.test
      mysql-test/t/ps_ddl.test
      mysql-test/t/query_cache.test
      mysql-test/t/rewrite_general_log.test
      mysql-test/t/sp-error.test
      mysql-test/t/sp.test
      mysql-test/t/trigger.test
      mysql-test/t/udf.test
      mysql-test/t/variables.test
      mysql-test/t/view.test
      mysql-test/t/view_grant.test
      mysql-test/valgrind.supp
      mysys/CMakeLists.txt
      mysys/array.c
      mysys/default.c
      mysys/lf_alloc-pin.c
      mysys/lf_dynarray.c
      mysys/mf_format.c
      mysys/mf_iocache.c
      mysys/my_alloc.c
      mysys/my_bitmap.c
      mysys/my_compare.c
      mysys/my_compress.c
      mysys/my_file.c
      mysys/stacktrace.c
      mysys/waiting_threads.c
      scripts/mysql_config.pl.in
      scripts/mysql_config.sh
      sql-common/client.c
      sql-common/client_plugin.c
      sql-common/my_time.c
      sql/CMakeLists.txt
      sql/binlog.cc
      sql/debug_sync.cc
      sql/field.cc
      sql/field.h
      sql/field_conv.cc
      sql/filesort.cc
      sql/filesort_utils.cc
      sql/filesort_utils.h
      sql/ha_partition.cc
      sql/handler.cc
      sql/handler.h
      sql/item.cc
      sql/item_buff.cc
      sql/item_cmpfunc.cc
      sql/item_func.cc
      sql/item_func.h
      sql/item_geofunc.cc
      sql/item_strfunc.cc
      sql/item_strfunc.h
      sql/item_sum.cc
      sql/item_timefunc.cc
      sql/item_timefunc.h
      sql/key.cc
      sql/lex.h
      sql/log.cc
      sql/log_event.cc
      sql/log_event.h
      sql/log_event_old.cc
      sql/mdl.cc
      sql/mdl.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/net_serv.cc
      sql/opt_explain.cc
      sql/opt_range.cc
      sql/opt_range.h
      sql/opt_trace.cc
      sql/opt_trace.h
      sql/opt_trace2server.cc
      sql/protocol.cc
      sql/rpl_handler.cc
      sql/rpl_mi.cc
      sql/rpl_mi.h
      sql/rpl_record.cc
      sql/rpl_reporting.cc
      sql/rpl_rli.cc
      sql/rpl_rli_pdb.cc
      sql/rpl_slave.cc
      sql/rpl_utility.cc
      sql/rpl_utility.h
      sql/set_var.cc
      sql/set_var.h
      sql/share/errmsg-utf8.txt
      sql/sp_head.cc
      sql/spatial.h
      sql/sql_acl.cc
      sql/sql_analyse.cc
      sql/sql_cache.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_client.cc
      sql/sql_connect.cc
      sql/sql_const.h
      sql/sql_derived.cc
      sql/sql_error.cc
      sql/sql_insert.cc
      sql/sql_join_cache.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_load.cc
      sql/sql_parse.cc
      sql/sql_partition.cc
      sql/sql_plugin.cc
      sql/sql_plugin.h
      sql/sql_prepare.cc
      sql/sql_profile.cc
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_show.cc
      sql/sql_string.cc
      sql/sql_table.cc
      sql/sql_table.h
      sql/sql_udf.cc
      sql/sql_union.cc
      sql/sql_yacc.yy
      sql/sys_vars.cc
      sql/table.cc
      sql/table.h
      sql/thr_malloc.cc
      sql/tztime.cc
      sql/udf_example.def
      sql/unireg.cc
      storage/csv/ha_tina.cc
      storage/federated/ha_federated.cc
      storage/heap/hp_create.c
      storage/heap/hp_static.c
      storage/heap/hp_test2.c
      storage/innobase/btr/btr0pcur.c
      storage/innobase/buf/buf0flu.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/ha_innodb.h
      storage/innobase/handler/handler0alter.cc
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/include/btr0pcur.h
      storage/innobase/include/btr0pcur.ic
      storage/innobase/include/dict0dict.ic
      storage/innobase/include/row0mysql.h
      storage/innobase/row/row0ins.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0vers.c
      storage/innobase/sync/sync0rw.c
      storage/myisam/ha_myisam.cc
      storage/myisam/ha_myisam.h
      storage/myisam/mi_cache.c
      storage/myisam/mi_check.c
      storage/myisam/mi_create.c
      storage/myisam/mi_dynrec.c
      storage/myisam/mi_extra.c
      storage/myisam/mi_open.c
      storage/myisam/mi_packrec.c
      storage/myisam/mi_static.c
      storage/myisam/myisamlog.c
      storage/myisam/myisampack.c
      storage/myisam/rt_mbr.c
      storage/myisam/sort.c
      storage/myisammrg/ha_myisammrg.cc
      storage/perfschema/pfs.cc
      strings/ctype-big5.c
      strings/ctype-bin.c
      strings/ctype-gbk.c
      strings/ctype-mb.c
      strings/ctype-simple.c
      strings/ctype-tis620.c
      strings/ctype-uca.c
      strings/ctype-ucs2.c
      strings/ctype-utf8.c
      strings/ctype.c
      strings/decimal.c
      strings/dtoa.c
      strings/my_vsnprintf.c
      support-files/mysql.spec.sh
      tests/mysql_client_test.c
      unittest/gunit/CMakeLists.txt
      unittest/gunit/gunit_test_main.cc
      unittest/gunit/item-t.cc
      unittest/mysys/lf-t.c
      unittest/mysys/my_atomic-t.c
      unittest/mysys/thr_template.c
      unittest/mysys/waiting_threads-t.c
      vio/viosocket.c
      win/create_def_file.js
      mysys/psi_noop.c
      sql/udf_example.cc
=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2011-11-14 15:41:08 +0000
+++ b/sql/ha_partition.cc	2011-11-16 11:29:51 +0000
@@ -1222,7 +1222,7 @@ int ha_partition::handle_opt_partitions(
       when ALTER TABLE <CMD> PARTITION ...
       it should only do named partitions, otherwise all partitions
     */
-    if (!(thd->lex->alter_info.flags & ALTER_ADMIN_PARTITION) ||
+    if (!(thd->lex->alter_info.flags & Alter_info::ALTER_ADMIN_PARTITION) ||
         part_elem->part_state == PART_ADMIN)
     {
       if (m_is_sub_partitioned)
@@ -3819,7 +3819,7 @@ int ha_partition::truncate_partition(Alt
   unlock_auto_increment();
 
   if (num_parts_set != num_parts_found &&
-      (!(alter_info->flags & ALTER_ALL_PARTITION)))
+      (!(alter_info->flags & Alter_info::ALTER_ALL_PARTITION)))
     DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND);
 
   *binlog_stmt= true;
@@ -6802,7 +6802,7 @@ void ha_partition::print_error(int error
   DBUG_PRINT("enter", ("error: %d", error));
 
   if ((error == HA_ERR_NO_PARTITION_FOUND) &&
-      ! (thd->lex->alter_info.flags & ALTER_TRUNCATE_PARTITION))
+      ! (thd->lex->alter_info.flags & Alter_info::ALTER_TRUNCATE_PARTITION))
     m_part_info->print_no_partition_found(table);
   else
   {
@@ -6915,8 +6915,7 @@ enum_alter_inplace_result
 ha_partition::check_if_supported_inplace_alter(const TABLE *table,
                                                HA_CREATE_INFO *create_info,
                                                const Alter_info *alter_info,
-                                               const Alter_inplace_information *ha_alter_info,
-                                               HA_ALTER_FLAGS *alter_flags)
+                                               Alter_inplace_info *ha_alter_info)
 {
   uint index= 0;
   enum_alter_inplace_result result= HA_ALTER_INPLACE_NO_LOCK;
@@ -6927,7 +6926,7 @@ ha_partition::check_if_supported_inplace
   {
     enum_alter_inplace_result p_result=
       m_file[index]->check_if_supported_inplace_alter(table, create_info, alter_info,
-                                                      ha_alter_info, alter_flags);
+                                                      ha_alter_info);
     if (p_result < result)
       result= p_result;
     if (result == HA_ALTER_ERROR)
@@ -6954,8 +6953,7 @@ public:
 
 
 bool ha_partition::prepare_inplace_alter_table(HA_CREATE_INFO *create_info,
-                                               Alter_inplace_information *ha_alter_info,
-                                               HA_ALTER_FLAGS *alter_flags)
+                                               Alter_inplace_info *ha_alter_info)
 {
   uint index= 0;
   bool error= false;
@@ -6976,8 +6974,7 @@ bool ha_partition::prepare_inplace_alter
   for (index= 0; index < m_tot_parts && !error; index++)
   {
     ha_alter_info->handler_ctx= NULL;
-    if (m_file[index]->prepare_inplace_alter_table(create_info, ha_alter_info,
-                                                   alter_flags))
+    if (m_file[index]->prepare_inplace_alter_table(create_info, ha_alter_info))
       error= true;
     part_inplace_ctx->handler_ctx_array[index]= ha_alter_info->handler_ctx;
   }
@@ -6988,8 +6985,7 @@ bool ha_partition::prepare_inplace_alter
 
 
 bool ha_partition::inplace_alter_table(HA_CREATE_INFO *create_info,
-                                       Alter_inplace_information *ha_alter_info,
-                                       HA_ALTER_FLAGS *alter_flags)
+                                       Alter_inplace_info *ha_alter_info)
 {
   uint index= 0;
   bool error= false;
@@ -7003,8 +6999,7 @@ bool ha_partition::inplace_alter_table(H
   for (index= 0; index < m_tot_parts && !error; index++)
   {
     ha_alter_info->handler_ctx= part_inplace_ctx->handler_ctx_array[index];
-    if (m_file[index]->inplace_alter_table(create_info, ha_alter_info,
-                                           alter_flags))
+    if (m_file[index]->inplace_alter_table(create_info, ha_alter_info))
       error= true;
     part_inplace_ctx->handler_ctx_array[index]= ha_alter_info->handler_ctx;
   }
@@ -7015,8 +7010,7 @@ bool ha_partition::inplace_alter_table(H
 
 
 bool ha_partition::commit_inplace_alter_table(HA_CREATE_INFO *create_info,
-                                              Alter_inplace_information *ha_alter_info,
-                                              HA_ALTER_FLAGS *alter_flags,
+                                              Alter_inplace_info *ha_alter_info,
                                               bool commit)
 {
   uint index= 0;
@@ -7032,7 +7026,7 @@ bool ha_partition::commit_inplace_alter_
   {
     ha_alter_info->handler_ctx= part_inplace_ctx->handler_ctx_array[index];
     if (m_file[index]->commit_inplace_alter_table(create_info, ha_alter_info,
-                                                  alter_flags, commit))
+                                                  commit))
     {
       error= true;
       // If commit fails, rollback remaining partitions.

=== modified file 'sql/ha_partition.h'
--- a/sql/ha_partition.h	2011-11-02 09:55:44 +0000
+++ b/sql/ha_partition.h	2011-11-16 11:29:51 +0000
@@ -1059,17 +1059,13 @@ public:
       check_if_supported_inplace_alter(const TABLE *table,
                                        HA_CREATE_INFO *create_info,
                                        const Alter_info *alter_info,
-                                       const Alter_inplace_information *ha_alter_info,
-                                       HA_ALTER_FLAGS *alter_flags);
+                                       Alter_inplace_info *ha_alter_info);
     virtual bool prepare_inplace_alter_table(HA_CREATE_INFO *create_info,
-                                             Alter_inplace_information *ha_alter_info,
-                                             HA_ALTER_FLAGS *alter_flags);
+                                             Alter_inplace_info *ha_alter_info);
     virtual bool inplace_alter_table(HA_CREATE_INFO *create_info,
-                                     Alter_inplace_information *ha_alter_info,
-                                     HA_ALTER_FLAGS *alter_flags);
+                                     Alter_inplace_info *ha_alter_info);
     virtual bool commit_inplace_alter_table(HA_CREATE_INFO *create_info,
-                                            Alter_inplace_information *ha_alter_info,
-                                            HA_ALTER_FLAGS *alter_flags,
+                                            Alter_inplace_info *ha_alter_info,
                                             bool commit);
     virtual void notify_table_changed(TABLE *altered_table);
 

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2011-11-14 15:41:08 +0000
+++ b/sql/handler.cc	2011-11-16 11:29:51 +0000
@@ -3719,7 +3719,7 @@ handler::ha_prepare_for_alter()
 */
 
 static bool
-is_index_maintenance_unique(const Alter_inplace_information *ha_alter_info,
+is_index_maintenance_unique(const Alter_inplace_info *ha_alter_info,
                             const TABLE *table)
 {
   const KEY *add_key;
@@ -3784,55 +3784,30 @@ enum_alter_inplace_result
 handler::check_if_supported_inplace_alter(const TABLE *table,
                                           HA_CREATE_INFO *create_info,
                                           const Alter_info *alter_info,
-                                          const Alter_inplace_information *ha_alter_info,
-                                          HA_ALTER_FLAGS *alter_flags)
+                                          Alter_inplace_info *ha_alter_info)
 {
   DBUG_ENTER("check_if_supported_alter");
+
   ulong handler_alter_flags= table->file->alter_table_flags(0);
-  HA_ALTER_FLAGS inplace_online_operations;
-  inplace_online_operations=
-    inplace_online_operations |
-    HA_ADD_INDEX |
-    HA_DROP_INDEX |
-    HA_ALTER_INDEX |
-    HA_ADD_UNIQUE_INDEX |
-    HA_DROP_UNIQUE_INDEX |
-    HA_ALTER_UNIQUE_INDEX |
-    HA_ADD_PK_INDEX |
-    HA_DROP_PK_INDEX |
-    HA_ALTER_PK_INDEX;
-  HA_ALTER_FLAGS copy_operations;
-  copy_operations=
-    copy_operations |
-    HA_ADD_COLUMN |
-    HA_DROP_COLUMN |
-    HA_ALTER_COLUMN_TYPE |
-    HA_ALTER_COLUMN_ORDER |
-    HA_ALTER_COLUMN_NULLABLE |
-    HA_ADD_FOREIGN_KEY |
-    HA_DROP_FOREIGN_KEY |
-    HA_ALTER_FOREIGN_KEY |
-    HA_ADD_CONSTRAINT |
-    HA_CHANGE_CHARACTER_SET |
-    HA_SET_DEFAULT_CHARACTER_SET |
-    HA_ALTER_STORAGE_ENGINE |
-    HA_RECREATE |
-    HA_ALTER_TABLE_REORG;
-  HA_ALTER_FLAGS inplace_offline_operations=
-    ~(inplace_online_operations) & ~(copy_operations);
   DBUG_PRINT("info", ("handler_alter_flags: %lu", handler_alter_flags));
-#ifndef DBUG_OFF
-  {
-    char dbug_string[HA_MAX_ALTER_FLAGS+1];
-    alter_flags->print(dbug_string);
-    DBUG_PRINT("info", ("alter_flags: %s", dbug_string));
-    inplace_offline_operations.print(dbug_string);
-    DBUG_PRINT("info", ("inplace_offline_operations: %s", dbug_string));
-  }
-#endif
+
+  Alter_inplace_info::HA_ALTER_FLAGS inplace_online_operations=
+    Alter_inplace_info::ADD_INDEX |
+    Alter_inplace_info::DROP_INDEX |
+    Alter_inplace_info::ADD_UNIQUE_INDEX |
+    Alter_inplace_info::DROP_UNIQUE_INDEX |
+    Alter_inplace_info::ADD_PK_INDEX |
+    Alter_inplace_info::DROP_PK_INDEX;
+  Alter_inplace_info::HA_ALTER_FLAGS inplace_offline_operations=
+    Alter_inplace_info::CHANGE_COLUMN |
+    Alter_inplace_info::ALTER_COLUMN_NAME |
+    Alter_inplace_info::COLUMN_DEFAULT_VALUE |
+    Alter_inplace_info::CHANGE_CREATE_OPTION;
+  Alter_inplace_info::HA_ALTER_FLAGS copy_operations=
+    ~(inplace_online_operations) & ~(inplace_offline_operations);
 
   /* Is there at least one operation that requires copy algorithm? */
-  if ((*alter_flags & copy_operations).is_set())
+  if (ha_alter_info->handler_flags & copy_operations)
     DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
 
   /*
@@ -3843,7 +3818,7 @@ handler::check_if_supported_inplace_alte
     DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
 
   /* Is there at least one in-place operation that must be done offline? */
-  if ((*alter_flags & inplace_offline_operations).is_set())
+  if (ha_alter_info->handler_flags & inplace_offline_operations)
   {
     if (table->file->check_if_incompatible_data(create_info, IS_EQUAL_YES)
         == COMPATIBLE_DATA_YES)
@@ -3856,57 +3831,50 @@ handler::check_if_supported_inplace_alte
   enum_alter_inplace_result result= HA_ALTER_ERROR;
 
   /* Add index */
-  if (alter_flags->is_set(HA_ADD_INDEX) ||
-      alter_flags->is_set(HA_ALTER_INDEX))
+  if (ha_alter_info->handler_flags & Alter_inplace_info::ADD_INDEX)
   {
     check_alter_index_flags(handler_alter_flags, &result,
                             HA_INPLACE_ADD_INDEX_NO_WRITE,
                             HA_INPLACE_ADD_INDEX_NO_READ_WRITE);
   }
   /* Drop index */
-  if (alter_flags->is_set(HA_DROP_INDEX) ||
-      alter_flags->is_set(HA_ALTER_INDEX))
+  if (ha_alter_info->handler_flags & Alter_inplace_info::DROP_INDEX)
   {
     check_alter_index_flags(handler_alter_flags, &result,
                             HA_INPLACE_DROP_INDEX_NO_WRITE,
                             HA_INPLACE_DROP_INDEX_NO_READ_WRITE);
   }
   /* Add unique index */
-  if (alter_flags->is_set(HA_ADD_UNIQUE_INDEX) ||
-      alter_flags->is_set(HA_ALTER_UNIQUE_INDEX))
+  if (ha_alter_info->handler_flags & Alter_inplace_info::ADD_UNIQUE_INDEX)
   {
     check_alter_index_flags(handler_alter_flags, &result,
                             HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE,
                             HA_INPLACE_ADD_UNIQUE_INDEX_NO_READ_WRITE);
   }
   /* Drop unique index */
-  if (alter_flags->is_set(HA_DROP_UNIQUE_INDEX) ||
-      alter_flags->is_set(HA_ALTER_UNIQUE_INDEX))
+  if (ha_alter_info->handler_flags & Alter_inplace_info::DROP_UNIQUE_INDEX)
   {
     check_alter_index_flags(handler_alter_flags, &result,
                             HA_INPLACE_DROP_UNIQUE_INDEX_NO_WRITE,
                             HA_INPLACE_DROP_UNIQUE_INDEX_NO_READ_WRITE);
   }
   /* Add primary key */
-  if (alter_flags->is_set(HA_ADD_PK_INDEX) ||
-      alter_flags->is_set(HA_ALTER_PK_INDEX))
+  if (ha_alter_info->handler_flags & Alter_inplace_info::ADD_PK_INDEX)
   {
     check_alter_index_flags(handler_alter_flags, &result,
                             HA_INPLACE_ADD_PK_INDEX_NO_WRITE,
                             HA_INPLACE_ADD_PK_INDEX_NO_READ_WRITE);
   }
   /* Drop primary key */
-  if (alter_flags->is_set(HA_DROP_PK_INDEX) ||
-      alter_flags->is_set(HA_ALTER_PK_INDEX))
+  if (ha_alter_info->handler_flags & Alter_inplace_info::DROP_PK_INDEX)
   {
     check_alter_index_flags(handler_alter_flags, &result,
                             HA_INPLACE_DROP_PK_INDEX_NO_WRITE,
                             HA_INPLACE_DROP_PK_INDEX_NO_READ_WRITE);
   }
 
-  /* Check if no alter_flags checks were hit. If so, use copy. */
-  if (result == HA_ALTER_ERROR)
-    result= HA_ALTER_INPLACE_NOT_SUPPORTED;
+  /* At least one ha_alter_info->handler_flags check should be hit. */
+  DBUG_ASSERT(result != HA_ALTER_ERROR);
 
   DBUG_RETURN(result);
 }
@@ -3918,20 +3886,20 @@ handler::check_if_supported_inplace_alte
 */
 
 bool handler::inplace_alter_table(HA_CREATE_INFO *create_info,
-                                  Alter_inplace_information *ha_alter_info,
-                                  HA_ALTER_FLAGS *alter_flags)
+                                  Alter_inplace_info *ha_alter_info)
 {
   DBUG_ENTER("inplace_alter_table");
   int error= 0;
-  HA_ALTER_FLAGS adding;
-  HA_ALTER_FLAGS dropping;
-
-  adding= adding | HA_ADD_INDEX | HA_ADD_UNIQUE_INDEX | HA_ADD_PK_INDEX |
-    HA_ALTER_INDEX | HA_ALTER_UNIQUE_INDEX | HA_ALTER_PK_INDEX;
-  dropping= dropping | HA_DROP_INDEX | HA_DROP_UNIQUE_INDEX |
-    HA_ALTER_INDEX | HA_ALTER_UNIQUE_INDEX | HA_ALTER_PK_INDEX;
+  Alter_inplace_info::HA_ALTER_FLAGS adding=
+    Alter_inplace_info::ADD_INDEX |
+    Alter_inplace_info::ADD_UNIQUE_INDEX |
+    Alter_inplace_info::ADD_PK_INDEX;
+  Alter_inplace_info::HA_ALTER_FLAGS dropping=
+    Alter_inplace_info::DROP_INDEX |
+    Alter_inplace_info::DROP_UNIQUE_INDEX |
+    Alter_inplace_info::DROP_PK_INDEX;
 
-  if ((*alter_flags & adding).is_set())
+  if (ha_alter_info->handler_flags & adding)
   {
     KEY           *key_info;
     KEY           *key;
@@ -3966,7 +3934,7 @@ bool handler::inplace_alter_table(HA_CRE
     ha_alter_info->handler_ctx->pending_add_index= true;
   }
 
-  if ((*alter_flags & dropping).is_set())
+  if (ha_alter_info->handler_flags & dropping)
   {
     /* Currently we must finalize add index if we also drop indexes */
     if (ha_alter_info->handler_ctx &&
@@ -4005,18 +3973,17 @@ bool handler::inplace_alter_table(HA_CRE
 */
 
 bool handler::commit_inplace_alter_table(HA_CREATE_INFO *create_info,
-                                         Alter_inplace_information *ha_alter_info,
-                                         HA_ALTER_FLAGS *alter_flags,
+                                         Alter_inplace_info *ha_alter_info,
                                          bool commit)
 {
   DBUG_ENTER("commit_inplace_alter_table");
   int error= 0;
-  HA_ALTER_FLAGS dropping;
-
-  dropping= dropping | HA_DROP_INDEX | HA_DROP_UNIQUE_INDEX |
-    HA_ALTER_INDEX | HA_ALTER_UNIQUE_INDEX | HA_ALTER_PK_INDEX;
+  Alter_inplace_info::HA_ALTER_FLAGS dropping=
+    Alter_inplace_info::DROP_INDEX |
+    Alter_inplace_info::DROP_UNIQUE_INDEX |
+    Alter_inplace_info::DROP_PK_INDEX;
 
-  if ((*alter_flags & dropping).is_set())
+  if (ha_alter_info->handler_flags & dropping)
   {
     if ((error= final_drop_index()))
     {

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2011-11-14 15:41:08 +0000
+++ b/sql/handler.h	2011-11-16 11:29:51 +0000
@@ -55,52 +55,6 @@ class Alter_info;
 #define HA_ADMIN_NEEDS_ALTER    -11
 #define HA_ADMIN_NEEDS_CHECK    -12
 
-/* Bits to show what an alter table will do */
-static const uint HA_MAX_ALTER_FLAGS= 40;
-typedef Bitmap<HA_MAX_ALTER_FLAGS> HA_ALTER_FLAGS;
-
-static const uint HA_ADD_INDEX                  = 0;
-static const uint HA_DROP_INDEX                 = 1;
-static const uint HA_ALTER_INDEX                = 2;
-static const uint HA_RENAME_INDEX               = 3;
-static const uint HA_ADD_UNIQUE_INDEX           = 4;
-static const uint HA_DROP_UNIQUE_INDEX          = 5;
-static const uint HA_ALTER_UNIQUE_INDEX         = 6;
-static const uint HA_RENAME_UNIQUE_INDEX        = 7;
-static const uint HA_ADD_PK_INDEX               = 8;
-static const uint HA_DROP_PK_INDEX              = 9;
-static const uint HA_ALTER_PK_INDEX             = 10;
-static const uint HA_ADD_COLUMN                 = 11;
-static const uint HA_DROP_COLUMN                = 12;
-static const uint HA_CHANGE_COLUMN              = 13;
-static const uint HA_ALTER_COLUMN_NAME          = 14;
-static const uint HA_ALTER_COLUMN_TYPE          = 15;
-static const uint HA_ALTER_COLUMN_ORDER         = 16;
-static const uint HA_ALTER_COLUMN_NULLABLE      = 17;
-static const uint HA_COLUMN_DEFAULT_VALUE       = 18;
-static const uint HA_COLUMN_STORAGE             = 19;
-static const uint HA_COLUMN_FORMAT              = 20;
-static const uint HA_ADD_FOREIGN_KEY            = 21;
-static const uint HA_DROP_FOREIGN_KEY           = 22;
-static const uint HA_ALTER_FOREIGN_KEY          = 23;
-static const uint HA_ADD_CONSTRAINT             = 24;
-static const uint HA_ADD_PARTITION              = 25;
-static const uint HA_DROP_PARTITION             = 26;
-static const uint HA_ALTER_PARTITION            = 27;
-static const uint HA_COALESCE_PARTITION         = 28;
-static const uint HA_REORGANIZE_PARTITION       = 29;
-static const uint HA_CHANGE_CHARACTER_SET       = 30;
-static const uint HA_SET_DEFAULT_CHARACTER_SET  = 31;
-static const uint HA_CHANGE_AUTOINCREMENT_VALUE = 32;
-static const uint HA_ALTER_STORAGE              = 33;
-static const uint HA_ALTER_TABLESPACE           = 34;
-static const uint HA_ALTER_ROW_FORMAT           = 35;
-static const uint HA_RENAME_TABLE               = 36;
-static const uint HA_ALTER_STORAGE_ENGINE       = 37;
-static const uint HA_RECREATE                   = 38;
-static const uint HA_ALTER_TABLE_REORG          = 39;
-/* Remember to increase HA_MAX_ALTER_FLAGS when adding more flags! */
-
 /* Return values for check_if_supported_inplace_alter */
 enum enum_alter_inplace_result {
   HA_ALTER_ERROR,
@@ -973,9 +927,73 @@ public:
 };
 
 
-class Alter_inplace_information
+class Alter_inplace_info
 {
 public:
+  /**
+     Bits to show in detail what operations the storage engine is
+     to execute.
+
+     All these operations are supported as in-place operations by the
+     SQL layer. This means that operations that by their nature must
+     be performed by copying the table to a temporary table, will not
+     have their own flags here (e.g. ALTER TABLE FORCE, ALTER TABLE
+     ENGINE).
+  */
+  typedef ulong HA_ALTER_FLAGS;
+
+  // Add non-unique, non-primary index
+  static const ulong ADD_INDEX                  = 1L << 0;
+
+  // Drop non-unique, non-primary index
+  static const ulong DROP_INDEX                 = 1L << 1;
+
+  // Add unique, non-primary index
+  static const ulong ADD_UNIQUE_INDEX           = 1L << 2;
+
+  // Drop unique, non-primary index
+  static const ulong DROP_UNIQUE_INDEX          = 1L << 3;
+
+  // Add primary index
+  static const ulong ADD_PK_INDEX               = 1L << 4;
+
+  // Drop primary index
+  static const ulong DROP_PK_INDEX              = 1L << 5;
+
+  // Add column
+  static const ulong ADD_COLUMN                 = 1L << 6;
+
+  // Drop column
+  static const ulong DROP_COLUMN                = 1L << 7;
+
+  // General flag for CHANGE [COLUMN] | MODIFY [COLUMN], See ALTER_COLUMN_*
+  static const ulong CHANGE_COLUMN              = 1L << 8;
+
+  // Rename column
+  static const ulong ALTER_COLUMN_NAME          = 1L << 9;
+
+  // Change column datatype
+  static const ulong ALTER_COLUMN_TYPE          = 1L << 10;
+
+  // Reorder column
+  static const ulong ALTER_COLUMN_ORDER         = 1L << 11;
+
+  // Change column from NULL to NOT NULL or vice versa
+  static const ulong ALTER_COLUMN_NULLABLE      = 1L << 12;
+
+  // Set or remove default column value
+  static const ulong COLUMN_DEFAULT_VALUE       = 1L << 13;
+
+  // Add or drop foreign key
+  static const ulong ALTER_FOREIGN_KEY          = 1L << 14;
+
+  // Change character set
+  static const ulong CHANGE_CHARACTER_SET       = 1L << 15;
+  static const ulong SET_DEFAULT_CHARACTER_SET  = 1L << 16;
+
+  // table_options changed, see HA_CREATE_INFO::used_fields for details.
+  static const ulong CHANGE_CREATE_OPTION       = 1L << 17;
+
   KEY  *key_info_buffer;
   uint key_count;
   uint index_drop_count;
@@ -983,15 +1001,17 @@ public:
   uint index_add_count;
   uint *index_add_buffer;
   inplace_alter_handler_ctx *handler_ctx;
+  HA_ALTER_FLAGS handler_flags;
 
-  Alter_inplace_information()
+  Alter_inplace_info()
     :key_info_buffer(NULL),
     key_count(0),
     index_drop_count(0),
     index_drop_buffer(NULL),
     index_add_count(0),
     index_add_buffer(NULL),
-    handler_ctx(NULL)
+    handler_ctx(NULL),
+    handler_flags(0)
   {}
 };
 
@@ -2298,7 +2318,6 @@ public:
                                 table properties.
     @param    alter_info        Data related to detected changes.
     @param    ha_alter_info     Structure holding data used during in-place alter.
-    @param    alter_flags       Bitmask that shows what will be changed.
 
     @retval   HA_ALTER_ERROR                  Unexpected error
     @retval   HA_ALTER_INPLACE_NOT_SUPPORTED  Not supported
@@ -2319,8 +2338,7 @@ public:
  check_if_supported_inplace_alter(const TABLE *table,
                                   HA_CREATE_INFO *create_info,
                                   const Alter_info *alter_info,
-                                  const Alter_inplace_information *ha_alter_info,
-                                  HA_ALTER_FLAGS *alter_flags);
+                                  Alter_inplace_info *ha_alter_info);
 
 
  /**
@@ -2335,20 +2353,18 @@ public:
     @param    create_info       Information from the parsing phase about new
                                 table properties.
     @param    ha_alter_info     Structure holding data used during in-place alter.
-    @param    alter_flags       Bitmask that shows what will be changed.
 
     @retval   true              Error
     @retval   false             Success
  */
  virtual bool prepare_inplace_alter_table(HA_CREATE_INFO *create_info,
-                                          Alter_inplace_information *ha_alter_info,
-                                          HA_ALTER_FLAGS *alter_flags)
+                                          Alter_inplace_info *ha_alter_info)
  { return false; }
 
 
  /**
     Alter the table structure in-place with operations specified using HA_ALTER_FLAGS
-    and Alter_inplace_information. The level of concurrency allowed during this
+    and Alter_inplace_info. The level of concurrency allowed during this
     operation depends on the return value from check_if_supported_inplace_alter().
 
     @note Storage engines are responsible for reporting any errors.
@@ -2362,8 +2378,7 @@ public:
     @retval   false             Success
  */
  virtual bool inplace_alter_table(HA_CREATE_INFO *create_info,
-                                  Alter_inplace_information *ha_alter_info,
-                                  HA_ALTER_FLAGS *alter_flags);
+                                  Alter_inplace_info *ha_alter_info);
 
 
  /**
@@ -2386,8 +2401,7 @@ public:
     @retval   false             Success
  */
  virtual bool commit_inplace_alter_table(HA_CREATE_INFO *create_info,
-                                         Alter_inplace_information *ha_alter_info,
-                                         HA_ALTER_FLAGS *alter_flags,
+                                         Alter_inplace_info *ha_alter_info,
                                          bool commit);
 
 

=== modified file 'sql/sql_admin.cc'
--- a/sql/sql_admin.cc	2011-09-11 13:11:23 +0000
+++ b/sql/sql_admin.cc	2011-11-16 11:29:51 +0000
@@ -410,7 +410,7 @@ static bool mysql_admin_table(THD* thd,
         */
         Alter_info *alter_info= &lex->alter_info;
 
-        if (alter_info->flags & ALTER_ADMIN_PARTITION)
+        if (alter_info->flags & Alter_info::ALTER_ADMIN_PARTITION)
         {
           if (!table->table->part_info)
           {
@@ -422,7 +422,7 @@ static bool mysql_admin_table(THD* thd,
           num_parts_found= set_part_state(alter_info, table->table->part_info,
                                           PART_ADMIN);
           if (num_parts_found != num_parts_opt &&
-              (!(alter_info->flags & ALTER_ALL_PARTITION)))
+              (!(alter_info->flags & Alter_info::ALTER_ALL_PARTITION)))
           {
             char buff[FN_REFLEN + MYSQL_ERRMSG_SIZE];
             size_t length;

=== modified file 'sql/sql_alter.cc'
--- a/sql/sql_alter.cc	2011-11-02 09:55:44 +0000
+++ b/sql/sql_alter.cc	2011-11-16 11:29:51 +0000
@@ -111,13 +111,14 @@ bool Sql_cmd_alter_table::execute(THD *t
     We also require DROP priv for ALTER TABLE ... DROP PARTITION, as well
     as for RENAME TO, as being done by SQLCOM_RENAME_TABLE
   */
-  if (alter_info.flags & (ALTER_DROP_PARTITION | ALTER_RENAME))
+  if (alter_info.flags & (Alter_info::ALTER_DROP_PARTITION |
+                          Alter_info::ALTER_RENAME))
     priv_needed|= DROP_ACL;
 
   /* Must be set in the parser */
   DBUG_ASSERT(select_lex->db);
-  DBUG_ASSERT(!(alter_info.flags & ALTER_EXCHANGE_PARTITION));
-  DBUG_ASSERT(!(alter_info.flags & ALTER_ADMIN_PARTITION));
+  DBUG_ASSERT(!(alter_info.flags & Alter_info::ALTER_EXCHANGE_PARTITION));
+  DBUG_ASSERT(!(alter_info.flags & Alter_info::ALTER_ADMIN_PARTITION));
   if (check_access(thd, priv_needed, first_table->db,
                    &first_table->grant.privilege,
                    &first_table->grant.m_internal,

=== modified file 'sql/sql_alter.h'
--- a/sql/sql_alter.h	2011-11-02 09:55:44 +0000
+++ b/sql/sql_alter.h	2011-11-16 11:29:51 +0000
@@ -31,6 +31,98 @@ class Key;
 class Alter_info
 {
 public:
+  /*
+    These flags are set by the parser and describes the type of
+    operation(s) specified by the ALTER TABLE statement.
+
+    They do *not* describe the type operation(s) to be executed
+    by the storage engine. For example, we don't yet know the
+    type of index to be added/dropped.
+  */
+
+  // Set for ADD [COLUMN]
+  static const uint ALTER_ADD_COLUMN	        = 1L <<  0;
+
+  // Set for DROP [COLUMN]
+  static const uint ALTER_DROP_COLUMN	        = 1L <<  1;
+
+  // Set for CHANGE [COLUMN] | MODIFY [CHANGE]
+  // Set by mysql_recreate_table()
+  static const uint ALTER_CHANGE_COLUMN	        = 1L <<  2;
+
+  // Set for ADD INDEX | ADD KEY | ADD PRIMARY KEY | ADD UNIQUE KEY |
+  //         ADD UNIQUE INDEX | ALTER ADD [COLUMN]
+  static const uint ALTER_ADD_INDEX		= 1L <<  3;
+
+  // Set for DROP PRIMARY KEY | DROP FOREIGN KEY | DROP KEY | DROP INDEX
+  static const uint ALTER_DROP_INDEX	        = 1L <<  4;
+
+  // Set for RENAME [TO]
+  static const uint ALTER_RENAME		= 1L <<  5;
+
+  // Set for ORDER BY
+  static const uint ALTER_ORDER		        = 1L <<  6;
+
+  // Set for table_options
+  static const uint ALTER_OPTIONS		= 1L <<  7;
+
+  // Set for ALTER [COLUMN] ... SET DEFAULT ... | DROP DEFAULT
+  static const uint ALTER_CHANGE_COLUMN_DEFAULT = 1L <<  8;
+
+  // Set for DISABLE KEYS | ENABLE KEYS
+  static const uint ALTER_KEYS_ONOFF            = 1L <<  9;
+
+  // Set for CONVERT TO CHARACTER SET
+  static const uint ALTER_CONVERT               = 1L << 10;
+
+  // Set for FORCE
+  // Set by mysql_recreate_table()
+  static const uint ALTER_RECREATE              = 1L << 11;
+
+  // Set for ADD PARTITION
+  static const uint ALTER_ADD_PARTITION         = 1L << 12;
+
+  // Set for DROP PARTITION
+  static const uint ALTER_DROP_PARTITION        = 1L << 13;
+
+  // Set for COALESCE PARTITION
+  static const uint ALTER_COALESCE_PARTITION    = 1L << 14;
+
+  // Set for REORGANIZE PARTITION ... INTO
+  static const uint ALTER_REORGANIZE_PARTITION  = 1L << 15;
+
+  // Set for partition_options
+  static const uint ALTER_PARTITION             = 1L << 16;
+
+  // Set for LOAD INDEX INTO CACHE ... PARTITION
+  // Set for CACHE INDEX ... PARTITION
+  static const uint ALTER_ADMIN_PARTITION       = 1L << 17;
+
+  // Set for REORGANIZE PARTITION
+  static const uint ALTER_TABLE_REORG           = 1L << 18;
+
+  // Set for REBUILD PARTITION
+  static const uint ALTER_REBUILD_PARTITION     = 1L << 19;
+
+  // Set for partitioning operations specifying ALL keyword
+  static const uint ALTER_ALL_PARTITION         = 1L << 20;
+
+  // Set for REMOVE PARTITIONING
+  static const uint ALTER_REMOVE_PARTITIONING   = 1L << 21;
+
+  // Set for ADD FOREIGN KEY | DROP FOREIGN KEY
+  static const uint ALTER_FOREIGN_KEY           = 1L << 22;
+
+  // Set for EXCHANGE PARITION
+  static const uint ALTER_EXCHANGE_PARTITION    = 1L << 23;
+
+  // Set by Sql_cmd_alter_table_truncate_partition::execute()
+  static const uint ALTER_TRUNCATE_PARTITION    = 1L << 24;
+
+  // Set for ADD [COLUMN] FIRST | AFTER
+  static const uint ALTER_COLUMN_ORDER          = 1L << 25;
+
+
   enum enum_enable_or_disable { LEAVE_AS_IS, ENABLE, DISABLE };
 
   enum enum_tablespace_op_type

=== modified file 'sql/sql_bitmap.h'
--- a/sql/sql_bitmap.h	2011-09-13 12:54:55 +0000
+++ b/sql/sql_bitmap.h	2011-11-16 11:29:51 +0000
@@ -65,71 +65,12 @@ public:
   void subtract(Bitmap& map2) { bitmap_subtract(&map, &map2.map); }
   void merge(Bitmap& map2) { bitmap_union(&map, &map2.map); }
   my_bool is_set(uint n) const { return bitmap_is_set(&map, n); }
-  my_bool is_set() const { return !bitmap_is_clear_all(&map); }
   my_bool is_prefix(uint n) const { return bitmap_is_prefix(&map, n); }
   my_bool is_clear_all() const { return bitmap_is_clear_all(&map); }
   my_bool is_set_all() const { return bitmap_is_set_all(&map); }
   my_bool is_subset(const Bitmap& map2) const { return bitmap_is_subset(&map, &map2.map); }
   my_bool is_overlapping(const Bitmap& map2) const { return bitmap_is_overlapping(&map, &map2.map); }
   my_bool operator==(const Bitmap& map2) const { return bitmap_cmp(&map, &map2.map); }
-  my_bool operator!=(const Bitmap& map2) const { return !bitmap_cmp(&map, &map2.
-map); }
-  Bitmap operator&=(uint n)
-  {
-    if (bitmap_is_set(&map, n))
-    {
-      bitmap_clear_all(&map);
-      bitmap_set_bit(&map, n);
-    }
-    else
-      bitmap_clear_all(&map);
-    return *this;
-  }
-  Bitmap operator&=(const Bitmap& map2)
-  {
-    bitmap_intersect(&map, &map2.map);
-    return *this;
-  }
-  Bitmap operator&(uint n)
-  {
-    Bitmap bm(*this);
-    bm&= n;
-    return bm;
-  }
-  Bitmap operator&(const Bitmap& map2)
-  {
-    Bitmap bm(*this);
-    bm&= map2;
-    return bm;
-  }
-  Bitmap operator|=(uint n)
-  {
-    bitmap_set_bit(&map, n);
-    return *this;
-  }
-  Bitmap operator|=(const Bitmap& map2)
-  {
-    bitmap_union(&map, &map2.map);
-    return *this;
-  }
-  Bitmap operator|(uint n)
-  {
-    Bitmap bm(*this);
-    bm|= n;
-    return bm;
-  }
-  Bitmap operator|(const Bitmap& map2)
-  {
-    Bitmap bm(*this);
-    bm|= map2;
-    return bm;
-  }
-  Bitmap operator~()
-  {
-    Bitmap bm(*this);
-    bitmap_invert(&bm.map);
-    return bm;
-  }
   char *print(char *buf) const
   {
     char *s=buf;

=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc	2011-11-14 15:41:08 +0000
+++ b/sql/sql_lex.cc	2011-11-16 11:29:51 +0000
@@ -3233,8 +3233,8 @@ bool st_select_lex::handle_derived(LEX *
 bool LEX::is_partition_management() const
 {
   return (sql_command == SQLCOM_ALTER_TABLE &&
-          (alter_info.flags == ALTER_ADD_PARTITION ||
-           alter_info.flags == ALTER_REORGANIZE_PARTITION));
+          (alter_info.flags == Alter_info::ALTER_ADD_PARTITION ||
+           alter_info.flags == Alter_info::ALTER_REORGANIZE_PARTITION));
 }
 
 

=== modified file 'sql/sql_lex.h'
--- a/sql/sql_lex.h	2011-11-14 15:41:08 +0000
+++ b/sql/sql_lex.h	2011-11-16 11:29:51 +0000
@@ -916,33 +916,6 @@ inline bool st_select_lex_unit::is_union
     first_select()->next_select()->linkage == UNION_TYPE;
 }
 
-#define ALTER_ADD_COLUMN	(1L << 0)
-#define ALTER_DROP_COLUMN	(1L << 1)
-#define ALTER_CHANGE_COLUMN	(1L << 2)
-#define ALTER_ADD_INDEX		(1L << 3)
-#define ALTER_DROP_INDEX	(1L << 4)
-#define ALTER_RENAME		(1L << 5)
-#define ALTER_ORDER		(1L << 6)
-#define ALTER_OPTIONS		(1L << 7)
-#define ALTER_CHANGE_COLUMN_DEFAULT (1L << 8)
-#define ALTER_KEYS_ONOFF        (1L << 9)
-#define ALTER_CONVERT           (1L << 10)
-#define ALTER_RECREATE          (1L << 11)
-#define ALTER_ADD_PARTITION     (1L << 12)
-#define ALTER_DROP_PARTITION    (1L << 13)
-#define ALTER_COALESCE_PARTITION (1L << 14)
-#define ALTER_REORGANIZE_PARTITION (1L << 15) 
-#define ALTER_PARTITION          (1L << 16)
-#define ALTER_ADMIN_PARTITION    (1L << 17)
-#define ALTER_TABLE_REORG        (1L << 18)
-#define ALTER_REBUILD_PARTITION  (1L << 19)
-#define ALTER_ALL_PARTITION      (1L << 20)
-#define ALTER_REMOVE_PARTITIONING (1L << 21)
-#define ALTER_FOREIGN_KEY        (1L << 22)
-#define ALTER_EXCHANGE_PARTITION (1L << 23)
-#define ALTER_TRUNCATE_PARTITION (1L << 24)
-#define ALTER_COLUMN_ORDER       (1L << 25)
-
 typedef struct struct_slave_connection
 {
   char *user;

=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc	2011-11-14 15:41:08 +0000
+++ b/sql/sql_partition.cc	2011-11-16 11:29:51 +0000
@@ -4560,7 +4560,7 @@ uint set_part_state(Alter_info *alter_in
   do
   {
     partition_element *part_elem= part_it++;
-    if ((alter_info->flags & ALTER_ALL_PARTITION) ||
+    if ((alter_info->flags & Alter_info::ALTER_ALL_PARTITION) ||
          (is_name_in_list(part_elem->partition_name,
           alter_info->partition_names)))
     {
@@ -4663,7 +4663,7 @@ uint prep_alter_part_table(THD *thd, TAB
   DBUG_ENTER("prep_alter_part_table");
 
   /* Foreign keys on partitioned tables are not supported, waits for WL#148 */
-  if (table->part_info && (alter_info->flags & ALTER_FOREIGN_KEY))
+  if (table->part_info && (alter_info->flags & Alter_info::ALTER_FOREIGN_KEY))
   {
     my_error(ER_FOREIGN_KEY_ON_PARTITIONED, MYF(0));
     DBUG_RETURN(TRUE);
@@ -4676,12 +4676,15 @@ uint prep_alter_part_table(THD *thd, TAB
     DBUG_RETURN(TRUE);
 
   /* ALTER_ADMIN_PARTITION is handled in mysql_admin_table */
-  DBUG_ASSERT(!(alter_info->flags & ALTER_ADMIN_PARTITION));
+  DBUG_ASSERT(!(alter_info->flags & Alter_info::ALTER_ADMIN_PARTITION));
 
   if (alter_info->flags &
-      (ALTER_ADD_PARTITION | ALTER_DROP_PARTITION |
-       ALTER_COALESCE_PARTITION | ALTER_REORGANIZE_PARTITION |
-       ALTER_TABLE_REORG | ALTER_REBUILD_PARTITION))
+      (Alter_info::ALTER_ADD_PARTITION |
+       Alter_info::ALTER_DROP_PARTITION |
+       Alter_info::ALTER_COALESCE_PARTITION |
+       Alter_info::ALTER_REORGANIZE_PARTITION |
+       Alter_info::ALTER_TABLE_REORG |
+       Alter_info::ALTER_REBUILD_PARTITION))
   {
     partition_info *tab_part_info;
     partition_info *alt_part_info= thd->work_part_info;
@@ -4718,7 +4721,7 @@ uint prep_alter_part_table(THD *thd, TAB
  
     tab_part_info= new_table->part_info;
 
-    if (alter_info->flags & ALTER_TABLE_REORG)
+    if (alter_info->flags & Alter_info::ALTER_TABLE_REORG)
     {
       uint new_part_no, curr_part_no;
       /* 'ALTER TABLE t REORG PARTITION' only allowed with auto partition 
@@ -4755,7 +4758,7 @@ uint prep_alter_part_table(THD *thd, TAB
           We will add more partitions, we use the ADD PARTITION without
           setting the flag for no default number of partitions
         */
-        alter_info->flags|= ALTER_ADD_PARTITION;
+        alter_info->flags|= Alter_info::ALTER_ADD_PARTITION;
         thd->work_part_info->num_parts= new_part_no - curr_part_no;
       }
       else
@@ -4764,7 +4767,7 @@ uint prep_alter_part_table(THD *thd, TAB
           We will remove hash partitions, we use the COALESCE PARTITION
           without setting the flag for no default number of partitions
         */
-        alter_info->flags|= ALTER_COALESCE_PARTITION;
+        alter_info->flags|= Alter_info::ALTER_COALESCE_PARTITION;
         alter_info->num_parts= curr_part_no - new_part_no;
       }
     }
@@ -4777,8 +4780,8 @@ uint prep_alter_part_table(THD *thd, TAB
       *is_fast_alter_partitioning= TRUE;
     DBUG_PRINT("info", ("*is_fast_alter_partitioning: %u  flags: 0x%x",
                         *is_fast_alter_partitioning, flags));
-    if ((alter_info->flags & ALTER_ADD_PARTITION) ||
-         (alter_info->flags & ALTER_REORGANIZE_PARTITION))
+    if ((alter_info->flags & Alter_info::ALTER_ADD_PARTITION) ||
+        (alter_info->flags & Alter_info::ALTER_REORGANIZE_PARTITION))
     {
       if (thd->work_part_info->part_type != tab_part_info->part_type)
       {
@@ -4845,7 +4848,7 @@ uint prep_alter_part_table(THD *thd, TAB
         goto err;
       }
     }
-    if (alter_info->flags & ALTER_ADD_PARTITION)
+    if (alter_info->flags & Alter_info::ALTER_ADD_PARTITION)
     {
       /*
         We start by moving the new partitions to the list of temporary
@@ -5085,7 +5088,7 @@ that are reorganised.
         of partitions anymore. We use this code also for Table reorganisations
         and here we don't set any default flags to FALSE.
       */
-      if (!(alter_info->flags & ALTER_TABLE_REORG))
+      if (!(alter_info->flags & Alter_info::ALTER_TABLE_REORG))
       {
         if (!alt_part_info->use_default_partitions)
         {
@@ -5096,7 +5099,7 @@ that are reorganised.
         tab_part_info->is_auto_partitioned= FALSE;
       }
     }
-    else if (alter_info->flags & ALTER_DROP_PARTITION)
+    else if (alter_info->flags & Alter_info::ALTER_DROP_PARTITION)
     {
       /*
         Drop a partition from a range partition and list partitioning is
@@ -5147,13 +5150,13 @@ that are reorganised.
       }
       tab_part_info->num_parts-= num_parts_dropped;
     }
-    else if (alter_info->flags & ALTER_REBUILD_PARTITION)
+    else if (alter_info->flags & Alter_info::ALTER_REBUILD_PARTITION)
     {
       uint num_parts_found;
       uint num_parts_opt= alter_info->partition_names.elements;
       num_parts_found= set_part_state(alter_info, tab_part_info, PART_CHANGED);
       if (num_parts_found != num_parts_opt &&
-          (!(alter_info->flags & ALTER_ALL_PARTITION)))
+          (!(alter_info->flags & Alter_info::ALTER_ALL_PARTITION)))
       {
         my_error(ER_DROP_PARTITION_NON_EXISTENT, MYF(0), "REBUILD");
         goto err;
@@ -5164,7 +5167,7 @@ that are reorganised.
         goto err;
       }
     }
-    else if (alter_info->flags & ALTER_COALESCE_PARTITION)
+    else if (alter_info->flags & Alter_info::ALTER_COALESCE_PARTITION)
     {
       uint num_parts_coalesced= alter_info->num_parts;
       uint num_parts_remain= tab_part_info->num_parts - num_parts_coalesced;
@@ -5262,13 +5265,13 @@ state of p1.
         } while (part_count < tab_part_info->num_parts);
         tab_part_info->num_parts= num_parts_remain;
       }
-      if (!(alter_info->flags & ALTER_TABLE_REORG))
+      if (!(alter_info->flags & Alter_info::ALTER_TABLE_REORG))
       {
         tab_part_info->use_default_num_partitions= FALSE;
         tab_part_info->is_auto_partitioned= FALSE;
       }
     }
-    else if (alter_info->flags & ALTER_REORGANIZE_PARTITION)
+    else if (alter_info->flags & Alter_info::ALTER_REORGANIZE_PARTITION)
     {
       /*
         Reorganise partitions takes a number of partitions that are next
@@ -5441,8 +5444,8 @@ the generated partition syntax in a corr
     }
     *partition_changed= TRUE;
     thd->work_part_info= tab_part_info;
-    if (alter_info->flags & ALTER_ADD_PARTITION ||
-        alter_info->flags & ALTER_REORGANIZE_PARTITION)
+    if (alter_info->flags & Alter_info::ALTER_ADD_PARTITION ||
+        alter_info->flags & Alter_info::ALTER_REORGANIZE_PARTITION)
     {
       if (tab_part_info->use_default_subpartitions &&
           !alt_part_info->use_default_subpartitions)
@@ -5460,7 +5463,7 @@ the generated partition syntax in a corr
         since this function "fixes" the item trees of the new partitions
         to reorganize into
       */
-      if (alter_info->flags == ALTER_REORGANIZE_PARTITION &&
+      if (alter_info->flags == Alter_info::ALTER_REORGANIZE_PARTITION &&
           tab_part_info->part_type == RANGE_PARTITION &&
           ((is_last_partition_reorged &&
             (tab_part_info->column_list ?
@@ -5541,7 +5544,7 @@ the generated partition syntax in a corr
     */
     if (table->part_info)
     {
-      if (alter_info->flags & ALTER_REMOVE_PARTITIONING)
+      if (alter_info->flags & Alter_info::ALTER_REMOVE_PARTITIONING)
       {
         DBUG_PRINT("info", ("Remove partitioning"));
         if (!(create_info->used_fields & HA_CREATE_USED_ENGINE))
@@ -6355,7 +6358,8 @@ static bool write_log_final_change_parti
   if (write_log_changed_partitions(lpt, &next_entry, (const char*)path))
     goto error;
   if (write_log_dropped_partitions(lpt, &next_entry, (const char*)path,
-                      lpt->alter_info->flags & ALTER_REORGANIZE_PARTITION))
+                                   lpt->alter_info->flags &
+                                   Alter_info::ALTER_REORGANIZE_PARTITION))
     goto error;
   if (write_log_replace_delete_frm(lpt, next_entry, shadow_path, path, TRUE))
     goto error;
@@ -6759,7 +6763,7 @@ uint fast_alter_partition_table(THD *thd
       goto err;
     }
   }
-  else if (alter_info->flags & ALTER_DROP_PARTITION)
+  else if (alter_info->flags & Alter_info::ALTER_DROP_PARTITION)
   {
     /*
       Now after all checks and setting state on dropped partitions we can
@@ -6859,7 +6863,7 @@ uint fast_alter_partition_table(THD *thd
       goto err;
     }
   }
-  else if ((alter_info->flags & ALTER_ADD_PARTITION) &&
+  else if ((alter_info->flags & Alter_info::ALTER_ADD_PARTITION) &&
            (part_info->part_type == RANGE_PARTITION ||
             part_info->part_type == LIST_PARTITION))
   {

=== modified file 'sql/sql_partition_admin.cc'
--- a/sql/sql_partition_admin.cc	2011-10-22 20:19:50 +0000
+++ b/sql/sql_partition_admin.cc	2011-11-16 11:29:51 +0000
@@ -71,7 +71,7 @@ bool Sql_cmd_alter_table_exchange_partit
   /* Must be set in the parser */
   DBUG_ASSERT(select_lex->db);
   /* also check the table to be exchanged with the partition */
-  DBUG_ASSERT(alter_info.flags & ALTER_EXCHANGE_PARTITION);
+  DBUG_ASSERT(alter_info.flags & Alter_info::ALTER_EXCHANGE_PARTITION);
 
   if (check_access(thd, priv_needed, first_table->db,
                    &first_table->grant.privilege,
@@ -486,7 +486,7 @@ bool Sql_cmd_alter_table_exchange_partit
   MDL_ticket *part_table_mdl_ticket= NULL;
   bool error= TRUE;
   DBUG_ENTER("mysql_exchange_partition");
-  DBUG_ASSERT(alter_info->flags & ALTER_EXCHANGE_PARTITION);
+  DBUG_ASSERT(alter_info->flags & Alter_info::ALTER_EXCHANGE_PARTITION);
 
   partition_name= alter_info->partition_names.head();
 
@@ -653,7 +653,7 @@ bool Sql_cmd_alter_table_analyze_partiti
     Flag that it is an ALTER command which administrates partitions, used
     by ha_partition
   */
-  thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
+  thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION;
 
   res= Sql_cmd_analyze_table::execute(thd);
     
@@ -670,7 +670,7 @@ bool Sql_cmd_alter_table_check_partition
     Flag that it is an ALTER command which administrates partitions, used
     by ha_partition
   */
-  thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
+  thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION;
 
   res= Sql_cmd_check_table::execute(thd);
 
@@ -687,7 +687,7 @@ bool Sql_cmd_alter_table_optimize_partit
     Flag that it is an ALTER command which administrates partitions, used
     by ha_partition
   */
-  thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
+  thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION;
 
   res= Sql_cmd_optimize_table::execute(thd);
 
@@ -704,7 +704,7 @@ bool Sql_cmd_alter_table_repair_partitio
     Flag that it is an ALTER command which administrates partitions, used
     by ha_partition
   */
-  thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
+  thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION;
 
   res= Sql_cmd_repair_table::execute(thd);
 
@@ -725,8 +725,8 @@ bool Sql_cmd_alter_table_truncate_partit
     Flag that it is an ALTER command which administrates partitions, used
     by ha_partition.
   */
-  thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION |
-                               ALTER_TRUNCATE_PARTITION;
+  thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION |
+                               Alter_info::ALTER_TRUNCATE_PARTITION;
 
   /* Fix the lock types (not the same as ordinary ALTER TABLE). */
   first_table->lock_type= TL_WRITE;

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2011-11-14 15:41:08 +0000
+++ b/sql/sql_table.cc	2011-11-16 11:29:51 +0000
@@ -5011,62 +5011,13 @@ err:
 
 
 /**
-  Copy all changes detected by parser to the HA_ALTER_FLAGS
-*/
-
-static void setup_ha_alter_flags(TABLE *table,
-                                 HA_CREATE_INFO *create_info,
-                                 Alter_info *alter_info,
-                                 HA_ALTER_FLAGS *alter_flags)
-{
-  uint flags= alter_info->flags;
-
-  if (ALTER_ADD_COLUMN & flags)
-    *alter_flags|= HA_ADD_COLUMN;
-  if (ALTER_DROP_COLUMN & flags)
-    *alter_flags|= HA_DROP_COLUMN;
-  if (ALTER_RENAME & flags)
-    *alter_flags|= HA_RENAME_TABLE;
-  if (ALTER_CHANGE_COLUMN & flags)
-    *alter_flags|= HA_CHANGE_COLUMN;
-  if (ALTER_CHANGE_COLUMN_DEFAULT & flags)
-    *alter_flags|= HA_COLUMN_DEFAULT_VALUE;
-  if (ALTER_COLUMN_ORDER & flags)
-    *alter_flags|= HA_ALTER_COLUMN_ORDER;
-//  if (ALTER_ROW_FORMAT & flags)
-//    *alter_flags|= HA_ALTER_ROW_FORMAT;
-  if (ALTER_RECREATE & flags)
-    *alter_flags|= HA_RECREATE;
-  if (ALTER_ADD_PARTITION & flags)
-    *alter_flags|= HA_ADD_PARTITION;
-  if (ALTER_DROP_PARTITION & flags)
-    *alter_flags|= HA_DROP_PARTITION;
-  if (ALTER_COALESCE_PARTITION & flags)
-    *alter_flags|= HA_COALESCE_PARTITION;
-  if (ALTER_REORGANIZE_PARTITION & flags)
-    *alter_flags|= HA_REORGANIZE_PARTITION;
-  if (ALTER_PARTITION & flags)
-    *alter_flags|= HA_ALTER_PARTITION;
-  if (ALTER_FOREIGN_KEY & flags)
-    *alter_flags|= HA_ALTER_FOREIGN_KEY;
-  if (create_info->auto_increment_value !=
-      table->file->stats.auto_increment_value)
-    *alter_flags|= HA_CHANGE_AUTOINCREMENT_VALUE;
-  if (ALTER_TABLE_REORG & flags)
-    *alter_flags|= HA_ALTER_TABLE_REORG;
-}
-
-
-/**
    @param       thd                Thread
    @param       table              The original table.
    @param       alter_info         Alter options, fields and keys for the new
                                    table.
    @param       create_info        Create options for the new table.
    @param       order_num          Number of order list elements.
-   @param[out]  ha_alter_flags  Flags that indicate what will be changed
-   @param[out]  ha_alter_info      Data structures needed for on-line alter
-   @param[out]  table_changes      Information about particular change
+   @param[out]  ha_alter_info      Data structures needed for in-place alter
 
    First argument 'table' contains information of the original
    table, which includes all corresponding parts that the new
@@ -5084,23 +5035,18 @@ static void setup_ha_alter_flags(TABLE *
    table->key_info or key_info_buffer respectively for the indexes
    that need to be dropped and/or (re-)created.
 
-   @retval TRUE  error
-   @retval FALSE success
+   @retval true  error
+   @retval false success
 */
 
-static
-bool
-compare_tables(THD *thd,
-               TABLE *table,
-               Alter_info *alter_info,
-               HA_CREATE_INFO *create_info,
-               uint order_num,
-               HA_ALTER_FLAGS *alter_flags,
-               Alter_inplace_information *ha_alter_info,
-               uint *table_changes)
+static bool fill_alter_inplace_info(THD *thd,
+                                    TABLE *table,
+                                    Alter_info *alter_info,
+                                    HA_CREATE_INFO *create_info,
+                                    uint order_num,
+                                    Alter_inplace_info *ha_alter_info)
 {
   Field **f_ptr, *field;
-  uint table_changes_local= 0;
   List_iterator_fast<Create_field> new_field_it, tmp_new_field_it;
   Create_field *new_field, *tmp_new_field;
   KEY_PART_INFO *key_part;
@@ -5112,7 +5058,7 @@ compare_tables(THD *thd,
   bool varchar= create_info->varchar;
   uint candidate_key_count= 0;
   bool not_nullable= true;
-  DBUG_ENTER("compare_tables");
+  DBUG_ENTER("fill_alter_inplace_info");
 
   /*
     Create a copy of alter_info.
@@ -5123,7 +5069,7 @@ compare_tables(THD *thd,
     mysql_prepare_create_table.  Unfortunately,
     mysql_prepare_create_table performs its transformations
     "in-place", that is, modifies the argument.  Since we would
-    like to keep compare_tables() idempotent (not altering any
+    like to keep fill_alter_inplace_info() idempotent (not altering any
     of the arguments) we create a copy of alter_info here and
     pass it to mysql_prepare_create_table, then use the result
     to evaluate possibility of fast ALTER TABLE, and then
@@ -5141,28 +5087,33 @@ compare_tables(THD *thd,
                                  &ha_alter_info->key_info_buffer,
                                  &ha_alter_info->key_count,
                                  /* select_field_count */ 0))
-    DBUG_RETURN(TRUE);
+    DBUG_RETURN(true);
   /* Allocate result buffers. */
   if (! (ha_alter_info->index_drop_buffer=
           (KEY**) thd->alloc(sizeof(KEY*) * table->s->keys)) ||
       ! (ha_alter_info->index_add_buffer=
           (uint*) thd->alloc(sizeof(uint) *
                             tmp_alter_info.key_list.elements)))
-    DBUG_RETURN(TRUE);
+    DBUG_RETURN(true);
 
   /*
     First we setup ha_alter_flags based on what was detected
     by parser
   */
-  setup_ha_alter_flags(table, create_info, alter_info, alter_flags);
-
-#ifndef DBUG_OFF
-  {
-    char dbug_string[HA_MAX_ALTER_FLAGS+1];
-    alter_flags->print(dbug_string);
-    DBUG_PRINT("info", ("alter_flags:  %s", (char *) dbug_string));
-  }
-#endif
+  if (alter_info->flags & Alter_info::ALTER_ADD_COLUMN)
+    ha_alter_info->handler_flags|= Alter_inplace_info::ADD_COLUMN;
+  if (alter_info->flags & Alter_info::ALTER_DROP_COLUMN)
+    ha_alter_info->handler_flags|= Alter_inplace_info::DROP_COLUMN;
+  if (alter_info->flags & Alter_info::ALTER_CHANGE_COLUMN)
+    ha_alter_info->handler_flags|= Alter_inplace_info::CHANGE_COLUMN;
+  if (alter_info->flags & Alter_info::ALTER_CHANGE_COLUMN_DEFAULT)
+    ha_alter_info->handler_flags|= Alter_inplace_info::COLUMN_DEFAULT_VALUE;
+  if (alter_info->flags & Alter_info::ALTER_COLUMN_ORDER)
+    ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_ORDER;
+  if (alter_info->flags & Alter_info::ALTER_FOREIGN_KEY)
+    ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_FOREIGN_KEY;
+  if (alter_info->flags & Alter_info::ALTER_OPTIONS)
+    ha_alter_info->handler_flags|= Alter_inplace_info::CHANGE_CREATE_OPTION;
 
   /*
     Some very basic checks. If number of fields changes, or the
@@ -5199,34 +5150,27 @@ compare_tables(THD *thd,
       (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)) ||
+      (alter_info->flags & (Alter_info::ALTER_RECREATE |
+                            Alter_info::ALTER_FOREIGN_KEY)) ||
       order_num ||
       !table->s->mysql_version ||
       (table->s->frm_version < FRM_VER_TRUE_VARCHAR && varchar))
   {
-    *table_changes= IS_EQUAL_NO;
     /*
       Check what has changed and set alter_flags
     */
     if (table->s->fields < alter_info->create_list.elements)
-      *alter_flags|= HA_ADD_COLUMN;
+      ha_alter_info->handler_flags|= Alter_inplace_info::ADD_COLUMN;
     else if (table->s->fields > alter_info->create_list.elements)
-      *alter_flags|= HA_DROP_COLUMN;
-    if (create_info->db_type != table->s->db_type() ||
-        create_info->used_fields & HA_CREATE_USED_ENGINE)
-      *alter_flags|= HA_ALTER_STORAGE_ENGINE;
+      ha_alter_info->handler_flags|= Alter_inplace_info::DROP_COLUMN;
     if (create_info->used_fields & HA_CREATE_USED_CHARSET)
-      *alter_flags|= HA_CHANGE_CHARACTER_SET;
+      ha_alter_info->handler_flags|= Alter_inplace_info::CHANGE_CHARACTER_SET;
     if (create_info->used_fields & HA_CREATE_USED_DEFAULT_CHARSET)
-      *alter_flags|= HA_SET_DEFAULT_CHARACTER_SET;
-    if (alter_info->flags & ALTER_RECREATE)
-      *alter_flags|= HA_RECREATE;
+      ha_alter_info->handler_flags|= Alter_inplace_info::SET_DEFAULT_CHARACTER_SET;
     /* TODO check for ADD/DROP FOREIGN KEY */
-    if (alter_info->flags & ALTER_FOREIGN_KEY)
-      *alter_flags|=  HA_ALTER_FOREIGN_KEY;
     if (!table->s->mysql_version ||
         (table->s->frm_version < FRM_VER_TRUE_VARCHAR && varchar))
-      *alter_flags|=  HA_ALTER_COLUMN_TYPE;
+      ha_alter_info->handler_flags|=  Alter_inplace_info::ALTER_COLUMN_TYPE;
   }
   /*
     Use transformed info to evaluate possibility of fast ALTER TABLE
@@ -5257,11 +5201,12 @@ compare_tables(THD *thd,
       create_info->table_options|= HA_OPTION_PACK_RECORD;
 
     /* Check how fields have been modified */
-    if (alter_info->flags & ALTER_CHANGE_COLUMN)
+    if (alter_info->flags & Alter_info::ALTER_CHANGE_COLUMN)
     {
+      uint table_changes_local= 0;
       /* Evaluate changes bitmap and send to check_if_incompatible_data() */
       if (!(table_changes_local= field->is_equal(tmp_new_field)))
-        *alter_flags|= HA_ALTER_COLUMN_TYPE;
+        ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_TYPE;
 
       /* Check if field was renamed */
       field->flags&= ~FIELD_IS_RENAMED;
@@ -5270,20 +5215,16 @@ compare_tables(THD *thd,
                         tmp_new_field->field_name))
       {
         field->flags|= FIELD_IS_RENAMED;
-        *alter_flags|= HA_ALTER_COLUMN_NAME;
+        ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_NAME;
       }
 
-      *table_changes&= table_changes_local;
       if (table_changes_local == IS_EQUAL_PACK_LENGTH)
-        *alter_flags|= HA_ALTER_COLUMN_TYPE;
+        ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_TYPE;
 
       /* Check that NULL behavior is same for old and new fields */
       if ((tmp_new_field->flags & NOT_NULL_FLAG) !=
           (uint) (field->flags & NOT_NULL_FLAG))
-      {
-        *table_changes= IS_EQUAL_NO;
-        *alter_flags|= HA_ALTER_COLUMN_NULLABLE;
-      }
+        ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_NULLABLE;
     }
 
     /* Clear indexed marker */
@@ -5335,10 +5276,6 @@ compare_tables(THD *thd,
   ha_alter_info->index_add_count= 0;
   for (table_key= table->key_info; table_key < table_key_end; table_key++)
   {
-    KEY_PART_INFO *table_part;
-    KEY_PART_INFO *table_part_end= table_key->key_part + table_key->key_parts;
-    KEY_PART_INFO *new_part;
-
     /* Search a new key with the same name. */
     for (new_key= ha_alter_info->key_info_buffer;
          new_key < new_key_end;
@@ -5358,14 +5295,14 @@ compare_tables(THD *thd,
         /* Unique key. Check for "PRIMARY". */
         if ((uint) (table_key - table->key_info) == table->s->primary_key)
         {
-          *alter_flags|= HA_DROP_PK_INDEX;
+          ha_alter_info->handler_flags|= Alter_inplace_info::DROP_PK_INDEX;
           candidate_key_count--;
         }
         else
         {
           bool is_not_null= true;
 
-          *alter_flags|= HA_DROP_UNIQUE_INDEX;
+          ha_alter_info->handler_flags|= Alter_inplace_info::DROP_UNIQUE_INDEX;
           key_part= table_key->key_part;
           end= key_part + table_key->key_parts;
 
@@ -5384,15 +5321,15 @@ compare_tables(THD *thd,
         }
       }
       else
-        *alter_flags|= HA_DROP_INDEX;
-      *table_changes= IS_EQUAL_NO;
+        ha_alter_info->handler_flags|= Alter_inplace_info::DROP_INDEX;
       DBUG_PRINT("info", ("index dropped: '%s'", table_key->name));
       continue;
     }
 
     bool is_not_null= true;
     bool no_pk= ((table->s->primary_key == MAX_KEY) ||
-                 alter_flags->is_set(HA_DROP_PK_INDEX));
+                 (ha_alter_info->handler_flags &
+                  Alter_inplace_info::DROP_PK_INDEX));
     key_part= new_key->key_part;
     end= key_part + new_key->key_parts;
     for(; key_part != end; key_part++)
@@ -5435,74 +5372,29 @@ compare_tables(THD *thd,
         /* Unique key. Check for "PRIMARY". */
         if ((uint) (table_key - table->key_info) == table->s->primary_key)
         {
-          if (new_key->flags & HA_NOSAME)
-            *alter_flags|= HA_ALTER_PK_INDEX;
-          else
-          {
-            *alter_flags|= HA_ALTER_PK_INDEX;
-            *alter_flags|= HA_DROP_PK_INDEX | HA_ADD_INDEX;
-          }
+          ha_alter_info->handler_flags|= Alter_inplace_info::DROP_PK_INDEX |
+                                         Alter_inplace_info::ADD_INDEX;
         }
         else
         {
-          if (new_key->flags & HA_NOSAME)
-            *alter_flags|= HA_ALTER_UNIQUE_INDEX;
-          else
-          {
-            *alter_flags|= HA_ALTER_UNIQUE_INDEX;
-            *alter_flags|= HA_DROP_UNIQUE_INDEX | HA_ADD_INDEX;
-          }
+          ha_alter_info->handler_flags|= Alter_inplace_info::DROP_UNIQUE_INDEX |
+                                         Alter_inplace_info::ADD_INDEX;
         }
       }
       else
       {
-        if (new_key->flags & HA_NOSAME)
-        {
-          *alter_flags|= HA_ALTER_INDEX;
-          *alter_flags|= HA_DROP_INDEX;
-          if ((!my_strcasecmp(system_charset_info,
-                              new_key->name, primary_key_name)) ||
-              (no_pk && candidate_key_count == 0 && is_not_null &&
-               !(new_key->flags & HA_KEY_HAS_PART_KEY_SEG)))
-            *alter_flags|= HA_ADD_PK_INDEX;
-          else
-            *alter_flags|= HA_ADD_UNIQUE_INDEX;
-        }
+        ha_alter_info->handler_flags|= Alter_inplace_info::DROP_INDEX;
+        if ((!my_strcasecmp(system_charset_info,
+                            new_key->name, primary_key_name)) ||
+            (no_pk && candidate_key_count == 0 && is_not_null &&
+             !(new_key->flags & HA_KEY_HAS_PART_KEY_SEG)))
+          ha_alter_info->handler_flags|= Alter_inplace_info::ADD_PK_INDEX;
         else
-          *alter_flags|= HA_ALTER_INDEX;
+          ha_alter_info->handler_flags|= Alter_inplace_info::ADD_UNIQUE_INDEX;
       }
       goto index_changed;
     }
 
-    /*
-      Check that the key parts remain compatible between the old and
-      new tables.
-    */
-    for (table_part= table_key->key_part, new_part= new_key->key_part;
-         table_part < table_part_end;
-         table_part++, new_part++)
-    {
-      /*
-        Key definition has changed if we are using a different field or
-        if the used key part length is different. We know that the fields
-        did not change. Comparing field numbers is sufficient.
-      */
-      if ((table_part->length != new_part->length) ||
-          (table_part->fieldnr - 1 != new_part->fieldnr))
-      {
-        if (table_key->flags & HA_NOSAME)
-        {
-          /* Unique key. Check for "PRIMARY" */
-          if ((uint) (table_key - table->key_info) ==  table->s->primary_key)
-            *alter_flags|= HA_ALTER_PK_INDEX;
-          else
-            *alter_flags|= HA_ALTER_UNIQUE_INDEX;
-        }
-        else
-          *alter_flags|= HA_ALTER_INDEX;
-        goto index_changed;
-      }
-    }
     continue;
 
   index_changed:
@@ -5521,7 +5413,6 @@ compare_tables(THD *thd,
       if ((field= table->field[key_part->fieldnr]))
         field->flags|= FIELD_IN_ADD_INDEX;
     }
-    *table_changes= IS_EQUAL_NO;
     DBUG_PRINT("info", ("index changed: '%s'", table_key->name));
   }
   /*end of for (; table_key < table_key_end;) */
@@ -5543,7 +5434,8 @@ compare_tables(THD *thd,
     {
       bool is_not_null= true;
       bool no_pk= ((table->s->primary_key == MAX_KEY) ||
-                   alter_flags->is_set(HA_DROP_PK_INDEX));
+                   (ha_alter_info->handler_flags &
+                    Alter_inplace_info::DROP_PK_INDEX));
 
       /* Key not found. Add the offset of the key to the add buffer. */
       ha_alter_info->index_add_buffer
@@ -5585,30 +5477,23 @@ compare_tables(THD *thd,
            or if adding first unique key
            defined on non-nullable
         */
-        DBUG_PRINT("info",("no_pk %s, candidate_key_count %u, is_not_null %s", (no_pk)?"yes":"no", candidate_key_count, (is_not_null)?"yes":"no"));
+        DBUG_PRINT("info",("no_pk %s, candidate_key_count %u, is_not_null %s",
+                           (no_pk)?"yes":"no", candidate_key_count, (is_not_null)?"yes":"no"));
         if ((!my_strcasecmp(system_charset_info,
                             new_key->name, primary_key_name)) ||
             (no_pk && candidate_key_count == 0 && is_not_null &&
              !(new_key->flags & HA_KEY_HAS_PART_KEY_SEG)))
-          *alter_flags|= HA_ADD_PK_INDEX;
+          ha_alter_info->handler_flags|= Alter_inplace_info::ADD_PK_INDEX;
         else
-          *alter_flags|= HA_ADD_UNIQUE_INDEX;
+          ha_alter_info->handler_flags|= Alter_inplace_info::ADD_UNIQUE_INDEX;
       }
       else
-        *alter_flags|= HA_ADD_INDEX;
-      *table_changes= IS_EQUAL_NO;
+        ha_alter_info->handler_flags|= Alter_inplace_info::ADD_INDEX;
       DBUG_PRINT("info", ("index added: '%s'", new_key->name));
     }
   }
-#ifndef DBUG_OFF
-  {
-    char dbug_string[HA_MAX_ALTER_FLAGS+1];
-    alter_flags->print(dbug_string);
-    DBUG_PRINT("info", ("alter_flags:  %s", (char *) dbug_string));
-  }
-#endif
 
-  DBUG_RETURN(FALSE);
+  DBUG_RETURN(false);
 }
 
 
@@ -5750,7 +5635,8 @@ mysql_compare_tables(TABLE *table,
       (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)) ||
+      (alter_info->flags & (Alter_info::ALTER_RECREATE |
+                            Alter_info::ALTER_FOREIGN_KEY)) ||
       order_num ||
       !table->s->mysql_version ||
       (table->s->frm_version < FRM_VER_TRUE_VARCHAR && varchar))
@@ -6113,6 +5999,48 @@ static bool create_altered_table(THD *th
 
 
 /**
+  Check if the pending ALTER TABLE operations support the in-place
+  algorithm based on restrictions in the SQL layer or given the
+  nature of the operations themselves. If in-place isn't supported,
+  it won't be necessary to check with the storage engine.
+
+  @param table        The original TABLE.
+  @param create_info  Information from the parsing phase about new
+                      table properties.
+  @param alter_info   Data related to detected changes.
+
+  @return false       In-place is possible, check with storage engine.
+  @return true        Incompatible operations, must use table copy.
+*/
+
+static bool is_inplace_alter_impossible(TABLE *table,
+                                        HA_CREATE_INFO *create_info,
+                                        const Alter_info *alter_info)
+{
+  DBUG_ENTER("is_inplace_alter_impossible");
+
+  if (alter_info->flags & (Alter_info::ALTER_RECREATE |
+                           Alter_info::ALTER_TABLE_REORG |
+                           Alter_info::ALTER_RENAME |
+                           Alter_info::ALTER_ORDER))
+    DBUG_RETURN(true);
+
+  if (alter_info->flags & Alter_info::ALTER_OPTIONS)
+  {
+    if (create_info->db_type != table->s->db_type() ||
+        create_info->used_fields & (HA_CREATE_USED_ENGINE |
+                                    HA_CREATE_USED_PACK_KEYS |
+                                    HA_CREATE_USED_MIN_ROWS |
+                                    HA_CREATE_USED_MAX_ROWS |
+                                    HA_CREATE_USED_ROW_FORMAT))
+      DBUG_RETURN(true);
+  }
+
+  DBUG_RETURN(false);
+}
+
+
+/**
   Perform in-place alter table.
 
   @param thd                Thread handle.
@@ -6147,8 +6075,7 @@ static bool mysql_inplace_alter_table(TH
                                       TABLE *table,
                                       HA_CREATE_INFO *create_info,
                                       Alter_info *alter_info,
-                                      HA_ALTER_FLAGS *ha_alter_flags,
-                                      Alter_inplace_information *ha_alter_info,
+                                      Alter_inplace_info *ha_alter_info,
                                       enum_alter_inplace_result inplace_supported,
                                       MDL_request *target_mdl_request,
                                       char *new_alias,
@@ -6233,8 +6160,7 @@ static bool mysql_inplace_alter_table(TH
   table->file->ha_prepare_for_alter();
 
   if (table->file->prepare_inplace_alter_table(create_info,
-                                               ha_alter_info,
-                                               ha_alter_flags))
+                                               ha_alter_info))
   {
     goto rollback;
   }
@@ -6248,8 +6174,7 @@ static bool mysql_inplace_alter_table(TH
   DEBUG_SYNC(thd, "alter_table_inplace_after_lock_downgrade");
 
   if (table->file->inplace_alter_table(create_info,
-                                       ha_alter_info,
-                                       ha_alter_flags))
+                                       ha_alter_info))
   {
     goto rollback;
   }
@@ -6270,7 +6195,6 @@ static bool mysql_inplace_alter_table(TH
   DBUG_EXECUTE_IF("alter_table_rollback_new_index", {
       table->file->commit_inplace_alter_table(create_info,
                                               ha_alter_info,
-                                              ha_alter_flags,
                                               false);
       my_error(ER_UNKNOWN_ERROR, MYF(0));
       DBUG_RETURN(true);
@@ -6280,7 +6204,6 @@ static bool mysql_inplace_alter_table(TH
 
   if (table->file->commit_inplace_alter_table(create_info,
                                               ha_alter_info,
-                                              ha_alter_flags,
                                               true))
   {
     goto rollback;
@@ -6329,7 +6252,6 @@ static bool mysql_inplace_alter_table(TH
  rollback:
   table->file->commit_inplace_alter_table(create_info,
                                           ha_alter_info,
-                                          ha_alter_flags,
                                           false);
   DBUG_RETURN(true);
 }
@@ -6970,9 +6892,9 @@ static int simple_rename_or_index_change
   Important is the fact, that this function tries to do as little work as
   possible, by finding out whether a intermediate table is needed to copy
   data into and when finishing the altering to use it as the original table.
-  For this reason the function compare_tables() is called, which decides
-  based on all kind of data how similar are the new and the original
-  tables.
+  For this reason the function prepare_inplace_alter_table() is called,
+  which decides based on all kind of data how similar are the new and the
+  original tables.
 */
 
 bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
@@ -7014,7 +6936,7 @@ bool mysql_alter_table(THD *thd,char *ne
       }
 
 #ifdef WITH_PARTITION_STORAGE_ENGINE
-      if (alter_info->flags & ALTER_PARTITION)
+      if (alter_info->flags & Alter_info::ALTER_PARTITION)
       {
         my_error(ER_WRONG_USAGE, MYF(0), "PARTITION", "log table");
         DBUG_RETURN(true);
@@ -7188,7 +7110,7 @@ bool mysql_alter_table(THD *thd,char *ne
     DBUG_RETURN(true);
 
   if ((create_info->db_type != table->s->db_type() ||
-       alter_info->flags & ALTER_PARTITION) &&
+       alter_info->flags & Alter_info::ALTER_PARTITION) &&
       !table->file->can_switch_engines())
   {
     my_error(ER_ROW_IS_REFERENCED, MYF(0));
@@ -7223,7 +7145,8 @@ bool mysql_alter_table(THD *thd,char *ne
   }
 
   THD_STAGE_INFO(thd, stage_setup);
-  if (!(alter_info->flags & ~(ALTER_RENAME | ALTER_KEYS_ONOFF)) &&
+  if (!(alter_info->flags & ~(Alter_info::ALTER_RENAME |
+                              Alter_info::ALTER_KEYS_ONOFF)) &&
       !table->s->tmp_table) // no need to touch frm
   {
     DBUG_RETURN(simple_rename_or_index_change(thd, table_list, alter_info,
@@ -7273,6 +7196,7 @@ bool mysql_alter_table(THD *thd,char *ne
        Alter_info::ALTER_TABLE_ALGORITHM_INPLACE)
       || table->s->tmp_table          // In-place not supported for tmp tables
       || ignore
+      || is_inplace_alter_impossible(table, create_info, alter_info)
 #ifdef WITH_PARTITION_STORAGE_ENGINE
       || (partition_changed && create_info->db_type == partition_hton &&
           !(create_info->db_type->partition_flags() & HA_USE_AUTO_PARTITION))
@@ -7302,96 +7226,87 @@ bool mysql_alter_table(THD *thd,char *ne
 
   if (alter_info->requested_algorithm != Alter_info::ALTER_TABLE_ALGORITHM_COPY)
   {
-    Alter_inplace_information ha_alter_info;
-    HA_ALTER_FLAGS ha_alter_flags;
-    uint table_changes= IS_EQUAL_YES;
-    /* Check how much the tables differ. */
-    if (compare_tables(thd, table, alter_info,
-                       create_info, order_num,
-                       &ha_alter_flags,
-                       &ha_alter_info,
-                       &table_changes))
+    Alter_inplace_info ha_alter_info;
+    bool use_inplace= true;
+
+    /* Fill the Alter_inplace_info structure. */
+    if (fill_alter_inplace_info(thd, table, alter_info,
+                                create_info, order_num,
+                                &ha_alter_info))
     {
       DBUG_RETURN(true);
     }
 
-    /*
-      If table is not renamed, changed database and some change was detected
-      then check if engine can do the change in-place.
-    */
-    if (new_name == table_name && new_db == db &&
-        ha_alter_flags.is_set())
-    {
-      bool use_inplace= true;
-
-      enum_alter_inplace_result inplace_supported=
+    enum_alter_inplace_result inplace_supported;
+    if (ha_alter_info.handler_flags == 0) // This shouldn't really happen...
+      inplace_supported= HA_ALTER_INPLACE_NOT_SUPPORTED;
+    else
+      inplace_supported=
         table->file->check_if_supported_inplace_alter(table,
                                                       create_info,
                                                       alter_info,
-                                                      &ha_alter_info,
-                                                      &ha_alter_flags);
+                                                      &ha_alter_info);
 
-      switch (inplace_supported) {
-      case HA_ALTER_INPLACE_EXCLUSIVE_LOCK:
-        // If SHARED lock and no particular algorithm was requested, use COPY.
-        if (alter_info->requested_lock ==
-            Alter_info::ALTER_TABLE_LOCK_SHARED &&
-            alter_info->requested_algorithm ==
-            Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT)
-        {
-          use_inplace= false;
-        }
-        // Otherwise, if weaker lock was requested, report errror.
-        else if (alter_info->requested_lock ==
-                 Alter_info::ALTER_TABLE_LOCK_NONE ||
-                 alter_info->requested_lock ==
-                 Alter_info::ALTER_TABLE_LOCK_SHARED)
-        {
-          my_error(ER_NOT_SUPPORTED_YET, MYF(0), thd->query());
-          DBUG_RETURN(true);
-        }
-        break;
-      case HA_ALTER_INPLACE_SHARED_LOCK:
-        // If weaker lock was requested, report errror.
-        if (alter_info->requested_lock ==
-            Alter_info::ALTER_TABLE_LOCK_NONE)
-        {
-          my_error(ER_NOT_SUPPORTED_YET, MYF(0), thd->query());
-          DBUG_RETURN(true);
-        }
-        break;
-      case HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE:
-      case HA_ALTER_INPLACE_NO_LOCK:
-        break;
-      case HA_ALTER_INPLACE_NOT_SUPPORTED:
-        // If INPLACE was requested, report error.
-        if (alter_info->requested_algorithm ==
-            Alter_info::ALTER_TABLE_ALGORITHM_INPLACE)
-        {
-          my_error(ER_NOT_SUPPORTED_YET, MYF(0), thd->query());
-          DBUG_RETURN(true);
-        }
-        // Otherwise use COPY
+    switch (inplace_supported) {
+    case HA_ALTER_INPLACE_EXCLUSIVE_LOCK:
+      // If SHARED lock and no particular algorithm was requested, use COPY.
+      if (alter_info->requested_lock ==
+          Alter_info::ALTER_TABLE_LOCK_SHARED &&
+          alter_info->requested_algorithm ==
+          Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT)
+      {
         use_inplace= false;
-        break;
-      case HA_ALTER_ERROR:
-      default:
+      }
+      // Otherwise, if weaker lock was requested, report errror.
+      else if (alter_info->requested_lock ==
+               Alter_info::ALTER_TABLE_LOCK_NONE ||
+               alter_info->requested_lock ==
+               Alter_info::ALTER_TABLE_LOCK_SHARED)
+      {
+        my_error(ER_NOT_SUPPORTED_YET, MYF(0), thd->query());
         DBUG_RETURN(true);
       }
-
-      if (use_inplace)
+      break;
+    case HA_ALTER_INPLACE_SHARED_LOCK:
+      // If weaker lock was requested, report errror.
+      if (alter_info->requested_lock ==
+          Alter_info::ALTER_TABLE_LOCK_NONE)
       {
-        if (mysql_inplace_alter_table(thd, table_list, table,
-                                      create_info, alter_info,
-                                      &ha_alter_flags, &ha_alter_info,
-                                      inplace_supported, &target_mdl_request,
-                                      new_alias, tmp_name, db, new_db))
-        {
-          DBUG_RETURN(true);
-        }
+        my_error(ER_NOT_SUPPORTED_YET, MYF(0), thd->query());
+        DBUG_RETURN(true);
+      }
+      break;
+    case HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE:
+    case HA_ALTER_INPLACE_NO_LOCK:
+      break;
+    case HA_ALTER_INPLACE_NOT_SUPPORTED:
+      // If INPLACE was requested, report error.
+      if (alter_info->requested_algorithm ==
+          Alter_info::ALTER_TABLE_ALGORITHM_INPLACE)
+      {
+        my_error(ER_NOT_SUPPORTED_YET, MYF(0), thd->query());
+        DBUG_RETURN(true);
+      }
+      // Otherwise use COPY
+      use_inplace= false;
+      break;
+    case HA_ALTER_ERROR:
+    default:
+      DBUG_RETURN(true);
+    }
 
-        goto end_inplace;
+    if (use_inplace)
+    {
+      if (mysql_inplace_alter_table(thd, table_list, table,
+                                    create_info, alter_info,
+                                    &ha_alter_info,
+                                    inplace_supported, &target_mdl_request,
+                                    new_alias, tmp_name, db, new_db))
+      {
+        DBUG_RETURN(true);
       }
+
+      goto end_inplace;
     }
   }
 
@@ -8029,7 +7944,8 @@ bool mysql_recreate_table(THD *thd, TABL
   create_info.row_type=ROW_TYPE_NOT_USED;
   create_info.default_table_charset=default_charset_info;
   /* Force alter table to recreate table */
-  alter_info.flags= (ALTER_CHANGE_COLUMN | ALTER_RECREATE);
+  alter_info.flags= (Alter_info::ALTER_CHANGE_COLUMN |
+                     Alter_info::ALTER_RECREATE);
   DBUG_RETURN(mysql_alter_table(thd, NullS, NullS, &create_info,
                                 table_list, &alter_info, 0,
                                 (ORDER *) 0, 0));

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2011-11-14 15:41:08 +0000
+++ b/sql/sql_yacc.yy	2011-11-16 11:29:51 +0000
@@ -762,7 +762,7 @@ static bool add_create_index_prepare (LE
                                               MDL_SHARED_UPGRADABLE))
     return TRUE;
   lex->alter_info.reset();
-  lex->alter_info.flags= ALTER_ADD_INDEX;
+  lex->alter_info.flags= Alter_info::ALTER_ADD_INDEX;
   lex->col_list.empty();
   lex->change= NullS;
   return FALSE;
@@ -4618,7 +4618,7 @@ partitioning:
             }
             if (lex->sql_command == SQLCOM_ALTER_TABLE)
             {
-              lex->alter_info.flags|= ALTER_PARTITION;
+              lex->alter_info.flags|= Alter_info::ALTER_PARTITION;
             }
           }
           partition
@@ -5639,7 +5639,7 @@ key_def:
                                   &default_key_create_info, 1))
               MYSQL_YYABORT;
             /* Only used for ALTER TABLE. Ignored otherwise. */
-            lex->alter_info.flags|= ALTER_FOREIGN_KEY;
+            lex->alter_info.flags|= Alter_info::ALTER_FOREIGN_KEY;
           }
         | opt_constraint check_constraint
           {
@@ -5981,25 +5981,25 @@ attribute:
           { 
             LEX *lex=Lex;
             lex->type|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG;
-            lex->alter_info.flags|= ALTER_ADD_INDEX;
+            lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
           }
         | opt_primary KEY_SYM
           {
             LEX *lex=Lex;
             lex->type|= PRI_KEY_FLAG | NOT_NULL_FLAG;
-            lex->alter_info.flags|= ALTER_ADD_INDEX;
+            lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
           }
         | UNIQUE_SYM
           {
             LEX *lex=Lex;
             lex->type|= UNIQUE_FLAG; 
-            lex->alter_info.flags|= ALTER_ADD_INDEX;
+            lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
           }
         | UNIQUE_SYM KEY_SYM
           {
             LEX *lex=Lex;
             lex->type|= UNIQUE_KEY_FLAG; 
-            lex->alter_info.flags|= ALTER_ADD_INDEX; 
+            lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; 
           }
         | COMMENT_SYM TEXT_STRING_sys { Lex->comment= $2; }
         | COLLATE_SYM collation_name
@@ -6762,13 +6762,13 @@ alter_commands:
         | add_partition_rule
         | DROP PARTITION_SYM alt_part_name_list
           {
-            Lex->alter_info.flags|= ALTER_DROP_PARTITION;
+            Lex->alter_info.flags|= Alter_info::ALTER_DROP_PARTITION;
           }
         | REBUILD_SYM PARTITION_SYM opt_no_write_to_binlog
           all_or_alt_part_name_list
           {
             LEX *lex= Lex;
-            lex->alter_info.flags|= ALTER_REBUILD_PARTITION;
+            lex->alter_info.flags|= Alter_info::ALTER_REBUILD_PARTITION;
             lex->no_write_to_binlog= $3;
           }
         | OPTIMIZE PARTITION_SYM opt_no_write_to_binlog
@@ -6827,7 +6827,7 @@ alter_commands:
         | COALESCE PARTITION_SYM opt_no_write_to_binlog real_ulong_num
           {
             LEX *lex= Lex;
-            lex->alter_info.flags|= ALTER_COALESCE_PARTITION;
+            lex->alter_info.flags|= Alter_info::ALTER_COALESCE_PARTITION;
             lex->no_write_to_binlog= $3;
             lex->alter_info.num_parts= $4;
           }
@@ -6856,7 +6856,7 @@ alter_commands:
               MYSQL_YYABORT;
             }
             lex->name= $6->table;
-            lex->alter_info.flags|= ALTER_EXCHANGE_PARTITION;
+            lex->alter_info.flags|= Alter_info::ALTER_EXCHANGE_PARTITION;
             if (!lex->select_lex.add_table_to_list(thd, $6, NULL,
                                                    TL_OPTION_UPDATING,
                                                    TL_READ_NO_INSERT,
@@ -6873,14 +6873,14 @@ alter_commands:
 remove_partitioning:
           REMOVE_SYM PARTITIONING_SYM
           {
-            Lex->alter_info.flags|= ALTER_REMOVE_PARTITIONING;
+            Lex->alter_info.flags|= Alter_info::ALTER_REMOVE_PARTITIONING;
           }
         ;
 
 all_or_alt_part_name_list:
           ALL
           {
-            Lex->alter_info.flags|= ALTER_ALL_PARTITION;
+            Lex->alter_info.flags|= Alter_info::ALTER_ALL_PARTITION;
           }
         | alt_part_name_list
         ;
@@ -6895,7 +6895,7 @@ add_partition_rule:
               mem_alloc_error(sizeof(partition_info));
               MYSQL_YYABORT;
             }
-            lex->alter_info.flags|= ALTER_ADD_PARTITION;
+            lex->alter_info.flags|= Alter_info::ALTER_ADD_PARTITION;
             lex->no_write_to_binlog= $3;
           }
           add_part_extra
@@ -6933,11 +6933,11 @@ reorg_partition_rule:
 reorg_parts_rule:
           /* empty */
           {
-            Lex->alter_info.flags|= ALTER_TABLE_REORG;
+            Lex->alter_info.flags|= Alter_info::ALTER_TABLE_REORG;
           }
         | alt_part_name_list
           {
-            Lex->alter_info.flags|= ALTER_REORGANIZE_PARTITION;
+            Lex->alter_info.flags|= Alter_info::ALTER_REORGANIZE_PARTITION;
           }
           INTO '(' part_def_list ')'
           {
@@ -6976,7 +6976,7 @@ add_column:
           {
             LEX *lex=Lex;
             lex->change=0;
-            lex->alter_info.flags|= ALTER_ADD_COLUMN;
+            lex->alter_info.flags|= Alter_info::ALTER_ADD_COLUMN;
           }
         ;
 
@@ -6988,17 +6988,18 @@ alter_list_item:
         | ADD key_def
           {
             Lex->create_last_non_select_table= Lex->last_table();
-            Lex->alter_info.flags|= ALTER_ADD_INDEX;
+            Lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
           }
         | add_column '(' create_field_list ')'
           {
-            Lex->alter_info.flags|= ALTER_ADD_COLUMN | ALTER_ADD_INDEX;
+            Lex->alter_info.flags|= Alter_info::ALTER_ADD_COLUMN |
+                                    Alter_info::ALTER_ADD_INDEX;
           }
         | CHANGE opt_column field_ident
           {
             LEX *lex=Lex;
             lex->change= $3.str;
-            lex->alter_info.flags|= ALTER_CHANGE_COLUMN;
+            lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN;
           }
           field_spec opt_place
           {
@@ -7011,7 +7012,7 @@ alter_list_item:
             lex->default_value= lex->on_update_value= 0;
             lex->comment=null_lex_str;
             lex->charset= NULL;
-            lex->alter_info.flags|= ALTER_CHANGE_COLUMN;
+            lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN;
           }
           type opt_attribute
           {
@@ -7036,11 +7037,12 @@ alter_list_item:
             if (ad == NULL)
               MYSQL_YYABORT;
             lex->alter_info.drop_list.push_back(ad);
-            lex->alter_info.flags|= ALTER_DROP_COLUMN;
+            lex->alter_info.flags|= Alter_info::ALTER_DROP_COLUMN;
           }
         | DROP FOREIGN KEY_SYM opt_ident
           {
-            Lex->alter_info.flags|= ALTER_DROP_INDEX | ALTER_FOREIGN_KEY;
+            Lex->alter_info.flags|= Alter_info::ALTER_DROP_INDEX |
+                                    Alter_info::ALTER_FOREIGN_KEY;
           }
         | DROP PRIMARY_SYM KEY_SYM
           {
@@ -7049,7 +7051,7 @@ alter_list_item:
             if (ad == NULL)
               MYSQL_YYABORT;
             lex->alter_info.drop_list.push_back(ad);
-            lex->alter_info.flags|= ALTER_DROP_INDEX;
+            lex->alter_info.flags|= Alter_info::ALTER_DROP_INDEX;
           }
         | DROP key_or_index field_ident
           {
@@ -7058,19 +7060,19 @@ alter_list_item:
             if (ad == NULL)
               MYSQL_YYABORT;
             lex->alter_info.drop_list.push_back(ad);
-            lex->alter_info.flags|= ALTER_DROP_INDEX;
+            lex->alter_info.flags|= Alter_info::ALTER_DROP_INDEX;
           }
         | DISABLE_SYM KEYS
           {
             LEX *lex=Lex;
             lex->alter_info.keys_onoff= Alter_info::DISABLE;
-            lex->alter_info.flags|= ALTER_KEYS_ONOFF;
+            lex->alter_info.flags|= Alter_info::ALTER_KEYS_ONOFF;
           }
         | ENABLE_SYM KEYS
           {
             LEX *lex=Lex;
             lex->alter_info.keys_onoff= Alter_info::ENABLE;
-            lex->alter_info.flags|= ALTER_KEYS_ONOFF;
+            lex->alter_info.flags|= Alter_info::ALTER_KEYS_ONOFF;
           }
         | ALTER opt_column field_ident SET DEFAULT signed_literal
           {
@@ -7079,7 +7081,7 @@ alter_list_item:
             if (ac == NULL)
               MYSQL_YYABORT;
             lex->alter_info.alter_list.push_back(ac);
-            lex->alter_info.flags|= ALTER_CHANGE_COLUMN_DEFAULT;
+            lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN_DEFAULT;
           }
         | ALTER opt_column field_ident DROP DEFAULT
           {
@@ -7088,7 +7090,7 @@ alter_list_item:
             if (ac == NULL)
               MYSQL_YYABORT;
             lex->alter_info.alter_list.push_back(ac);
-            lex->alter_info.flags|= ALTER_CHANGE_COLUMN_DEFAULT;
+            lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN_DEFAULT;
           }
         | RENAME opt_to table_ident
           {
@@ -7107,7 +7109,7 @@ alter_list_item:
               MYSQL_YYABORT;
             }
             lex->name= $3->table;
-            lex->alter_info.flags|= ALTER_RENAME;
+            lex->alter_info.flags|= Alter_info::ALTER_RENAME;
           }
         | CONVERT_SYM TO_SYM charset charset_name_or_default opt_collate
           {
@@ -7128,12 +7130,12 @@ alter_list_item:
             lex->create_info.default_table_charset= $5;
             lex->create_info.used_fields|= (HA_CREATE_USED_CHARSET |
               HA_CREATE_USED_DEFAULT_CHARSET);
-            lex->alter_info.flags|= ALTER_CONVERT;
+            lex->alter_info.flags|= Alter_info::ALTER_CONVERT;
           }
         | create_table_options_space_separated
           {
             LEX *lex=Lex;
-            lex->alter_info.flags|= ALTER_OPTIONS;
+            lex->alter_info.flags|= Alter_info::ALTER_OPTIONS;
             if ((lex->create_info.used_fields & HA_CREATE_USED_ENGINE) &&
                 !lex->create_info.db_type)
             {
@@ -7142,12 +7144,12 @@ alter_list_item:
           }
         | FORCE_SYM
           {
-            Lex->alter_info.flags|= ALTER_RECREATE;
+            Lex->alter_info.flags|= Alter_info::ALTER_RECREATE;
           }
         | alter_order_clause
           {
             LEX *lex=Lex;
-            lex->alter_info.flags|= ALTER_ORDER;
+            lex->alter_info.flags|= Alter_info::ALTER_ORDER;
           }
         | ALGORITHM_SYM opt_equal DEFAULT {}
         | ALGORITHM_SYM opt_equal ident_or_text
@@ -7190,12 +7192,12 @@ opt_place:
         | AFTER_SYM ident
           {
             store_position_for_column($2.str);
-            Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
+            Lex->alter_info.flags |= Alter_info::ALTER_COLUMN_ORDER;
           }
         | FIRST_SYM
           {
             store_position_for_column(first_keyword);
-            Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
+            Lex->alter_info.flags |= Alter_info::ALTER_COLUMN_ORDER;
           }
         ;
 
@@ -7640,7 +7642,7 @@ preload_keys_parts:
 adm_partition:
           PARTITION_SYM have_partitioning
           {
-            Lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
+            Lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION;
           }
           '(' all_or_alt_part_name_list ')'
         ;
@@ -10748,7 +10750,7 @@ drop:
               MYSQL_YYABORT;
             lex->sql_command= SQLCOM_DROP_INDEX;
             lex->alter_info.reset();
-            lex->alter_info.flags= ALTER_DROP_INDEX;
+            lex->alter_info.flags= Alter_info::ALTER_DROP_INDEX;
             lex->alter_info.drop_list.push_back(ad);
             if (!lex->current_select->add_table_to_list(lex->thd, $5, NULL,
                                                         TL_OPTION_UPDATING,

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5534 branch (jon.hauglid:3421 to 3422) WL#5534Jon Olav Hauglid16 Nov