List:Commits« Previous MessageNext Message »
From:Marc Alff Date:February 9 2011 10:01am
Subject:bzr push into mysql-trunk branch (marc.alff:3204 to 3205)
View as plain text  
 3205 Marc Alff	2011-02-09 [merge]
      Merge mysql-trunk --> mysql-trunk-wl4813

    removed:
      mysql-test/collections/mysql-5.1-innodb.push
      mysql-test/collections/mysql-5.5-innodb.push
      mysql-test/collections/mysql-next-mr-wl2540.push
      mysql-test/collections/mysql-trunk-innodb.push
      mysql-test/collections/mysql-trunk.daily
      mysql-test/collections/mysql-trunk.push
      mysql-test/collections/mysql-trunk.weekly
      mysql-test/suite/perfschema/r/debug_env.result
      mysql-test/suite/perfschema/t/debug_env.test
    added:
      include/mysql/service_my_plugin_log.h
      libservices/my_plugin_log_service.c
      mysql-test/r/ssl_and_innodb.result
      mysql-test/suite/innodb/r/innodb-autoinc-56228.result
      mysql-test/suite/innodb/t/innodb-autoinc-56228-master.opt
      mysql-test/suite/innodb/t/innodb-autoinc-56228.test
      mysql-test/suite/sys_vars/r/secure_file_priv2.result
      mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt
      mysql-test/suite/sys_vars/t/secure_file_priv2.test
      mysql-test/t/ssl_and_innodb.test
    modified:
      README
      client/my_readline.h
      client/mysql.cc
      client/readline.cc
      config.h.cmake
      configure.cmake
      include/my_pthread.h
      include/my_sys.h
      include/my_time.h
      include/mysql/plugin.h
      include/mysql/plugin_audit.h.pp
      include/mysql/plugin_auth.h.pp
      include/mysql/plugin_ftparser.h.pp
      include/mysql/services.h
      include/service_versions.h
      libmysqld/CMakeLists.txt
      libservices/CMakeLists.txt
      mysql-test/collections/default.daily
      mysql-test/collections/default.experimental
      mysql-test/collections/default.push
      mysql-test/collections/default.weekly
      mysql-test/include/gis_keys.inc
      mysql-test/include/icp_tests.inc
      mysql-test/include/mtr_warnings.sql
      mysql-test/include/mysqlhotcopy.inc
      mysql-test/include/order_by.inc
      mysql-test/include/rpl_sync.inc
      mysql-test/include/subquery.inc
      mysql-test/include/subquery_sj.inc
      mysql-test/include/subquery_sj_innodb.inc
      mysql-test/mysql-test-run.pl
      mysql-test/r/delete.result
      mysql-test/r/filesort_debug.result
      mysql-test/r/func_in_all.result
      mysql-test/r/func_time.result
      mysql-test/r/gis.result
      mysql-test/r/grant.result
      mysql-test/r/innodb_icp.result
      mysql-test/r/innodb_icp_all.result
      mysql-test/r/innodb_icp_none.result
      mysql-test/r/join_outer.result
      mysql-test/r/myisam_icp.result
      mysql-test/r/myisam_icp_all.result
      mysql-test/r/myisam_icp_none.result
      mysql-test/r/not_embedded_server.result
      mysql-test/r/optimizer_switch.result
      mysql-test/r/order_by_all.result
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      mysql-test/r/plugin_auth.result
      mysql-test/r/plugin_auth_qa_1.result
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_jcl6.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_jcl6.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_jcl6.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_jcl6.result
      mysql-test/r/subquery_sj_all_jcl7.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_jcl6.result
      mysql-test/r/subquery_sj_dupsweed_jcl7.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_jcl6.result
      mysql-test/r/subquery_sj_firstmatch_jcl7.result
      mysql-test/r/subquery_sj_innodb_all.result
      mysql-test/r/subquery_sj_innodb_all_jcl6.result
      mysql-test/r/subquery_sj_innodb_all_jcl7.result
      mysql-test/r/subquery_sj_innodb_none.result
      mysql-test/r/subquery_sj_innodb_none_jcl6.result
      mysql-test/r/subquery_sj_innodb_none_jcl7.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_jcl6.result
      mysql-test/r/subquery_sj_loosescan_jcl7.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_jcl6.result
      mysql-test/r/subquery_sj_mat_jcl7.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_jcl6.result
      mysql-test/r/subquery_sj_none_jcl7.result
      mysql-test/r/type_year.result
      mysql-test/r/user_var.result
      mysql-test/suite/binlog/r/binlog_unsafe.result
      mysql-test/suite/binlog/t/binlog_unsafe.test
      mysql-test/suite/engines/funcs/r/ps_string_not_null.result
      mysql-test/suite/engines/funcs/t/ps_string_not_null.test
      mysql-test/suite/innodb/r/innodb_gis.result
      mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
      mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result
      mysql-test/suite/rpl/r/rpl_loaddatalocal.result
      mysql-test/suite/rpl/t/disabled.def
      mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
      mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test
      mysql-test/suite/rpl/t/rpl_loaddatalocal.test
      mysql-test/t/delete.test
      mysql-test/t/filesort_debug.test
      mysql-test/t/func_time.test
      mysql-test/t/grant.test
      mysql-test/t/join_outer.test
      mysql-test/t/mysql.test
      mysql-test/t/not_embedded_server.test
      mysql-test/t/optimizer_switch.test
      mysql-test/t/plugin_auth.test
      mysql-test/t/plugin_auth_qa_1.test
      mysql-test/t/type_year.test
      mysql-test/t/user_var.test
      mysql-test/t/variables.test
      mysql-test/valgrind.supp
      mysys/my_fopen.c
      mysys/my_getsystime.c
      plugin/auth/test_plugin.c
      regex/my_regex.h
      regex/regcomp.c
      regex/reginit.c
      sql-common/my_time.c
      sql/CMakeLists.txt
      sql/field.cc
      sql/filesort.cc
      sql/gcalc_slicescan.cc
      sql/gcalc_slicescan.h
      sql/handler.cc
      sql/item.cc
      sql/item.h
      sql/item_cmpfunc.cc
      sql/item_func.cc
      sql/item_geofunc.h
      sql/item_strfunc.h
      sql/item_subselect.h
      sql/log.cc
      sql/mysqld.cc
      sql/net_serv.cc
      sql/protocol.cc
      sql/rpl_info_handler.h
      sql/rpl_injector.cc
      sql/rpl_injector.h
      sql/rpl_slave.cc
      sql/share/errmsg-utf8.txt
      sql/sql_base.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_delete.cc
      sql/sql_lex.cc
      sql/sql_load.cc
      sql/sql_parse.cc
      sql/sql_plugin_services.h
      sql/sql_select.cc
      sql/sql_view.cc
      sql/sql_yacc.yy
      sql/sys_vars.cc
      sql/unireg.h
      storage/innobase/btr/btr0btr.c
      storage/innobase/btr/btr0cur.c
      storage/innobase/btr/btr0sea.c
      storage/innobase/buf/buf0buddy.c
      storage/innobase/buf/buf0buf.c
      storage/innobase/buf/buf0lru.c
      storage/innobase/dict/dict0dict.c
      storage/innobase/dict/dict0load.c
      storage/innobase/dict/dict0stats.c
      storage/innobase/fsp/fsp0fsp.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/handler0alter.cc
      storage/innobase/handler/i_s.cc
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/include/btr0cur.h
      storage/innobase/include/buf0buf.h
      storage/innobase/include/buf0lru.h
      storage/innobase/include/dict0types.h
      storage/innobase/include/os0sync.h
      storage/innobase/include/os0sync.ic
      storage/innobase/include/rem0cmp.h
      storage/innobase/include/rem0cmp.ic
      storage/innobase/include/row0upd.h
      storage/innobase/include/srv0srv.h
      storage/innobase/include/trx0trx.h
      storage/innobase/include/trx0trx.ic
      storage/innobase/include/univ.i
      storage/innobase/include/ut0vec.h
      storage/innobase/include/ut0vec.ic
      storage/innobase/lock/lock0lock.c
      storage/innobase/lock/lock0wait.c
      storage/innobase/mem/mem0mem.c
      storage/innobase/page/page0zip.c
      storage/innobase/que/que0que.c
      storage/innobase/rem/rem0cmp.c
      storage/innobase/row/row0ins.c
      storage/innobase/row/row0merge.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0purge.c
      storage/innobase/row/row0sel.c
      storage/innobase/row/row0umod.c
      storage/innobase/row/row0upd.c
      storage/innobase/srv/srv0start.c
      storage/innobase/sync/sync0sync.c
      storage/innobase/trx/trx0purge.c
      storage/innobase/trx/trx0roll.c
      storage/innobase/trx/trx0trx.c
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_engine_table.cc
      storage/perfschema/pfs_engine_table.h
      storage/perfschema/pfs_instr.h
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_setup_actor.h
      storage/perfschema/pfs_setup_object.h
      storage/perfschema/pfs_stat.h
      storage/perfschema/pfs_timer.h
      storage/perfschema/table_helper.h
      unittest/gunit/CMakeLists.txt
      unittest/gunit/item-t.cc
 3204 Marc Alff	2011-02-02 [merge]
      Merge mysql-trunk --> mysql-trunk-wl4813

    removed:
      BUILD/Makefile.am
      Docs/Makefile.am
      Doxyfile-wl4895
      EXCEPTIONS-CLIENT
      Makefile.am
      client/Makefile.am
      cmake/Makefile.am
      cmd-line-utils/Makefile.am
      cmd-line-utils/libedit/Makefile.am
      cmd-line-utils/readline/Makefile.am
      config/
      config/ac-macros/
      config/ac-macros/alloca.m4
      config/ac-macros/character_sets.m4
      config/ac-macros/check_cpu.m4
      config/ac-macros/compiler_flag.m4
      config/ac-macros/dtrace.m4
      config/ac-macros/gtest.m4
      config/ac-macros/large_file.m4
      config/ac-macros/maintainer.m4
      config/ac-macros/misc.m4
      config/ac-macros/plugins.m4
      config/ac-macros/readline.m4
      config/ac-macros/ssl.m4
      config/ac-macros/zlib.m4
      configure.in
      dbug/Makefile.am
      extra/Makefile.am
      extra/yassl/Makefile.am
      extra/yassl/src/Makefile.am
      extra/yassl/taocrypt/Makefile.am
      extra/yassl/taocrypt/benchmark/Makefile.am
      extra/yassl/taocrypt/src/Makefile.am
      extra/yassl/taocrypt/test/Makefile.am
      extra/yassl/testsuite/Makefile.am
      include/Makefile.am
      include/my_no_pthread.h
      libmysql/Makefile.am
      libmysql/Makefile.shared
      libmysql/acinclude.m4
      libmysql_r/
      libmysql_r/Makefile.am
      libmysqld/Makefile.am
      libmysqld/copyright
      libmysqld/examples/Makefile.am
      libservices/Makefile.am
      man/Makefile.am
      mysql-test/Makefile.am
      mysql-test/collections/mysql-next-mr-rpl-merge.push
      mysql-test/collections/mysql-next-mr-wl4445.push
      mysql-test/collections/mysql-next-mr.push
      mysql-test/include/check_slave_is_running.inc
      mysql-test/include/check_slave_no_error.inc
      mysql-test/include/check_slave_param.inc
      mysql-test/include/have_innodb.inc
      mysql-test/include/reset_master_and_slave.inc
      mysql-test/include/rpl_chained_3_hosts.inc
      mysql-test/include/rpl_chained_3_hosts_sync.inc
      mysql-test/include/rpl_diff_tables.inc
      mysql-test/include/save_master_pos.inc
      mysql-test/lib/My/SafeProcess/Makefile.am
      mysql-test/r/ctype_utf8mb4_ndb.result
      mysql-test/suite/funcs_1/r/is_cml_ndb.result
      mysql-test/suite/funcs_1/r/is_columns_ndb.result
      mysql-test/suite/funcs_1/r/is_engines_ndb.result
      mysql-test/suite/funcs_1/r/is_tables_ndb.result
      mysql-test/suite/funcs_1/r/ndb_bitdata.result
      mysql-test/suite/funcs_1/r/ndb_cursors.result
      mysql-test/suite/funcs_1/r/ndb_func_view.result
      mysql-test/suite/funcs_1/r/ndb_storedproc_02.result
      mysql-test/suite/funcs_1/r/ndb_storedproc_03.result
      mysql-test/suite/funcs_1/r/ndb_storedproc_06.result
      mysql-test/suite/funcs_1/r/ndb_storedproc_07.result
      mysql-test/suite/funcs_1/r/ndb_storedproc_08.result
      mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
      mysql-test/suite/funcs_1/r/ndb_trig_0102.result
      mysql-test/suite/funcs_1/r/ndb_trig_03.result
      mysql-test/suite/funcs_1/r/ndb_trig_03e.result
      mysql-test/suite/funcs_1/r/ndb_trig_0407.result
      mysql-test/suite/funcs_1/r/ndb_trig_08.result
      mysql-test/suite/funcs_1/r/ndb_trig_09.result
      mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result
      mysql-test/suite/funcs_1/r/ndb_views.result
      mysql-test/suite/funcs_1/t/is_cml_ndb.test
      mysql-test/suite/funcs_1/t/is_columns_ndb.test
      mysql-test/suite/funcs_1/t/is_engines_ndb.test
      mysql-test/suite/funcs_1/t/is_tables_ndb.test
      mysql-test/suite/funcs_1/t/ndb_bitdata.test
      mysql-test/suite/funcs_1/t/ndb_cursors.test
      mysql-test/suite/funcs_1/t/ndb_func_view.test
      mysql-test/suite/funcs_1/t/ndb_storedproc_02.test
      mysql-test/suite/funcs_1/t/ndb_storedproc_03.test
      mysql-test/suite/funcs_1/t/ndb_storedproc_06.test
      mysql-test/suite/funcs_1/t/ndb_storedproc_07.test
      mysql-test/suite/funcs_1/t/ndb_storedproc_08.test
      mysql-test/suite/funcs_1/t/ndb_storedproc_10.test
      mysql-test/suite/funcs_1/t/ndb_trig_0102.test
      mysql-test/suite/funcs_1/t/ndb_trig_03.test
      mysql-test/suite/funcs_1/t/ndb_trig_03e.test
      mysql-test/suite/funcs_1/t/ndb_trig_0407.test
      mysql-test/suite/funcs_1/t/ndb_trig_08.test
      mysql-test/suite/funcs_1/t/ndb_trig_09.test
      mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test
      mysql-test/suite/funcs_1/t/ndb_views.test
      mysql-test/suite/funcs_2/r/ndb_charset.result
      mysql-test/suite/funcs_2/t/ndb_charset.test
      mysql-test/suite/innodb/r/innodb_bug54679.result
      mysql-test/suite/innodb/r/innodb_bug56632.result
      mysql-test/suite/innodb/t/innodb_bug54679.test
      mysql-test/suite/innodb/t/innodb_bug56632.test
      mysql-test/suite/ndb/
      mysql-test/suite/ndb/my.cnf
      mysql-test/suite/ndb/r/
      mysql-test/suite/ndb/r/loaddata_autocom_ndb.result
      mysql-test/suite/ndb/r/ndb_alter_table.result
      mysql-test/suite/ndb/r/ndb_alter_table2.result
      mysql-test/suite/ndb/r/ndb_alter_table3.result
      mysql-test/suite/ndb/r/ndb_auto_increment.result
      mysql-test/suite/ndb/r/ndb_autoinc.result
      mysql-test/suite/ndb/r/ndb_basic.result
      mysql-test/suite/ndb/r/ndb_binlog_basic.result
      mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result
      mysql-test/suite/ndb/r/ndb_binlog_discover.result
      mysql-test/suite/ndb/r/ndb_binlog_format.result
      mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result
      mysql-test/suite/ndb/r/ndb_binlog_log_bin.result
      mysql-test/suite/ndb/r/ndb_binlog_multi.result
      mysql-test/suite/ndb/r/ndb_bitfield.result
      mysql-test/suite/ndb/r/ndb_blob.result
      mysql-test/suite/ndb/r/ndb_blob_partition.result
      mysql-test/suite/ndb/r/ndb_bug26793.result
      mysql-test/suite/ndb/r/ndb_bug31477.result
      mysql-test/suite/ndb/r/ndb_cache.result
      mysql-test/suite/ndb/r/ndb_cache2.result
      mysql-test/suite/ndb/r/ndb_cache_multi.result
      mysql-test/suite/ndb/r/ndb_cache_multi2.result
      mysql-test/suite/ndb/r/ndb_charset.result
      mysql-test/suite/ndb/r/ndb_condition_pushdown.result
      mysql-test/suite/ndb/r/ndb_config.result
      mysql-test/suite/ndb/r/ndb_config2.result
      mysql-test/suite/ndb/r/ndb_cursor.result
      mysql-test/suite/ndb/r/ndb_database.result
      mysql-test/suite/ndb/r/ndb_dd_alter.result
      mysql-test/suite/ndb/r/ndb_dd_basic.result
      mysql-test/suite/ndb/r/ndb_dd_ddl.result
      mysql-test/suite/ndb/r/ndb_dd_disk2memory.result
      mysql-test/suite/ndb/r/ndb_dd_dump.result
      mysql-test/suite/ndb/r/ndb_dd_sql_features.result
      mysql-test/suite/ndb/r/ndb_gis.result
      mysql-test/suite/ndb/r/ndb_grant.result
      mysql-test/suite/ndb/r/ndb_index.result
      mysql-test/suite/ndb/r/ndb_index_ordered.result
      mysql-test/suite/ndb/r/ndb_index_unique.result
      mysql-test/suite/ndb/r/ndb_insert.result
      mysql-test/suite/ndb/r/ndb_limit.result
      mysql-test/suite/ndb/r/ndb_load.result
      mysql-test/suite/ndb/r/ndb_loaddatalocal.result
      mysql-test/suite/ndb/r/ndb_lock.result
      mysql-test/suite/ndb/r/ndb_lock_table.result
      mysql-test/suite/ndb/r/ndb_minmax.result
      mysql-test/suite/ndb/r/ndb_multi.result
      mysql-test/suite/ndb/r/ndb_multi_row.result
      mysql-test/suite/ndb/r/ndb_partition_error.result
      mysql-test/suite/ndb/r/ndb_partition_error2.result
      mysql-test/suite/ndb/r/ndb_partition_key.result
      mysql-test/suite/ndb/r/ndb_partition_list.result
      mysql-test/suite/ndb/r/ndb_partition_range.result
      mysql-test/suite/ndb/r/ndb_read_multi_range.result
      mysql-test/suite/ndb/r/ndb_rename.result
      mysql-test/suite/ndb/r/ndb_replace.result
      mysql-test/suite/ndb/r/ndb_restore.result
      mysql-test/suite/ndb/r/ndb_restore_compat.result
      mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result
      mysql-test/suite/ndb/r/ndb_restore_partition.result
      mysql-test/suite/ndb/r/ndb_restore_print.result
      mysql-test/suite/ndb/r/ndb_row_format.result
      mysql-test/suite/ndb/r/ndb_single_user.result
      mysql-test/suite/ndb/r/ndb_sp.result
      mysql-test/suite/ndb/r/ndb_subquery.result
      mysql-test/suite/ndb/r/ndb_temporary.result
      mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result
      mysql-test/suite/ndb/r/ndb_transaction.result
      mysql-test/suite/ndb/r/ndb_trigger.result
      mysql-test/suite/ndb/r/ndb_truncate.result
      mysql-test/suite/ndb/r/ndb_types.result
      mysql-test/suite/ndb/r/ndb_update.result
      mysql-test/suite/ndb/r/ndb_update_no_read.result
      mysql-test/suite/ndb/r/ndb_view.result
      mysql-test/suite/ndb/r/ndbapi.result
      mysql-test/suite/ndb/r/ps_7ndb.result
      mysql-test/suite/ndb/r/strict_autoinc_5ndb.result
      mysql-test/suite/ndb/t/
      mysql-test/suite/ndb/t/disabled.def
      mysql-test/suite/ndb/t/loaddata_autocom_ndb.test
      mysql-test/suite/ndb/t/ndb_alter_table.test
      mysql-test/suite/ndb/t/ndb_alter_table2.test
      mysql-test/suite/ndb/t/ndb_alter_table3.test
      mysql-test/suite/ndb/t/ndb_auto_increment.test
      mysql-test/suite/ndb/t/ndb_autoinc.test
      mysql-test/suite/ndb/t/ndb_basic.test
      mysql-test/suite/ndb/t/ndb_binlog_basic.test
      mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test
      mysql-test/suite/ndb/t/ndb_binlog_discover.test
      mysql-test/suite/ndb/t/ndb_binlog_format.test
      mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt
      mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test
      mysql-test/suite/ndb/t/ndb_binlog_log_bin.test
      mysql-test/suite/ndb/t/ndb_binlog_multi.test
      mysql-test/suite/ndb/t/ndb_bitfield.test
      mysql-test/suite/ndb/t/ndb_blob.test
      mysql-test/suite/ndb/t/ndb_blob_partition.test
      mysql-test/suite/ndb/t/ndb_bug26793.test
      mysql-test/suite/ndb/t/ndb_bug31477.test
      mysql-test/suite/ndb/t/ndb_cache.test
      mysql-test/suite/ndb/t/ndb_cache2.test
      mysql-test/suite/ndb/t/ndb_cache_multi.test
      mysql-test/suite/ndb/t/ndb_cache_multi2.test
      mysql-test/suite/ndb/t/ndb_charset.test
      mysql-test/suite/ndb/t/ndb_condition_pushdown.test
      mysql-test/suite/ndb/t/ndb_config.test
      mysql-test/suite/ndb/t/ndb_config2.test
      mysql-test/suite/ndb/t/ndb_cursor.test
      mysql-test/suite/ndb/t/ndb_database.test
      mysql-test/suite/ndb/t/ndb_dd_alter.test
      mysql-test/suite/ndb/t/ndb_dd_basic.test
      mysql-test/suite/ndb/t/ndb_dd_ddl.test
      mysql-test/suite/ndb/t/ndb_dd_disk2memory.test
      mysql-test/suite/ndb/t/ndb_dd_dump.test
      mysql-test/suite/ndb/t/ndb_dd_sql_features.test
      mysql-test/suite/ndb/t/ndb_gis.test
      mysql-test/suite/ndb/t/ndb_grant.later
      mysql-test/suite/ndb/t/ndb_index.test
      mysql-test/suite/ndb/t/ndb_index_ordered.test
      mysql-test/suite/ndb/t/ndb_index_unique.test
      mysql-test/suite/ndb/t/ndb_insert.test
      mysql-test/suite/ndb/t/ndb_limit.test
      mysql-test/suite/ndb/t/ndb_load.test
      mysql-test/suite/ndb/t/ndb_loaddatalocal.test
      mysql-test/suite/ndb/t/ndb_lock.test
      mysql-test/suite/ndb/t/ndb_lock_table.test
      mysql-test/suite/ndb/t/ndb_minmax.test
      mysql-test/suite/ndb/t/ndb_multi.test
      mysql-test/suite/ndb/t/ndb_multi_row.test
      mysql-test/suite/ndb/t/ndb_partition_error.test
      mysql-test/suite/ndb/t/ndb_partition_error2-master.opt
      mysql-test/suite/ndb/t/ndb_partition_error2.test
      mysql-test/suite/ndb/t/ndb_partition_key.test
      mysql-test/suite/ndb/t/ndb_partition_list.test
      mysql-test/suite/ndb/t/ndb_partition_range.test
      mysql-test/suite/ndb/t/ndb_read_multi_range.test
      mysql-test/suite/ndb/t/ndb_rename.test
      mysql-test/suite/ndb/t/ndb_replace.test
      mysql-test/suite/ndb/t/ndb_restore.test
      mysql-test/suite/ndb/t/ndb_restore_compat.test
      mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test
      mysql-test/suite/ndb/t/ndb_restore_partition-master.opt
      mysql-test/suite/ndb/t/ndb_restore_partition.test
      mysql-test/suite/ndb/t/ndb_restore_print.test
      mysql-test/suite/ndb/t/ndb_row_format.test
      mysql-test/suite/ndb/t/ndb_single_user.test
      mysql-test/suite/ndb/t/ndb_sp.test
      mysql-test/suite/ndb/t/ndb_subquery.test
      mysql-test/suite/ndb/t/ndb_temporary.test
      mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test
      mysql-test/suite/ndb/t/ndb_transaction.test
      mysql-test/suite/ndb/t/ndb_trigger.test
      mysql-test/suite/ndb/t/ndb_truncate.test
      mysql-test/suite/ndb/t/ndb_types.test
      mysql-test/suite/ndb/t/ndb_update.test
      mysql-test/suite/ndb/t/ndb_update_no_read.test
      mysql-test/suite/ndb/t/ndb_view.test
      mysql-test/suite/ndb/t/ndbapi.test
      mysql-test/suite/ndb/t/ps_7ndb.test
      mysql-test/suite/ndb/t/strict_autoinc_5ndb.test
      mysql-test/suite/ndb_team/
      mysql-test/suite/ndb_team/r/
      mysql-test/suite/ndb_team/r/ndb_autodiscover.result
      mysql-test/suite/ndb_team/r/ndb_autodiscover2.result
      mysql-test/suite/ndb_team/r/ndb_autodiscover3.result
      mysql-test/suite/ndb_team/r/ndb_backup_print.result
      mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result
      mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result
      mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result
      mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result
      mysql-test/suite/ndb_team/t/
      mysql-test/suite/ndb_team/t/disabled.def
      mysql-test/suite/ndb_team/t/ndb_autodiscover.test
      mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt
      mysql-test/suite/ndb_team/t/ndb_autodiscover2.test
      mysql-test/suite/ndb_team/t/ndb_autodiscover3.test
      mysql-test/suite/ndb_team/t/ndb_backup_print.test
      mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test
      mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test
      mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test
      mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt
      mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test
      mysql-test/suite/optimizer_unfixed_bugs/
      mysql-test/suite/optimizer_unfixed_bugs/README.txt
      mysql-test/suite/optimizer_unfixed_bugs/r/
      mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result
      mysql-test/suite/optimizer_unfixed_bugs/r/bug49129.result
      mysql-test/suite/optimizer_unfixed_bugs/t/
      mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test
      mysql-test/suite/optimizer_unfixed_bugs/t/bug49129.test
      mysql-test/suite/parts/r/ndb_dd_backuprestore.result
      mysql-test/suite/parts/r/part_supported_sql_func_ndb.result
      mysql-test/suite/parts/r/partition_alter1_1_2_ndb.result
      mysql-test/suite/parts/r/partition_alter1_1_ndb.result
      mysql-test/suite/parts/r/partition_alter1_2_ndb.result
      mysql-test/suite/parts/r/partition_auto_increment_ndb.result
      mysql-test/suite/parts/r/partition_engine_ndb.result
      mysql-test/suite/parts/r/partition_int_ndb.result
      mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result
      mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result
      mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result
      mysql-test/suite/parts/r/partition_syntax_ndb.result
      mysql-test/suite/parts/r/partition_value_ndb.result
      mysql-test/suite/parts/t/ndb_dd_backuprestore.test
      mysql-test/suite/parts/t/part_supported_sql_func_ndb.test
      mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test
      mysql-test/suite/parts/t/partition_alter1_1_ndb.test
      mysql-test/suite/parts/t/partition_alter1_2_ndb.test
      mysql-test/suite/parts/t/partition_auto_increment_ndb.test
      mysql-test/suite/parts/t/partition_basic_ndb.test
      mysql-test/suite/parts/t/partition_engine_ndb.test
      mysql-test/suite/parts/t/partition_int_ndb.test
      mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test
      mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt
      mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test
      mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt
      mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test
      mysql-test/suite/parts/t/partition_syntax_ndb.test
      mysql-test/suite/parts/t/partition_value_ndb.test
      mysql-test/suite/perfschema/r/ddl_threads.result
      mysql-test/suite/perfschema/r/dml_threads.result
      mysql-test/suite/perfschema/r/schema.result
      mysql-test/suite/perfschema/r/thread_cache.result
      mysql-test/suite/perfschema/t/ddl_threads.test
      mysql-test/suite/perfschema/t/dml_threads.test
      mysql-test/suite/perfschema/t/thread_cache.test
      mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result
      mysql-test/suite/rpl/t/rpl000017-slave.sh
      mysql-test/suite/rpl/t/rpl_binlog_auto_inc_bug33029-master.opt
      mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt
      mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh
      mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh
      mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt
      mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt
      mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh
      mysql-test/suite/rpl/t/rpl_start_stop_slave-slave.opt
      mysql-test/suite/rpl/t/rpl_stm_000001.test
      mysql-test/suite/rpl_ndb/
      mysql-test/suite/rpl_ndb/combinations
      mysql-test/suite/rpl_ndb/my.cnf
      mysql-test/suite/rpl_ndb/r/
      mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_row_img.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result
      mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result
      mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
      mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result
      mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result
      mysql-test/suite/rpl_ndb/t/
      mysql-test/suite/rpl_ndb/t/disabled.def
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_implicit_commit_binlog.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_row_img.cnf
      mysql-test/suite/rpl_ndb/t/rpl_ndb_row_img.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_row_implicit_commit_binlog.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt
      mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test
      mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test
      mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test
      mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test
      mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt
      mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test
      mysql-test/suite/stress/r/ddl_ndb.result
      mysql-test/suite/stress/t/ddl_ndb.test
      mysql-test/suite/sys_vars/r/innodb_page_hash_mutexes_basic.result
      mysql-test/suite/sys_vars/t/innodb_page_hash_mutexes_basic.test
      mysql-test/suite/sys_vars/t/max_binlog_cache_size_func-master.opt
      mysql-test/t/ctype_utf8mb4_ndb.test
      mysql-test/t/flush_read_lock_kill-master.opt
      mysql-test/t/join_optimizer.test
      mysys/Makefile.am
      mysys/mf_brkhant.c
      packaging/Makefile.am
      packaging/WiX/ca/CustomAction.rc
      plugin/Makefile.am
      plugin/audit_null/Makefile.am
      plugin/audit_null/plug.in
      plugin/auth/Makefile.am
      plugin/auth/plug.in
      plugin/daemon_example/Makefile.am
      plugin/daemon_example/configure.in
      plugin/daemon_example/plug.in
      plugin/fulltext/Makefile.am
      plugin/fulltext/configure.in
      plugin/fulltext/plug.in
      plugin/semisync/Makefile.am
      plugin/semisync/configure.in
      plugin/semisync/plug.in
      regex/Makefile.am
      scripts/Makefile.am
      scripts/make_sharedlib_distribution.sh
      sql-bench/Makefile.am
      sql-common/Makefile.am
      sql/Makefile.am
      sql/share/Makefile.am
      storage/Makefile.am
      storage/archive/Makefile.am
      storage/archive/plug.in
      storage/blackhole/Makefile.am
      storage/blackhole/plug.in
      storage/csv/Makefile.am
      storage/csv/plug.in
      storage/example/Makefile.am
      storage/example/plug.in
      storage/federated/Makefile.am
      storage/federated/plug.in
      storage/heap/Makefile.am
      storage/heap/plug.in
      storage/innobase/Makefile.am
      storage/innobase/plug.in
      storage/myisam/Makefile.am
      storage/myisam/plug.in
      storage/myisammrg/Makefile.am
      storage/myisammrg/plug.in
      storage/ndb/docs/doxygen/header.mgmapi.tex
      storage/ndb/docs/doxygen/header.ndbapi.tex
      storage/ndb/src/cw/cpcc-win32/vb6/
      storage/ndb/src/cw/cpcc-win32/vb6/Computer.cls
      storage/ndb/src/cw/cpcc-win32/vb6/Database.cls
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 110.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 231.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 237.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 241.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 242.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 270.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 271.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 273.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 31.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 337.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 338.ico
      storage/ndb/src/cw/cpcc-win32/vb6/Icon 339.ico
      storage/ndb/src/cw/cpcc-win32/vb6/MSSCCPRJ.SCC
      storage/ndb/src/cw/cpcc-win32/vb6/Module1.bas
      storage/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbp
      storage/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbw
      storage/ndb/src/cw/cpcc-win32/vb6/Process.cls
      storage/ndb/src/cw/cpcc-win32/vb6/closed folder.ico
      storage/ndb/src/cw/cpcc-win32/vb6/computer.ico
      storage/ndb/src/cw/cpcc-win32/vb6/frmAbout.frm
      storage/ndb/src/cw/cpcc-win32/vb6/frmLogin.frm
      storage/ndb/src/cw/cpcc-win32/vb6/frmMain.frm
      storage/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frm
      storage/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frx
      storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase.frx
      storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase1.frm
      storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.frm
      storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.log
      storage/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase3.frm
      storage/ndb/src/cw/cpcc-win32/vb6/frmOptions.frm
      storage/ndb/src/cw/cpcc-win32/vb6/frmSplash.frx
      storage/ndb/src/cw/cpcc-win32/vb6/networking.ico
      storage/ndb/src/cw/cpcc-win32/vb6/open folder.ico
      storage/perfschema/Makefile.am
      storage/perfschema/plug.in
      storage/perfschema/unittest/Makefile.am
      strings/Makefile.am
      strings/bfill.c
      strings/bmove.c
      strings/longlong2str-x86.s
      strings/longlong2str_asm.c
      strings/my_strtoll10-x86.s
      strings/str_test.c
      strings/strings-x86.s
      strings/strstr.c
      strings/strto.c
      strings/strtol.c
      strings/strtoll.c
      strings/strtoul.c
      strings/strtoull.c
      support-files/MacOSX/Makefile.am
      support-files/Makefile.am
      support-files/RHEL4-SElinux/Makefile.am
      support-files/SCO/
      support-files/SCO/INSTALL.sh
      support-files/SCO/compile.sh
      support-files/SCO/doc.sh
      support-files/SCO/mkpkg.sh
      support-files/SCO/patch
      support-files/SCO/pkginfo.ini
      support-files/SCO/postinstall
      support-files/SCO/preinstall
      support-files/SCO/preremove
      support-files/SCO/prototype.ini
      support-files/SCO/version
      tests/Makefile.am
      unittest/Makefile.am
      unittest/examples/Makefile.am
      unittest/gunit/Makefile.am
      unittest/mysys/Makefile.am
      unittest/mytap/Makefile.am
      unittest/mytap/t/Makefile.am
      unittest/strings/Makefile.am
      vio/Makefile.am
      win/Makefile.am
      win/README
      win/configure.js
      win/create_manifest.js
      win/mysql_manifest.cmake
      zlib/Makefile.am
    added:
      Doxyfile-perfschema
      VERSION
      cmake/maintainer.cmake
      mysql-test/collections/mysql-5.1-innodb.push
      mysql-test/collections/mysql-5.5-innodb.push
      mysql-test/collections/mysql-next-mr-wl2540.push
      mysql-test/collections/mysql-trunk-innodb.push
      mysql-test/collections/mysql-trunk.daily
      mysql-test/collections/mysql-trunk.weekly
      mysql-test/extra/rpl_tests/rpl_change_master.test
      mysql-test/extra/rpl_tests/rpl_change_master_bind.inc
      mysql-test/extra/rpl_tests/rpl_crash_safe.inc
      mysql-test/extra/rpl_tests/rpl_crash_safe.test
      mysql-test/extra/rpl_tests/rpl_insert_duplicate.test
      mysql-test/extra/rpl_tests/rpl_lower_case_table_names.test
      mysql-test/extra/rpl_tests/rpl_show_binlog_events.inc
      mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
      mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test
      mysql-test/extra/rpl_tests/rpl_test_framework.inc
      mysql-test/include/assert.inc
      mysql-test/include/begin_include_file.inc
      mysql-test/include/check_ftwrl_compatible.inc
      mysql-test/include/check_ftwrl_incompatible.inc
      mysql-test/include/check_slave_is_running.inc
      mysql-test/include/check_slave_no_error.inc
      mysql-test/include/check_slave_param.inc
      mysql-test/include/ctype_8bit.inc
      mysql-test/include/ctype_czech.inc
      mysql-test/include/ctype_heap.inc
      mysql-test/include/ctype_like_ignorable.inc
      mysql-test/include/end_include_file.inc
      mysql-test/include/file_does_not_exist.inc
      mysql-test/include/force_restart.inc
      mysql-test/include/force_restart_if_skipped.inc
      mysql-test/include/have_binlog_checksum_off.inc
      mysql-test/include/have_dbi_dbd-mysql.inc
      mysql-test/include/have_innodb.inc
      mysql-test/include/io_thd_fault_injection.inc
      mysql-test/include/not_master_info_table.inc
      mysql-test/include/not_relay_log_info_table.inc
      mysql-test/include/plugin.defs
      mysql-test/include/restart_slave_sql.inc
      mysql-test/include/rpl_change_topology.inc
      mysql-test/include/rpl_connect.inc
      mysql-test/include/rpl_connection.inc
      mysql-test/include/rpl_connection_master.inc
      mysql-test/include/rpl_connection_slave.inc
      mysql-test/include/rpl_connection_slave1.inc
      mysql-test/include/rpl_for_each_slave.inc
      mysql-test/include/rpl_generate_sync_chain.inc
      mysql-test/include/rpl_reconnect.inc
      mysql-test/include/rpl_restart_server.inc
      mysql-test/include/rpl_start_server.inc
      mysql-test/include/rpl_start_slaves.inc
      mysql-test/include/rpl_stop_server.inc
      mysql-test/include/rpl_stop_slaves.inc
      mysql-test/include/save_master_pos.inc
      mysql-test/include/stop_slave_io.inc
      mysql-test/include/stop_slave_sql.inc
      mysql-test/include/sync_io_with_master.inc
      mysql-test/include/sync_slave_sql_with_io.inc
      mysql-test/include/wait_for_query_to_fail.inc
      mysql-test/include/write_var_to_file.inc
      mysql-test/r/bug58669.result
      mysql-test/r/ctype_like_range.result
      mysql-test/r/ctype_utf16le.result
      mysql-test/r/filesort_debug.result
      mysql-test/r/flush_read_lock.result
      mysql-test/r/func_in_mrr_cost.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/myisam_mrr_cost.result
      mysql-test/r/myisam_mrr_cost_all.result
      mysql-test/r/myisam_mrr_cost_icp.result
      mysql-test/r/mysqld--defaults-file.result
      mysql-test/r/order_by_sortkey.result
      mysql-test/r/partition_binlog.result
      mysql-test/r/range_mrr_cost.result
      mysql-test/std_data/checkDBI_DBD-mysql.pl
      mysql-test/suite/binlog/r/binlog_checksum.result
      mysql-test/suite/binlog/r/binlog_variables_log_bin.result
      mysql-test/suite/binlog/r/binlog_variables_log_bin_index.result
      mysql-test/suite/binlog/r/binlog_variables_relay_log.result
      mysql-test/suite/binlog/r/binlog_variables_relay_log_index.result
      mysql-test/suite/binlog/t/binlog_checksum.test
      mysql-test/suite/binlog/t/binlog_variables_log_bin-master.opt
      mysql-test/suite/binlog/t/binlog_variables_log_bin.test
      mysql-test/suite/binlog/t/binlog_variables_log_bin_index-master.opt
      mysql-test/suite/binlog/t/binlog_variables_log_bin_index.test
      mysql-test/suite/binlog/t/binlog_variables_relay_log-master.opt
      mysql-test/suite/binlog/t/binlog_variables_relay_log.test
      mysql-test/suite/binlog/t/binlog_variables_relay_log_index-master.opt
      mysql-test/suite/binlog/t/binlog_variables_relay_log_index.test
      mysql-test/suite/federated/federated_bug_35333.result
      mysql-test/suite/federated/federated_bug_35333.test
      mysql-test/suite/innodb/r/innodb-autoinc-18274.result
      mysql-test/suite/innodb/r/innodb-create-options.result
      mysql-test/suite/innodb/r/innodb-system-table-view.result
      mysql-test/suite/innodb/r/innodb_bug30423.result
      mysql-test/suite/innodb/r/innodb_bug53046.result
      mysql-test/suite/innodb/r/innodb_bug56947.result
      mysql-test/suite/innodb/r/innodb_bug57904.result
      mysql-test/suite/innodb/r/innodb_information_schema_buffer.result
      mysql-test/suite/innodb/t/innodb-autoinc-18274.test
      mysql-test/suite/innodb/t/innodb-create-options.test
      mysql-test/suite/innodb/t/innodb-system-table-view.test
      mysql-test/suite/innodb/t/innodb_bug30423.test
      mysql-test/suite/innodb/t/innodb_bug53046.test
      mysql-test/suite/innodb/t/innodb_bug56947.test
      mysql-test/suite/innodb/t/innodb_bug57904.test
      mysql-test/suite/innodb/t/innodb_information_schema_buffer.test
      mysql-test/suite/perfschema/include/event_aggregate_cleanup.inc
      mysql-test/suite/perfschema/include/event_aggregate_load.inc
      mysql-test/suite/perfschema/include/event_aggregate_setup.inc
      mysql-test/suite/perfschema/include/table_aggregate_cleanup.inc
      mysql-test/suite/perfschema/include/table_aggregate_load.inc
      mysql-test/suite/perfschema/include/table_aggregate_setup.inc
      mysql-test/suite/perfschema/r/ddl_os_global_by_type.result
      mysql-test/suite/perfschema/r/ddl_setup_objects.result
      mysql-test/suite/perfschema/r/ddl_tiws_by_index_usage.result
      mysql-test/suite/perfschema/r/ddl_tiws_by_table.result
      mysql-test/suite/perfschema/r/ddl_tlws_by_table.result
      mysql-test/suite/perfschema/r/debug_env.result
      mysql-test/suite/perfschema/r/dml_os_global_by_type.result
      mysql-test/suite/perfschema/r/dml_setup_objects.result
      mysql-test/suite/perfschema/r/dml_threads.result
      mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result
      mysql-test/suite/perfschema/r/dml_tiws_by_table.result
      mysql-test/suite/perfschema/r/dml_tlws_by_table.result
      mysql-test/suite/perfschema/r/event_aggregate.result
      mysql-test/suite/perfschema/r/ortho_iter.result
      mysql-test/suite/perfschema/r/setup_objects.result
      mysql-test/suite/perfschema/r/start_server_no_setup_objects.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/r/thread_cache.result
      mysql-test/suite/perfschema/t/ddl_os_global_by_type.test
      mysql-test/suite/perfschema/t/ddl_setup_objects.test
      mysql-test/suite/perfschema/t/ddl_tiws_by_index_usage.test
      mysql-test/suite/perfschema/t/ddl_tiws_by_table.test
      mysql-test/suite/perfschema/t/ddl_tlws_by_table.test
      mysql-test/suite/perfschema/t/debug_env.test
      mysql-test/suite/perfschema/t/dml_os_global_by_type.test
      mysql-test/suite/perfschema/t/dml_setup_objects.test
      mysql-test/suite/perfschema/t/dml_threads.test
      mysql-test/suite/perfschema/t/dml_tiws_by_index_usage.test
      mysql-test/suite/perfschema/t/dml_tiws_by_table.test
      mysql-test/suite/perfschema/t/dml_tlws_by_table.test
      mysql-test/suite/perfschema/t/event_aggregate-master.opt
      mysql-test/suite/perfschema/t/event_aggregate.test
      mysql-test/suite/perfschema/t/ortho_iter.test
      mysql-test/suite/perfschema/t/setup_objects.test
      mysql-test/suite/perfschema/t/start_server_no_setup_objects-master.opt
      mysql-test/suite/perfschema/t/start_server_no_setup_objects.test
      mysql-test/suite/perfschema/t/table_aggregate_global_2u_2t.test
      mysql-test/suite/perfschema/t/table_aggregate_global_2u_3t.test
      mysql-test/suite/perfschema/t/table_aggregate_global_4u_2t.test
      mysql-test/suite/perfschema/t/table_aggregate_global_4u_3t.test
      mysql-test/suite/perfschema/t/table_aggregate_hist_2u_2t.test
      mysql-test/suite/perfschema/t/table_aggregate_hist_2u_3t.test
      mysql-test/suite/perfschema/t/table_aggregate_hist_4u_2t.test
      mysql-test/suite/perfschema/t/table_aggregate_hist_4u_3t.test
      mysql-test/suite/perfschema/t/table_aggregate_off.test
      mysql-test/suite/perfschema/t/table_aggregate_thread_2u_2t.test
      mysql-test/suite/perfschema/t/table_aggregate_thread_2u_3t.test
      mysql-test/suite/perfschema/t/table_aggregate_thread_4u_2t.test
      mysql-test/suite/perfschema/t/table_aggregate_thread_4u_3t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_2t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_3t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_2t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_3t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_2t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_3t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_2t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_3t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_2t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_3t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_2t.test
      mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_3t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t.test
      mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t.test
      mysql-test/suite/perfschema/t/thread_cache-master.opt
      mysql-test/suite/perfschema/t/thread_cache.test
      mysql-test/suite/rpl/extension/README.checksum
      mysql-test/suite/rpl/extension/checksum.pl
      mysql-test/suite/rpl/r/rpl_binlog_errors.result
      mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result
      mysql-test/suite/rpl/r/rpl_checksum.result
      mysql-test/suite/rpl/r/rpl_checksum_cache.result
      mysql-test/suite/rpl/r/rpl_corruption.result
      mysql-test/suite/rpl/r/rpl_insert_duplicate.result
      mysql-test/suite/rpl/r/rpl_lcase_tblnames_rewrite_db.result
      mysql-test/suite/rpl/r/rpl_migration_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_lcase_tblnames.result
      mysql-test/suite/rpl/r/rpl_slave_start.result
      mysql-test/suite/rpl/r/rpl_stm_lcase_tblnames.result
      mysql-test/suite/rpl/r/rpl_stm_mixed_crash_safe.result
      mysql-test/suite/rpl/r/rpl_test_framework.result
      mysql-test/suite/rpl/t/rpl_binlog_errors-master.opt
      mysql-test/suite/rpl/t/rpl_binlog_errors.test
      mysql-test/suite/rpl/t/rpl_change_master_crash_safe-slave.opt
      mysql-test/suite/rpl/t/rpl_change_master_crash_safe.test
      mysql-test/suite/rpl/t/rpl_checksum-master.opt
      mysql-test/suite/rpl/t/rpl_checksum.test
      mysql-test/suite/rpl/t/rpl_checksum_cache.test
      mysql-test/suite/rpl/t/rpl_circular_for_4_hosts-master.opt
      mysql-test/suite/rpl/t/rpl_corruption-master.opt
      mysql-test/suite/rpl/t/rpl_corruption-slave.opt
      mysql-test/suite/rpl/t/rpl_corruption.test
      mysql-test/suite/rpl/t/rpl_insert_duplicate.test
      mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db-slave.opt
      mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test
      mysql-test/suite/rpl/t/rpl_migration_crash_safe.test
      mysql-test/suite/rpl/t/rpl_row_crash_safe-slave.opt
      mysql-test/suite/rpl/t/rpl_row_crash_safe.test
      mysql-test/suite/rpl/t/rpl_row_img_blobs.cnf
      mysql-test/suite/rpl/t/rpl_row_lcase_tblnames-slave.opt
      mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test
      mysql-test/suite/rpl/t/rpl_slave_start.test
      mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames-slave.opt
      mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test
      mysql-test/suite/rpl/t/rpl_stm_mixed_crash_safe-slave.opt
      mysql-test/suite/rpl/t/rpl_stm_mixed_crash_safe.test
      mysql-test/suite/rpl/t/rpl_test_framework.cnf
      mysql-test/suite/rpl/t/rpl_test_framework.test
      mysql-test/suite/sys_vars/inc/binlog_stmt_cache_size_basic.inc
      mysql-test/suite/sys_vars/r/autocommit_func4.result
      mysql-test/suite/sys_vars/r/autocommit_func5.result
      mysql-test/suite/sys_vars/r/binlog_checksum_basic.result
      mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_32.result
      mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_64.result
      mysql-test/suite/sys_vars/r/master_verify_checksum_basic.result
      mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_basic.result
      mysql-test/suite/sys_vars/r/pfs_setup_objects_size_basic.result
      mysql-test/suite/sys_vars/r/slave_sql_verify_checksum_basic.result
      mysql-test/suite/sys_vars/t/autocommit_func4-master.opt
      mysql-test/suite/sys_vars/t/autocommit_func4.test
      mysql-test/suite/sys_vars/t/autocommit_func5-master.opt
      mysql-test/suite/sys_vars/t/autocommit_func5.test
      mysql-test/suite/sys_vars/t/binlog_checksum_basic.test
      mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_32.test
      mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_64.test
      mysql-test/suite/sys_vars/t/master_verify_checksum_basic.test
      mysql-test/suite/sys_vars/t/max_binlog_stmt_cache_size_basic.test
      mysql-test/suite/sys_vars/t/pfs_setup_objects_size_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_setup_objects_size_basic.test
      mysql-test/suite/sys_vars/t/slave_sql_verify_checksum_basic.test
      mysql-test/t/bug58669-master.opt
      mysql-test/t/bug58669.test
      mysql-test/t/ctype_like_range.test
      mysql-test/t/ctype_utf16le.test
      mysql-test/t/filesort_debug.test
      mysql-test/t/flush_read_lock.test
      mysql-test/t/func_in_mrr_cost.test
      mysql-test/t/innodb_mrr_cost-master.opt
      mysql-test/t/innodb_mrr_cost.test
      mysql-test/t/innodb_mrr_cost_all-master.opt
      mysql-test/t/innodb_mrr_cost_all.test
      mysql-test/t/innodb_mrr_cost_icp-master.opt
      mysql-test/t/innodb_mrr_cost_icp.test
      mysql-test/t/myisam_mrr_cost.test
      mysql-test/t/myisam_mrr_cost_all.test
      mysql-test/t/myisam_mrr_cost_icp.test
      mysql-test/t/mysqld--defaults-file.test
      mysql-test/t/order_by_sortkey.test
      mysql-test/t/partition_binlog.test
      mysql-test/t/range_mrr_cost.test
      mysql-test/t/wl4435_generated.inc
      sql/bounded_queue.h
      sql/filesort_utils.cc
      sql/filesort_utils.h
      sql/rpl_info_table.cc
      sql/rpl_info_table.h
      sql/rpl_info_table_access.cc
      sql/rpl_info_table_access.h
      sql/rpl_info_values.cc
      sql/rpl_info_values.h
      storage/innobase/include/ut0bh.h
      storage/innobase/lock/lock0wait.c
      storage/innobase/ut/ut0bh.c
      storage/perfschema/pfs_setup_object.cc
      storage/perfschema/pfs_setup_object.h
      storage/perfschema/pfs_visitor.cc
      storage/perfschema/pfs_visitor.h
      storage/perfschema/table_ews_by_thread_by_event_name.cc
      storage/perfschema/table_ews_by_thread_by_event_name.h
      storage/perfschema/table_helper.cc
      storage/perfschema/table_os_global_by_type.cc
      storage/perfschema/table_os_global_by_type.h
      storage/perfschema/table_setup_objects.cc
      storage/perfschema/table_setup_objects.h
      storage/perfschema/table_tiws_by_index_usage.cc
      storage/perfschema/table_tiws_by_index_usage.h
      storage/perfschema/table_tiws_by_table.cc
      storage/perfschema/table_tiws_by_table.h
      storage/perfschema/table_tlws_by_table.cc
      storage/perfschema/table_tlws_by_table.h
      storage/perfschema/unittest/stub_pfs_defaults.h
      storage/perfschema/unittest/stub_server_misc.h
      storage/perfschema/unittest/stub_server_misc.h.moved
      unittest/gunit/bounded_queue-t.cc
      unittest/gunit/item-t.cc
      unittest/gunit/my_decimal-t.cc
      unittest/gunit/test_mdl_context_owner.h
    renamed:
      mysql-test/extra/binlog_tests/innodb_stat.test => mysql-test/extra/binlog_tests/binlog_cache_stat.test
      mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test => mysql-test/extra/rpl_tests/rpl_extra_col_master.test
      mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test => mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
      mysql-test/extra/rpl_tests/rpl_stm_000001.test => mysql-test/suite/rpl/t/rpl_stm_000001.test
      mysql-test/include/circular_rpl_for_4_hosts_init.inc => mysql-test/include/rpl_init.inc
      mysql-test/include/circular_rpl_for_4_hosts_sync.inc => mysql-test/include/rpl_sync.inc
      mysql-test/include/diff_master_slave.inc => mysql-test/include/rpl_diff.inc
      mysql-test/include/master-slave-end.inc => mysql-test/include/rpl_end.inc
      mysql-test/include/master-slave-reset.inc => mysql-test/include/rpl_reset.inc
      mysql-test/suite/binlog/r/binlog_mix_innodb_stat.result => mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result
      mysql-test/suite/binlog/r/binlog_row_innodb_stat.result => mysql-test/suite/binlog/r/binlog_row_cache_stat.result
      mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result => mysql-test/suite/binlog/r/binlog_stm_cache_stat.result
      mysql-test/suite/binlog/t/binlog_mix_innodb_stat.test => mysql-test/suite/binlog/t/binlog_mixed_cache_stat.test
      mysql-test/suite/binlog/t/binlog_row_innodb_stat.test => mysql-test/suite/binlog/t/binlog_row_cache_stat.test
      mysql-test/suite/binlog/t/binlog_stm_innodb_stat.test => mysql-test/suite/binlog/t/binlog_stm_cache_stat.test
      mysql-test/suite/funcs_1/r/myisam_views.result => mysql-test/suite/funcs_1/r/myisam_views-big.result
      mysql-test/suite/funcs_1/t/myisam_views.test => mysql-test/suite/funcs_1/t/myisam_views-big.test
      mysql-test/suite/rpl/r/rpl000010.result => mysql-test/suite/rpl/r/rpl_000010.result
      mysql-test/suite/rpl/r/rpl000011.result => mysql-test/suite/rpl/r/rpl_000011.result
      mysql-test/suite/rpl/r/rpl000013.result => mysql-test/suite/rpl/r/rpl_000013.result
      mysql-test/suite/rpl/r/rpl000017.result => mysql-test/suite/rpl/r/rpl_000017.result
      mysql-test/suite/rpl/r/rpl_binlog_auto_inc_bug33029.result => mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result
      mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result => mysql-test/suite/binlog/r/binlog_query_filter_rules.result
      mysql-test/suite/rpl/r/rpl_drop_if_exists.result => mysql-test/suite/binlog/r/binlog_drop_if_exists.result
      mysql-test/suite/rpl/r/rpl_extraCol_innodb.result => mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
      mysql-test/suite/rpl/r/rpl_extraCol_myisam.result => mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
      mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result => mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
      mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result => mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
      mysql-test/suite/rpl/r/rpl_server_id.result => mysql-test/suite/binlog/r/binlog_server_id.result
      mysql-test/suite/rpl/r/rpl_sf.result => mysql-test/suite/binlog/r/binlog_sf.result
      mysql-test/suite/rpl/t/rpl000010-slave.opt => mysql-test/suite/rpl/t/rpl_000010-slave.opt
      mysql-test/suite/rpl/t/rpl000010.test => mysql-test/suite/rpl/t/rpl_000010.test
      mysql-test/suite/rpl/t/rpl000011.test => mysql-test/suite/rpl/t/rpl_000011.test
      mysql-test/suite/rpl/t/rpl000013.test => mysql-test/suite/rpl/t/rpl_000013.test
      mysql-test/suite/rpl/t/rpl000017.test => mysql-test/suite/rpl/t/rpl_000017.test
      mysql-test/suite/rpl/t/rpl_binlog_auto_inc_bug33029.test => mysql-test/suite/rpl/t/rpl_auto_increment_bug33029.test
      mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt => mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt
      mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test => mysql-test/suite/binlog/t/binlog_query_filter_rules.test
      mysql-test/suite/rpl/t/rpl_drop_if_exists.test => mysql-test/suite/binlog/t/binlog_drop_if_exists.test
      mysql-test/suite/rpl/t/rpl_extraCol_innodb.test => mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test
      mysql-test/suite/rpl/t/rpl_extraCol_myisam.test => mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test
      mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test => mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test
      mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test => mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test
      mysql-test/suite/rpl/t/rpl_row_img_blobs.cnf => mysql-test/suite/rpl/t/rpl_row_img.cnf
      mysql-test/suite/rpl/t/rpl_server_id.test => mysql-test/suite/binlog/t/binlog_server_id.test
      mysql-test/suite/rpl/t/rpl_sf.test => mysql-test/suite/binlog/t/binlog_sf.test
    modified:
      .bzrignore
      BUILD/FINISH.sh
      BUILD/SETUP.sh
      BUILD/autorun.sh
      BUILD/build_mccge.sh
      BUILD/check-cpu
      BUILD/cleanup
      BUILD/cmake_configure.sh
      BUILD/compile-alpha
      BUILD/compile-alpha-debug
      BUILD/compile-amd64-debug-max
      BUILD/compile-amd64-debug-max-no-ndb
      BUILD/compile-amd64-gcov
      BUILD/compile-amd64-gprof
      BUILD/compile-amd64-max
      BUILD/compile-amd64-max-sci
      BUILD/compile-amd64-valgrind-max
      BUILD/compile-darwin-mwcc
      BUILD/compile-dist
      BUILD/compile-hpux11-parisc2-aCC
      BUILD/compile-ia64-debug-max
      BUILD/compile-irix-mips64-mipspro
      BUILD/compile-ndb-autotest
      BUILD/compile-pentium
      BUILD/compile-pentium-cybozu
      BUILD/compile-pentium-debug
      BUILD/compile-pentium-debug-max
      BUILD/compile-pentium-debug-max-no-embedded
      BUILD/compile-pentium-debug-max-no-ndb
      BUILD/compile-pentium-debug-openssl
      BUILD/compile-pentium-debug-yassl
      BUILD/compile-pentium-gcov
      BUILD/compile-pentium-gprof
      BUILD/compile-pentium-icc
      BUILD/compile-pentium-icc-valgrind-max
      BUILD/compile-pentium-icc-yassl
      BUILD/compile-pentium-max
      BUILD/compile-pentium-myodbc
      BUILD/compile-pentium-pgcc
      BUILD/compile-pentium-valgrind-max
      BUILD/compile-pentium-valgrind-max-no-ndb
      BUILD/compile-pentium64
      BUILD/compile-pentium64-debug
      BUILD/compile-pentium64-debug-max
      BUILD/compile-pentium64-gcov
      BUILD/compile-pentium64-gprof
      BUILD/compile-pentium64-max
      BUILD/compile-pentium64-max-sci
      BUILD/compile-pentium64-valgrind-max
      BUILD/compile-ppc
      BUILD/compile-ppc-debug
      BUILD/compile-ppc-debug-max
      BUILD/compile-ppc-debug-max-no-ndb
      BUILD/compile-ppc-max
      BUILD/compile-solaris-amd64
      BUILD/compile-solaris-amd64-debug
      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
      CMakeLists.txt
      README
      client/client_priv.h
      client/completion_hash.h
      client/mysql.cc
      client/mysql_upgrade.c
      client/mysqladmin.cc
      client/mysqlbinlog.cc
      client/mysqlcheck.c
      client/mysqldump.c
      client/mysqlimport.c
      client/mysqlshow.c
      client/mysqlslap.c
      client/mysqltest.cc
      cmake/build_configurations/mysql_release.cmake
      cmake/character_sets.cmake
      cmake/configure.pl
      cmake/do_abi_check.cmake
      cmake/dtrace.cmake
      cmake/install_layout.cmake
      cmake/install_macros.cmake
      cmake/make_dist.cmake.in
      cmake/mysql_version.cmake
      cmake/os/SunOS.cmake
      cmake/os/Windows.cmake
      cmake/os/WindowsCache.cmake
      cmake/plugin.cmake
      cmake/versioninfo.rc.in
      cmd-line-utils/libedit/CMakeLists.txt
      cmd-line-utils/readline/CMakeLists.txt
      cmd-line-utils/readline/bind.c
      config.h.cmake
      configure.cmake
      dbug/dbug.c
      dbug/dbug_add_tags.pl
      dbug/dbug_analyze.c
      dbug/my_main.c
      dbug/tests.c
      extra/comp_err.c
      extra/my_print_defaults.c
      extra/resolve_stack_dump.c
      extra/yassl/examples/client/client.cpp
      extra/yassl/examples/echoclient/echoclient.cpp
      extra/yassl/examples/echoserver/echoserver.cpp
      extra/yassl/examples/server/server.cpp
      extra/yassl/include/lock.hpp
      extra/yassl/include/openssl/crypto.h
      extra/yassl/include/openssl/des.h
      extra/yassl/include/openssl/des_old.h
      extra/yassl/include/openssl/engine.h
      extra/yassl/include/openssl/err.h
      extra/yassl/include/openssl/evp.h
      extra/yassl/include/openssl/generate_prefix_files.pl
      extra/yassl/include/openssl/hmac.h
      extra/yassl/include/openssl/lhash.h
      extra/yassl/include/openssl/md4.h
      extra/yassl/include/openssl/md5.h
      extra/yassl/include/openssl/objects.h
      extra/yassl/include/openssl/opensslv.h
      extra/yassl/include/openssl/pem.h
      extra/yassl/include/openssl/pkcs12.h
      extra/yassl/include/openssl/prefix_crypto.h
      extra/yassl/include/openssl/prefix_ssl.h
      extra/yassl/include/openssl/rand.h
      extra/yassl/include/openssl/rsa.h
      extra/yassl/include/openssl/sha.h
      extra/yassl/include/openssl/x509.h
      extra/yassl/include/openssl/x509v3.h
      extra/yassl/src/lock.cpp
      extra/yassl/src/make.bat
      extra/yassl/taocrypt/benchmark/benchmark.cpp
      extra/yassl/taocrypt/benchmark/make.bat
      extra/yassl/taocrypt/src/make.bat
      extra/yassl/taocrypt/test/make.bat
      extra/yassl/taocrypt/test/memory.cpp
      extra/yassl/taocrypt/test/test.cpp
      extra/yassl/testsuite/make.bat
      extra/yassl/testsuite/test.hpp
      extra/yassl/testsuite/testsuite.cpp
      include/CMakeLists.txt
      include/atomic/x86-gcc.h
      include/base64.h
      include/heap.h
      include/m_ctype.h
      include/m_string.h
      include/my_base.h
      include/my_bitmap.h
      include/my_compiler.h
      include/my_dbug.h
      include/my_getopt.h
      include/my_global.h
      include/my_handler.h
      include/my_pthread.h
      include/my_stacktrace.h
      include/my_sys.h
      include/myisam.h
      include/mysql.h
      include/mysql/innodb_priv.h
      include/mysql/plugin_audit.h
      include/mysql/plugin_audit.h.pp
      include/mysql/psi/mysql_file.h
      include/mysql/psi/mysql_table.h
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v1.h.pp
      include/mysql/psi/psi_abi_v2.h.pp
      include/mysql_com.h
      include/mysys_err.h
      include/thr_alarm.h
      libmysql/CMakeLists.txt
      libmysql/client_settings.h
      libmysql/conf_to_src.c
      libmysql/errmsg.c
      libmysql/get_password.c
      libmysql/libmysql.c
      libmysqld/CMakeLists.txt
      libmysqld/examples/test-run
      libservices/CMakeLists.txt
      man/CMakeLists.txt
      mysql-test/CMakeLists.txt
      mysql-test/collections/README.experimental
      mysql-test/collections/default.experimental
      mysql-test/collections/default.weekly
      mysql-test/collections/mysql-trunk.push
      mysql-test/collections/test-bt
      mysql-test/collections/test-bt-debug
      mysql-test/collections/test-bt-fast
      mysql-test/extra/binlog_tests/binlog.test
      mysql-test/extra/binlog_tests/binlog_insert_delayed.test
      mysql-test/extra/binlog_tests/binlog_truncate.test
      mysql-test/extra/binlog_tests/blackhole.test
      mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
      mysql-test/extra/rpl_tests/create_recursive_construct.inc
      mysql-test/extra/rpl_tests/rpl_EE_err.test
      mysql-test/extra/rpl_tests/rpl_auto_increment.test
      mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test
      mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test
      mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test
      mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test
      mysql-test/extra/rpl_tests/rpl_charset.test
      mysql-test/extra/rpl_tests/rpl_commit_after_flush.test
      mysql-test/extra/rpl_tests/rpl_conflicts.test
      mysql-test/extra/rpl_tests/rpl_ddl.test
      mysql-test/extra/rpl_tests/rpl_deadlock.test
      mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc
      mysql-test/extra/rpl_tests/rpl_failed_optimize.test
      mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
      mysql-test/extra/rpl_tests/rpl_foreign_key.test
      mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
      mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test
      mysql-test/extra/rpl_tests/rpl_innodb.test
      mysql-test/extra/rpl_tests/rpl_insert_delayed.test
      mysql-test/extra/rpl_tests/rpl_insert_id.test
      mysql-test/extra/rpl_tests/rpl_insert_id_pk.test
      mysql-test/extra/rpl_tests/rpl_insert_ignore.test
      mysql-test/extra/rpl_tests/rpl_loaddata.test
      mysql-test/extra/rpl_tests/rpl_log.test
      mysql-test/extra/rpl_tests/rpl_max_relay_size.test
      mysql-test/extra/rpl_tests/rpl_multi_query.test
      mysql-test/extra/rpl_tests/rpl_multi_update.test
      mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test
      mysql-test/extra/rpl_tests/rpl_not_null.test
      mysql-test/extra/rpl_tests/rpl_record_compare.test
      mysql-test/extra/rpl_tests/rpl_reset_slave.test
      mysql-test/extra/rpl_tests/rpl_row_UUID.test
      mysql-test/extra/rpl_tests/rpl_row_basic.test
      mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test
      mysql-test/extra/rpl_tests/rpl_row_empty_imgs.test
      mysql-test/extra/rpl_tests/rpl_row_img.test
      mysql-test/extra/rpl_tests/rpl_row_img_blobs.test
      mysql-test/extra/rpl_tests/rpl_row_img_diff_indexes.test
      mysql-test/extra/rpl_tests/rpl_row_sp002.test
      mysql-test/extra/rpl_tests/rpl_row_sp007.test
      mysql-test/extra/rpl_tests/rpl_set_null.test
      mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
      mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
      mysql-test/extra/rpl_tests/rpl_stop_middle_group.test
      mysql-test/extra/rpl_tests/rpl_stop_slave.test
      mysql-test/extra/rpl_tests/rpl_sv_relay_space.test
      mysql-test/extra/rpl_tests/rpl_truncate.test
      mysql-test/extra/rpl_tests/rpl_truncate_helper.test
      mysql-test/extra/rpl_tests/type_conversions.test
      mysql-test/include/analyze-sync_with_master.test
      mysql-test/include/check-testcase.test
      mysql-test/include/check_ipv6.inc
      mysql-test/include/cleanup_fake_relay_log.inc
      mysql-test/include/commit.inc
      mysql-test/include/ctype_numconv.inc
      mysql-test/include/diff_tables.inc
      mysql-test/include/func_in.inc
      mysql-test/include/handler.inc
      mysql-test/include/have_example_plugin.inc
      mysql-test/include/have_semisync_plugin.inc
      mysql-test/include/have_simple_parser.inc
      mysql-test/include/have_udf.inc
      mysql-test/include/icp_tests.inc
      mysql-test/include/kill_query_and_diff_master_slave.inc
      mysql-test/include/master-slave.inc
      mysql-test/include/mrr_tests.inc
      mysql-test/include/mtr_check.sql
      mysql-test/include/mtr_warnings.sql
      mysql-test/include/mysql_upgrade_preparation.inc
      mysql-test/include/mysqldump.inc
      mysql-test/include/mysqlhotcopy.inc
      mysql-test/include/ndb_master-slave.inc
      mysql-test/include/ndb_master-slave_2ch.inc
      mysql-test/include/ndb_not_readonly.inc
      mysql-test/include/no_valgrind_without_big.inc
      mysql-test/include/not_parallel.inc
      mysql-test/include/order_by.inc
      mysql-test/include/range.inc
      mysql-test/include/report-features.test
      mysql-test/include/restart_mysqld.inc
      mysql-test/include/rpl_assert.inc
      mysql-test/include/rpl_row_img_general_loop.inc
      mysql-test/include/rpl_row_img_parts_master_slave.inc
      mysql-test/include/rpl_row_img_set.inc
      mysql-test/include/select.inc
      mysql-test/include/setup_fake_relay_log.inc
      mysql-test/include/show_rpl_debug_info.inc
      mysql-test/include/show_slave_status.inc
      mysql-test/include/start_slave.inc
      mysql-test/include/stop_slave.inc
      mysql-test/include/subquery.inc
      mysql-test/include/subquery_mat.inc
      mysql-test/include/subquery_sj.inc
      mysql-test/include/sync_slave_io_with_master.inc
      mysql-test/include/sync_with_master.inc
      mysql-test/include/truncate_file.inc
      mysql-test/include/wait_for_binlog_event.inc
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/include/wait_for_slave_io_to_start.inc
      mysql-test/include/wait_for_slave_io_to_stop.inc
      mysql-test/include/wait_for_slave_param.inc
      mysql-test/include/wait_for_slave_sql_error.inc
      mysql-test/include/wait_for_slave_sql_error_and_skip.inc
      mysql-test/include/wait_for_slave_sql_to_start.inc
      mysql-test/include/wait_for_slave_sql_to_stop.inc
      mysql-test/include/wait_for_slave_to_start.inc
      mysql-test/include/wait_for_slave_to_stop.inc
      mysql-test/include/wait_for_status_var.inc
      mysql-test/include/wait_show_condition.inc
      mysql-test/lib/My/ConfigFactory.pm
      mysql-test/lib/My/CoreDump.pm
      mysql-test/lib/My/File/Path.pm
      mysql-test/lib/My/Find.pm
      mysql-test/lib/My/Options.pm
      mysql-test/lib/My/Platform.pm
      mysql-test/lib/My/SafeProcess.pm
      mysql-test/lib/My/SafeProcess/Base.pm
      mysql-test/lib/My/SafeProcess/safe_kill_win.cc
      mysql-test/lib/My/SafeProcess/safe_process.cc
      mysql-test/lib/My/SafeProcess/safe_process_win.cc
      mysql-test/lib/My/SysInfo.pm
      mysql-test/lib/My/Test.pm
      mysql-test/lib/mtr_cases.pm
      mysql-test/lib/mtr_gcov.pl
      mysql-test/lib/mtr_gprof.pl
      mysql-test/lib/mtr_io.pl
      mysql-test/lib/mtr_match.pm
      mysql-test/lib/mtr_misc.pl
      mysql-test/lib/mtr_process.pl
      mysql-test/lib/mtr_report.pm
      mysql-test/lib/mtr_stress.pl
      mysql-test/lib/mtr_unique.pm
      mysql-test/lib/v1/mysql-test-run.pl
      mysql-test/mysql-stress-test.pl
      mysql-test/mysql-test-run.pl
      mysql-test/purify.supp
      mysql-test/r/1st.result
      mysql-test/r/archive.result
      mysql-test/r/archive_gis.result
      mysql-test/r/auto_increment.result
      mysql-test/r/client_xml.result
      mysql-test/r/commit_1innodb.result
      mysql-test/r/compress.result
      mysql-test/r/connect.result
      mysql-test/r/create.result
      mysql-test/r/csv_not_null.result
      mysql-test/r/ctype_binary.result
      mysql-test/r/ctype_collate.result
      mysql-test/r/ctype_cp1251.result
      mysql-test/r/ctype_latin1.result
      mysql-test/r/ctype_ldml.result
      mysql-test/r/ctype_many.result
      mysql-test/r/ctype_uca.result
      mysql-test/r/ctype_ucs.result
      mysql-test/r/ctype_ujis.result
      mysql-test/r/ctype_utf16.result
      mysql-test/r/ctype_utf16_uca.result
      mysql-test/r/ctype_utf32.result
      mysql-test/r/ctype_utf32_uca.result
      mysql-test/r/ctype_utf8.result
      mysql-test/r/ctype_utf8mb4.result
      mysql-test/r/ctype_utf8mb4_heap.result
      mysql-test/r/ctype_utf8mb4_innodb.result
      mysql-test/r/ctype_utf8mb4_myisam.result
      mysql-test/r/ctype_utf8mb4_uca.result
      mysql-test/r/date_formats.result
      mysql-test/r/delayed.result
      mysql-test/r/derived.result
      mysql-test/r/distinct.result
      mysql-test/r/error_simulation.result
      mysql-test/r/events_2.result
      mysql-test/r/explain.result
      mysql-test/r/flush.result
      mysql-test/r/flush2.result
      mysql-test/r/flush_read_lock_kill.result
      mysql-test/r/fulltext.result
      mysql-test/r/func_gconcat.result
      mysql-test/r/func_group.result
      mysql-test/r/func_group_innodb.result
      mysql-test/r/func_in_all.result
      mysql-test/r/func_in_icp.result
      mysql-test/r/func_in_icp_mrr.result
      mysql-test/r/func_in_mrr.result
      mysql-test/r/func_in_none.result
      mysql-test/r/func_like.result
      mysql-test/r/func_math.result
      mysql-test/r/func_misc.result
      mysql-test/r/func_str.result
      mysql-test/r/func_time.result
      mysql-test/r/gis-precise.result
      mysql-test/r/gis.result
      mysql-test/r/grant.result
      mysql-test/r/greedy_optimizer.result
      mysql-test/r/group_by.result
      mysql-test/r/group_min_max.result
      mysql-test/r/handler_innodb.result
      mysql-test/r/handler_myisam.result
      mysql-test/r/index_merge_innodb.result
      mysql-test/r/index_merge_myisam.result
      mysql-test/r/information_schema-big.result
      mysql-test/r/information_schema.result
      mysql-test/r/init_file.result
      mysql-test/r/innodb_icp.result
      mysql-test/r/innodb_icp_all.result
      mysql-test/r/innodb_icp_none.result
      mysql-test/r/innodb_mrr.result
      mysql-test/r/innodb_mrr_all.result
      mysql-test/r/innodb_mrr_icp.result
      mysql-test/r/innodb_mrr_none.result
      mysql-test/r/innodb_mysql_sync.result
      mysql-test/r/join.result
      mysql-test/r/join_cache_jcl1.result
      mysql-test/r/join_cache_jcl2.result
      mysql-test/r/join_cache_jcl3.result
      mysql-test/r/join_cache_jcl4.result
      mysql-test/r/join_cache_jcl5.result
      mysql-test/r/join_cache_jcl6.result
      mysql-test/r/join_cache_jcl7.result
      mysql-test/r/join_cache_jcl8.result
      mysql-test/r/join_nested.result
      mysql-test/r/join_nested_jcl6.result
      mysql-test/r/join_optimizer.result
      mysql-test/r/join_outer.result
      mysql-test/r/join_outer_innodb.result
      mysql-test/r/join_outer_jcl6.result
      mysql-test/r/key_diff.result
      mysql-test/r/kill.result
      mysql-test/r/limit.result
      mysql-test/r/lock_multi.result
      mysql-test/r/lock_sync.result
      mysql-test/r/log_tables.result
      mysql-test/r/log_tables_upgrade.result
      mysql-test/r/lowercase_table4.result
      mysql-test/r/mdl_sync.result
      mysql-test/r/merge.result
      mysql-test/r/mix2_myisam.result
      mysql-test/r/multi_update.result
      mysql-test/r/myisam.result
      mysql-test/r/myisam_icp.result
      mysql-test/r/myisam_icp_all.result
      mysql-test/r/myisam_icp_none.result
      mysql-test/r/myisam_mrr.result
      mysql-test/r/myisam_mrr_all.result
      mysql-test/r/myisam_mrr_icp.result
      mysql-test/r/myisam_mrr_none.result
      mysql-test/r/mysql.result
      mysql-test/r/mysql_upgrade.result
      mysql-test/r/mysql_upgrade_ssl.result
      mysql-test/r/mysqladmin.result
      mysql-test/r/mysqlbinlog.result
      mysql-test/r/mysqlbinlog_row_big.result
      mysql-test/r/mysqlcheck.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqldump.result
      mysql-test/r/mysqldump_restore.result
      mysql-test/r/mysqlshow.result
      mysql-test/r/mysqltest.result
      mysql-test/r/named_pipe.result
      mysql-test/r/not_embedded_server.result
      mysql-test/r/null.result
      mysql-test/r/optimizer_switch.result
      mysql-test/r/order_by_all.result
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      mysql-test/r/partition.result
      mysql-test/r/partition_debug_sync.result
      mysql-test/r/partition_error.result
      mysql-test/r/partition_exchange.result
      mysql-test/r/partition_innodb.result
      mysql-test/r/partition_innodb_plugin.result
      mysql-test/r/partition_range.result
      mysql-test/r/plugin_auth.result
      mysql-test/r/plugin_not_embedded.result
      mysql-test/r/ps.result
      mysql-test/r/ps_1general.result
      mysql-test/r/range_all.result
      mysql-test/r/range_icp.result
      mysql-test/r/range_icp_mrr.result
      mysql-test/r/range_mrr.result
      mysql-test/r/range_none.result
      mysql-test/r/row.result
      mysql-test/r/rpl_mysqldump_slave.result
      mysql-test/r/select_all.result
      mysql-test/r/select_all_jcl6.result
      mysql-test/r/select_icp_mrr.result
      mysql-test/r/select_icp_mrr_jcl6.result
      mysql-test/r/select_none.result
      mysql-test/r/select_none_jcl6.result
      mysql-test/r/shm.result
      mysql-test/r/show_check.result
      mysql-test/r/sp-destruct.result
      mysql-test/r/sp-lock.result
      mysql-test/r/ssl.result
      mysql-test/r/ssl_compress.result
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_jcl6.result
      mysql-test/r/subquery_mat.result
      mysql-test/r/subquery_mat_all.result
      mysql-test/r/subquery_mat_none.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_jcl6.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_jcl6.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_jcl6.result
      mysql-test/r/subquery_sj_all_jcl7.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_jcl6.result
      mysql-test/r/subquery_sj_dupsweed_jcl7.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_jcl6.result
      mysql-test/r/subquery_sj_firstmatch_jcl7.result
      mysql-test/r/subquery_sj_innodb_all.result
      mysql-test/r/subquery_sj_innodb_all_jcl6.result
      mysql-test/r/subquery_sj_innodb_all_jcl7.result
      mysql-test/r/subquery_sj_innodb_none.result
      mysql-test/r/subquery_sj_innodb_none_jcl6.result
      mysql-test/r/subquery_sj_innodb_none_jcl7.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_jcl6.result
      mysql-test/r/subquery_sj_loosescan_jcl7.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_jcl6.result
      mysql-test/r/subquery_sj_mat_jcl7.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_jcl6.result
      mysql-test/r/subquery_sj_none_jcl7.result
      mysql-test/r/subselect_innodb.result
      mysql-test/r/symlink.result
      mysql-test/r/system_mysql_db.result
      mysql-test/r/truncate_coverage.result
      mysql-test/r/type_date.result
      mysql-test/r/type_datetime.result
      mysql-test/r/type_timestamp.result
      mysql-test/r/udf.result
      mysql-test/r/union.result
      mysql-test/r/update.result
      mysql-test/r/user_var.result
      mysql-test/r/variables-big.result
      mysql-test/r/variables-notembedded.result
      mysql-test/r/variables.result
      mysql-test/r/view.result
      mysql-test/r/view_grant.result
      mysql-test/r/xml.result
      mysql-test/std_data/Index.xml
      mysql-test/suite/binlog/r/binlog_base64_flag.result
      mysql-test/suite/binlog/r/binlog_index.result
      mysql-test/suite/binlog/r/binlog_innodb.result
      mysql-test/suite/binlog/r/binlog_killed.result
      mysql-test/suite/binlog/r/binlog_max_extension.result
      mysql-test/suite/binlog/r/binlog_old_versions.result
      mysql-test/suite/binlog/r/binlog_row_binlog.result
      mysql-test/suite/binlog/r/binlog_sql_mode.result
      mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result
      mysql-test/suite/binlog/r/binlog_stm_binlog.result
      mysql-test/suite/binlog/t/binlog_base64_flag.test
      mysql-test/suite/binlog/t/binlog_index.test
      mysql-test/suite/binlog/t/binlog_killed.test
      mysql-test/suite/binlog/t/binlog_max_extension.test
      mysql-test/suite/binlog/t/binlog_old_versions.test
      mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test
      mysql-test/suite/binlog/t/binlog_sql_mode.test
      mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
      mysql-test/suite/binlog/t/binlog_unsafe.test
      mysql-test/suite/bugs/t/bug57108.test
      mysql-test/suite/bugs/t/rpl_bug12691.test
      mysql-test/suite/bugs/t/rpl_bug23533.test
      mysql-test/suite/bugs/t/rpl_bug31582.test
      mysql-test/suite/bugs/t/rpl_bug31583.test
      mysql-test/suite/bugs/t/rpl_bug33029.test
      mysql-test/suite/bugs/t/rpl_bug36391.test
      mysql-test/suite/bugs/t/rpl_bug37426.test
      mysql-test/suite/bugs/t/rpl_bug38205.test
      mysql-test/suite/engines/funcs/r/db_alter_character_set.result
      mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
      mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
      mysql-test/suite/engines/funcs/r/in_multicolumn_string_pk_constraint_error.result
      mysql-test/suite/engines/funcs/r/in_multicolumn_string_pk_constraint_ignore.result
      mysql-test/suite/engines/funcs/r/in_multicolumn_string_unique_constraint_error.result
      mysql-test/suite/engines/funcs/r/in_string_pk_constraint_error.result
      mysql-test/suite/engines/funcs/r/in_string_unique_constraint_error.result
      mysql-test/suite/engines/funcs/r/rpl000013.result
      mysql-test/suite/engines/funcs/r/rpl_000015.result
      mysql-test/suite/engines/funcs/r/rpl_change_master.result
      mysql-test/suite/engines/funcs/r/rpl_drop.result
      mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result
      mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result
      mysql-test/suite/engines/funcs/r/rpl_log_pos.result
      mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result
      mysql-test/suite/engines/funcs/r/rpl_row_drop.result
      mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result
      mysql-test/suite/engines/funcs/r/rpl_row_reset_slave.result
      mysql-test/suite/engines/funcs/r/rpl_row_sp005.result
      mysql-test/suite/engines/funcs/r/rpl_row_trig003.result
      mysql-test/suite/engines/funcs/r/rpl_row_until.result
      mysql-test/suite/engines/funcs/r/rpl_server_id1.result
      mysql-test/suite/engines/funcs/r/rpl_server_id2.result
      mysql-test/suite/engines/funcs/r/rpl_session_var.result
      mysql-test/suite/engines/funcs/r/rpl_slave_status.result
      mysql-test/suite/engines/funcs/r/rpl_stm_no_op.result
      mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
      mysql-test/suite/engines/funcs/r/rpl_temp_table.result
      mysql-test/suite/engines/funcs/r/rpl_trigger.result
      mysql-test/suite/engines/funcs/r/se_join_left.result
      mysql-test/suite/engines/funcs/r/se_join_left_outer.result
      mysql-test/suite/engines/funcs/r/se_join_natural_left.result
      mysql-test/suite/engines/funcs/r/se_join_natural_left_outer.result
      mysql-test/suite/engines/funcs/r/sf_alter.result
      mysql-test/suite/engines/funcs/r/sf_cursor.result
      mysql-test/suite/engines/funcs/r/sp_alter.result
      mysql-test/suite/engines/funcs/r/sp_cursor.result
      mysql-test/suite/engines/funcs/r/ta_rename.result
      mysql-test/suite/engines/funcs/t/db_alter_collate_utf8.test
      mysql-test/suite/engines/funcs/t/disabled.def
      mysql-test/suite/engines/funcs/t/in_multicolumn_string_pk_constraint_error.test
      mysql-test/suite/engines/funcs/t/in_multicolumn_string_pk_constraint_ignore.test
      mysql-test/suite/engines/funcs/t/in_multicolumn_string_unique_constraint_error.test
      mysql-test/suite/engines/funcs/t/in_string_pk_constraint_error.test
      mysql-test/suite/engines/funcs/t/in_string_unique_constraint_error.test
      mysql-test/suite/engines/funcs/t/rpl000013.test
      mysql-test/suite/engines/funcs/t/rpl_000015.test
      mysql-test/suite/engines/funcs/t/rpl_change_master.test
      mysql-test/suite/engines/funcs/t/rpl_err_ignoredtable.test
      mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test
      mysql-test/suite/engines/funcs/t/rpl_get_lock.test
      mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test
      mysql-test/suite/engines/funcs/t/rpl_loadfile.test
      mysql-test/suite/engines/funcs/t/rpl_log_pos.test
      mysql-test/suite/engines/funcs/t/rpl_misc_functions.test
      mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test
      mysql-test/suite/engines/funcs/t/rpl_row_drop.test
      mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test
      mysql-test/suite/engines/funcs/t/rpl_row_until.test
      mysql-test/suite/engines/funcs/t/rpl_server_id1.test
      mysql-test/suite/engines/funcs/t/rpl_server_id2.test
      mysql-test/suite/engines/funcs/t/rpl_slave_status.test
      mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test
      mysql-test/suite/engines/funcs/t/rpl_temp_table.test
      mysql-test/suite/engines/funcs/t/rpl_temporary.test
      mysql-test/suite/engines/funcs/t/rpl_trigger.test
      mysql-test/suite/engines/funcs/t/se_join_left.test
      mysql-test/suite/engines/funcs/t/se_join_left_outer.test
      mysql-test/suite/engines/funcs/t/se_join_natural_left.test
      mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test
      mysql-test/suite/engines/iuds/r/insert_number.result
      mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result
      mysql-test/suite/engines/iuds/r/strings_update_delete.result
      mysql-test/suite/engines/iuds/r/type_bit_iuds.result
      mysql-test/suite/engines/iuds/r/update_delete_calendar.result
      mysql-test/suite/engines/iuds/r/update_delete_number.result
      mysql-test/suite/engines/iuds/t/disabled.def
      mysql-test/suite/engines/iuds/t/insert_number.test
      mysql-test/suite/engines/iuds/t/update_delete_calendar.test
      mysql-test/suite/federated/federated_bug_25714.test
      mysql-test/suite/funcs_1/r/innodb_func_view.result
      mysql-test/suite/funcs_1/r/is_columns_mysql.result
      mysql-test/suite/funcs_1/r/is_key_column_usage.result
      mysql-test/suite/funcs_1/r/is_statistics.result
      mysql-test/suite/funcs_1/r/is_statistics_mysql.result
      mysql-test/suite/funcs_1/r/is_table_constraints.result
      mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
      mysql-test/suite/funcs_1/r/is_tables_mysql.result
      mysql-test/suite/funcs_1/r/memory_func_view.result
      mysql-test/suite/funcs_1/r/myisam_func_view.result
      mysql-test/suite/funcs_1/t/disabled.def
      mysql-test/suite/funcs_1/views/views_master.inc
      mysql-test/suite/funcs_2/t/disabled.def
      mysql-test/suite/innodb/r/innodb-autoinc.result
      mysql-test/suite/innodb/r/innodb-timeout.result
      mysql-test/suite/innodb/r/innodb-zip.result
      mysql-test/suite/innodb/r/innodb.result
      mysql-test/suite/innodb/r/innodb_gis.result
      mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
      mysql-test/suite/innodb/r/innodb_monitor.result
      mysql-test/suite/innodb/r/innodb_multi_update.result
      mysql-test/suite/innodb/r/innodb_mysql.result
      mysql-test/suite/innodb/t/innodb-autoinc.test
      mysql-test/suite/innodb/t/innodb-timeout.test
      mysql-test/suite/innodb/t/innodb-zip.test
      mysql-test/suite/innodb/t/innodb.test
      mysql-test/suite/innodb/t/innodb_bug42419.test
      mysql-test/suite/innodb/t/innodb_bug56143.test
      mysql-test/suite/innodb/t/innodb_bug57255.test
      mysql-test/suite/innodb/t/innodb_monitor.test
      mysql-test/suite/innodb/t/innodb_multi_update.test
      mysql-test/suite/innodb/t/innodb_mysql.test
      mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test
      mysql-test/suite/parts/inc/part_exch_qa_1.inc
      mysql-test/suite/parts/inc/part_exch_qa_13.inc
      mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc
      mysql-test/suite/parts/inc/partition_auto_increment.inc
      mysql-test/suite/parts/inc/partition_decimal.inc
      mysql-test/suite/parts/inc/partition_double.inc
      mysql-test/suite/parts/inc/partition_float.inc
      mysql-test/suite/parts/inc/partition_layout_check1.inc
      mysql-test/suite/parts/inc/partition_layout_check2.inc
      mysql-test/suite/parts/r/part_supported_sql_func_innodb.result
      mysql-test/suite/parts/r/part_supported_sql_func_myisam.result
      mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
      mysql-test/suite/parts/r/partition_auto_increment_innodb.result
      mysql-test/suite/parts/r/partition_auto_increment_memory.result
      mysql-test/suite/parts/r/partition_auto_increment_myisam.result
      mysql-test/suite/parts/r/partition_decimal_innodb.result
      mysql-test/suite/parts/r/partition_decimal_myisam.result
      mysql-test/suite/parts/r/partition_exch_qa_12.result*
      mysql-test/suite/parts/r/partition_exch_qa_13.result
      mysql-test/suite/parts/r/partition_exch_qa_1_innodb.result*
      mysql-test/suite/parts/r/partition_exch_qa_1_myisam.result*
      mysql-test/suite/parts/r/partition_recover_myisam.result
      mysql-test/suite/parts/r/rpl_partition.result
      mysql-test/suite/parts/t/disabled.def
      mysql-test/suite/parts/t/partition_alter1_1_2_myisam.test
      mysql-test/suite/parts/t/partition_alter1_1_myisam.test
      mysql-test/suite/parts/t/partition_alter1_2_myisam.test
      mysql-test/suite/parts/t/partition_basic_myisam.test
      mysql-test/suite/parts/t/partition_engine_myisam.test
      mysql-test/suite/parts/t/partition_exch_qa_12.test
      mysql-test/suite/parts/t/partition_exch_qa_14.test
      mysql-test/suite/parts/t/partition_recover_myisam.test
      mysql-test/suite/parts/t/partition_syntax_myisam.test
      mysql-test/suite/parts/t/rpl_partition.test
      mysql-test/suite/perfschema/include/binlog_common.inc
      mysql-test/suite/perfschema/include/privilege.inc
      mysql-test/suite/perfschema/include/schema.inc
      mysql-test/suite/perfschema/include/start_server_common.inc
      mysql-test/suite/perfschema/r/binlog_mix.result
      mysql-test/suite/perfschema/r/binlog_row.result
      mysql-test/suite/perfschema/r/binlog_stmt.result
      mysql-test/suite/perfschema/r/dml_cond_instances.result
      mysql-test/suite/perfschema/r/dml_ews_by_instance.result
      mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result
      mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result
      mysql-test/suite/perfschema/r/dml_file_instances.result
      mysql-test/suite/perfschema/r/dml_file_summary_by_event_name.result
      mysql-test/suite/perfschema/r/dml_file_summary_by_instance.result
      mysql-test/suite/perfschema/r/dml_mutex_instances.result
      mysql-test/suite/perfschema/r/dml_rwlock_instances.result
      mysql-test/suite/perfschema/r/dml_setup_consumers.result
      mysql-test/suite/perfschema/r/dml_setup_instruments.result
      mysql-test/suite/perfschema/r/func_file_io.result
      mysql-test/suite/perfschema/r/func_mutex.result
      mysql-test/suite/perfschema/r/global_read_lock.result
      mysql-test/suite/perfschema/r/information_schema.result
      mysql-test/suite/perfschema/r/misc.result
      mysql-test/suite/perfschema/r/myisam_file_io.result
      mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result
      mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result
      mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result
      mysql-test/suite/perfschema/r/privilege.result
      mysql-test/suite/perfschema/r/privilege_table_io.result
      mysql-test/suite/perfschema/r/schema_lc0.result
      mysql-test/suite/perfschema/r/schema_lc1.result
      mysql-test/suite/perfschema/r/schema_lc2.result
      mysql-test/suite/perfschema/r/server_init.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_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_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_nothing.result
      mysql-test/suite/perfschema/r/start_server_off.result
      mysql-test/suite/perfschema/r/start_server_on.result
      mysql-test/suite/perfschema/r/threads_innodb.result
      mysql-test/suite/perfschema/t/binlog_mix.test
      mysql-test/suite/perfschema/t/binlog_row.test
      mysql-test/suite/perfschema/t/binlog_stmt.test
      mysql-test/suite/perfschema/t/disabled.def
      mysql-test/suite/perfschema/t/dml_cond_instances.test
      mysql-test/suite/perfschema/t/dml_ews_by_instance.test
      mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test
      mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test
      mysql-test/suite/perfschema/t/dml_file_instances.test
      mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test
      mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test
      mysql-test/suite/perfschema/t/dml_mutex_instances.test
      mysql-test/suite/perfschema/t/dml_rwlock_instances.test
      mysql-test/suite/perfschema/t/func_file_io.test
      mysql-test/suite/perfschema/t/func_mutex.test
      mysql-test/suite/perfschema/t/global_read_lock.test
      mysql-test/suite/perfschema/t/misc.test
      mysql-test/suite/perfschema/t/myisam_file_io.test
      mysql-test/suite/perfschema/t/server_init.test
      mysql-test/suite/perfschema/t/setup_actors.test
      mysql-test/suite/perfschema/t/threads_mysql.test
      mysql-test/suite/perfschema_stress/r/modify.result
      mysql-test/suite/perfschema_stress/r/read.result
      mysql-test/suite/perfschema_stress/t/modify.test
      mysql-test/suite/perfschema_stress/t/read.test
      mysql-test/suite/perfschema_stress/t/setup.test
      mysql-test/suite/perfschema_stress/t/work.test
      mysql-test/suite/rpl/include/rpl_mixed_ddl.inc
      mysql-test/suite/rpl/include/rpl_mixed_dml.inc
      mysql-test/suite/rpl/include/rpl_partition.inc
      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_auto_increment.result
      mysql-test/suite/rpl/r/rpl_auto_increment_11932.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_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_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_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_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_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_delayed_slave.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_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_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_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_insert_select.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_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_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_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_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_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_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_loaddata_concurrent.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_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_until.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_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_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_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_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_mixing_engines.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_until.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_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/disabled.def
      mysql-test/suite/rpl/t/rpl_EE_err.test
      mysql-test/suite/rpl/t/rpl_LD_INFILE.test
      mysql-test/suite/rpl/t/rpl_alter.test
      mysql-test/suite/rpl/t/rpl_alter_db.test
      mysql-test/suite/rpl/t/rpl_auto_increment.test
      mysql-test/suite/rpl/t/rpl_auto_increment_11932.test
      mysql-test/suite/rpl/t/rpl_auto_increment_update_failure.test
      mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test
      mysql-test/suite/rpl/t/rpl_binlog_corruption.test
      mysql-test/suite/rpl/t/rpl_binlog_grant.test
      mysql-test/suite/rpl/t/rpl_bit.test
      mysql-test/suite/rpl/t/rpl_bit_npk.test
      mysql-test/suite/rpl/t/rpl_blackhole.test
      mysql-test/suite/rpl/t/rpl_bug26395.test
      mysql-test/suite/rpl/t/rpl_bug31076.test
      mysql-test/suite/rpl/t/rpl_bug33931.test
      mysql-test/suite/rpl/t/rpl_bug38694.test
      mysql-test/suite/rpl/t/rpl_bug41902.test
      mysql-test/suite/rpl/t/rpl_change_master.test
      mysql-test/suite/rpl/t/rpl_change_master_dbug.test
      mysql-test/suite/rpl/t/rpl_charset.test
      mysql-test/suite/rpl/t/rpl_charset_sjis.test
      mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf
      mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
      mysql-test/suite/rpl/t/rpl_colSize.test
      mysql-test/suite/rpl/t/rpl_commit_after_flush.test
      mysql-test/suite/rpl/t/rpl_concurrency_error.test
      mysql-test/suite/rpl/t/rpl_conditional_comments.test
      mysql-test/suite/rpl/t/rpl_create_database.test
      mysql-test/suite/rpl/t/rpl_create_if_not_exists.test
      mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test
      mysql-test/suite/rpl/t/rpl_critical_errors.test
      mysql-test/suite/rpl/t/rpl_cross_version.test
      mysql-test/suite/rpl/t/rpl_current_user.cnf
      mysql-test/suite/rpl/t/rpl_current_user.test
      mysql-test/suite/rpl/t/rpl_ddl.test
      mysql-test/suite/rpl/t/rpl_deadlock_innodb.test
      mysql-test/suite/rpl/t/rpl_delayed_slave.test
      mysql-test/suite/rpl/t/rpl_delete_no_where.test
      mysql-test/suite/rpl/t/rpl_do_db_filter.test
      mysql-test/suite/rpl/t/rpl_do_grant.test
      mysql-test/suite/rpl/t/rpl_do_table_filter_insensitive.test
      mysql-test/suite/rpl/t/rpl_do_table_filter_sensitive.test
      mysql-test/suite/rpl/t/rpl_drop.test
      mysql-test/suite/rpl/t/rpl_drop_db.test
      mysql-test/suite/rpl/t/rpl_drop_temp.test
      mysql-test/suite/rpl/t/rpl_drop_view.test
      mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
      mysql-test/suite/rpl/t/rpl_empty_master_host.test
      mysql-test/suite/rpl/t/rpl_err_ignoredtable.test
      mysql-test/suite/rpl/t/rpl_events.test
      mysql-test/suite/rpl/t/rpl_failed_optimize.test
      mysql-test/suite/rpl/t/rpl_filter_database.test
      mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
      mysql-test/suite/rpl/t/rpl_flush_logs.test
      mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt
      mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt
      mysql-test/suite/rpl/t/rpl_flushlog_loop.test
      mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test
      mysql-test/suite/rpl/t/rpl_free_items.test
      mysql-test/suite/rpl/t/rpl_geometry.test
      mysql-test/suite/rpl/t/rpl_get_lock.test
      mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
      mysql-test/suite/rpl/t/rpl_grant.test
      mysql-test/suite/rpl/t/rpl_heartbeat.test
      mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf
      mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test
      mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
      mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test
      mysql-test/suite/rpl/t/rpl_idempotency.test
      mysql-test/suite/rpl/t/rpl_ignore_db_filter.test
      mysql-test/suite/rpl/t/rpl_ignore_grant.test
      mysql-test/suite/rpl/t/rpl_ignore_revoke.test
      mysql-test/suite/rpl/t/rpl_ignore_table.test
      mysql-test/suite/rpl/t/rpl_ignore_table_filter_insensitive.test
      mysql-test/suite/rpl/t/rpl_ignore_table_filter_sensitive.test
      mysql-test/suite/rpl/t/rpl_ignore_table_update.test
      mysql-test/suite/rpl/t/rpl_incident.test
      mysql-test/suite/rpl/t/rpl_init_slave.test
      mysql-test/suite/rpl/t/rpl_init_slave_errors.test
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
      mysql-test/suite/rpl/t/rpl_innodb_bug30888.test
      mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test
      mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test
      mysql-test/suite/rpl/t/rpl_insert.test
      mysql-test/suite/rpl/t/rpl_insert_id.test
      mysql-test/suite/rpl/t/rpl_insert_id_pk.test
      mysql-test/suite/rpl/t/rpl_insert_ignore.test
      mysql-test/suite/rpl/t/rpl_insert_select.test
      mysql-test/suite/rpl/t/rpl_invoked_features.test
      mysql-test/suite/rpl/t/rpl_ip_mix.test
      mysql-test/suite/rpl/t/rpl_ip_mix2.test
      mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test
      mysql-test/suite/rpl/t/rpl_ipv6.test
      mysql-test/suite/rpl/t/rpl_killed_ddl.test
      mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
      mysql-test/suite/rpl/t/rpl_loaddata.test
      mysql-test/suite/rpl/t/rpl_loaddata_charset.test
      mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
      mysql-test/suite/rpl/t/rpl_loaddata_m.test
      mysql-test/suite/rpl/t/rpl_loaddata_map.test
      mysql-test/suite/rpl/t/rpl_loaddata_s.test
      mysql-test/suite/rpl/t/rpl_loaddata_simple.test
      mysql-test/suite/rpl/t/rpl_loaddata_symlink.test
      mysql-test/suite/rpl/t/rpl_loaddatalocal.test
      mysql-test/suite/rpl/t/rpl_loadfile.test
      mysql-test/suite/rpl/t/rpl_locale.test
      mysql-test/suite/rpl/t/rpl_log_pos.test
      mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
      mysql-test/suite/rpl/t/rpl_many_optimize.test
      mysql-test/suite/rpl/t/rpl_master_pos_wait.test
      mysql-test/suite/rpl/t/rpl_misc_functions.test
      mysql-test/suite/rpl/t/rpl_mix_found_rows.test
      mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test
      mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test
      mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test
      mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test
      mysql-test/suite/rpl/t/rpl_mixed_drop_create_temp_table.test
      mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test
      mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_multi_delete.test
      mysql-test/suite/rpl/t/rpl_multi_delete2.test
      mysql-test/suite/rpl/t/rpl_multi_engine.test
      mysql-test/suite/rpl/t/rpl_multi_update.test
      mysql-test/suite/rpl/t/rpl_multi_update2.test
      mysql-test/suite/rpl/t/rpl_multi_update3.test
      mysql-test/suite/rpl/t/rpl_multi_update4.test
      mysql-test/suite/rpl/t/rpl_mysql_upgrade.test
      mysql-test/suite/rpl/t/rpl_name_const.test
      mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_non_direct_row_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_non_direct_stm_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test
      mysql-test/suite/rpl/t/rpl_not_null_innodb.test
      mysql-test/suite/rpl/t/rpl_not_null_myisam.test
      mysql-test/suite/rpl/t/rpl_optimize.test
      mysql-test/suite/rpl/t/rpl_packet.test
      mysql-test/suite/rpl/t/rpl_partition_archive.test
      mysql-test/suite/rpl/t/rpl_partition_innodb.test
      mysql-test/suite/rpl/t/rpl_partition_memory.test
      mysql-test/suite/rpl/t/rpl_partition_myisam.test
      mysql-test/suite/rpl/t/rpl_plugin_load.test
      mysql-test/suite/rpl/t/rpl_ps.test
      mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
      mysql-test/suite/rpl/t/rpl_read_old_relay_log_info.test
      mysql-test/suite/rpl/t/rpl_read_only.test
      mysql-test/suite/rpl/t/rpl_relay_space_innodb.test
      mysql-test/suite/rpl/t/rpl_relay_space_myisam.test
      mysql-test/suite/rpl/t/rpl_relayrotate.test
      mysql-test/suite/rpl/t/rpl_relayspace.test
      mysql-test/suite/rpl/t/rpl_replicate_do.test
      mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test
      mysql-test/suite/rpl/t/rpl_report.test
      mysql-test/suite/rpl/t/rpl_rewrite_db_filter.test
      mysql-test/suite/rpl/t/rpl_rewrt_db.test
      mysql-test/suite/rpl/t/rpl_rotate_logs.test
      mysql-test/suite/rpl/t/rpl_row_001.test
      mysql-test/suite/rpl/t/rpl_row_4_bytes.test
      mysql-test/suite/rpl/t/rpl_row_NOW.test
      mysql-test/suite/rpl/t/rpl_row_USER.test
      mysql-test/suite/rpl/t/rpl_row_UUID.test
      mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
      mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test
      mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test
      mysql-test/suite/rpl/t/rpl_row_basic_8partition.test
      mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test
      mysql-test/suite/rpl/t/rpl_row_blob_innodb.test
      mysql-test/suite/rpl/t/rpl_row_blob_myisam.test
      mysql-test/suite/rpl/t/rpl_row_colSize.test
      mysql-test/suite/rpl/t/rpl_row_conflicts.test
      mysql-test/suite/rpl/t/rpl_row_create_table.test
      mysql-test/suite/rpl/t/rpl_row_delayed_ins.test
      mysql-test/suite/rpl/t/rpl_row_drop.test
      mysql-test/suite/rpl/t/rpl_row_drop_create_temp_table.test
      mysql-test/suite/rpl/t/rpl_row_event_max_size.test
      mysql-test/suite/rpl/t/rpl_row_find_row.test
      mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test
      mysql-test/suite/rpl/t/rpl_row_func001.test
      mysql-test/suite/rpl/t/rpl_row_func002.test
      mysql-test/suite/rpl/t/rpl_row_func003.test
      mysql-test/suite/rpl/t/rpl_row_idempotency.test
      mysql-test/suite/rpl/t/rpl_row_ignorable_event.test
      mysql-test/suite/rpl/t/rpl_row_img_blobs.test
      mysql-test/suite/rpl/t/rpl_row_img_eng_full.cnf
      mysql-test/suite/rpl/t/rpl_row_img_eng_full.test
      mysql-test/suite/rpl/t/rpl_row_img_eng_min.cnf
      mysql-test/suite/rpl/t/rpl_row_img_eng_min.test
      mysql-test/suite/rpl/t/rpl_row_img_eng_noblob.cnf
      mysql-test/suite/rpl/t/rpl_row_img_eng_noblob.test
      mysql-test/suite/rpl/t/rpl_row_img_idx_full.cnf
      mysql-test/suite/rpl/t/rpl_row_img_idx_full.test
      mysql-test/suite/rpl/t/rpl_row_img_idx_min.cnf
      mysql-test/suite/rpl/t/rpl_row_img_idx_min.test
      mysql-test/suite/rpl/t/rpl_row_img_idx_noblob.cnf
      mysql-test/suite/rpl/t/rpl_row_img_idx_noblob.test
      mysql-test/suite/rpl/t/rpl_row_img_misc.test
      mysql-test/suite/rpl/t/rpl_row_img_sanity.test
      mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test
      mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test
      mysql-test/suite/rpl/t/rpl_row_insert_delayed.test
      mysql-test/suite/rpl/t/rpl_row_log.test
      mysql-test/suite/rpl/t/rpl_row_log_innodb.test
      mysql-test/suite/rpl/t/rpl_row_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
      mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test
      mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test
      mysql-test/suite/rpl/t/rpl_row_record_find_myisam.test
      mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test
      mysql-test/suite/rpl/t/rpl_row_sp001.test
      mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test
      mysql-test/suite/rpl/t/rpl_row_sp003.test
      mysql-test/suite/rpl/t/rpl_row_sp005.test
      mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test
      mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test
      mysql-test/suite/rpl/t/rpl_row_sp008.test
      mysql-test/suite/rpl/t/rpl_row_sp009.test
      mysql-test/suite/rpl/t/rpl_row_sp010.test
      mysql-test/suite/rpl/t/rpl_row_sp011.test
      mysql-test/suite/rpl/t/rpl_row_sp012.test
      mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test
      mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test
      mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
      mysql-test/suite/rpl/t/rpl_row_trig001.test
      mysql-test/suite/rpl/t/rpl_row_trig002.test
      mysql-test/suite/rpl/t/rpl_row_trig003.test
      mysql-test/suite/rpl/t/rpl_row_trig004.test
      mysql-test/suite/rpl/t/rpl_row_trunc_temp.test
      mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test
      mysql-test/suite/rpl/t/rpl_row_until.test
      mysql-test/suite/rpl/t/rpl_row_utf16.test
      mysql-test/suite/rpl/t/rpl_row_utf32.test
      mysql-test/suite/rpl/t/rpl_row_view01.test
      mysql-test/suite/rpl/t/rpl_row_wide_table.test
      mysql-test/suite/rpl/t/rpl_savepoint.test
      mysql-test/suite/rpl/t/rpl_seconds_behind_master.test
      mysql-test/suite/rpl/t/rpl_semi_sync.test
      mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt
      mysql-test/suite/rpl/t/rpl_semi_sync_event.test
      mysql-test/suite/rpl/t/rpl_server_id1.test
      mysql-test/suite/rpl/t/rpl_server_id2.test
      mysql-test/suite/rpl/t/rpl_server_id_ignore.test
      mysql-test/suite/rpl/t/rpl_server_uuid.cnf
      mysql-test/suite/rpl/t/rpl_server_uuid.test
      mysql-test/suite/rpl/t/rpl_session_var.test
      mysql-test/suite/rpl/t/rpl_set_charset.test
      mysql-test/suite/rpl/t/rpl_set_null_innodb.test
      mysql-test/suite/rpl/t/rpl_set_null_myisam.test
      mysql-test/suite/rpl/t/rpl_show_errors.test
      mysql-test/suite/rpl/t/rpl_show_master_info_file.test
      mysql-test/suite/rpl/t/rpl_show_slave_hosts.test
      mysql-test/suite/rpl/t/rpl_show_slave_running.test
      mysql-test/suite/rpl/t/rpl_skip_error.test
      mysql-test/suite/rpl/t/rpl_slave_grp_exec.test
      mysql-test/suite/rpl/t/rpl_slave_load_in.test
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
      mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test
      mysql-test/suite/rpl/t/rpl_slave_skip.test
      mysql-test/suite/rpl/t/rpl_slave_status.test
      mysql-test/suite/rpl/t/rpl_slow_query_log.test
      mysql-test/suite/rpl/t/rpl_sp.test
      mysql-test/suite/rpl/t/rpl_sp004.test
      mysql-test/suite/rpl/t/rpl_sp_effects.test
      mysql-test/suite/rpl/t/rpl_spec_variables.test
      mysql-test/suite/rpl/t/rpl_sporadic_master.test
      mysql-test/suite/rpl/t/rpl_ssl.test
      mysql-test/suite/rpl/t/rpl_ssl1.test
      mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test
      mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test
      mysql-test/suite/rpl/t/rpl_stm_conflicts.test
      mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test
      mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test
      mysql-test/suite/rpl/t/rpl_stm_found_rows.test
      mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test
      mysql-test/suite/rpl/t/rpl_stm_innodb.test
      mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test
      mysql-test/suite/rpl/t/rpl_stm_loadfile.test
      mysql-test/suite/rpl/t/rpl_stm_log.test
      mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test
      mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test
      mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_stm_multi_query.test
      mysql-test/suite/rpl/t/rpl_stm_no_op.test
      mysql-test/suite/rpl/t/rpl_stm_sql_mode.test
      mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
      mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test
      mysql-test/suite/rpl/t/rpl_stm_until.test
      mysql-test/suite/rpl/t/rpl_stm_user_variables.test
      mysql-test/suite/rpl/t/rpl_stop_slave.test
      mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test
      mysql-test/suite/rpl/t/rpl_sync-slave.opt
      mysql-test/suite/rpl/t/rpl_sync.test
      mysql-test/suite/rpl/t/rpl_temp_table.test
      mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test
      mysql-test/suite/rpl/t/rpl_temporary.test
      mysql-test/suite/rpl/t/rpl_temporary_errors.test
      mysql-test/suite/rpl/t/rpl_timezone.test
      mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test
      mysql-test/suite/rpl/t/rpl_trigger.test
      mysql-test/suite/rpl/t/rpl_trunc_temp.test
      mysql-test/suite/rpl/t/rpl_truncate_2myisam.test
      mysql-test/suite/rpl/t/rpl_truncate_3innodb.test
      mysql-test/suite/rpl/t/rpl_typeconv.test
      mysql-test/suite/rpl/t/rpl_typeconv_innodb.test
      mysql-test/suite/rpl/t/rpl_udf.test
      mysql-test/suite/rpl/t/rpl_user.test
      mysql-test/suite/rpl/t/rpl_user_variables.test
      mysql-test/suite/rpl/t/rpl_variables.test
      mysql-test/suite/rpl/t/rpl_variables_stm.test
      mysql-test/suite/rpl/t/rpl_view.test
      mysql-test/suite/rpl/t/rpl_view_multi.test
      mysql-test/suite/sys_vars/r/all_vars.result
      mysql-test/suite/sys_vars/r/character_set_client_basic.result
      mysql-test/suite/sys_vars/r/character_set_connection_basic.result
      mysql-test/suite/sys_vars/r/character_set_database_basic.result
      mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result
      mysql-test/suite/sys_vars/r/character_set_results_basic.result
      mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
      mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
      mysql-test/suite/sys_vars/r/optimizer_join_cache_level_basic.result
      mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
      mysql-test/suite/sys_vars/r/rpl_init_slave_func.result
      mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result
      mysql-test/suite/sys_vars/t/all_vars.test
      mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
      mysql-test/suite/sys_vars/t/master_info_repository_basic.test
      mysql-test/suite/sys_vars/t/relay_log_info_repository_basic.test
      mysql-test/suite/sys_vars/t/rpl_init_slave_func.test
      mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test
      mysql-test/suite/sys_vars/t/slow_launch_time_func.test
      mysql-test/t/archive.test
      mysql-test/t/auto_increment.test
      mysql-test/t/bug46261.test
      mysql-test/t/change_user.test
      mysql-test/t/csv_not_null.test
      mysql-test/t/ctype_cp1251.test
      mysql-test/t/ctype_latin1.test
      mysql-test/t/ctype_ldml.test
      mysql-test/t/ctype_many.test
      mysql-test/t/ctype_uca.test
      mysql-test/t/ctype_ucs.test
      mysql-test/t/ctype_ujis.test
      mysql-test/t/ctype_utf16_uca.test
      mysql-test/t/ctype_utf32_uca.test
      mysql-test/t/ctype_utf8.test
      mysql-test/t/ctype_utf8mb4_uca.test
      mysql-test/t/date_formats.test
      mysql-test/t/delayed.test
      mysql-test/t/derived.test
      mysql-test/t/disabled.def
      mysql-test/t/events_2.test
      mysql-test/t/execution_constants.test
      mysql-test/t/explain.test
      mysql-test/t/fix_priv_tables.test
      mysql-test/t/flush.test
      mysql-test/t/flush2.test
      mysql-test/t/flush_block_commit.test
      mysql-test/t/flush_block_commit_notembedded.test
      mysql-test/t/flush_read_lock_kill.test
      mysql-test/t/fulltext.test
      mysql-test/t/fulltext_plugin.test
      mysql-test/t/func_gconcat.test
      mysql-test/t/func_group.test
      mysql-test/t/func_group_innodb.test
      mysql-test/t/func_in_all.test
      mysql-test/t/func_in_icp_mrr.test
      mysql-test/t/func_in_mrr.test
      mysql-test/t/func_like.test
      mysql-test/t/func_math.test
      mysql-test/t/func_misc.test
      mysql-test/t/func_op.test
      mysql-test/t/func_str.test
      mysql-test/t/func_time.test
      mysql-test/t/gis-precise.test
      mysql-test/t/gis.test
      mysql-test/t/group_by.test
      mysql-test/t/init_file.test
      mysql-test/t/innodb_mrr.test
      mysql-test/t/innodb_mrr_all.test
      mysql-test/t/innodb_mrr_icp.test
      mysql-test/t/innodb_mysql_sync.test
      mysql-test/t/join.test
      mysql-test/t/join_cache_jcl1.test
      mysql-test/t/join_cache_jcl2.test
      mysql-test/t/join_cache_jcl3.test
      mysql-test/t/join_cache_jcl4.test
      mysql-test/t/join_cache_jcl5.test
      mysql-test/t/join_cache_jcl6.test
      mysql-test/t/join_cache_jcl7.test
      mysql-test/t/join_cache_jcl8.test
      mysql-test/t/join_nested.test
      mysql-test/t/join_nested_jcl6.test
      mysql-test/t/join_outer.test
      mysql-test/t/join_outer_innodb.test
      mysql-test/t/join_outer_jcl6.test
      mysql-test/t/kill.test
      mysql-test/t/lock_multi.test
      mysql-test/t/lock_sync.test
      mysql-test/t/lowercase_table4.test
      mysql-test/t/mdl_sync.test
      mysql-test/t/multi_update.test
      mysql-test/t/myisam_mrr.test
      mysql-test/t/myisam_mrr_all.test
      mysql-test/t/myisam_mrr_icp.test
      mysql-test/t/mysql.test
      mysql-test/t/mysqladmin.test
      mysql-test/t/mysqlbinlog.test
      mysql-test/t/mysqlbinlog2.test
      mysql-test/t/mysqlbinlog_row_big.test
      mysql-test/t/mysqldump.test
      mysql-test/t/mysqltest.test
      mysql-test/t/named_pipe.test
      mysql-test/t/not_embedded_server.test
      mysql-test/t/order_by_all.test
      mysql-test/t/order_by_icp_mrr.test
      mysql-test/t/partition.test
      mysql-test/t/partition_debug_sync.test
      mysql-test/t/partition_error.test
      mysql-test/t/partition_exchange.test
      mysql-test/t/partition_innodb.test
      mysql-test/t/partition_innodb_plugin.test
      mysql-test/t/partition_range.test
      mysql-test/t/plugin.test
      mysql-test/t/plugin_auth.test
      mysql-test/t/plugin_auth_qa_2-master.opt
      mysql-test/t/plugin_auth_qa_3-master.opt
      mysql-test/t/plugin_not_embedded.test
      mysql-test/t/ps.test
      mysql-test/t/range_all.test
      mysql-test/t/range_icp_mrr.test
      mysql-test/t/range_mrr.test
      mysql-test/t/rpl_mysqldump_slave.test
      mysql-test/t/select_all.test
      mysql-test/t/select_all_jcl6.test
      mysql-test/t/select_icp_mrr.test
      mysql-test/t/select_icp_mrr_jcl6.test
      mysql-test/t/select_none_jcl6.test
      mysql-test/t/server_uuid.test
      mysql-test/t/server_uuid_embedded.test
      mysql-test/t/shm.test
      mysql-test/t/show_check.test
      mysql-test/t/sp-destruct.test
      mysql-test/t/sp-lock.test
      mysql-test/t/subquery_all.test
      mysql-test/t/subquery_all_jcl6.test
      mysql-test/t/subquery_nomat_nosj.test
      mysql-test/t/subquery_nomat_nosj_jcl6.test
      mysql-test/t/subquery_none_jcl6.test
      mysql-test/t/subquery_sj_all.test
      mysql-test/t/subquery_sj_all_jcl6.test
      mysql-test/t/subquery_sj_all_jcl7.test
      mysql-test/t/subquery_sj_dupsweed_jcl6.test
      mysql-test/t/subquery_sj_dupsweed_jcl7.test
      mysql-test/t/subquery_sj_firstmatch_jcl6.test
      mysql-test/t/subquery_sj_firstmatch_jcl7.test
      mysql-test/t/subquery_sj_innodb_all.test
      mysql-test/t/subquery_sj_innodb_all_jcl6.test
      mysql-test/t/subquery_sj_innodb_all_jcl7.test
      mysql-test/t/subquery_sj_innodb_none_jcl6.test
      mysql-test/t/subquery_sj_innodb_none_jcl7.test
      mysql-test/t/subquery_sj_loosescan_jcl6.test
      mysql-test/t/subquery_sj_loosescan_jcl7.test
      mysql-test/t/subquery_sj_mat_jcl6.test
      mysql-test/t/subquery_sj_mat_jcl7.test
      mysql-test/t/subquery_sj_none_jcl6.test
      mysql-test/t/subquery_sj_none_jcl7.test
      mysql-test/t/subselect_innodb.test
      mysql-test/t/symlink.test
      mysql-test/t/system_mysql_db_fix40123.test
      mysql-test/t/system_mysql_db_fix50030.test
      mysql-test/t/system_mysql_db_fix50117.test
      mysql-test/t/trigger_notembedded.test
      mysql-test/t/truncate_coverage.test
      mysql-test/t/type_date.test
      mysql-test/t/type_datetime.test
      mysql-test/t/type_timestamp.test
      mysql-test/t/udf.test
      mysql-test/t/union.test
      mysql-test/t/user_var.test
      mysql-test/t/variables-big.test
      mysql-test/t/variables-notembedded.test
      mysql-test/t/variables.test
      mysql-test/t/view.test
      mysql-test/t/view_grant.test
      mysql-test/t/xml.test
      mysql-test/valgrind.supp
      mysys/CMakeLists.txt
      mysys/array.c
      mysys/base64.c
      mysys/charset-def.c
      mysys/charset.c
      mysys/default.c
      mysys/errors.c
      mysys/mf_format.c
      mysys/mf_iocache.c
      mysys/mf_iocache2.c
      mysys/mf_keycache.c
      mysys/mf_keycaches.c
      mysys/mf_pack.c
      mysys/mf_tempdir.c
      mysys/my_bitmap.c
      mysys/my_fopen.c
      mysys/my_fstream.c
      mysys/my_gethostbyname.c
      mysys/my_getopt.c
      mysys/my_getsystime.c
      mysys/my_init.c
      mysys/my_lib.c
      mysys/my_open.c
      mysys/my_pread.c
      mysys/my_pthread.c
      mysys/my_rdtsc.c
      mysys/my_read.c
      mysys/my_seek.c
      mysys/my_static.c
      mysys/my_symlink.c
      mysys/my_thr_init.c
      mysys/my_write.c
      mysys/mysys_priv.h
      mysys/ptr_cmp.c
      mysys/queues.c
      mysys/stacktrace.c
      mysys/thr_alarm.c
      mysys/thr_lock.c
      mysys/thr_mutex.c
      mysys/thr_rwlock.c
      packaging/WiX/CMakeLists.txt
      packaging/WiX/ca/CMakeLists.txt
      packaging/WiX/create_msi.cmake.in
      packaging/WiX/mysql_server.wxs.in
      plugin/auth/test_plugin.c
      plugin/semisync/semisync_slave_plugin.cc
      regex/regexec.c
      scripts/CMakeLists.txt
      scripts/fill_help_tables.sql
      scripts/make_binary_distribution.sh
      scripts/make_win_bin_dist
      scripts/mysql_config.pl.in
      scripts/mysql_config.sh
      scripts/mysql_fix_extensions.sh
      scripts/mysql_install_db.pl.in
      scripts/mysql_install_db.sh
      scripts/mysql_setpermission.sh
      scripts/mysql_system_tables.sql
      scripts/mysql_system_tables_data.sql
      scripts/mysql_system_tables_fix.sql
      scripts/mysql_test_data_timezone.sql
      scripts/mysqlaccess.sh
      scripts/mysqld_multi.sh
      scripts/mysqldumpslow.sh
      scripts/mysqlhotcopy.sh
      sql-bench/CMakeLists.txt
      sql-common/client.c
      sql-common/client_plugin.c
      sql-common/my_time.c
      sql/CMakeLists.txt
      sql/binlog.cc
      sql/binlog.h
      sql/client_settings.h
      sql/debug_sync.cc
      sql/event_data_objects.cc
      sql/event_data_objects.h
      sql/event_db_repository.cc
      sql/event_db_repository.h
      sql/event_queue.cc
      sql/events.cc
      sql/events.h
      sql/field.cc
      sql/field.h
      sql/field_conv.cc
      sql/filesort.cc
      sql/filesort.h
      sql/gen_lex_hash.cc
      sql/ha_ndbcluster.cc
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.cc
      sql/handler.h
      sql/item.cc
      sql/item.h
      sql/item_cmpfunc.cc
      sql/item_cmpfunc.h
      sql/item_create.cc
      sql/item_func.cc
      sql/item_func.h
      sql/item_geofunc.h
      sql/item_row.cc
      sql/item_strfunc.cc
      sql/item_strfunc.h
      sql/item_subselect.cc
      sql/item_subselect.h
      sql/item_sum.cc
      sql/item_sum.h
      sql/item_timefunc.cc
      sql/item_timefunc.h
      sql/item_xmlfunc.cc
      sql/key.cc
      sql/lex.h
      sql/lock.cc
      sql/lock.h
      sql/log.cc
      sql/log.h
      sql/log_event.cc
      sql/log_event.h
      sql/mdl.cc
      sql/mdl.h
      sql/message.h
      sql/my_decimal.cc
      sql/my_decimal.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/net_serv.cc
      sql/opt_range.cc
      sql/opt_range.h
      sql/opt_sum.cc
      sql/partition_info.cc
      sql/partition_info.h
      sql/protocol.cc
      sql/records.cc
      sql/rpl_filter.cc
      sql/rpl_handler.cc
      sql/rpl_handler.h
      sql/rpl_info.cc
      sql/rpl_info.h
      sql/rpl_info_factory.cc
      sql/rpl_info_factory.h
      sql/rpl_info_file.cc
      sql/rpl_info_file.h
      sql/rpl_info_handler.cc
      sql/rpl_info_handler.h
      sql/rpl_injector.cc
      sql/rpl_master.cc
      sql/rpl_mi.cc
      sql/rpl_mi.h
      sql/rpl_record.cc
      sql/rpl_record.h
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/rpl_slave.cc
      sql/rpl_slave.h
      sql/rpl_utility.cc
      sql/server_ids.h
      sql/set_var.cc
      sql/set_var.h
      sql/share/charsets/cp1251.xml
      sql/share/charsets/languages.html
      sql/share/errmsg-utf8.txt
      sql/sp.cc
      sql/sp.h
      sql/sp_head.cc
      sql/sp_head.h
      sql/sp_pcontext.cc
      sql/sp_pcontext.h
      sql/sp_rcontext.h
      sql/sql_acl.cc
      sql/sql_admin.cc
      sql/sql_analyse.cc
      sql/sql_array.h
      sql/sql_audit.cc
      sql/sql_audit.h
      sql/sql_base.cc
      sql/sql_base.h
      sql/sql_binlog.cc
      sql/sql_cache.cc
      sql/sql_cache.h
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_connect.cc
      sql/sql_const.h
      sql/sql_cursor.cc
      sql/sql_db.cc
      sql/sql_delete.cc
      sql/sql_derived.cc
      sql/sql_derived.h
      sql/sql_error.cc
      sql/sql_error.h
      sql/sql_handler.cc
      sql/sql_handler.h
      sql/sql_insert.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_load.cc
      sql/sql_parse.cc
      sql/sql_parse.h
      sql/sql_partition.cc
      sql/sql_partition_admin.cc
      sql/sql_plugin.cc
      sql/sql_plugin.h
      sql/sql_prepare.cc
      sql/sql_priv.h
      sql/sql_reload.cc
      sql/sql_reload.h
      sql/sql_rename.cc
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_show.cc
      sql/sql_sort.h
      sql/sql_string.cc
      sql/sql_string.h
      sql/sql_table.cc
      sql/sql_table.h
      sql/sql_test.cc
      sql/sql_trigger.cc
      sql/sql_trigger.h
      sql/sql_truncate.cc
      sql/sql_udf.cc
      sql/sql_update.cc
      sql/sql_view.cc
      sql/sql_yacc.yy
      sql/sys_vars.cc
      sql/sys_vars.h
      sql/table.cc
      sql/table.h
      sql/transaction.cc
      sql/uniques.cc
      storage/archive/ha_archive.cc
      storage/federated/ha_federated.cc
      storage/heap/heapdef.h
      storage/heap/hp_block.c
      storage/heap/hp_create.c
      storage/heap/hp_delete.c
      storage/heap/hp_open.c
      storage/heap/hp_static.c
      storage/heap/hp_test2.c
      storage/innobase/CMakeLists.txt
      storage/innobase/btr/btr0btr.c
      storage/innobase/btr/btr0cur.c
      storage/innobase/btr/btr0sea.c
      storage/innobase/buf/buf0buddy.c
      storage/innobase/buf/buf0buf.c
      storage/innobase/buf/buf0flu.c
      storage/innobase/buf/buf0lru.c
      storage/innobase/buf/buf0rea.c
      storage/innobase/dict/dict0crea.c
      storage/innobase/dict/dict0dict.c
      storage/innobase/dict/dict0load.c
      storage/innobase/dict/dict0mem.c
      storage/innobase/dict/dict0stats.c
      storage/innobase/fil/fil0fil.c
      storage/innobase/fsp/fsp0fsp.c
      storage/innobase/ha/ha0ha.c
      storage/innobase/ha/hash0hash.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/handler0alter.cc
      storage/innobase/handler/i_s.cc
      storage/innobase/handler/i_s.h
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/include/btr0btr.h
      storage/innobase/include/btr0btr.ic
      storage/innobase/include/btr0cur.h
      storage/innobase/include/buf0buf.h
      storage/innobase/include/buf0buf.ic
      storage/innobase/include/buf0flu.h
      storage/innobase/include/buf0lru.h
      storage/innobase/include/data0data.h
      storage/innobase/include/data0data.ic
      storage/innobase/include/db0err.h
      storage/innobase/include/dict0dict.h
      storage/innobase/include/dict0mem.h
      storage/innobase/include/dict0stats.h
      storage/innobase/include/dict0types.h
      storage/innobase/include/fil0fil.h
      storage/innobase/include/ha0ha.h
      storage/innobase/include/ha0ha.ic
      storage/innobase/include/ha_prototypes.h
      storage/innobase/include/hash0hash.h
      storage/innobase/include/hash0hash.ic
      storage/innobase/include/ibuf0ibuf.h
      storage/innobase/include/lock0lock.h
      storage/innobase/include/lock0lock.ic
      storage/innobase/include/lock0priv.h
      storage/innobase/include/lock0priv.ic
      storage/innobase/include/log0log.h
      storage/innobase/include/mem0mem.ic
      storage/innobase/include/mtr0mtr.ic
      storage/innobase/include/os0file.h
      storage/innobase/include/os0sync.h
      storage/innobase/include/os0sync.ic
      storage/innobase/include/os0thread.h
      storage/innobase/include/que0que.h
      storage/innobase/include/que0que.ic
      storage/innobase/include/read0read.h
      storage/innobase/include/read0read.ic
      storage/innobase/include/rem0cmp.h
      storage/innobase/include/rem0cmp.ic
      storage/innobase/include/row0ins.h
      storage/innobase/include/row0mysql.h
      storage/innobase/include/row0purge.h
      storage/innobase/include/row0row.h
      storage/innobase/include/row0upd.h
      storage/innobase/include/row0vers.h
      storage/innobase/include/srv0mon.h
      storage/innobase/include/srv0srv.h
      storage/innobase/include/srv0start.h
      storage/innobase/include/sync0rw.h
      storage/innobase/include/sync0sync.h
      storage/innobase/include/sync0sync.ic
      storage/innobase/include/trx0i_s.h
      storage/innobase/include/trx0purge.h
      storage/innobase/include/trx0purge.ic
      storage/innobase/include/trx0rec.h
      storage/innobase/include/trx0roll.h
      storage/innobase/include/trx0rseg.h
      storage/innobase/include/trx0rseg.ic
      storage/innobase/include/trx0sys.h
      storage/innobase/include/trx0sys.ic
      storage/innobase/include/trx0trx.h
      storage/innobase/include/trx0trx.ic
      storage/innobase/include/trx0types.h
      storage/innobase/include/trx0undo.h
      storage/innobase/include/univ.i
      storage/innobase/include/usr0sess.h
      storage/innobase/include/ut0rnd.ic
      storage/innobase/include/ut0ut.h
      storage/innobase/lock/lock0iter.c
      storage/innobase/lock/lock0lock.c
      storage/innobase/log/log0log.c
      storage/innobase/log/log0recv.c
      storage/innobase/mem/mem0mem.c
      storage/innobase/mtr/mtr0log.c
      storage/innobase/os/os0file.c
      storage/innobase/page/page0zip.c
      storage/innobase/pars/pars0pars.c
      storage/innobase/que/que0que.c
      storage/innobase/read/read0read.c
      storage/innobase/rem/rem0cmp.c
      storage/innobase/row/row0ins.c
      storage/innobase/row/row0merge.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0purge.c
      storage/innobase/row/row0sel.c
      storage/innobase/row/row0umod.c
      storage/innobase/row/row0undo.c
      storage/innobase/row/row0upd.c
      storage/innobase/row/row0vers.c
      storage/innobase/scripts/persistent_storage.sql
      storage/innobase/srv/srv0mon.c
      storage/innobase/srv/srv0srv.c
      storage/innobase/srv/srv0start.c
      storage/innobase/sync/sync0arr.c
      storage/innobase/sync/sync0rw.c
      storage/innobase/sync/sync0sync.c
      storage/innobase/thr/thr0loc.c
      storage/innobase/trx/trx0i_s.c
      storage/innobase/trx/trx0purge.c
      storage/innobase/trx/trx0rec.c
      storage/innobase/trx/trx0roll.c
      storage/innobase/trx/trx0rseg.c
      storage/innobase/trx/trx0sys.c
      storage/innobase/trx/trx0trx.c
      storage/innobase/trx/trx0undo.c
      storage/innobase/usr/usr0sess.c
      storage/innobase/ut/ut0dbg.c
      storage/innobase/ut/ut0ut.c
      storage/myisam/ft_nlq_search.c
      storage/myisam/ftbench/Ecompare.pl
      storage/myisam/ftbench/Ecreate.pl
      storage/myisam/ftbench/Ereport.pl
      storage/myisam/ftbench/ft-test-run.sh
      storage/myisam/ha_myisam.cc
      storage/myisam/mi_check.c
      storage/myisam/mi_close.c
      storage/myisam/mi_delete.c
      storage/myisam/mi_delete_all.c
      storage/myisam/mi_dynrec.c
      storage/myisam/mi_log.c
      storage/myisam/mi_open.c
      storage/myisam/mi_static.c
      storage/myisam/mi_statrec.c
      storage/myisam/mi_test_all.sh
      storage/myisam/mi_update.c
      storage/myisam/mi_write.c
      storage/myisam/myisamdef.h
      storage/myisam/myisampack.c
      storage/myisam/rt_index.c
      storage/myisam/sort.c
      storage/myisammrg/myrg_def.h
      storage/myisammrg/myrg_open.c
      storage/ndb/Makefile.am
      storage/ndb/config/make-win-dsw.sh
      storage/ndb/config/win-includes
      storage/ndb/config/win-libraries
      storage/ndb/config/win-name
      storage/ndb/config/win-sources
      storage/ndb/docs/Makefile.am
      storage/ndb/docs/doxygen/Doxyfile.mgmapi
      storage/ndb/docs/doxygen/Doxyfile.ndb
      storage/ndb/docs/doxygen/Doxyfile.ndbapi
      storage/ndb/docs/doxygen/Doxyfile.odbc
      storage/ndb/docs/doxygen/postdoxy.pl
      storage/ndb/docs/doxygen/predoxy.pl
      storage/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs
      storage/ndb/src/cw/cpcc-win32/csharp/Computer.cs
      storage/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs
      storage/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs
      storage/ndb/src/cw/cpcc-win32/csharp/Database.cs
      storage/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs
      storage/ndb/src/cw/cpcc-win32/csharp/Process.cs
      storage/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs
      storage/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs
      storage/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs
      storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs
      storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs
      storage/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs
      storage/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs
      storage/ndb/src/libndb.ver.in
      storage/ndb/test/ndbapi/slow_select.cpp
      storage/ndb/test/ndbapi/testBitfield.cpp
      storage/ndb/test/ndbapi/testLcp.cpp
      storage/ndb/test/ndbnet/test.run
      storage/ndb/test/ndbnet/testError.run
      storage/ndb/test/ndbnet/testMNF.run
      storage/ndb/test/ndbnet/testNR.run
      storage/ndb/test/ndbnet/testNR1.run
      storage/ndb/test/ndbnet/testNR4.run
      storage/ndb/test/ndbnet/testSRhang.run
      storage/ndb/test/ndbnet/testTR295.run
      storage/ndb/test/run-test/16node-tests.txt
      storage/ndb/test/run-test/atrt-analyze-result.sh
      storage/ndb/test/run-test/atrt-clear-result.sh
      storage/ndb/test/run-test/atrt-gather-result.sh
      storage/ndb/test/run-test/atrt-mysql-test-run
      storage/ndb/test/run-test/atrt-setup.sh
      storage/ndb/test/run-test/atrt-testBackup
      storage/ndb/test/run-test/basic.txt
      storage/ndb/test/run-test/daily-basic-tests.txt
      storage/ndb/test/run-test/daily-devel-tests.txt
      storage/ndb/test/run-test/make-config.sh
      storage/ndb/test/run-test/make-html-reports.sh
      storage/ndb/test/run-test/make-index.sh
      storage/ndb/test/run-test/ndb-autotest.sh
      storage/ndb/test/run-test/setup.cpp
      storage/ndb/test/sql/test_create_drop.pl
      storage/ndb/test/sql/test_range_bounds.pl
      storage/ndb/tools/clean-links.sh
      storage/ndb/tools/make-errors.pl
      storage/ndb/tools/make-links.sh
      storage/ndb/tools/ndb_error_reporter
      storage/ndb/tools/rgrep
      storage/perfschema/CMakeLists.txt
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/ha_perfschema.h
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_column_types.h
      storage/perfschema/pfs_defaults.cc
      storage/perfschema/pfs_engine_table.cc
      storage/perfschema/pfs_events_waits.cc
      storage/perfschema/pfs_events_waits.h
      storage/perfschema/pfs_global.h
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr.h
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_instr_class.h
      storage/perfschema/pfs_lock.h
      storage/perfschema/pfs_server.cc
      storage/perfschema/pfs_server.h
      storage/perfschema/pfs_stat.h
      storage/perfschema/pfs_timer.cc
      storage/perfschema/pfs_timer.h
      storage/perfschema/table_all_instr.cc
      storage/perfschema/table_all_instr.h
      storage/perfschema/table_events_waits.cc
      storage/perfschema/table_events_waits.h
      storage/perfschema/table_events_waits_summary.cc
      storage/perfschema/table_events_waits_summary.h
      storage/perfschema/table_ews_global_by_event_name.cc
      storage/perfschema/table_ews_global_by_event_name.h
      storage/perfschema/table_file_summary.cc
      storage/perfschema/table_file_summary.h
      storage/perfschema/table_helper.h
      storage/perfschema/table_setup_actors.cc
      storage/perfschema/table_setup_consumers.cc
      storage/perfschema/table_setup_instruments.cc
      storage/perfschema/table_setup_timers.cc
      storage/perfschema/table_threads.cc
      storage/perfschema/unittest/pfs-t.cc
      storage/perfschema/unittest/pfs_instr-oom-t.cc
      storage/perfschema/unittest/pfs_instr-t.cc
      storage/perfschema/unittest/pfs_instr_class-oom-t.cc
      storage/perfschema/unittest/pfs_instr_class-t.cc
      strings/CHARSET_INFO.txt
      strings/CMakeLists.txt
      strings/bchange.c
      strings/bmove_upp.c
      strings/conf_to_src.c
      strings/ctype-big5.c
      strings/ctype-bin.c
      strings/ctype-cp932.c
      strings/ctype-czech.c
      strings/ctype-euc_kr.c
      strings/ctype-eucjpms.c
      strings/ctype-extra.c
      strings/ctype-gb2312.c
      strings/ctype-gbk.c
      strings/ctype-latin1.c
      strings/ctype-mb.c
      strings/ctype-simple.c
      strings/ctype-sjis.c
      strings/ctype-tis620.c
      strings/ctype-uca.c
      strings/ctype-ucs2.c
      strings/ctype-ujis.c
      strings/ctype-utf8.c
      strings/ctype-win1250ch.c
      strings/ctype.c
      strings/decimal.c
      strings/do_ctype.c
      strings/dtoa.c
      strings/dump_map.c
      strings/int2str.c
      strings/is_prefix.c
      strings/llstr.c
      strings/longlong2str.c
      strings/my_strchr.c
      strings/my_strtoll10.c
      strings/my_vsnprintf.c
      strings/str2int.c
      strings/str_alloc.c
      strings/strappend.c
      strings/strcend.c
      strings/strcont.c
      strings/strend.c
      strings/strfill.c
      strings/strmake.c
      strings/strmov.c
      strings/strnlen.c
      strings/strnmov.c
      strings/strxmov.c
      strings/strxnmov.c
      strings/uca-dump.c
      strings/uctypedump.c
      strings/utr11-dump.c
      strings/xml.c
      support-files/CMakeLists.txt
      support-files/MacOSX/Description.plist.sh
      support-files/MacOSX/Info.plist.sh
      support-files/MacOSX/MySQLCOM
      support-files/MacOSX/StartupItem.Description.plist
      support-files/MacOSX/StartupItem.Info.plist
      support-files/MacOSX/StartupItem.postinstall
      support-files/MacOSX/StartupParameters.plist.sh
      support-files/MacOSX/mwar-wrapper
      support-files/MacOSX/mwcc-wrapper
      support-files/MacOSX/postflight.sh
      support-files/MacOSX/preflight.sh
      support-files/MySQL-shared-compat.spec.sh
      support-files/RHEL4-SElinux/mysql.fc
      support-files/RHEL4-SElinux/mysql.te
      support-files/compiler_warnings.supp
      support-files/my-huge.cnf.sh
      support-files/my-innodb-heavy-4G.cnf.sh
      support-files/my-large.cnf.sh
      support-files/my-medium.cnf.sh
      support-files/my-small.cnf.sh
      support-files/mysql.spec.sh
      tests/big_record.pl
      tests/drop_test.pl
      tests/export.pl
      tests/fork2_test.pl
      tests/fork_big.pl
      tests/fork_big2.pl
      tests/grant.pl
      tests/index_corrupt.pl
      tests/insert_and_repair.pl
      tests/lock_test.pl
      tests/mysql_client_test.c
      tests/pmail.pl
      tests/rename_test.pl
      tests/table_types.pl
      tests/test_delayed_insert.pl
      tests/thread_test.c
      tests/truncate.pl
      unittest/gunit/CMakeLists.txt
      unittest/gunit/mdl-t.cc
      unittest/gunit/mdl_mytap-t.cc
      unittest/gunit/my_regex-t.cc
      unittest/gunit/sql_list-t.cc
      unittest/gunit/thread_utils-t.cc
      unittest/gunit/thread_utils.cc
      unittest/mysys/base64-t.c
      unittest/unit.pl
      mysql-test/extra/binlog_tests/binlog_cache_stat.test
      mysql-test/extra/rpl_tests/rpl_extra_col_master.test
      mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
      mysql-test/suite/rpl/t/rpl_stm_000001.test
      mysql-test/include/rpl_init.inc
      mysql-test/include/rpl_sync.inc
      mysql-test/include/rpl_diff.inc
      mysql-test/include/rpl_end.inc
      mysql-test/include/rpl_reset.inc
      mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result
      mysql-test/suite/binlog/r/binlog_row_cache_stat.result
      mysql-test/suite/binlog/r/binlog_stm_cache_stat.result
      mysql-test/suite/binlog/t/binlog_mixed_cache_stat.test
      mysql-test/suite/binlog/t/binlog_row_cache_stat.test
      mysql-test/suite/binlog/t/binlog_stm_cache_stat.test
      mysql-test/suite/funcs_1/t/myisam_views-big.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_auto_increment_bug33029.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_extra_col_master_innodb.result
      mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
      mysql-test/suite/rpl/t/rpl_000010.test
      mysql-test/suite/rpl/t/rpl_000011.test
      mysql-test/suite/rpl/t/rpl_000013.test
      mysql-test/suite/rpl/t/rpl_000017.test
      mysql-test/suite/rpl/t/rpl_auto_increment_bug33029.test
      mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test
      mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test
      mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test
      mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test
      mysql-test/suite/rpl/t/rpl_row_img.cnf
      mysql-test/suite/binlog/t/binlog_sf.test
=== modified file 'README'
--- a/README	2010-11-24 15:25:25 +0000
+++ b/README	2011-02-08 15:54:12 +0000
@@ -5,7 +5,7 @@ For the avoidance of doubt, this particu
 is released under the version 2 of the GNU General Public License. 
 MySQL is brought to you by the MySQL team at Oracle.
 
-Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
 License information can be found in the COPYING file.
 

=== modified file 'client/my_readline.h'
--- a/client/my_readline.h	2009-09-23 21:32:31 +0000
+++ b/client/my_readline.h	2011-02-05 05:04:15 +0000
@@ -28,11 +28,13 @@ typedef struct st_line_buffer
   uint eof;
   ulong max_size;
   ulong read_length;		/* Length of last read string */
+  int error;
+  bool truncated;
 } LINE_BUFFER;
 
 extern LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file);
 extern LINE_BUFFER *batch_readline_command(LINE_BUFFER *buffer, char * str);
-extern char *batch_readline(LINE_BUFFER *buffer, bool *truncated);
+extern char *batch_readline(LINE_BUFFER *buffer);
 extern void batch_readline_end(LINE_BUFFER *buffer);
 
 #endif /* CLIENT_MY_READLINE_INCLUDED */

=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2011-01-16 04:02:29 +0000
+++ b/client/mysql.cc	2011-02-09 06:56:59 +0000
@@ -1128,6 +1128,8 @@ int main(int argc,char *argv[])
   if (status.batch && !status.line_buff &&
       !(status.line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, stdin)))
   {
+    put_info("Can't initialize batch_readline - may be the input source is "
+             "a directory or a block device.", INFO_ERROR, 0);
     free_defaults(defaults_argv);
     my_end(0);
     exit(1);
@@ -1843,14 +1845,13 @@ static int read_and_execute(bool interac
   ulong line_number=0;
   bool ml_comment= 0;  
   COMMANDS *com;
-  bool truncated= 0;
   status.exit_status=1;
-  
+
   for (;;)
   {
     if (!interactive)
     {
-      line=batch_readline(status.line_buff, &truncated);
+      line=batch_readline(status.line_buff);
       /*
         Skip UTF8 Byte Order Marker (BOM) 0xEFBBBF.
         Editors like "notepad" put this marker in
@@ -1913,9 +1914,13 @@ static int read_and_execute(bool interac
       if (opt_outfile && line)
 	fprintf(OUTFILE, "%s\n", line);
     }
-    if (!line)					// End of file
+    // End of file or system error
+    if (!line)
     {
-      status.exit_status=0;
+      if (status.line_buff && status.line_buff->error)
+        status.exit_status= 1;
+      else
+        status.exit_status= 0;
       break;
     }
 
@@ -1936,7 +1941,8 @@ static int read_and_execute(bool interac
 #endif
       continue;
     }
-    if (add_line(glob_buffer,line,&in_string,&ml_comment, truncated))
+    if (add_line(glob_buffer, line, &in_string, &ml_comment,
+                 status.line_buff ? status.line_buff->truncated : 0))
       break;
   }
   /* if in batch mode, send last query even if it doesn't end with \g or go */

=== modified file 'client/readline.cc'
--- a/client/readline.cc	2010-07-08 21:20:08 +0000
+++ b/client/readline.cc	2011-02-09 06:50:11 +0000
@@ -18,18 +18,26 @@
 #include <my_global.h>
 #include <my_sys.h>
 #include <m_string.h>
+#include <my_dir.h>
 #include "my_readline.h"
 
 static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
 			    ulong max_size);
 static bool init_line_buffer_from_string(LINE_BUFFER *buffer,char * str);
 static size_t fill_buffer(LINE_BUFFER *buffer);
-static char *intern_read_line(LINE_BUFFER *buffer, ulong *out_length, bool *truncated);
+static char *intern_read_line(LINE_BUFFER *buffer, ulong *out_length);
 
 
 LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
 {
   LINE_BUFFER *line_buff;
+  MY_STAT input_file_stat;
+
+  if (my_fstat(fileno(file), &input_file_stat, MYF(MY_WME)) ||
+      MY_S_ISDIR(input_file_stat.st_mode) ||
+      MY_S_ISBLK(input_file_stat.st_mode))
+    return 0;
+
   if (!(line_buff=(LINE_BUFFER*)
         my_malloc(sizeof(*line_buff),MYF(MY_WME | MY_ZEROFILL))))
     return 0;
@@ -42,13 +50,12 @@ LINE_BUFFER *batch_readline_init(ulong m
 }
 
 
-char *batch_readline(LINE_BUFFER *line_buff, bool *truncated)
+char *batch_readline(LINE_BUFFER *line_buff)
 {
   char *pos;
   ulong out_length;
-  DBUG_ASSERT(truncated != NULL);
 
-  if (!(pos=intern_read_line(line_buff,&out_length, truncated)))
+  if (!(pos=intern_read_line(line_buff, &out_length)))
     return 0;
   if (out_length && pos[out_length-1] == '\n')
     if (--out_length && pos[out_length-1] == '\r')  /* Remove '\n' */
@@ -162,7 +169,10 @@ static size_t fill_buffer(LINE_BUFFER *b
     if (!(buffer->buffer = (char*) my_realloc(buffer->buffer,
 					      buffer->bufread+1,
 					      MYF(MY_WME | MY_FAE))))
-      return (uint) -1;
+    {
+      buffer->error= my_errno;
+      return (size_t) -1;
+    }
     buffer->start_of_line=buffer->buffer+start_offset;
     buffer->end=buffer->buffer+bufbytes;
   }
@@ -177,7 +187,10 @@ static size_t fill_buffer(LINE_BUFFER *b
   /* Read in new stuff. */
   if ((read_count= my_read(buffer->file, (uchar*) buffer->end, read_count,
 			   MYF(MY_WME))) == MY_FILE_ERROR)
+  {
+    buffer->error= my_errno;
     return (size_t) -1;
+  }
 
   DBUG_PRINT("fill_buff", ("Got %lu bytes", (ulong) read_count));
 
@@ -198,8 +211,7 @@ static size_t fill_buffer(LINE_BUFFER *b
 }
 
 
-
-char *intern_read_line(LINE_BUFFER *buffer, ulong *out_length, bool *truncated)
+char *intern_read_line(LINE_BUFFER *buffer, ulong *out_length)
 {
   char *pos;
   size_t length;
@@ -214,22 +226,25 @@ char *intern_read_line(LINE_BUFFER *buff
     if (pos == buffer->end)
     {
       /*
-        fill_buffer() can return 0 either on EOF in which case we abort
-        or when the internal buffer has hit the size limit. In the latter case
-        return what we have read so far and signal string truncation.
+        fill_buffer() can return NULL on EOF (in which case we abort),
+        on error, or when the internal buffer has hit the size limit.
+        In the latter case return what we have read so far and signal
+        string truncation.
       */
-      if (!(length=fill_buffer(buffer)) || length == (uint) -1)
+      if (!(length= fill_buffer(buffer)))
       {
         if (buffer->eof)
           DBUG_RETURN(0);
       }
+      else if (length == (size_t) -1)
+        DBUG_RETURN(NULL);
       else
         continue;
       pos--;					/* break line here */
-      *truncated= 1;
+      buffer->truncated= 1;
     }
     else
-      *truncated= 0;
+      buffer->truncated= 0;
     buffer->end_of_line=pos+1;
     *out_length=(ulong) (pos + 1 - buffer->eof - buffer->start_of_line);
     DBUG_RETURN(buffer->start_of_line);

=== modified file 'config.h.cmake'
--- a/config.h.cmake	2011-01-24 07:59:34 +0000
+++ b/config.h.cmake	2011-02-02 18:31:39 +0000
@@ -616,4 +616,9 @@
 #define PROTOCOL_VERSION 10
 
 
+/* time_t related defines */
+
+#cmakedefine SIZEOF_TIME_T @SIZEOF_TIME_T@
+#cmakedefine TIME_T_UNSIGNED @TIME_T_UNSIGNED@
+
 #endif

=== modified file 'configure.cmake'
--- a/configure.cmake	2010-12-21 15:27:40 +0000
+++ b/configure.cmake	2011-02-02 18:31:39 +0000
@@ -574,6 +574,7 @@ MY_CHECK_TYPE_SIZE(uint32 UINT32)
 MY_CHECK_TYPE_SIZE(u_int32_t U_INT32_T)
 MY_CHECK_TYPE_SIZE(int64 INT64)
 MY_CHECK_TYPE_SIZE(uint64 UINT64)
+MY_CHECK_TYPE_SIZE(time_t TIME_T)
 SET (CMAKE_EXTRA_INCLUDE_FILES sys/types.h)
 MY_CHECK_TYPE_SIZE(bool  BOOL)
 SET(CMAKE_EXTRA_INCLUDE_FILES)
@@ -593,6 +594,16 @@ ENDIF()
 # Code tests
 #
 
+# check whether time_t is unsigned
+CHECK_C_SOURCE_COMPILES("
+int main()
+{
+  int array[(((time_t)-1) > 0) ? 1 : -1];
+  return 0;
+}"
+TIME_T_UNSIGNED)
+
+
 CHECK_C_SOURCE_COMPILES("
 #ifdef _WIN32
 #include <winsock2.h>

=== modified file 'include/my_pthread.h'
--- a/include/my_pthread.h	2011-01-11 09:09:21 +0000
+++ b/include/my_pthread.h	2011-02-08 15:54:12 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2011-01-17 09:52:59 +0000
+++ b/include/my_sys.h	2011-02-08 15:54:12 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -104,7 +104,7 @@ typedef struct my_aio_result {
 #define ME_HOLDTANG	8	/* Don't delete last keys */
 #define ME_WAITTOT	16	/* Wait for errtime secs of for a action */
 #define ME_WAITTANG	32	/* Wait for a user action  */
-#define ME_NOREFRESH	64	/* Dont refresh screen */
+#define ME_NOREFRESH	64	/* Write the error message to error log */
 #define ME_NOINPUT	128	/* Dont use the input libary */
 #define ME_COLOUR1	((1 << ME_HIGHBYTE))	/* Possibly error-colours */
 #define ME_COLOUR2	((2 << ME_HIGHBYTE))

=== modified file 'include/my_time.h'
--- a/include/my_time.h	2010-07-15 11:28:41 +0000
+++ b/include/my_time.h	2011-02-02 18:13:28 +0000
@@ -50,6 +50,19 @@ typedef long my_time_t;
 /* two-digit years < this are 20..; >= this are 19.. */
 #define YY_PART_YEAR	   70
 
+/*
+  check for valid times only if the range of time_t is greater than
+  the range of my_time_t
+*/
+#if SIZEOF_TIME_T > 4 || defined(TIME_T_UNSIGNED)
+# define IS_TIME_T_VALID_FOR_TIMESTAMP(x) \
+    ((x) <= TIMESTAMP_MAX_VALUE && \
+     (x) >= TIMESTAMP_MIN_VALUE)
+#else
+# define IS_TIME_T_VALID_FOR_TIMESTAMP(x) \
+    ((x) >= TIMESTAMP_MIN_VALUE)
+#endif
+
 /* Flags to str_to_datetime */
 #define TIME_FUZZY_DATE		1
 #define TIME_DATETIME_ONLY	2

=== modified file 'include/mysql/plugin.h'
--- a/include/mysql/plugin.h	2010-10-21 09:49:16 +0000
+++ b/include/mysql/plugin.h	2011-01-21 14:03:58 +0000
@@ -48,6 +48,8 @@ class Item;
 #define MYSQL_THD void*
 #endif
 
+typedef void * MYSQL_PLUGIN;
+
 #include <mysql/services.h>
 
 #define MYSQL_XIDDATASIZE 128
@@ -409,8 +411,8 @@ struct st_mysql_plugin
   const char *author;   /* plugin author (for I_S.PLUGINS)              */
   const char *descr;    /* general descriptive text (for I_S.PLUGINS)   */
   int license;          /* the plugin license (PLUGIN_LICENSE_XXX)      */
-  int (*init)(void *);  /* the function to invoke when plugin is loaded */
-  int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
+  int (*init)(MYSQL_PLUGIN);  /* the function to invoke when plugin is loaded */
+  int (*deinit)(MYSQL_PLUGIN);/* the function to invoke when plugin is unloaded */
   unsigned int version; /* plugin version (for I_S.PLUGINS)             */
   struct st_mysql_show_var *status_vars;
   struct st_mysql_sys_var **system_vars;

=== modified file 'include/mysql/plugin_audit.h.pp'
--- a/include/mysql/plugin_audit.h.pp	2010-12-14 14:34:23 +0000
+++ b/include/mysql/plugin_audit.h.pp	2011-02-08 17:48:20 +0000
@@ -1,4 +1,5 @@
 #include "plugin.h"
+typedef void * MYSQL_PLUGIN;
 #include <mysql/services.h>
 #include <mysql/service_my_snprintf.h>
 extern struct my_snprintf_service_st {
@@ -52,6 +53,19 @@ extern struct my_thread_scheduler_servic
 } *my_thread_scheduler_service;
 int my_thread_scheduler_set(struct scheduler_functions *scheduler);
 int my_thread_scheduler_reset();
+#include <mysql/service_my_plugin_log.h>
+enum plugin_log_level
+{
+  MY_ERROR_LEVEL,
+  MY_WARNING_LEVEL,
+  MY_INFORMATION_LEVEL
+};
+extern struct my_plugin_log_service
+{
+  int (*my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *, ...);
+} *my_plugin_log_service;
+int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
+                          const char *format, ...);
 struct st_mysql_xid {
   long formatID;
   long gtrid_length;
@@ -88,8 +102,8 @@ struct st_mysql_plugin
   const char *author;
   const char *descr;
   int license;
-  int (*init)(void *);
-  int (*deinit)(void *);
+  int (*init)(MYSQL_PLUGIN);
+  int (*deinit)(MYSQL_PLUGIN);
   unsigned int version;
   struct st_mysql_show_var *status_vars;
   struct st_mysql_sys_var **system_vars;

=== modified file 'include/mysql/plugin_auth.h.pp'
--- a/include/mysql/plugin_auth.h.pp	2010-10-05 12:26:49 +0000
+++ b/include/mysql/plugin_auth.h.pp	2011-02-08 17:48:20 +0000
@@ -1,4 +1,5 @@
 #include <mysql/plugin.h>
+typedef void * MYSQL_PLUGIN;
 #include <mysql/services.h>
 #include <mysql/service_my_snprintf.h>
 extern struct my_snprintf_service_st {
@@ -52,6 +53,19 @@ extern struct my_thread_scheduler_servic
 } *my_thread_scheduler_service;
 int my_thread_scheduler_set(struct scheduler_functions *scheduler);
 int my_thread_scheduler_reset();
+#include <mysql/service_my_plugin_log.h>
+enum plugin_log_level
+{
+  MY_ERROR_LEVEL,
+  MY_WARNING_LEVEL,
+  MY_INFORMATION_LEVEL
+};
+extern struct my_plugin_log_service
+{
+  int (*my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *, ...);
+} *my_plugin_log_service;
+int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
+                          const char *format, ...);
 struct st_mysql_xid {
   long formatID;
   long gtrid_length;
@@ -88,8 +102,8 @@ struct st_mysql_plugin
   const char *author;
   const char *descr;
   int license;
-  int (*init)(void *);
-  int (*deinit)(void *);
+  int (*init)(MYSQL_PLUGIN);
+  int (*deinit)(MYSQL_PLUGIN);
   unsigned int version;
   struct st_mysql_show_var *status_vars;
   struct st_mysql_sys_var **system_vars;

=== modified file 'include/mysql/plugin_ftparser.h.pp'
--- a/include/mysql/plugin_ftparser.h.pp	2010-08-30 14:07:40 +0000
+++ b/include/mysql/plugin_ftparser.h.pp	2011-02-08 17:48:20 +0000
@@ -1,4 +1,5 @@
 #include "plugin.h"
+typedef void * MYSQL_PLUGIN;
 #include <mysql/services.h>
 #include <mysql/service_my_snprintf.h>
 extern struct my_snprintf_service_st {
@@ -52,6 +53,19 @@ extern struct my_thread_scheduler_servic
 } *my_thread_scheduler_service;
 int my_thread_scheduler_set(struct scheduler_functions *scheduler);
 int my_thread_scheduler_reset();
+#include <mysql/service_my_plugin_log.h>
+enum plugin_log_level
+{
+  MY_ERROR_LEVEL,
+  MY_WARNING_LEVEL,
+  MY_INFORMATION_LEVEL
+};
+extern struct my_plugin_log_service
+{
+  int (*my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *, ...);
+} *my_plugin_log_service;
+int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
+                          const char *format, ...);
 struct st_mysql_xid {
   long formatID;
   long gtrid_length;
@@ -88,8 +102,8 @@ struct st_mysql_plugin
   const char *author;
   const char *descr;
   int license;
-  int (*init)(void *);
-  int (*deinit)(void *);
+  int (*init)(MYSQL_PLUGIN);
+  int (*deinit)(MYSQL_PLUGIN);
   unsigned int version;
   struct st_mysql_show_var *status_vars;
   struct st_mysql_sys_var **system_vars;

=== added file 'include/mysql/service_my_plugin_log.h'
--- a/include/mysql/service_my_plugin_log.h	1970-01-01 00:00:00 +0000
+++ b/include/mysql/service_my_plugin_log.h	2011-02-08 17:48:20 +0000
@@ -0,0 +1,64 @@
+/*  Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+    
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; version 2 of the
+    License.
+    
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+    GNU General Public License for more details.
+    
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/**
+  @file
+  This service provides functions to report error conditions and log to 
+  mysql error log.
+*/
+
+#ifndef MYSQL_SERVICE_MY_PLUGIN_LOG_INCLUDED
+#define MYSQL_SERVICE_MY_PLUGIN_LOG_INCLUDED
+
+#ifndef MYSQL_ABI_CHECK
+#include <stdarg.h>
+#endif
+
+/* keep in sync with the loglevel enum in my_sys.h */
+enum plugin_log_level
+{
+  MY_ERROR_LEVEL,
+  MY_WARNING_LEVEL,
+  MY_INFORMATION_LEVEL
+};  
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern struct my_plugin_log_service
+{
+  /** write a message to the log */
+  int (*my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *, ...);
+} *my_plugin_log_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define my_plugin_log_message my_plugin_log_service->my_plugin_log_message
+
+#else
+
+int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
+                          const char *format, ...);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

=== modified file 'include/mysql/services.h'
--- a/include/mysql/services.h	2010-06-07 14:01:39 +0000
+++ b/include/mysql/services.h	2011-02-08 17:48:20 +0000
@@ -22,6 +22,7 @@ extern "C" {
 #include <mysql/service_thd_alloc.h>
 #include <mysql/service_thd_wait.h>
 #include <mysql/service_thread_scheduler.h>
+#include <mysql/service_my_plugin_log.h>
 
 #ifdef __cplusplus
 }

=== modified file 'include/service_versions.h'
--- a/include/service_versions.h	2010-06-07 14:01:39 +0000
+++ b/include/service_versions.h	2011-02-08 17:48:20 +0000
@@ -23,3 +23,4 @@
 #define VERSION_thd_alloc       0x0100
 #define VERSION_thd_wait        0x0100
 #define VERSION_my_thread_scheduler 0x0100
+#define VERSION_my_plugin_log 0x0100

=== modified file 'libmysqld/CMakeLists.txt'
--- a/libmysqld/CMakeLists.txt	2010-12-17 09:41:21 +0000
+++ b/libmysqld/CMakeLists.txt	2011-02-02 08:30:13 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,81 +17,55 @@ ADD_DEFINITIONS(-DMYSQL_SERVER -DEMBEDDE
  ${SSL_DEFINES})
 
 INCLUDE_DIRECTORIES(
-${CMAKE_SOURCE_DIR}/include 
-${CMAKE_SOURCE_DIR}/libmysql
-${CMAKE_SOURCE_DIR}/libmysqld
-${CMAKE_SOURCE_DIR}/sql
-${CMAKE_BINARY_DIR}/sql 
-${CMAKE_SOURCE_DIR}/regex
-${ZLIB_INCLUDE_DIR}
-${SSL_INCLUDE_DIRS}
-${SSL_INTERNAL_INCLUDE_DIRS}
-${CMAKE_SOURCE_DIR}/sql/backup
+  ${CMAKE_SOURCE_DIR}/include 
+  ${CMAKE_SOURCE_DIR}/libmysql
+  ${CMAKE_SOURCE_DIR}/libmysqld
+  ${CMAKE_SOURCE_DIR}/sql
+  ${CMAKE_BINARY_DIR}/sql 
+  ${CMAKE_SOURCE_DIR}/regex
+  ${ZLIB_INCLUDE_DIR}
+  ${SSL_INCLUDE_DIRS}
+  ${SSL_INTERNAL_INCLUDE_DIRS}
+  ${CMAKE_SOURCE_DIR}/sql/backup
 )
 
 SET(GEN_SOURCES
-${CMAKE_BINARY_DIR}/sql/sql_yacc.h 
-${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
-${CMAKE_BINARY_DIR}/sql/lex_hash.h 
+  ${CMAKE_BINARY_DIR}/sql/sql_yacc.h 
+  ${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
+  ${CMAKE_BINARY_DIR}/sql/sql_builtin.cc
+  ${CMAKE_BINARY_DIR}/sql/lex_hash.h 
 )
 
 SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED TRUE)
 
-SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc 
-           ../libmysql/libmysql.c ../libmysql/errmsg.c ../client/get_password.c
-           ../sql-common/client.c ../sql-common/my_time.c 
-           ../sql-common/my_user.c ../sql-common/pack.c
-           ../sql-common/client_plugin.c
-           ../sql/password.c ../sql/discover.cc ../sql/derror.cc 
-           ../sql/field.cc ../sql/field_conv.cc
-           ../sql/filesort_utils.cc
-           ../sql/filesort.cc ../sql/gstream.cc
-           ../sql/handler.cc ../sql/hash_filo.cc ../sql/hostname.cc 
-           ../sql/init.cc ../sql/item_buff.cc ../sql/item_cmpfunc.cc 
-           ../sql/item.cc ../sql/item_create.cc ../sql/item_func.cc 
-           ../sql/item_geofunc.cc ../sql/item_row.cc ../sql/item_strfunc.cc 
-           ../sql/item_subselect.cc ../sql/item_sum.cc ../sql/item_timefunc.cc 
-           ../sql/item_xmlfunc.cc ../sql/key.cc ../sql/lock.cc ../sql/log.cc 
-           ../sql/log_event.cc ../sql/mf_iocache.cc ../sql/my_decimal.cc 
-           ../sql/net_serv.cc ../sql/opt_range.cc ../sql/opt_sum.cc 
-           ../sql/parse_file.cc ../sql/procedure.cc ../sql/protocol.cc 
-           ../sql/records.cc ../sql/rpl_filter.cc
-           ../sql/rpl_record.cc ../sql/sha2.cc ../sql/des_key_file.cc
-           ../sql/rpl_injector.cc ../sql/set_var.cc ../sql/spatial.cc 
-           ../sql/sp_cache.cc ../sql/sp.cc ../sql/sp_head.cc 
-           ../sql/sp_pcontext.cc ../sql/sp_rcontext.cc ../sql/sql_acl.cc 
-           ../sql/sql_alloc_error_handler.cc
-           ../sql/sql_analyse.cc ../sql/sql_base.cc ../sql/sql_cache.cc 
-           ../sql/sql_class.cc ../sql/sql_crypt.cc ../sql/sql_cursor.cc 
-           ../sql/sql_db.cc ../sql/sql_delete.cc ../sql/sql_derived.cc 
-           ../sql/sql_do.cc ../sql/sql_error.cc ../sql/sql_handler.cc 
-           ../sql/sql_help.cc ../sql/sql_insert.cc ../sql/sql_join_cache.cc
-           ../sql/datadict.cc ../sql/sql_admin.cc ../sql/sql_truncate.cc
-           ../sql/sql_reload.cc
-           ../sql/sql_lex.cc ../sql/keycaches.cc
-           ../sql/sql_list.cc ../sql/sql_load.cc ../sql/sql_locale.cc 
-           ../sql/sql_binlog.cc ../sql/sql_manager.cc
-           ../sql/sql_parse.cc ../sql/sql_partition.cc ../sql/sql_plugin.cc 
-           ../sql/debug_sync.cc
-           ../sql/sql_prepare.cc ../sql/sql_rename.cc
-           ../sql/sql_select.cc ../sql/sql_servers.cc
-           ../sql/sql_show.cc ../sql/sql_state.c ../sql/sql_string.cc
-           ../sql/sql_tablespace.cc ../sql/sql_table.cc ../sql/sql_test.cc
-           ../sql/sql_trigger.cc ../sql/sql_udf.cc ../sql/sql_union.cc
-           ../sql/sql_update.cc ../sql/sql_view.cc ../sql/sql_profile.cc
-           ../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc
-           ../sql/sql_time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
-           ../sql/partition_info.cc ../sql/sql_connect.cc 
-           ../sql/scheduler.cc ../sql/sql_audit.cc
-           ../sql/sql_alter.cc ../sql/sql_partition_admin.cc
-           ../sql/event_parse_data.cc
-           ../sql/sql_signal.cc ../sql/rpl_handler.cc
-           ../sql/rpl_utility.cc ../sql/rpl_reporting.cc ../sql/binlog.cc 
-           ../sql/sys_vars.cc ../sql/gcalc_slicescan.cc ../sql/gcalc_tools.cc
-           ${CMAKE_BINARY_DIR}/sql/sql_builtin.cc
-           ../sql/mdl.cc ../sql/transaction.cc ../sql/sql_bootstrap.cc
-           ${GEN_SOURCES}
-           ${MYSYS_LIBWRAP_SOURCE}
+FOREACH(file ${SQL_EXPORTED_SOURCES})
+  LIST(APPEND IMPORTED_SOURCES "../sql/${file}")
+ENDFOREACH()
+
+SET(SQL_EMBEDDED_SOURCES
+  emb_qcache.cc
+  lib_sql.cc 
+  libmysqld.c
+  ${GEN_SOURCES}
+  ${MYSYS_LIBWRAP_SOURCE}
+  ../client/get_password.c
+  ../libmysql/errmsg.c
+  ../libmysql/libmysql.c
+  ../sql-common/client.c
+  ../sql-common/client_plugin.c
+  ../sql-common/my_time.c 
+  ../sql-common/my_user.c
+  ../sql-common/pack.c
+  ../sql/binlog.cc 
+  ../sql/event_parse_data.cc
+  ../sql/hash_filo.cc
+  ../sql/log_event.cc
+  ../sql/rpl_filter.cc
+  ../sql/rpl_injector.cc
+  ../sql/rpl_record.cc
+  ../sql/rpl_reporting.cc
+  ../sql/rpl_utility.cc
+  ${IMPORTED_SOURCES}
 )
 
 

=== modified file 'libservices/CMakeLists.txt'
--- a/libservices/CMakeLists.txt	2010-11-13 22:16:52 +0000
+++ b/libservices/CMakeLists.txt	2011-02-08 17:48:20 +0000
@@ -19,6 +19,7 @@ SET(MYSQLSERVICES_SOURCES
   my_snprintf_service.c
   thd_alloc_service.c
   thd_wait_service.c
+  my_plugin_log_service.c
   my_thread_scheduler_service.c)
 
 ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})

=== added file 'libservices/my_plugin_log_service.c'
--- a/libservices/my_plugin_log_service.c	1970-01-01 00:00:00 +0000
+++ b/libservices/my_plugin_log_service.c	2011-02-08 17:48:20 +0000
@@ -0,0 +1,18 @@
+/*  Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+    
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; version 2 of the
+    License.
+    
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+    GNU General Public License for more details.
+    
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#include <service_versions.h>
+SERVICE_VERSION *my_plugin_log_service= (void*)VERSION_my_plugin_log;

=== modified file 'mysql-test/collections/default.daily'
--- a/mysql-test/collections/default.daily	2010-10-05 11:33:54 +0000
+++ b/mysql-test/collections/default.daily	2011-02-08 13:56:25 +0000
@@ -1,5 +1,15 @@
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix          --vardir=var-n_mix                  --mysqld=--binlog-format=mixed
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row         --vardir=var-ps_row   --ps-protocol --mysqld=--binlog-format=row
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded       --vardir=var-emebbed  --embedded
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1        --vardir=var-funcs_1                                              --suite=funcs_1
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog --skip-ndb
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal               --vardir=var-normal                                                                  --report-features
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=n_mix                --vardir=var-n_mix                                  --mysqld=--binlog-format=mixed
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=row                --vardir=var-row                                  --mysqld=--binlog-format=row
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_row               --vardir=var-ps_row                                 --mysqld=--binlog-format=row     --ps-protocol
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=embedded             --vardir=var-embedded                                                                --embedded
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps                   --vardir=var-ps                                                                --ps-protocol
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs_1              --vardir=var-funcs_1             --suite=funcs_1
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_funcs1            --vardir=var-ps_funcs_1          --suite=funcs_1                                     --ps-protocol
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs2               --vardir=var-funcs2              --suite=funcs_2
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=partitions           --vardir=var-parts               --suite=parts
+perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=stress               --vardir=var-stress              --suite=stress
+perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=jp                   --vardir=var-jp                  --suite=jp
+perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist                 --vardir=var-nist                --suite=nist
+perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist+ps              --vardir=var-ps_nist             --suite=nist                                        --ps-protocol
+perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_checksum  --vardir=var-rpl_binlog_checksum --suite=rpl,binlog --mysqld=--binlog-checksum=CRC32

=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2011-01-31 04:23:08 +0000
+++ b/mysql-test/collections/default.experimental	2011-02-08 15:54:12 +0000
@@ -8,7 +8,6 @@ funcs_1.charset_collation_1             
 innodb.innodb_information_schema         # Bug#48883 2010-05-11 alik Test "innodb_information_schema" takes fewer locks than expected
 
 main.func_math @freebsd                  # Bug#43020 2010-05-04 alik main.func_math fails on FreeBSD in PB2
-main.gis                                 # Bug#52208 2010-11-24 alik gis fails on some platforms (Solaris, HP-UX, Linux)
 main.gis-rtree @freebsd                  # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
 main.lock_multi_bug38499                 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
 main.mysqlslap @windows                  # Bug#54024 2010-08-10 alik mysqlslap fails sporadically starting from Dahlia
@@ -42,10 +41,6 @@ main.gis-rtree                          
 main.type_float                          # svoj: due to BUG#38965
 main.type_newdecimal                     # svoj: due to BUG#38965
 
-# Not a test, utility to troubleshoot test failures
-# Flagged as experimental since output will vary
-perfschema.debug_env                         # Bug#59740 2011-02-26 Marc Alff, script needed to investigate the failure
-
 perfschema.ortho_iter                        # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD
 perfschema.event_aggregate                   # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD
 perfschema.table_aggregate_off               # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD

=== modified file 'mysql-test/collections/default.push'
--- a/mysql-test/collections/default.push	2010-11-29 15:42:42 +0000
+++ b/mysql-test/collections/default.push	2011-02-08 06:34:01 +0000
@@ -1,5 +1,4 @@
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed  --embedded --experimental=collections/default.experimental --skip-ndb
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row  --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_ps_row --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_embedded --vardir=var-main_emebbed  --suite=main --embedded --experimental=collections/default.experimental --skip-ndb
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb

=== modified file 'mysql-test/collections/default.weekly'
--- a/mysql-test/collections/default.weekly	2011-01-06 11:23:59 +0000
+++ b/mysql-test/collections/default.weekly	2011-02-08 13:56:25 +0000
@@ -1,2 +1,8 @@
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=1st       --experimental=collections/default.experimental 1st
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb funcs_1.myisam_views-big
+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto  --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb funcs_1.myisam_views-big
+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto  --comment=eits-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam 
+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row
+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto  --comment=eits-rpl-binlog-mixed-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=mixed
+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb
+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row
+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed
+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=all_binlog_checksum --experimental=collections/default.experimental --mysqld=--binlog-checksum=CRC32 --vardir=var-all_binlog_checksum --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema

=== removed file 'mysql-test/collections/mysql-5.1-innodb.push'
--- a/mysql-test/collections/mysql-5.1-innodb.push	2010-11-22 10:27:04 +0000
+++ b/mysql-test/collections/mysql-5.1-innodb.push	1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed  --embedded --experimental=collections/default.experimental --skip-ndb
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row  --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb

=== removed file 'mysql-test/collections/mysql-5.5-innodb.push'
--- a/mysql-test/collections/mysql-5.5-innodb.push	2010-11-22 10:27:04 +0000
+++ b/mysql-test/collections/mysql-5.5-innodb.push	1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed  --embedded --experimental=collections/default.experimental --skip-ndb
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row  --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb

=== removed file 'mysql-test/collections/mysql-next-mr-wl2540.push'
--- a/mysql-test/collections/mysql-next-mr-wl2540.push	2010-11-11 23:33:21 +0000
+++ b/mysql-test/collections/mysql-next-mr-wl2540.push	1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_checksum  --mysqld=--binlog-checksum=CRC32  --vardir=var-rpl_binlog_checksum --suite=binlog,rpl --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix          --vardir=var-n_mix                        --mysqld=--binlog-format=mixed  --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row         --vardir=var-ps_row         --ps-protocol --mysqld=--binlog-format=row    --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded       --vardir=var-emebbed        --embedded                                    --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row               --mysqld=--binlog-format=row    --suite=rpl,binlog --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1        --vardir=var-funcs_1                                                      --suite=funcs_1

=== removed file 'mysql-test/collections/mysql-trunk-innodb.push'
--- a/mysql-test/collections/mysql-trunk-innodb.push	2010-11-22 10:29:44 +0000
+++ b/mysql-test/collections/mysql-trunk-innodb.push	1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix          --vardir=var-n_mix                        --mysqld=--binlog-format=mixed  --suite=main,binlog,innodb,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row         --vardir=var-ps_row         --ps-protocol --mysqld=--binlog-format=row    --suite=main,binlog,innodb,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded       --vardir=var-emebbed        --embedded                                    --suite=main,binlog,innodb,rpl,sys_vars,perfschema
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row               --mysqld=--binlog-format=row    --suite=rpl,binlog --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1        --vardir=var-funcs_1                                                      --suite=funcs_1

=== removed file 'mysql-test/collections/mysql-trunk.daily'
--- a/mysql-test/collections/mysql-trunk.daily	2011-01-27 00:57:39 +0000
+++ b/mysql-test/collections/mysql-trunk.daily	1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal               --vardir=var-normal                                                                  --report-features
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=n_mix                --vardir=var-n_mix                                  --mysqld=--binlog-format=mixed
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row       --vardir=var-rpl_binlog_row      --suite=rpl,binlog --mysqld=--binlog-format=row     --skip-ndb
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps_row               --vardir=var-ps_row                                 --mysqld=--binlog-format=row     --ps-protocol
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded             --vardir=var-embedded                                                                --embedded
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs_1              --vardir=var-funcs_1             --suite=funcs_1
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps_funcs1            --vardir=var-ps_funcs_1          --suite=funcs_1                                     --ps-protocol
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs2               --vardir=var-funcs2              --suite=funcs_2
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=partitions           --vardir=var-parts               --suite=parts
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=stress               --vardir=var-stress              --suite=stress
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=jp                   --vardir=var-jp                  --suite=jp
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist                 --vardir=var-nist                --suite=nist
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist+ps              --vardir=var-ps_nist             --suite=nist                                        --ps-protocol
-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_checksum  --vardir=var-rpl_binlog_checksum --suite=rpl,binlog --mysqld=--binlog-checksum=CRC32

=== removed file 'mysql-test/collections/mysql-trunk.push'
--- a/mysql-test/collections/mysql-trunk.push	2010-12-10 06:37:44 +0000
+++ b/mysql-test/collections/mysql-trunk.push	1970-01-01 00:00:00 +0000
@@ -1,4 +0,0 @@
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_ps_row --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_embedded --vardir=var-main_emebbed  --suite=main --embedded --experimental=collections/default.experimental --skip-ndb
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb

=== removed file 'mysql-test/collections/mysql-trunk.weekly'
--- a/mysql-test/collections/mysql-trunk.weekly	2011-01-06 11:28:20 +0000
+++ b/mysql-test/collections/mysql-trunk.weekly	1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-perl mysql-test-run.pl --timer --force --comment=1st --experimental=collections/default.experimental 1st
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=all_binlog_checksum --experimental=collections/default.experimental --mysqld=--binlog-checksum=CRC32 --vardir=var-all_binlog_checksum --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb 
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-mixed-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=mixed
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed

=== modified file 'mysql-test/include/gis_keys.inc'
--- a/mysql-test/include/gis_keys.inc	2007-11-01 14:03:09 +0000
+++ b/mysql-test/include/gis_keys.inc	2011-02-02 13:17:48 +0000
@@ -44,3 +44,19 @@ SELECT COUNT(*) FROM t2 IGNORE INDEX(p) 
 DROP TABLE t1, t2;
 
 --echo End of 5.0 tests
+
+
+--echo #
+--echo # Test for bug #58650 "Failing assertion: primary_key_no == -1 ||
+--echo #                      primary_key_no == 0".
+--echo #
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+--echo # The minimal test case.
+create table t1 (a int not null, b linestring not null, unique key b (b(12)), unique key a (a));
+drop table t1;
+--echo # The original test case.
+create table t1 (a int not null, b linestring not null, unique key b (b(12)));
+create unique index a on t1(a);
+drop table t1;

=== modified file 'mysql-test/include/icp_tests.inc'
--- a/mysql-test/include/icp_tests.inc	2011-01-30 16:55:22 +0000
+++ b/mysql-test/include/icp_tests.inc	2011-01-31 11:56:15 +0000
@@ -798,3 +798,26 @@ SELECT pk FROM t1 WHERE c1 <> 1 HAVING p
 SELECT pk FROM t1 WHERE c1 <> 1 HAVING pk = 3 ORDER BY pk LIMIT 5;
 
 DROP TABLE t1;
+
+--echo #
+--echo # Bug#59483 "Crash on INSERT/REPLACE in
+--echo #            rec_convert_dtuple_to_rec_comp with ICP on"
+--echo #
+
+CREATE TABLE t1 (
+ pk INTEGER AUTO_INCREMENT PRIMARY KEY,
+ i1 INTEGER,
+ c1 CHAR(6),
+ i2 INTEGER NOT NULL,
+ KEY (i2)
+);
+
+INSERT INTO t1 VALUES
+ (NULL, 4, 'that', 8),
+ (NULL, 1, 'she', 6),
+ (NULL, 6, 'tell', 2);
+
+SELECT * FROM t1 WHERE i2 IN (3, 6) LIMIT 2 FOR UPDATE;
+INSERT INTO t1 (i2) VALUES (1);
+
+DROP TABLE t1;

=== modified file 'mysql-test/include/mtr_warnings.sql'
--- a/mysql-test/include/mtr_warnings.sql	2010-11-29 11:28:55 +0000
+++ b/mysql-test/include/mtr_warnings.sql	2011-02-02 13:41:10 +0000
@@ -188,9 +188,6 @@ INSERT INTO global_suppressions VALUES
  /*It will print a warning if a new UUID of server is generated.*/
  ("No existing UUID has been found, so we assume that this is the first time that this server has been started.*"),
 
- /* Test case for Bug#31590 in order_by.test produces the following error */
- ("Out of sort memory; increase server sort buffer size"),
-
  /* Special case for Bug #26402 in show_check.test
     - Question marks are not valid file name parts on Windows. Ignore
       this error message.

=== modified file 'mysql-test/include/mysqlhotcopy.inc'
--- a/mysql-test/include/mysqlhotcopy.inc	2011-01-29 12:15:56 +0000
+++ b/mysql-test/include/mysqlhotcopy.inc	2011-02-08 09:56:04 +0000
@@ -107,7 +107,7 @@ DROP DATABASE hotcopy_save;
 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
 --list_files $MYSQLD_DATADIR/hotcopy_save
 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
---error 9,2304
+--error 9,11,2304
 --exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
 --replace_result $MASTER_MYSOCK MASTER_MYSOCK
 --exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save

=== modified file 'mysql-test/include/order_by.inc'
--- a/mysql-test/include/order_by.inc	2010-12-17 09:41:21 +0000
+++ b/mysql-test/include/order_by.inc	2011-02-07 09:46:53 +0000
@@ -843,7 +843,8 @@ create table t1(a int, b tinytext);
 insert into t1 values (1,2),(3,2);
 set session sort_buffer_size= 30000;
 set session max_sort_length= 2180;
---error 1038
+CALL mtr.add_suppression("Out of sort memory");
+--error ER_OUT_OF_SORTMEMORY
 select * from t1 order by b;
 drop table t1;
 
@@ -1689,6 +1690,23 @@ LIMIT 2;
 DROP TABLE t1, t2;
 
 
+--echo #
+--echo # Bug #59110: Memory leak of QUICK_SELECT_I allocated memory 
+--echo #  and
+--echo # Bug #59308: Incorrect result for 
+--echo               SELECT DISTINCT <col>... ORDER BY <col> DESC 
+--echo
+--echo # Use Valgrind to detect #59110!
+--echo #
+
+CREATE TABLE t1 (a INT,KEY (a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+EXPLAIN SELECT DISTINCT a,1 FROM t1 WHERE a <> 1 ORDER BY a DESC;
+SELECT DISTINCT a,1 FROM t1 WHERE a <> 1 ORDER BY a DESC;
+
+DROP TABLE t1;
+
 --echo End of 5.1 tests
 
 

=== modified file 'mysql-test/include/rpl_sync.inc'
--- a/mysql-test/include/rpl_sync.inc	2010-12-19 17:07:28 +0000
+++ b/mysql-test/include/rpl_sync.inc	2011-02-03 16:09:33 +0000
@@ -88,7 +88,7 @@ while ($_rpl_i) {
       {
         --echo Sync IO: $_rpl_slave_io_running; Sync SQL: $_rpl_slave_sql_running
       }
-      --let $_rpl_slave_io_running= `SELECT IF('$_rpl_slave_io_running' = 'Yes', 1, '')`
+      --let $_rpl_slave_io_running= `SELECT IF('$_rpl_slave_io_running' != 'No', 1, '')`
       --let $_rpl_slave_sql_running= `SELECT IF('$_rpl_slave_sql_running' = 'Yes', 1, '')`
       if ($_rpl_slave_io_running)
       {

=== modified file 'mysql-test/include/subquery.inc'
--- a/mysql-test/include/subquery.inc	2011-01-18 11:42:09 +0000
+++ b/mysql-test/include/subquery.inc	2011-02-02 09:04:55 +0000
@@ -4999,6 +4999,34 @@ SELECT * FROM t1
 
 DROP TABLE t1,t1s,t2s;
 
+--echo #
+--echo # Bug #56690  Wrong results with subquery with 
+--echo # GROUP BY inside < ANY clause
+--echo #
+
+CREATE TABLE t1 (
+ pk INT NOT NULL PRIMARY KEY,
+ number INT,
+ KEY key_number (number)
+);
+INSERT INTO t1 VALUES (8,8);
+
+CREATE TABLE t2 (
+ pk INT NOT NULL PRIMARY KEY,
+ number INT,
+ KEY key_number (number)
+);
+
+INSERT INTO t2 VALUES (1,2);
+INSERT INTO t2 VALUES (2,8);
+INSERT INTO t2 VALUES (3,NULL);
+INSERT INTO t2 VALUES (4,166);
+
+SELECT * FROM t1 WHERE t1.number < ANY(SELECT number FROM t2 GROUP BY number);
+SELECT * FROM t1 WHERE t1.number < ANY(SELECT number FROM t2);
+
+DROP TABLE t1,t2;
+
 --echo End of 5.1 tests
  
 --echo #

=== modified file 'mysql-test/include/subquery_sj.inc'
--- a/mysql-test/include/subquery_sj.inc	2010-11-24 14:06:22 +0000
+++ b/mysql-test/include/subquery_sj.inc	2011-01-27 11:38:22 +0000
@@ -3472,3 +3472,35 @@ eval explain $query;
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 
 --echo # End of the test for bug#52068.
+
+--echo #
+--echo # Bug#57623: subquery within before insert trigger causes crash (sj=on)
+--echo #
+
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+
+let $query=
+SELECT *
+FROM   ot1
+     LEFT JOIN
+       (ot2 JOIN ot3 on ot2.a=ot3.a)
+     ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+
+eval explain $query;
+eval $query;
+eval prepare s from '$query';
+execute s;
+execute s;
+deallocate prepare s;
+
+DROP TABLE ot1, ot2, ot3, it1;
+
+--echo # End of the test for bug#57623.

=== modified file 'mysql-test/include/subquery_sj_innodb.inc'
--- a/mysql-test/include/subquery_sj_innodb.inc	2010-07-13 08:14:01 +0000
+++ b/mysql-test/include/subquery_sj_innodb.inc	2011-01-24 11:56:54 +0000
@@ -114,3 +114,24 @@ explain select 1 from t2 where 
   c2 in (select 1 from t3, t2) and
   c1 in (select convert(c6,char(1)) from t2);
 drop table t2, t3;
+--echo # 
+--echo # BUG#57431: subquery returns wrong result (semijoin=on) with pred AND
+--echo # 
+CREATE TABLE t1 (
+   i INT
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (2),(4);
+
+CREATE TABLE t2 (
+   i INT,
+   vc VARCHAR(1)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (8,NULL);
+
+SELECT i
+FROM t1
+WHERE i IN (SELECT innr.i
+             FROM t2 LEFT JOIN t2 innr ON innr.vc)
+   AND i = 2;
+
+DROP TABLE t1, t2;

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-01-29 23:40:42 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-02-08 15:54:12 +0000
@@ -192,6 +192,7 @@ my $opt_explain_protocol;
 our $opt_debug;
 my $debug_d= "d";
 my $opt_debug_common;
+our $opt_debug_server;
 our @opt_cases;                  # The test cases names in argv
 our $opt_embedded_server;
 
@@ -981,6 +982,7 @@ sub command_line_setup {
              # Debugging
              'debug'                    => \$opt_debug,
              'debug-common'             => \$opt_debug_common,
+             'debug-server'             => \$opt_debug_server,
              'gdb'                      => \$opt_gdb,
              'client-gdb'               => \$opt_client_gdb,
              'manual-gdb'               => \$opt_manual_gdb,
@@ -1137,6 +1139,9 @@ sub command_line_setup {
 
   ($auth_plugin)= find_plugin("auth_test_plugin", "plugin/auth");
 
+  # --debug[-common] implies we run debug server
+  $opt_debug_server= 1 if $opt_debug || $opt_debug_common;
+
   if (using_extern())
   {
     # Connect to the running mysqld and find out what it supports
@@ -1789,7 +1794,7 @@ sub find_mysqld {
   my @mysqld_names= ("mysqld", "mysqld-max-nt", "mysqld-max",
 		     "mysqld-nt");
 
-  if ( $opt_debug ){
+  if ( $opt_debug_server ){
     # Put mysqld-debug first in the list of binaries to look for
     mtr_verbose("Adding mysqld-debug first in list of binaries to look for");
     unshift(@mysqld_names, "mysqld-debug");
@@ -1886,9 +1891,12 @@ sub executable_setup () {
 sub client_debug_arg($$) {
   my ($args, $client_name)= @_;
 
+  # Workaround for Bug #50627: drop any debug opt
+  return if $client_name =~ /^mysqlbinlog/;
+
   if ( $opt_debug ) {
     mtr_add_arg($args,
-		"--debug=$debug_d:t:A,%s/log/%s.trace",
+		"--loose-debug=$debug_d:t:A,%s/log/%s.trace",
 		$path_vardir_trace, $client_name)
   }
 }
@@ -2015,7 +2023,7 @@ sub read_plugin_defs($)
     or mtr_error("Can't read plugin defintions file $defs_file");
 
   # Need to check if we will be running mysqld-debug
-  if ($opt_debug) {
+  if ($opt_debug_server) {
     $running_debug= 1 if find_mysqld($basedir) =~ /-debug$/;
   }
 
@@ -2162,6 +2170,16 @@ sub environment_setup {
   $ENV{'MYSQL_LIBDIR'}=       "$basedir/lib";
   $ENV{'MYSQL_SHAREDIR'}=     $path_language;
   $ENV{'MYSQL_CHARSETSDIR'}=  $path_charsetsdir;
+  
+  if (IS_WINDOWS)
+  {
+    $ENV{'SECURE_LOAD_PATH'}= $glob_mysql_test_dir."\\std_data";
+  }
+  else
+  {
+    $ENV{'SECURE_LOAD_PATH'}= $glob_mysql_test_dir."/std_data";
+  }
+    
 
   # ----------------------------------------------------
   # Setup env for NDB
@@ -2515,9 +2533,9 @@ sub check_debug_support ($) {
     #mtr_report(" - binaries are not debug compiled");
     $debug_compiled_binaries= 0;
 
-    if ( $opt_debug )
+    if ( $opt_debug_server )
     {
-      mtr_error("Can't use --debug, binaries does not support it");
+      mtr_error("Can't use --debug[-server], binary does not support it");
     }
     return;
   }
@@ -5788,6 +5806,8 @@ Options for debugging the product
   debug                 Dump trace output for all servers and client programs
   debug-common          Same as debug, but sets 'd' debug flags to
                         "query,info,error,enter,exit"
+  debug-server          Use debug version of server, but without turning on
+                        tracing
   debugger=NAME         Start mysqld in the selected debugger
   gdb                   Start the mysqld(s) in gdb
   manual-debug          Let user manually start mysqld in debugger, before

=== modified file 'mysql-test/r/delete.result'
--- a/mysql-test/r/delete.result	2010-10-04 08:25:04 +0000
+++ b/mysql-test/r/delete.result	2011-02-02 10:32:21 +0000
@@ -524,3 +524,26 @@ DELETE v2 FROM v2;
 ERROR HY000: Can not delete from join view 'test.v2'
 DROP VIEW v2, v1;
 DROP TABLE t1, t2;
+#
+# Bug#58709 assert in mysql_execute_command
+#
+DROP TABLE IF EXISTS t2, t1;
+DROP PROCEDURE IF EXISTS p1;
+CREATE TABLE t1 (i INT PRIMARY KEY) engine=InnoDB;
+CREATE TABLE t2 (i INT, FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION) engine=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+DELETE IGNORE FROM t1 WHERE i = 1;
+Warnings:
+Error	1451	Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`i`) REFERENCES `t1` (`i`) ON DELETE NO ACTION)
+CREATE PROCEDURE p1() DELETE IGNORE FROM t1 WHERE i = 1;
+CALL p1();
+Warnings:
+Error	1451	Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`i`) REFERENCES `t1` (`i`) ON DELETE NO ACTION)
+PREPARE stm FROM 'CALL p1()';
+EXECUTE stm;
+Warnings:
+Error	1451	Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`i`) REFERENCES `t1` (`i`) ON DELETE NO ACTION)
+DEALLOCATE PREPARE stm;
+DROP TABLE t2, t1;
+DROP PROCEDURE p1;

=== modified file 'mysql-test/r/filesort_debug.result'
--- a/mysql-test/r/filesort_debug.result	2011-01-10 13:23:11 +0000
+++ b/mysql-test/r/filesort_debug.result	2011-02-02 13:41:10 +0000
@@ -1,3 +1,4 @@
+SET @old_debug= @@session.debug;
 #
 # Bug#59331 filesort with priority queue: handling of out-of-memory
 #
@@ -8,4 +9,20 @@ INSERT INTO t1(f1, f2) VALUES 
 set debug= '+d,bounded_queue_init_fail';
 SELECT * FROM t1 ORDER BY f1 ASC, f0 LIMIT 1;
 ERROR HY000: Out of memory (Needed NN bytes)
+SET session debug= @old_debug;
 DROP TABLE t1;
+#
+# Bug#36022 please log more information about "Sort aborted" queries
+#
+CREATE TABLE t1(f0 int auto_increment primary key, f1 int);
+INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
+SET session debug= '+d,make_char_array_fail';
+CALL mtr.add_suppression("Out of sort memory");
+SELECT * FROM t1 ORDER BY f1 ASC, f0;
+ERROR HY001: Out of sort memory, consider increasing server sort buffer size
+SET session debug= @old_debug;
+CREATE FUNCTION f1() RETURNS INT RETURN 1;
+DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
+ERROR 42000: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1
+DROP TABLE t1;
+DROP FUNCTION f1;

=== modified file 'mysql-test/r/func_in_all.result'
--- a/mysql-test/r/func_in_all.result	2010-11-30 13:55:22 +0000
+++ b/mysql-test/r/func_in_all.result	2011-01-25 10:28:21 +0000
@@ -771,5 +771,40 @@ CASE a WHEN a THEN a END
 NULL
 DROP TABLE t1;
 #
+# Bug#58628: Incorrect result for 'WHERE NULL NOT IN (<subquery>)
+#
+CREATE TABLE t1 (pk INT NOT NULL, i INT);
+INSERT INTO t1 VALUES (0,NULL), (1,NULL), (2,NULL), (3,NULL);
+CREATE TABLE subq (pk INT NOT NULL, i INT NOT NULL, PRIMARY KEY(i,pk));
+INSERT INTO subq VALUES (0,0), (1,1), (2,2), (3,3);
+SELECT * FROM t1
+WHERE t1.i NOT IN
+(SELECT i FROM subq WHERE subq.pk = t1.pk);
+pk	i
+SELECT * FROM t1
+WHERE t1.i IN
+(SELECT i FROM subq WHERE subq.pk = t1.pk) IS UNKNOWN;
+pk	i
+0	NULL
+1	NULL
+2	NULL
+3	NULL
+SELECT * FROM t1
+WHERE NULL NOT IN
+(SELECT i FROM subq WHERE subq.pk = t1.pk);
+pk	i
+SELECT * FROM t1
+WHERE NULL IN
+(SELECT i FROM subq WHERE subq.pk = t1.pk) IS UNKNOWN;
+pk	i
+0	NULL
+1	NULL
+2	NULL
+3	NULL
+SELECT * FROM t1
+WHERE 1+NULL NOT IN
+(SELECT i FROM subq WHERE subq.pk = t1.pk);
+pk	i
+DROP TABLE t1,subq;
 End of 5.1 tests
 set optimizer_switch=default;

=== modified file 'mysql-test/r/func_time.result'
--- a/mysql-test/r/func_time.result	2010-12-17 11:28:59 +0000
+++ b/mysql-test/r/func_time.result	2011-02-02 18:31:39 +0000
@@ -1273,6 +1273,24 @@ date_add('1000-01-01 00:00:00', interval
 select date_add('1000-01-01 00:00:00', interval '1.02' day_microsecond);
 date_add('1000-01-01 00:00:00', interval '1.02' day_microsecond)
 1000-01-01 00:00:01.020000
+#
+# Bug #52315 part 2 : utc_date() crashes when system time > year 2037
+#
+SET TIMESTAMP=-147490000;
+SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=2147483648;
+SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=2147483646;
+SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=2147483647;
+SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=0;
+SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=-1;
+SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=1;
+SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=0;
 End of 5.0 tests
 select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
 date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND)

=== modified file 'mysql-test/r/gis.result'
--- a/mysql-test/r/gis.result	2011-01-12 17:24:53 +0000
+++ b/mysql-test/r/gis.result	2011-02-08 15:49:51 +0000
@@ -960,6 +960,18 @@ COUNT(*)
 2
 DROP TABLE t1, t2;
 End of 5.0 tests
+#
+# Test for bug #58650 "Failing assertion: primary_key_no == -1 ||
+#                      primary_key_no == 0".
+#
+drop table if exists t1;
+# The minimal test case.
+create table t1 (a int not null, b linestring not null, unique key b (b(12)), unique key a (a));
+drop table t1;
+# The original test case.
+create table t1 (a int not null, b linestring not null, unique key b (b(12)));
+create unique index a on t1(a);
+drop table t1;
 create table `t1` (`col002` point)engine=myisam;
 insert into t1 values (),(),();
 select min(`col002`) from t1 union select `col002` from t1;

=== modified file 'mysql-test/r/grant.result'
--- a/mysql-test/r/grant.result	2011-01-24 15:47:16 +0000
+++ b/mysql-test/r/grant.result	2011-02-08 15:54:12 +0000
@@ -1378,6 +1378,80 @@ CURRENT_USER()
 root@localhost
 SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
 SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
+
+# Bug#57952
+
+DROP DATABASE IF EXISTS mysqltest1;
+DROP DATABASE IF EXISTS mysqltest2;
+CREATE DATABASE mysqltest1;
+CREATE DATABASE mysqltest2;
+use mysqltest1;
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (1, 1);
+CREATE TABLE t2(a INT);
+INSERT INTO t2 VALUES (2);
+CREATE TABLE mysqltest2.t3(a INT);
+INSERT INTO mysqltest2.t3 VALUES (4);
+CREATE USER testuser@localhost;
+GRANT CREATE ROUTINE, EXECUTE ON mysqltest1.* TO testuser@localhost;
+GRANT SELECT(b) ON t1 TO testuser@localhost;
+GRANT SELECT    ON t2 TO testuser@localhost;
+GRANT SELECT    ON mysqltest2.* TO testuser@localhost;
+
+# Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
+PREPARE s1 FROM 'SELECT b FROM t1';
+PREPARE s2 FROM 'SELECT a FROM t2';
+PREPARE s3 FROM 'SHOW TABLES FROM mysqltest2';
+CREATE PROCEDURE p1() SELECT b FROM t1;
+CREATE PROCEDURE p2() SELECT a FROM t2;
+CREATE PROCEDURE p3() SHOW TABLES FROM mysqltest2;
+CALL p1;
+b
+1
+CALL p2;
+a
+2
+CALL p3;
+Tables_in_mysqltest2
+t3
+
+# Connection: default
+REVOKE SELECT ON t1 FROM testuser@localhost;
+GRANT SELECT(a) ON t1 TO testuser@localhost;
+REVOKE SELECT ON t2 FROM testuser@localhost;
+REVOKE SELECT ON mysqltest2.* FROM testuser@localhost;
+
+# Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
+#   - Check column-level privileges...
+EXECUTE s1;
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
+SELECT b FROM t1;
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
+EXECUTE s1;
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
+CALL p1;
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
+#   - Check table-level privileges...
+SELECT a FROM t2;
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
+EXECUTE s2;
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
+CALL p2;
+ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
+#   - Check database-level privileges...
+SHOW TABLES FROM mysqltest2;
+ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
+EXECUTE s3;
+ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
+CALL p3;
+ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
+
+# Connection: default
+DROP DATABASE mysqltest1;
+DROP DATABASE mysqltest2;
+DROP USER testuser@localhost;
+use test;
+
 End of 5.0 tests
 set names utf8;
 grant select on test.* to юзер_юзер@localhost;

=== modified file 'mysql-test/r/innodb_icp.result'
--- a/mysql-test/r/innodb_icp.result	2011-01-30 16:55:22 +0000
+++ b/mysql-test/r/innodb_icp.result	2011-01-31 11:56:15 +0000
@@ -739,5 +739,25 @@ SELECT pk FROM t1 WHERE c1 <> 1 HAVING p
 pk
 3
 DROP TABLE t1;
+#
+# Bug#59483 "Crash on INSERT/REPLACE in
+#            rec_convert_dtuple_to_rec_comp with ICP on"
+#
+CREATE TABLE t1 (
+pk INTEGER AUTO_INCREMENT PRIMARY KEY,
+i1 INTEGER,
+c1 CHAR(6),
+i2 INTEGER NOT NULL,
+KEY (i2)
+);
+INSERT INTO t1 VALUES
+(NULL, 4, 'that', 8),
+(NULL, 1, 'she', 6),
+(NULL, 6, 'tell', 2);
+SELECT * FROM t1 WHERE i2 IN (3, 6) LIMIT 2 FOR UPDATE;
+pk	i1	c1	i2
+2	1	she	6
+INSERT INTO t1 (i2) VALUES (1);
+DROP TABLE t1;
 set default_storage_engine= @save_storage_engine;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/innodb_icp_all.result'
--- a/mysql-test/r/innodb_icp_all.result	2011-01-28 10:21:56 +0000
+++ b/mysql-test/r/innodb_icp_all.result	2011-02-02 13:23:58 +0000
@@ -602,6 +602,7 @@ drop table t1;
 # Bug #58816 "Extra temporary duplicate rows in result set when 
 #             switching ICP off"
 #
+set @save_optimizer_switch_bug58816= @@optimizer_switch;
 CREATE TABLE t1 (
 pk INT NOT NULL,
 c1 INT NOT NULL,
@@ -619,6 +620,7 @@ pk	c1
 4	3
 5	1
 DROP TABLE t1;
+set optimizer_switch= @save_optimizer_switch_bug58816;
 #
 # Bug#58837: ICP crash or valgrind error due to uninitialized 
 #            value in innobase_index_cond

=== modified file 'mysql-test/r/innodb_icp_none.result'
--- a/mysql-test/r/innodb_icp_none.result	2011-01-30 16:55:22 +0000
+++ b/mysql-test/r/innodb_icp_none.result	2011-01-31 11:56:15 +0000
@@ -738,5 +738,25 @@ SELECT pk FROM t1 WHERE c1 <> 1 HAVING p
 pk
 3
 DROP TABLE t1;
+#
+# Bug#59483 "Crash on INSERT/REPLACE in
+#            rec_convert_dtuple_to_rec_comp with ICP on"
+#
+CREATE TABLE t1 (
+pk INTEGER AUTO_INCREMENT PRIMARY KEY,
+i1 INTEGER,
+c1 CHAR(6),
+i2 INTEGER NOT NULL,
+KEY (i2)
+);
+INSERT INTO t1 VALUES
+(NULL, 4, 'that', 8),
+(NULL, 1, 'she', 6),
+(NULL, 6, 'tell', 2);
+SELECT * FROM t1 WHERE i2 IN (3, 6) LIMIT 2 FOR UPDATE;
+pk	i1	c1	i2
+2	1	she	6
+INSERT INTO t1 (i2) VALUES (1);
+DROP TABLE t1;
 set default_storage_engine= @save_storage_engine;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/join_outer.result'
--- a/mysql-test/r/join_outer.result	2011-01-13 09:08:47 +0000
+++ b/mysql-test/r/join_outer.result	2011-02-02 08:15:16 +0000
@@ -1502,6 +1502,148 @@ WHERE 7;
 col_datetime_key
 NULL
 DROP TABLE BB;
+#
+# Bug#58490: Incorrect result in multi level OUTER JOIN
+# in combination with IS NULL
+#
+CREATE TABLE t1 (i INT NOT NULL);
+INSERT INTO t1 VALUES (0),    (2),(3),(4);
+CREATE TABLE t2 (i INT NOT NULL);
+INSERT INTO t2 VALUES (0),(1),    (3),(4);
+CREATE TABLE t3 (i INT NOT NULL);
+INSERT INTO t3 VALUES (0),(1),(2),    (4);
+CREATE TABLE t4 (i INT NOT NULL);
+INSERT INTO t4 VALUES (0),(1),(2),(3)   ;
+SELECT * FROM
+t1 LEFT JOIN
+( t2 LEFT JOIN
+( t3 LEFT JOIN
+t4
+ON t4.i = t3.i
+)
+ON t3.i = t2.i
+)
+ON t2.i = t1.i
+;
+i	i	i	i
+0	0	0	0
+2	NULL	NULL	NULL
+3	3	NULL	NULL
+4	4	4	NULL
+SELECT * FROM
+t1 LEFT JOIN
+( t2 LEFT JOIN
+( t3 LEFT JOIN
+t4
+ON t4.i = t3.i
+)
+ON t3.i = t2.i
+)
+ON t2.i = t1.i
+WHERE t4.i IS NULL;
+i	i	i	i
+2	NULL	NULL	NULL
+3	3	NULL	NULL
+4	4	4	NULL
+SELECT * FROM
+t1 LEFT JOIN
+( ( t2 LEFT JOIN
+t3
+ON t3.i = t2.i
+)
+)
+ON t2.i = t1.i
+WHERE t3.i IS NULL;
+i	i	i
+2	NULL	NULL
+3	3	NULL
+SELECT * FROM
+t1 LEFT JOIN
+( ( t2 LEFT JOIN
+t3
+ON t3.i = t2.i
+)
+JOIN t4
+ON t4.i=t2.i
+)
+ON t2.i = t1.i
+WHERE t3.i IS NULL;
+i	i	i	i
+2	NULL	NULL	NULL
+3	3	NULL	3
+4	NULL	NULL	NULL
+SELECT * FROM
+t1 LEFT JOIN
+( ( t2 LEFT JOIN
+t3
+ON t3.i = t2.i
+)
+JOIN (t4 AS t4a JOIN t4 AS t4b ON t4a.i=t4b.i)
+ON t4a.i=t2.i
+)
+ON t2.i = t1.i
+WHERE t3.i IS NULL;
+i	i	i	i	i
+2	NULL	NULL	NULL	NULL
+3	3	NULL	3	3
+4	NULL	NULL	NULL	NULL
+SELECT * FROM
+t1 LEFT JOIN
+( ( t2 LEFT JOIN
+t3
+ON t3.i = t2.i
+)
+JOIN (t4 AS t4a, t4 AS t4b)
+ON t4a.i=t2.i
+)
+ON t2.i = t1.i
+WHERE t3.i IS NULL;
+i	i	i	i	i
+2	NULL	NULL	NULL	NULL
+3	3	NULL	3	0
+3	3	NULL	3	1
+3	3	NULL	3	2
+3	3	NULL	3	3
+4	NULL	NULL	NULL	NULL
+DROP TABLE t1,t2,t3,t4;
+#
+# Bug#49322(Duplicate): Server is adding extra NULL row
+# on processing a WHERE clause
+#
+CREATE TABLE h (pk INT NOT NULL, col_int_key INT);
+INSERT INTO h VALUES (1,NULL),(4,2),(5,2),(3,4),(2,8);
+CREATE TABLE m (pk INT NOT NULL, col_int_key INT);
+INSERT INTO m VALUES (1,2),(2,7),(3,5),(4,7),(5,5),(6,NULL),(7,NULL),(8,9);
+CREATE TABLE k (pk INT NOT NULL, col_int_key INT);
+INSERT INTO k VALUES (1,9),(2,2),(3,5),(4,2),(5,7),(6,0),(7,5);
+SELECT TABLE1.pk FROM k TABLE1
+RIGHT JOIN h TABLE2 ON TABLE1.col_int_key=TABLE2.col_int_key
+RIGHT JOIN m TABLE4 ON TABLE2.col_int_key=TABLE4.col_int_key;
+pk
+2
+2
+4
+4
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+SELECT TABLE1.pk FROM k TABLE1
+RIGHT JOIN h TABLE2 ON TABLE1.col_int_key=TABLE2.col_int_key
+RIGHT JOIN m TABLE4 ON TABLE2.col_int_key=TABLE4.col_int_key
+WHERE TABLE1.pk IS NULL;
+pk
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+DROP TABLE h,m,k;
 End of 5.1 tests
 #
 # Bug#54235 Extra rows with join_cache_level=4,6,8 and two LEFT JOIN

=== modified file 'mysql-test/r/myisam_icp.result'
--- a/mysql-test/r/myisam_icp.result	2011-01-30 16:55:22 +0000
+++ b/mysql-test/r/myisam_icp.result	2011-01-31 11:56:15 +0000
@@ -737,4 +737,24 @@ SELECT pk FROM t1 WHERE c1 <> 1 HAVING p
 pk
 3
 DROP TABLE t1;
+#
+# Bug#59483 "Crash on INSERT/REPLACE in
+#            rec_convert_dtuple_to_rec_comp with ICP on"
+#
+CREATE TABLE t1 (
+pk INTEGER AUTO_INCREMENT PRIMARY KEY,
+i1 INTEGER,
+c1 CHAR(6),
+i2 INTEGER NOT NULL,
+KEY (i2)
+);
+INSERT INTO t1 VALUES
+(NULL, 4, 'that', 8),
+(NULL, 1, 'she', 6),
+(NULL, 6, 'tell', 2);
+SELECT * FROM t1 WHERE i2 IN (3, 6) LIMIT 2 FOR UPDATE;
+pk	i1	c1	i2
+2	1	she	6
+INSERT INTO t1 (i2) VALUES (1);
+DROP TABLE t1;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/myisam_icp_all.result'
--- a/mysql-test/r/myisam_icp_all.result	2011-01-28 10:21:56 +0000
+++ b/mysql-test/r/myisam_icp_all.result	2011-02-02 13:23:58 +0000
@@ -600,6 +600,7 @@ drop table t1;
 # Bug #58816 "Extra temporary duplicate rows in result set when 
 #             switching ICP off"
 #
+set @save_optimizer_switch_bug58816= @@optimizer_switch;
 CREATE TABLE t1 (
 pk INT NOT NULL,
 c1 INT NOT NULL,
@@ -617,6 +618,7 @@ pk	c1
 4	3
 5	1
 DROP TABLE t1;
+set optimizer_switch= @save_optimizer_switch_bug58816;
 #
 # Bug#58837: ICP crash or valgrind error due to uninitialized 
 #            value in innobase_index_cond

=== modified file 'mysql-test/r/myisam_icp_none.result'
--- a/mysql-test/r/myisam_icp_none.result	2011-01-30 16:55:22 +0000
+++ b/mysql-test/r/myisam_icp_none.result	2011-01-31 11:56:15 +0000
@@ -736,4 +736,24 @@ SELECT pk FROM t1 WHERE c1 <> 1 HAVING p
 pk
 3
 DROP TABLE t1;
+#
+# Bug#59483 "Crash on INSERT/REPLACE in
+#            rec_convert_dtuple_to_rec_comp with ICP on"
+#
+CREATE TABLE t1 (
+pk INTEGER AUTO_INCREMENT PRIMARY KEY,
+i1 INTEGER,
+c1 CHAR(6),
+i2 INTEGER NOT NULL,
+KEY (i2)
+);
+INSERT INTO t1 VALUES
+(NULL, 4, 'that', 8),
+(NULL, 1, 'she', 6),
+(NULL, 6, 'tell', 2);
+SELECT * FROM t1 WHERE i2 IN (3, 6) LIMIT 2 FOR UPDATE;
+pk	i1	c1	i2
+2	1	she	6
+INSERT INTO t1 (i2) VALUES (1);
+DROP TABLE t1;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/not_embedded_server.result'
--- a/mysql-test/r/not_embedded_server.result	2011-01-07 12:08:05 +0000
+++ b/mysql-test/r/not_embedded_server.result	2011-02-04 04:59:55 +0000
@@ -3,6 +3,10 @@ SHOW VARIABLES like 'slave_skip_errors';
 Variable_name	Value
 slave_skip_errors	OFF
 #
+# Bug#58026: massive recursion and crash in regular expression handling
+#
+SELECT '1' RLIKE RPAD('1', 10000, '(');
+#
 # WL#4284: Transactional DDL locking
 #
 # FLUSH PRIVILEGES should not implicitly unlock locked tables.

=== modified file 'mysql-test/r/optimizer_switch.result'
--- a/mysql-test/r/optimizer_switch.result	2010-11-30 18:16:43 +0000
+++ b/mysql-test/r/optimizer_switch.result	2011-01-24 14:17:03 +0000
@@ -293,14 +293,13 @@ a	b
 3	20
 2	30
 set @@optimizer_switch='materialization=off,semijoin=on';
-# The query result with semijoin is WRONG
 EXPLAIN SELECT * FROM t1 AS ta
 WHERE ta.a IN (SELECT c FROM t2 AS tb
 WHERE tb.d >= SOME(SELECT SUM(g) FROM t4 as tc
 GROUP BY f
 HAVING ta.a=tc.f));
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	tb	ALL	NULL	NULL	NULL	NULL	6	Using where; Start temporary
+1	PRIMARY	tb	ALL	NULL	NULL	NULL	NULL	6	Start temporary
 1	PRIMARY	ta	ALL	NULL	NULL	NULL	NULL	7	Using where; End temporary; Using join buffer (BNL, incremental buffers)
 3	DEPENDENT SUBQUERY	tc	ALL	NULL	NULL	NULL	NULL	6	Using temporary; Using filesort
 SELECT * FROM t1 AS ta
@@ -309,6 +308,10 @@ WHERE tb.d >= SOME(SELECT SUM(g) FROM t4
 GROUP BY f
 HAVING ta.a=tc.f));
 a	b
+2	10
+2	20
+3	20
+2	30
 # Subquery with ORDER BY and LIMIT
 set @@optimizer_switch='materialization=off,semijoin=off';
 # NOTE: The ordered subquery should have a LIMIT clause to make sense
@@ -332,7 +335,6 @@ a	b
 2	30
 4	40
 set @@optimizer_switch='materialization=off,semijoin=on';
-# The query result with semijoin is WRONG
 EXPLAIN SELECT * FROM t1 AS ta
 WHERE ta.a IN (SELECT c FROM t2 AS tb
 WHERE tb.d IN (SELECT g FROM t4 as tc

=== modified file 'mysql-test/r/order_by_all.result'
--- a/mysql-test/r/order_by_all.result	2010-12-20 14:21:44 +0000
+++ b/mysql-test/r/order_by_all.result	2011-02-07 09:46:53 +0000
@@ -1426,8 +1426,9 @@ set session sort_buffer_size= 30000;
 Warnings:
 Warning	1292	Truncated incorrect sort_buffer_size value: '30000'
 set session max_sort_length= 2180;
+CALL mtr.add_suppression("Out of sort memory");
 select * from t1 order by b;
-ERROR HY001: Out of sort memory; increase server sort buffer size
+ERROR HY001: Out of sort memory, consider increasing server sort buffer size
 drop table t1;
 #
 # Bug #39844: Query Crash Mysql Server 5.0.67
@@ -2523,6 +2524,31 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t1	index	NULL	a	8	NULL	10	Using index; Using temporary; Using filesort
 1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	4	test.t1.b	1	Using where
 DROP TABLE t1, t2;
+#
+# Bug #59110: Memory leak of QUICK_SELECT_I allocated memory 
+#  and
+# Bug #59308: Incorrect result for 
+SELECT DISTINCT <col>... ORDER BY <col> DESC 
+
+# Use Valgrind to detect #59110!
+#
+CREATE TABLE t1 (a INT,KEY (a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+EXPLAIN SELECT DISTINCT a,1 FROM t1 WHERE a <> 1 ORDER BY a DESC;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	index	a	a	5	NULL	10	Using where; Using index; Using filesort
+SELECT DISTINCT a,1 FROM t1 WHERE a <> 1 ORDER BY a DESC;
+a	1
+10	1
+9	1
+8	1
+7	1
+6	1
+5	1
+4	1
+3	1
+2	1
+DROP TABLE t1;
 End of 5.1 tests
 #
 # Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BY

=== modified file 'mysql-test/r/order_by_icp_mrr.result'
--- a/mysql-test/r/order_by_icp_mrr.result	2010-12-17 09:41:21 +0000
+++ b/mysql-test/r/order_by_icp_mrr.result	2011-02-07 09:46:53 +0000
@@ -1426,8 +1426,9 @@ set session sort_buffer_size= 30000;
 Warnings:
 Warning	1292	Truncated incorrect sort_buffer_size value: '30000'
 set session max_sort_length= 2180;
+CALL mtr.add_suppression("Out of sort memory");
 select * from t1 order by b;
-ERROR HY001: Out of sort memory; increase server sort buffer size
+ERROR HY001: Out of sort memory, consider increasing server sort buffer size
 drop table t1;
 #
 # Bug #39844: Query Crash Mysql Server 5.0.67
@@ -2523,6 +2524,31 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t1	index	NULL	a	8	NULL	10	Using index; Using temporary; Using filesort
 1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	4	test.t1.b	1	Using where
 DROP TABLE t1, t2;
+#
+# Bug #59110: Memory leak of QUICK_SELECT_I allocated memory 
+#  and
+# Bug #59308: Incorrect result for 
+SELECT DISTINCT <col>... ORDER BY <col> DESC 
+
+# Use Valgrind to detect #59110!
+#
+CREATE TABLE t1 (a INT,KEY (a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+EXPLAIN SELECT DISTINCT a,1 FROM t1 WHERE a <> 1 ORDER BY a DESC;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	index	a	a	5	NULL	10	Using where; Using index; Using filesort
+SELECT DISTINCT a,1 FROM t1 WHERE a <> 1 ORDER BY a DESC;
+a	1
+10	1
+9	1
+8	1
+7	1
+6	1
+5	1
+4	1
+3	1
+2	1
+DROP TABLE t1;
 End of 5.1 tests
 #
 # Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BY

=== modified file 'mysql-test/r/order_by_none.result'
--- a/mysql-test/r/order_by_none.result	2010-12-17 09:41:21 +0000
+++ b/mysql-test/r/order_by_none.result	2011-02-07 09:46:53 +0000
@@ -1425,8 +1425,9 @@ set session sort_buffer_size= 30000;
 Warnings:
 Warning	1292	Truncated incorrect sort_buffer_size value: '30000'
 set session max_sort_length= 2180;
+CALL mtr.add_suppression("Out of sort memory");
 select * from t1 order by b;
-ERROR HY001: Out of sort memory; increase server sort buffer size
+ERROR HY001: Out of sort memory, consider increasing server sort buffer size
 drop table t1;
 #
 # Bug #39844: Query Crash Mysql Server 5.0.67
@@ -2522,6 +2523,31 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t1	index	NULL	a	8	NULL	10	Using index; Using temporary; Using filesort
 1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	4	test.t1.b	1	Using where
 DROP TABLE t1, t2;
+#
+# Bug #59110: Memory leak of QUICK_SELECT_I allocated memory 
+#  and
+# Bug #59308: Incorrect result for 
+SELECT DISTINCT <col>... ORDER BY <col> DESC 
+
+# Use Valgrind to detect #59110!
+#
+CREATE TABLE t1 (a INT,KEY (a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+EXPLAIN SELECT DISTINCT a,1 FROM t1 WHERE a <> 1 ORDER BY a DESC;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	index	a	a	5	NULL	10	Using where; Using index; Using filesort
+SELECT DISTINCT a,1 FROM t1 WHERE a <> 1 ORDER BY a DESC;
+a	1
+10	1
+9	1
+8	1
+7	1
+6	1
+5	1
+4	1
+3	1
+2	1
+DROP TABLE t1;
 End of 5.1 tests
 #
 # Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BY

=== modified file 'mysql-test/r/plugin_auth.result'
--- a/mysql-test/r/plugin_auth.result	2011-01-31 15:55:58 +0000
+++ b/mysql-test/r/plugin_auth.result	2011-02-08 17:48:20 +0000
@@ -1,3 +1,4 @@
+CALL mtr.add_suppression("Plugin test_plugin_server reported: 'Wrong password supplied for plug_dest'");
 SELECT PLUGIN_STATUS, PLUGIN_TYPE, PLUGIN_DESCRIPTION
 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='test_plugin_server';
 PLUGIN_STATUS	ACTIVE

=== modified file 'mysql-test/r/plugin_auth_qa_1.result'
--- a/mysql-test/r/plugin_auth_qa_1.result	2010-10-20 14:56:09 +0000
+++ b/mysql-test/r/plugin_auth_qa_1.result	2011-02-08 17:48:20 +0000
@@ -1,3 +1,4 @@
+CALL mtr.add_suppression("Plugin test_plugin_server reported: 'Wrong password supplied for plug_dest'");
 CREATE DATABASE test_user_db;
 SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
 user	plugin	authentication_string

=== added file 'mysql-test/r/ssl_and_innodb.result'
--- a/mysql-test/r/ssl_and_innodb.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/ssl_and_innodb.result	2011-02-07 23:54:23 +0000
@@ -0,0 +1,8 @@
+CREATE TABLE t1(a int) engine=innodb;
+INSERT INTO t1 VALUES (1);
+SELECT DISTINCT
+convert((SELECT des_decrypt(2,1) AS a FROM t1 WHERE @a:=1), signed) as d
+FROM t1 ;
+d
+2
+DROP TABLE t1;

=== modified file 'mysql-test/r/subquery_all.result'
--- a/mysql-test/r/subquery_all.result	2011-01-18 11:42:09 +0000
+++ b/mysql-test/r/subquery_all.result	2011-01-25 10:28:21 +0000
@@ -5088,7 +5088,7 @@ SELECT 1 FROM t1
 WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3))
 ORDER BY count(*);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	index	NULL	a	5	NULL	2	Using index; Using temporary
+1	PRIMARY	t1	index	NULL	a	5	NULL	2	Using index
 2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	2	Using where
 3	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	no matching row in const table
 # should not crash the next statement

=== modified file 'mysql-test/r/subquery_all_jcl6.result'
--- a/mysql-test/r/subquery_all_jcl6.result	2011-01-13 15:37:54 +0000
+++ b/mysql-test/r/subquery_all_jcl6.result	2011-01-25 10:28:21 +0000
@@ -5092,7 +5092,7 @@ SELECT 1 FROM t1
 WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3))
 ORDER BY count(*);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	index	NULL	a	5	NULL	2	Using index; Using temporary
+1	PRIMARY	t1	index	NULL	a	5	NULL	2	Using index
 2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	2	Using where
 3	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	no matching row in const table
 # should not crash the next statement

=== modified file 'mysql-test/r/subquery_nomat_nosj.result'
--- a/mysql-test/r/subquery_nomat_nosj.result	2011-01-24 09:02:03 +0000
+++ b/mysql-test/r/subquery_nomat_nosj.result	2011-02-02 09:04:55 +0000
@@ -6152,6 +6152,32 @@ HAVING t2s.i = 999
 ) IS UNKNOWN;
 i
 DROP TABLE t1,t1s,t2s;
+#
+# Bug #56690  Wrong results with subquery with 
+# GROUP BY inside < ANY clause
+#
+CREATE TABLE t1 (
+pk INT NOT NULL PRIMARY KEY,
+number INT,
+KEY key_number (number)
+);
+INSERT INTO t1 VALUES (8,8);
+CREATE TABLE t2 (
+pk INT NOT NULL PRIMARY KEY,
+number INT,
+KEY key_number (number)
+);
+INSERT INTO t2 VALUES (1,2);
+INSERT INTO t2 VALUES (2,8);
+INSERT INTO t2 VALUES (3,NULL);
+INSERT INTO t2 VALUES (4,166);
+SELECT * FROM t1 WHERE t1.number < ANY(SELECT number FROM t2 GROUP BY number);
+pk	number
+8	8
+SELECT * FROM t1 WHERE t1.number < ANY(SELECT number FROM t2);
+pk	number
+8	8
+DROP TABLE t1,t2;
 End of 5.1 tests
 #
 # BUG#50257: Missing info in REF column of the EXPLAIN 

=== modified file 'mysql-test/r/subquery_nomat_nosj_jcl6.result'
--- a/mysql-test/r/subquery_nomat_nosj_jcl6.result	2011-01-13 15:37:54 +0000
+++ b/mysql-test/r/subquery_nomat_nosj_jcl6.result	2011-01-25 10:28:21 +0000
@@ -5092,7 +5092,7 @@ SELECT 1 FROM t1
 WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3))
 ORDER BY count(*);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	index	NULL	a	5	NULL	2	Using index; Using temporary
+1	PRIMARY	t1	index	NULL	a	5	NULL	2	Using index
 2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	2	Using where
 3	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	no matching row in const table
 # should not crash the next statement

=== modified file 'mysql-test/r/subquery_none.result'
--- a/mysql-test/r/subquery_none.result	2011-01-24 09:02:03 +0000
+++ b/mysql-test/r/subquery_none.result	2011-02-02 09:04:55 +0000
@@ -6151,6 +6151,32 @@ HAVING t2s.i = 999
 ) IS UNKNOWN;
 i
 DROP TABLE t1,t1s,t2s;
+#
+# Bug #56690  Wrong results with subquery with 
+# GROUP BY inside < ANY clause
+#
+CREATE TABLE t1 (
+pk INT NOT NULL PRIMARY KEY,
+number INT,
+KEY key_number (number)
+);
+INSERT INTO t1 VALUES (8,8);
+CREATE TABLE t2 (
+pk INT NOT NULL PRIMARY KEY,
+number INT,
+KEY key_number (number)
+);
+INSERT INTO t2 VALUES (1,2);
+INSERT INTO t2 VALUES (2,8);
+INSERT INTO t2 VALUES (3,NULL);
+INSERT INTO t2 VALUES (4,166);
+SELECT * FROM t1 WHERE t1.number < ANY(SELECT number FROM t2 GROUP BY number);
+pk	number
+8	8
+SELECT * FROM t1 WHERE t1.number < ANY(SELECT number FROM t2);
+pk	number
+8	8
+DROP TABLE t1,t2;
 End of 5.1 tests
 #
 # BUG#50257: Missing info in REF column of the EXPLAIN 

=== modified file 'mysql-test/r/subquery_none_jcl6.result'
--- a/mysql-test/r/subquery_none_jcl6.result	2011-01-13 15:37:54 +0000
+++ b/mysql-test/r/subquery_none_jcl6.result	2011-01-25 10:28:21 +0000
@@ -5091,7 +5091,7 @@ SELECT 1 FROM t1
 WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3))
 ORDER BY count(*);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	index	NULL	a	5	NULL	2	Using index; Using temporary
+1	PRIMARY	t1	index	NULL	a	5	NULL	2	Using index
 2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	2	Using where
 3	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	no matching row in const table
 # should not crash the next statement

=== modified file 'mysql-test/r/subquery_sj_all.result'
--- a/mysql-test/r/subquery_sj_all.result	2010-11-30 13:55:22 +0000
+++ b/mysql-test/r/subquery_sj_all.result	2011-01-27 11:38:22 +0000
@@ -5330,4 +5330,67 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;

=== modified file 'mysql-test/r/subquery_sj_all_jcl6.result'
--- a/mysql-test/r/subquery_sj_all_jcl6.result	2010-11-30 13:55:22 +0000
+++ b/mysql-test/r/subquery_sj_all_jcl6.result	2011-01-27 11:38:22 +0000
@@ -5334,5 +5334,68 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_all_jcl7.result'
--- a/mysql-test/r/subquery_sj_all_jcl7.result	2010-11-30 13:55:22 +0000
+++ b/mysql-test/r/subquery_sj_all_jcl7.result	2011-01-27 11:38:22 +0000
@@ -5334,5 +5334,68 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; Using join buffer (BNL, regular buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_dupsweed.result'
--- a/mysql-test/r/subquery_sj_dupsweed.result	2010-11-29 13:30:18 +0000
+++ b/mysql-test/r/subquery_sj_dupsweed.result	2011-01-27 11:38:22 +0000
@@ -5329,4 +5329,67 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; End temporary; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;

=== modified file 'mysql-test/r/subquery_sj_dupsweed_jcl6.result'
--- a/mysql-test/r/subquery_sj_dupsweed_jcl6.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_dupsweed_jcl6.result	2011-01-27 11:38:22 +0000
@@ -5333,5 +5333,68 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; End temporary; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_dupsweed_jcl7.result'
--- a/mysql-test/r/subquery_sj_dupsweed_jcl7.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_dupsweed_jcl7.result	2011-01-27 11:38:22 +0000
@@ -5333,5 +5333,68 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; End temporary; Using join buffer (BNL, regular buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_firstmatch.result'
--- a/mysql-test/r/subquery_sj_firstmatch.result	2010-11-29 13:30:18 +0000
+++ b/mysql-test/r/subquery_sj_firstmatch.result	2011-01-27 11:38:22 +0000
@@ -5331,6 +5331,69 @@ id	select_type	table	type	possible_keys	
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
 #
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
+#
 # Bug#51457 Firstmatch semijoin strategy gives wrong results for
 #           certain query plans
 #

=== modified file 'mysql-test/r/subquery_sj_firstmatch_jcl6.result'
--- a/mysql-test/r/subquery_sj_firstmatch_jcl6.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_firstmatch_jcl6.result	2011-01-27 11:38:22 +0000
@@ -5335,6 +5335,69 @@ id	select_type	table	type	possible_keys	
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
 #
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
+#
 # Bug#51457 Firstmatch semijoin strategy gives wrong results for
 #           certain query plans
 #

=== modified file 'mysql-test/r/subquery_sj_firstmatch_jcl7.result'
--- a/mysql-test/r/subquery_sj_firstmatch_jcl7.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_firstmatch_jcl7.result	2011-01-27 11:38:22 +0000
@@ -5335,6 +5335,69 @@ id	select_type	table	type	possible_keys	
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
 #
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
+#
 # Bug#51457 Firstmatch semijoin strategy gives wrong results for
 #           certain query plans
 #

=== modified file 'mysql-test/r/subquery_sj_innodb_all.result'
--- a/mysql-test/r/subquery_sj_innodb_all.result	2010-11-30 13:55:22 +0000
+++ b/mysql-test/r/subquery_sj_innodb_all.result	2011-01-24 11:56:54 +0000
@@ -141,4 +141,23 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	t2	ALL	NULL	NULL	NULL	NULL	1	Using where
 1	PRIMARY	t3	ALL	NULL	NULL	NULL	NULL	2	FirstMatch(t2)
 drop table t2, t3;
+# 
+# BUG#57431: subquery returns wrong result (semijoin=on) with pred AND
+# 
+CREATE TABLE t1 (
+i INT
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (2),(4);
+CREATE TABLE t2 (
+i INT,
+vc VARCHAR(1)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (8,NULL);
+SELECT i
+FROM t1
+WHERE i IN (SELECT innr.i
+FROM t2 LEFT JOIN t2 innr ON innr.vc)
+AND i = 2;
+i
+DROP TABLE t1, t2;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/subquery_sj_innodb_all_jcl6.result'
--- a/mysql-test/r/subquery_sj_innodb_all_jcl6.result	2010-11-30 13:55:22 +0000
+++ b/mysql-test/r/subquery_sj_innodb_all_jcl6.result	2011-01-24 11:56:54 +0000
@@ -145,5 +145,24 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	t2	ALL	NULL	NULL	NULL	NULL	1	Using where
 1	PRIMARY	t3	ALL	NULL	NULL	NULL	NULL	2	FirstMatch(t2)
 drop table t2, t3;
+# 
+# BUG#57431: subquery returns wrong result (semijoin=on) with pred AND
+# 
+CREATE TABLE t1 (
+i INT
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (2),(4);
+CREATE TABLE t2 (
+i INT,
+vc VARCHAR(1)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (8,NULL);
+SELECT i
+FROM t1
+WHERE i IN (SELECT innr.i
+FROM t2 LEFT JOIN t2 innr ON innr.vc)
+AND i = 2;
+i
+DROP TABLE t1, t2;
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_innodb_all_jcl7.result'
--- a/mysql-test/r/subquery_sj_innodb_all_jcl7.result	2010-11-30 13:55:22 +0000
+++ b/mysql-test/r/subquery_sj_innodb_all_jcl7.result	2011-01-24 11:56:54 +0000
@@ -145,5 +145,24 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	t2	ALL	NULL	NULL	NULL	NULL	1	Using where
 1	PRIMARY	t3	ALL	NULL	NULL	NULL	NULL	2	FirstMatch(t2)
 drop table t2, t3;
+# 
+# BUG#57431: subquery returns wrong result (semijoin=on) with pred AND
+# 
+CREATE TABLE t1 (
+i INT
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (2),(4);
+CREATE TABLE t2 (
+i INT,
+vc VARCHAR(1)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (8,NULL);
+SELECT i
+FROM t1
+WHERE i IN (SELECT innr.i
+FROM t2 LEFT JOIN t2 innr ON innr.vc)
+AND i = 2;
+i
+DROP TABLE t1, t2;
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_innodb_none.result'
--- a/mysql-test/r/subquery_sj_innodb_none.result	2010-11-29 13:30:18 +0000
+++ b/mysql-test/r/subquery_sj_innodb_none.result	2011-01-24 11:56:54 +0000
@@ -141,4 +141,23 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	
 2	DEPENDENT SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	2	Using where; Using join buffer (BNL, incremental buffers)
 drop table t2, t3;
+# 
+# BUG#57431: subquery returns wrong result (semijoin=on) with pred AND
+# 
+CREATE TABLE t1 (
+i INT
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (2),(4);
+CREATE TABLE t2 (
+i INT,
+vc VARCHAR(1)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (8,NULL);
+SELECT i
+FROM t1
+WHERE i IN (SELECT innr.i
+FROM t2 LEFT JOIN t2 innr ON innr.vc)
+AND i = 2;
+i
+DROP TABLE t1, t2;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/subquery_sj_innodb_none_jcl6.result'
--- a/mysql-test/r/subquery_sj_innodb_none_jcl6.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_innodb_none_jcl6.result	2011-01-24 11:56:54 +0000
@@ -145,5 +145,24 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	
 2	DEPENDENT SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	2	Using where; Using join buffer (BNL, incremental buffers)
 drop table t2, t3;
+# 
+# BUG#57431: subquery returns wrong result (semijoin=on) with pred AND
+# 
+CREATE TABLE t1 (
+i INT
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (2),(4);
+CREATE TABLE t2 (
+i INT,
+vc VARCHAR(1)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (8,NULL);
+SELECT i
+FROM t1
+WHERE i IN (SELECT innr.i
+FROM t2 LEFT JOIN t2 innr ON innr.vc)
+AND i = 2;
+i
+DROP TABLE t1, t2;
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_innodb_none_jcl7.result'
--- a/mysql-test/r/subquery_sj_innodb_none_jcl7.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_innodb_none_jcl7.result	2011-01-24 11:56:54 +0000
@@ -145,5 +145,24 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	
 2	DEPENDENT SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	2	Using where; Using join buffer (BNL, regular buffers)
 drop table t2, t3;
+# 
+# BUG#57431: subquery returns wrong result (semijoin=on) with pred AND
+# 
+CREATE TABLE t1 (
+i INT
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (2),(4);
+CREATE TABLE t2 (
+i INT,
+vc VARCHAR(1)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (8,NULL);
+SELECT i
+FROM t1
+WHERE i IN (SELECT innr.i
+FROM t2 LEFT JOIN t2 innr ON innr.vc)
+AND i = 2;
+i
+DROP TABLE t1, t2;
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_loosescan.result'
--- a/mysql-test/r/subquery_sj_loosescan.result	2010-11-29 13:30:18 +0000
+++ b/mysql-test/r/subquery_sj_loosescan.result	2011-01-27 11:38:22 +0000
@@ -5330,4 +5330,67 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; End temporary; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;

=== modified file 'mysql-test/r/subquery_sj_loosescan_jcl6.result'
--- a/mysql-test/r/subquery_sj_loosescan_jcl6.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_loosescan_jcl6.result	2011-01-27 11:38:22 +0000
@@ -5334,5 +5334,68 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; End temporary; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_loosescan_jcl7.result'
--- a/mysql-test/r/subquery_sj_loosescan_jcl7.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_loosescan_jcl7.result	2011-01-27 11:38:22 +0000
@@ -5334,5 +5334,68 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; End temporary; Using join buffer (BNL, regular buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_mat.result'
--- a/mysql-test/r/subquery_sj_mat.result	2010-11-29 13:30:18 +0000
+++ b/mysql-test/r/subquery_sj_mat.result	2011-01-27 11:38:22 +0000
@@ -5330,4 +5330,67 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;

=== modified file 'mysql-test/r/subquery_sj_mat_jcl6.result'
--- a/mysql-test/r/subquery_sj_mat_jcl6.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_mat_jcl6.result	2011-01-27 11:38:22 +0000
@@ -5334,5 +5334,68 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_mat_jcl7.result'
--- a/mysql-test/r/subquery_sj_mat_jcl7.result	2010-11-29 13:04:34 +0000
+++ b/mysql-test/r/subquery_sj_mat_jcl7.result	2011-01-27 11:38:22 +0000
@@ -5334,5 +5334,68 @@ id	select_type	table	type	possible_keys	
 1	PRIMARY	ot4	ALL	NULL	NULL	NULL	NULL	8	Using where; Using join buffer (BNL, regular buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_mat_nosj.result'
--- a/mysql-test/r/subquery_sj_mat_nosj.result	2011-01-13 15:37:54 +0000
+++ b/mysql-test/r/subquery_sj_mat_nosj.result	2011-01-27 11:38:22 +0000
@@ -5552,4 +5552,67 @@ id	select_type	table	type	possible_keys	
 2	SUBQUERY	it3	ALL	NULL	NULL	NULL	NULL	6	Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;

=== modified file 'mysql-test/r/subquery_sj_none.result'
--- a/mysql-test/r/subquery_sj_none.result	2011-01-13 10:48:28 +0000
+++ b/mysql-test/r/subquery_sj_none.result	2011-01-27 11:38:22 +0000
@@ -5475,4 +5475,67 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	it3	ALL	NULL	NULL	NULL	NULL	6	Using where; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;

=== modified file 'mysql-test/r/subquery_sj_none_jcl6.result'
--- a/mysql-test/r/subquery_sj_none_jcl6.result	2011-01-13 15:37:54 +0000
+++ b/mysql-test/r/subquery_sj_none_jcl6.result	2011-01-27 11:38:22 +0000
@@ -5479,5 +5479,68 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	it3	ALL	NULL	NULL	NULL	NULL	6	Using where; Using join buffer (BNL, incremental buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer (BNL, incremental buffers)
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where; Using join buffer (BNL, incremental buffers)
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+6	6	6
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/subquery_sj_none_jcl7.result'
--- a/mysql-test/r/subquery_sj_none_jcl7.result	2011-01-13 15:37:54 +0000
+++ b/mysql-test/r/subquery_sj_none_jcl7.result	2011-01-27 11:38:22 +0000
@@ -5479,5 +5479,68 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	it3	ALL	NULL	NULL	NULL	NULL	6	Using where; Using join buffer (BNL, regular buffers)
 DROP TABLE IF EXISTS ot1, ot4, it2, it3;
 # End of the test for bug#52068.
+#
+# Bug#57623: subquery within before insert trigger causes crash (sj=on)
+#
+CREATE TABLE ot1(a INT);
+CREATE TABLE ot2(a INT);
+CREATE TABLE ot3(a INT);
+CREATE TABLE it1(a INT);
+INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+INSERT INTO ot2 VALUES(0),(2),(4),(6);
+INSERT INTO ot3 VALUES(0),(3),(6);
+INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
+explain SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	ot1	ALL	NULL	NULL	NULL	NULL	8	
+1	PRIMARY	ot3	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	PRIMARY	ot2	ALL	NULL	NULL	NULL	NULL	4	Using where
+2	DEPENDENT SUBQUERY	it1	ALL	NULL	NULL	NULL	NULL	8	Using where
+SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+prepare s from 'SELECT *
+FROM   ot1
+LEFT JOIN
+(ot2 JOIN ot3 on ot2.a=ot3.a)
+ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1)';
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+execute s;
+a	a	a
+0	0	0
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+5	NULL	NULL
+6	6	6
+7	NULL	NULL
+deallocate prepare s;
+DROP TABLE ot1, ot2, ot3, it1;
+# End of the test for bug#57623.
 set optimizer_switch=default;
 set optimizer_join_cache_level=default;

=== modified file 'mysql-test/r/type_year.result'
--- a/mysql-test/r/type_year.result	2010-03-22 13:28:51 +0000
+++ b/mysql-test/r/type_year.result	2011-01-12 10:27:31 +0000
@@ -341,4 +341,18 @@ ta_y	s	tb_y	s
 2001	2001	2001	2001
 DROP TABLE t1;
 #
+# Bug #59211: Select Returns Different Value for min(year) Function
+#
+CREATE TABLE t1(c1 YEAR(4));
+INSERT INTO t1 VALUES (1901),(2155),(0000);
+SELECT * FROM t1;
+c1
+1901
+2155
+0000
+SELECT COUNT(*) AS total_rows, MIN(c1) AS min_value, MAX(c1) FROM t1;
+total_rows	min_value	MAX(c1)
+3	0	2155
+DROP TABLE t1;
+#
 End of 5.1 tests

=== modified file 'mysql-test/r/user_var.result'
--- a/mysql-test/r/user_var.result	2010-11-22 09:13:46 +0000
+++ b/mysql-test/r/user_var.result	2010-12-08 14:36:52 +0000
@@ -448,6 +448,12 @@ DROP TABLE t1;
 select @v:=@v:=sum(1) from dual;
 @v:=@v:=sum(1)
 1
+CREATE TABLE t1(a DECIMAL(31,21));
+INSERT INTO t1 VALUES (0);
+SELECT (@v:=a) <> (@v:=1) FROM t1;
+(@v:=a) <> (@v:=1)
+1
+DROP TABLE t1;
 End of 5.1 tests
 DROP TABLE IF EXISTS t1;
 CREATE TABLE t1(f1 INT AUTO_INCREMENT, PRIMARY KEY(f1));

=== modified file 'mysql-test/suite/binlog/r/binlog_unsafe.result'
--- a/mysql-test/suite/binlog/r/binlog_unsafe.result	2010-12-21 10:14:02 +0000
+++ b/mysql-test/suite/binlog/r/binlog_unsafe.result	2010-12-23 11:41:50 +0000
@@ -2418,7 +2418,7 @@ INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
 DROP TABLE t1,t2;
 "Should NOT have any warning message issued in the following func7() and trig"
 CREATE TABLE t1 (a INT);
-CREATE TABLE t2 (a CHAR(40));
+CREATE TABLE t2 (a TEXT);
 CREATE TABLE trigger_table (a CHAR(7));
 CREATE FUNCTION func7()
 RETURNS INT

=== modified file 'mysql-test/suite/binlog/t/binlog_unsafe.test'
--- a/mysql-test/suite/binlog/t/binlog_unsafe.test	2010-12-21 10:14:02 +0000
+++ b/mysql-test/suite/binlog/t/binlog_unsafe.test	2010-12-23 11:41:50 +0000
@@ -481,7 +481,7 @@ DROP TABLE t1,t2;
 
 --echo "Should NOT have any warning message issued in the following func7() and trig"
 CREATE TABLE t1 (a INT);
-CREATE TABLE t2 (a CHAR(40));
+CREATE TABLE t2 (a TEXT);
 CREATE TABLE trigger_table (a CHAR(7));
 DELIMITER |;
 CREATE FUNCTION func7()

=== modified file 'mysql-test/suite/engines/funcs/r/ps_string_not_null.result'
Binary files a/mysql-test/suite/engines/funcs/r/ps_string_not_null.result	2010-03-18 06:42:07 +0000 and b/mysql-test/suite/engines/funcs/r/ps_string_not_null.result	2011-02-07 05:40:35 +0000 differ

=== modified file 'mysql-test/suite/engines/funcs/t/ps_string_not_null.test'
--- a/mysql-test/suite/engines/funcs/t/ps_string_not_null.test	2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/funcs/t/ps_string_not_null.test	2011-02-07 05:40:35 +0000
@@ -1,5 +1,5 @@
 --disable_warnings
-DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t1;
 --enable_warnings
 CREATE TABLE t1(c1 CHAR(100) NOT NULL);
 PREPARE stmt1 FROM 'INSERT INTO t1 (c1) VALUES(?)';

=== added file 'mysql-test/suite/innodb/r/innodb-autoinc-56228.result'
--- a/mysql-test/suite/innodb/r/innodb-autoinc-56228.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb-autoinc-56228.result	2010-11-30 11:03:30 +0000
@@ -0,0 +1,30 @@
+DROP TABLE IF EXISTS t1_56228;
+Warnings:
+Note	1051	Unknown table 'test.t1_56228'
+DROP TABLE IF EXISTS t2_56228;
+Warnings:
+Note	1051	Unknown table 'test.t2_56228'
+DROP FUNCTION IF EXISTS bug56228;
+Warnings:
+Note	1305	FUNCTION test.bug56228 does not exist
+CREATE TEMPORARY TABLE t1_56228(
+c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TEMPORARY TABLE t2_56228(
+c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+CREATE FUNCTION bug56228() RETURNS INT DETERMINISTIC
+BEGIN
+INSERT INTO t1_56228 VALUES(NULL);
+INSERT INTO t2_56228 VALUES(NULL);
+INSERT INTO t1_56228 VALUES(NULL);
+INSERT INTO t2_56228 VALUES(NULL);
+DROP TEMPORARY TABLE t1_56228;
+RETURN 42;
+END //
+SELECT bug56228();
+bug56228()
+42
+DROP FUNCTION bug56228;
+DROP TEMPORARY TABLE t2_56228;
+DROP TEMPORARY TABLE IF EXISTS t1_56228;
+Warnings:
+Note	1051	Unknown table 'test.t1_56228'

=== modified file 'mysql-test/suite/innodb/r/innodb_gis.result'
--- a/mysql-test/suite/innodb/r/innodb_gis.result	2010-11-29 13:30:18 +0000
+++ b/mysql-test/suite/innodb/r/innodb_gis.result	2011-02-02 14:26:54 +0000
@@ -585,5 +585,17 @@ COUNT(*)
 2
 DROP TABLE t1, t2;
 End of 5.0 tests
+#
+# Test for bug #58650 "Failing assertion: primary_key_no == -1 ||
+#                      primary_key_no == 0".
+#
+drop table if exists t1;
+# The minimal test case.
+create table t1 (a int not null, b linestring not null, unique key b (b(12)), unique key a (a));
+drop table t1;
+# The original test case.
+create table t1 (a int not null, b linestring not null, unique key b (b(12)));
+create unique index a on t1(a);
+drop table t1;
 create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
 ERROR HY000: The used table type doesn't support SPATIAL indexes

=== added file 'mysql-test/suite/innodb/t/innodb-autoinc-56228-master.opt'
--- a/mysql-test/suite/innodb/t/innodb-autoinc-56228-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-56228-master.opt	2010-11-30 10:44:06 +0000
@@ -0,0 +1 @@
+--innodb_autoinc_lock_mode=0

=== added file 'mysql-test/suite/innodb/t/innodb-autoinc-56228.test'
--- a/mysql-test/suite/innodb/t/innodb-autoinc-56228.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-56228.test	2010-11-30 10:44:06 +0000
@@ -0,0 +1,33 @@
+-- source include/have_innodb.inc
+
+##
+# Bug #56228: dropping tables from within an active statement crashes server
+#
+DROP TABLE IF EXISTS t1_56228;
+DROP TABLE IF EXISTS t2_56228;
+DROP FUNCTION IF EXISTS bug56228;
+
+CREATE TEMPORARY TABLE t1_56228(
+	c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TEMPORARY TABLE t2_56228(
+	c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+
+DELIMITER //;
+
+CREATE FUNCTION bug56228() RETURNS INT DETERMINISTIC
+BEGIN
+ INSERT INTO t1_56228 VALUES(NULL);
+ INSERT INTO t2_56228 VALUES(NULL);
+ INSERT INTO t1_56228 VALUES(NULL);
+ INSERT INTO t2_56228 VALUES(NULL);
+ DROP TEMPORARY TABLE t1_56228;
+ RETURN 42;
+END //
+
+DELIMITER ;//
+
+SELECT bug56228();
+
+DROP FUNCTION bug56228;
+DROP TEMPORARY TABLE t2_56228;
+DROP TEMPORARY TABLE IF EXISTS t1_56228;

=== removed file 'mysql-test/suite/perfschema/r/debug_env.result'
--- a/mysql-test/suite/perfschema/r/debug_env.result	2011-01-26 14:41:43 +0000
+++ b/mysql-test/suite/perfschema/r/debug_env.result	1970-01-01 00:00:00 +0000
@@ -1,152 +0,0 @@
-"============================================================================"
-"This is not a test, it's a debug utility to troubleshoot test suite problems"
-"This script is flagged as experimental, as failures are expected"
-"============================================================================"
-show engines;
-Engine	Support	Comment	Transactions	XA	Savepoints
-FEDERATED	NO	Federated MySQL storage engine	NULL	NULL	NULL
-MRG_MYISAM	YES	Collection of identical MyISAM tables	NO	NO	NO
-MyISAM	DEFAULT	MyISAM storage engine	NO	NO	NO
-BLACKHOLE	YES	/dev/null storage engine (anything you write to it disappears)	NO	NO	NO
-CSV	YES	CSV storage engine	NO	NO	NO
-MEMORY	YES	Hash based, stored in memory, useful for temporary tables	NO	NO	NO
-ARCHIVE	YES	Archive storage engine	NO	NO	NO
-InnoDB	YES	Supports transactions, row-level locking, and foreign keys	YES	YES	YES
-PERFORMANCE_SCHEMA	YES	Performance Schema	NO	NO	NO
-show status like "performance_schema%";
-Variable_name	Value
-Performance_schema_cond_classes_lost	0
-Performance_schema_cond_instances_lost	0
-Performance_schema_file_classes_lost	0
-Performance_schema_file_handles_lost	0
-Performance_schema_file_instances_lost	0
-Performance_schema_locker_lost	0
-Performance_schema_mutex_classes_lost	0
-Performance_schema_mutex_instances_lost	0
-Performance_schema_rwlock_classes_lost	0
-Performance_schema_rwlock_instances_lost	0
-Performance_schema_table_handles_lost	0
-Performance_schema_table_instances_lost	0
-Performance_schema_thread_classes_lost	0
-Performance_schema_thread_instances_lost	0
-show variables like "performance_schema%";
-Variable_name	Value
-performance_schema	ON
-performance_schema_events_waits_history_long_size	10000
-performance_schema_events_waits_history_size	10
-performance_schema_max_cond_classes	80
-performance_schema_max_cond_instances	1000
-performance_schema_max_file_classes	50
-performance_schema_max_file_handles	32768
-performance_schema_max_file_instances	10000
-performance_schema_max_mutex_classes	200
-performance_schema_max_mutex_instances	10000
-performance_schema_max_rwlock_classes	30
-performance_schema_max_rwlock_instances	10000
-performance_schema_max_table_handles	1000
-performance_schema_max_table_instances	500
-performance_schema_max_thread_classes	50
-performance_schema_max_thread_instances	1000
-performance_schema_setup_actors_size	100
-performance_schema_setup_objects_size	100
-show engine performance_schema status;
-Type	Name	Status
-performance_schema	events_waits_current.row_size	136
-performance_schema	events_waits_current.row_count	3000
-performance_schema	events_waits_history.row_size	136
-performance_schema	events_waits_history.row_count	10000
-performance_schema	events_waits_history.memory	1360000
-performance_schema	events_waits_history_long.row_size	136
-performance_schema	events_waits_history_long.row_count	10000
-performance_schema	events_waits_history_long.memory	1360000
-performance_schema	(pfs_mutex_class).row_size	192
-performance_schema	(pfs_mutex_class).row_count	200
-performance_schema	(pfs_mutex_class).memory	38400
-performance_schema	(pfs_rwlock_class).row_size	224
-performance_schema	(pfs_rwlock_class).row_count	30
-performance_schema	(pfs_rwlock_class).memory	6720
-performance_schema	(pfs_cond_class).row_size	176
-performance_schema	(pfs_cond_class).row_count	80
-performance_schema	(pfs_cond_class).memory	14080
-performance_schema	(pfs_thread_class).row_size	144
-performance_schema	(pfs_thread_class).row_count	50
-performance_schema	(pfs_thread_class).memory	7200
-performance_schema	(pfs_file_class).row_size	200
-performance_schema	(pfs_file_class).row_count	50
-performance_schema	(pfs_file_class).memory	10000
-performance_schema	mutex_instances.row_size	104
-performance_schema	mutex_instances.row_count	10000
-performance_schema	mutex_instances.memory	1040000
-performance_schema	rwlock_instances.row_size	152
-performance_schema	rwlock_instances.row_count	10000
-performance_schema	rwlock_instances.memory	1520000
-performance_schema	cond_instances.row_size	72
-performance_schema	cond_instances.row_count	1000
-performance_schema	cond_instances.memory	72000
-performance_schema	threads.row_size	888
-performance_schema	threads.row_count	1000
-performance_schema	threads.memory	888000
-performance_schema	file_instances.row_size	608
-performance_schema	file_instances.row_count	10000
-performance_schema	file_instances.memory	6080000
-performance_schema	(pfs_file_handle).row_size	8
-performance_schema	(pfs_file_handle).row_count	32768
-performance_schema	(pfs_file_handle).memory	262144
-performance_schema	events_waits_summary_by_thread_by_event_name.row_size	32
-performance_schema	events_waits_summary_by_thread_by_event_name.row_count	362000
-performance_schema	events_waits_summary_by_thread_by_event_name.memory	11584000
-performance_schema	(pfs_table_share).row_size	21664
-performance_schema	(pfs_table_share).row_count	500
-performance_schema	(pfs_table_share).memory	10832000
-performance_schema	(pfs_table).row_size	8704
-performance_schema	(pfs_table).row_count	1000
-performance_schema	(pfs_table).memory	8704000
-performance_schema	setup_actors.row_size	240
-performance_schema	setup_actors.row_count	100
-performance_schema	setup_actors.memory	24000
-performance_schema	setup_objects.row_size	432
-performance_schema	setup_objects.row_count	100
-performance_schema	setup_objects.memory	43200
-performance_schema	events_waits_summary_global_by_event_name.row_size	32
-performance_schema	events_waits_summary_global_by_event_name.row_count	362
-performance_schema	events_waits_summary_global_by_event_name.memory	11584
-performance_schema	performance_schema.memory	43857328
-use performance_schema;
-show tables;
-Tables_in_performance_schema
-cond_instances
-events_waits_current
-events_waits_history
-events_waits_history_long
-events_waits_summary_by_instance
-events_waits_summary_by_thread_by_event_name
-events_waits_summary_global_by_event_name
-file_instances
-file_summary_by_event_name
-file_summary_by_instance
-mutex_instances
-objects_summary_global_by_type
-performance_timers
-rwlock_instances
-setup_actors
-setup_consumers
-setup_instruments
-setup_objects
-setup_timers
-table_io_waits_summary_by_index_usage
-table_io_waits_summary_by_table
-table_lock_waits_summary_by_table
-threads
-select * from performance_timers;
-TIMER_NAME	TIMER_FREQUENCY	TIMER_RESOLUTION	TIMER_OVERHEAD
-select * from setup_timers;
-NAME	TIMER_NAME
-wait	CYCLE
-select * from threads;
-THREAD_ID	NAME	TYPE	PROCESSLIST_ID	PROCESSLIST_USER	PROCESSLIST_HOST	PROCESSLIST_DB	PROCESSLIST_COMMAND	PROCESSLIST_TIME	PROCESSLIST_STATE	PROCESSLIST_INFO	PARENT_THREAD_ID	ROLE	INSTRUMENTED
-select count(*) from setup_instruments;
-count(*)
-220
-select count(*) from events_waits_summary_by_thread_by_event_name;
-count(*)
-3080

=== removed file 'mysql-test/suite/perfschema/t/debug_env.test'
--- a/mysql-test/suite/perfschema/t/debug_env.test	2011-01-28 18:55:45 +0000
+++ b/mysql-test/suite/perfschema/t/debug_env.test	1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
-
-# Tests for PERFORMANCE_SCHEMA
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
-
--- echo "============================================================================"
--- echo "This is not a test, it's a debug utility to troubleshoot test suite problems"
--- echo "This script is flagged as experimental, as failures are expected"
--- echo "============================================================================"
-
-show engines;
-show status like "performance_schema%";
-show variables like "performance_schema%";
-show engine performance_schema status;
-
-use performance_schema;
-show tables;
-
-select * from performance_timers;
-select * from setup_timers;
-
-# Investigating bug#59740
-select * from threads;
-select count(*) from threads;
-select count(*) from setup_instruments;
-
-show status like "%handler%";
-select count(*) from events_waits_summary_by_thread_by_event_name;
-show status like "%handler%";
-

=== modified file 'mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result'
--- a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result	2011-02-03 16:09:33 +0000
@@ -121,11 +121,11 @@ Master D	12	D
 * Remove wrong event from C and restore B->C->D *
 include/stop_slave.inc
 DELETE FROM t1 WHERE a = 6;
-START SLAVE;
+include/start_slave.inc
 RESET MASTER;
 RESET SLAVE;
 include/rpl_change_topology.inc [new topology=1->2->3->4->1]
-START SLAVE;
+include/start_slave.inc
 include/rpl_sync.inc
 
 * Check data inserted before restoring schema A->B->C->D->A *

=== modified file 'mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result'
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result	2011-02-04 19:07:48 +0000
@@ -2,13 +2,21 @@ include/rpl_init.inc [topology=1->2,1->3
 include/rpl_connect.inc [creating master]
 include/rpl_connect.inc [creating slave_1]
 include/rpl_connect.inc [creating slave_2]
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 0.1;
+include/start_slave.inc
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 1;
+include/start_slave.inc
 Slave has received heartbeat event
-slave_2 has received heartbeat event
-slave_1 has received more heartbeats than slave_2 (1 means 'yes'): 0
+include/assert.inc [slave_1 should have received more heartbeats than slave_2]
 
 include/rpl_stop_slaves.inc
 include/rpl_change_topology.inc [new topology=1->3->2]
 include/rpl_start_slaves.inc
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=0.1;
+include/start_slave.inc
 slave_1 has received heartbeat event
 [on master]
 CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT);
@@ -26,7 +34,7 @@ Tables_in_test
 [on master]
 creating updates on master and send to slave_2 during 5 second
 [on slave_1]
-slave_1 has received heartbeats (1 means 'yes'): 0
+include/assert.inc [slave_1 should have received heartbeats]
 
 *** Clean up ***
 DROP TABLE t1;

=== modified file 'mysql-test/suite/rpl/r/rpl_loaddatalocal.result'
--- a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result	2011-01-12 09:31:32 +0000
@@ -74,6 +74,21 @@ LOAD/*!99999 special comments that do no
 SET sql_mode='PIPES_AS_CONCAT,ANSI_QUOTES,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER';
 LOAD DATA LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO TABLE t1;
 [slave]
+
+Bug #59267:
+"LOAD DATA LOCAL INFILE not executed on slave with SBR"
+
+[master]
+SELECT * INTO OUTFILE 'MYSQLD_DATADIR/bug59267.sql' FROM t1;
+TRUNCATE TABLE t1;
+LOAD DATA LOCAL INFILE 'MYSQLD_DATADIR/bug59267.sql' INTO TABLE t1;
+SELECT 'Master', COUNT(*) FROM t1;
+Master	COUNT(*)
+Master	44
+[slave]
+SELECT 'Slave', COUNT(*) FROM t1;
+Slave	COUNT(*)
+Slave	44
 [master]
 DROP TABLE t1;
 SET SESSION sql_mode=@old_mode;

=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def	2011-01-31 13:44:38 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def	2011-02-09 09:28:32 +0000
@@ -12,7 +12,6 @@
 
 rpl_row_create_table      : Bug#51574 2010-02-27 andrei failed different way than earlier with bug#45576
 rpl_spec_variables        : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
-rpl_row_event_max_size    : Bug#55675 2010-10-25 andrei mysql_binlog_send attempts to read events partly
 rpl_delayed_slave         : Bug#57514 2010-11-09 andrei rpl_delayed_slave fails sporadically in pb
 rpl_row_until : BUG#59543 Jan 26 2011 alfranio Replication test from eits suite rpl_row_until times out
 rpl_stm_until : BUG#59543 Jan 26 2011 alfranio Replication test from eits suite rpl_row_until times out

=== modified file 'mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test'
--- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test	2011-02-04 15:00:14 +0000
@@ -178,7 +178,7 @@ SELECT 'Master D',a,b FROM t1 WHERE c = 
 source include/stop_slave.inc;
 --connection server_3
 DELETE FROM t1 WHERE a = 6;
-START SLAVE;
+--source include/start_slave.inc
 --connection server_2
 --sync_slave_with_master server_3
 RESET MASTER;
@@ -192,7 +192,7 @@ RESET SLAVE;
 --source include/rpl_change_topology.inc
 #--replace_result $SERVER_MYPORT_3 SERVER_MYPORT_3 $file_d LOG_FILE $pos_d LOG_POS 
 #--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SERVER_MYPORT_3,master_user='root',master_log_file='$file_d',master_log_pos=$pos_d
-START SLAVE;
+--source include/start_slave.inc
 --connection server_3
 --sync_slave_with_master server_4
 --source include/rpl_sync.inc

=== modified file 'mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test'
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test	2011-02-04 19:07:48 +0000
@@ -20,7 +20,19 @@
 --source include/rpl_connect.inc
 
 #
-# Testing heartbeat
+# Set different heartbeat periods for slaves
+#
+--connection slave_1
+--source include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 0.1;
+--source include/start_slave.inc
+--connection slave_2
+--source include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 1;
+--source include/start_slave.inc
+
+#
+# Testing heartbeat for one master and two slaves
 #
 
 # Check that heartbeat events sent to both slaves with correct periods
@@ -35,15 +47,11 @@ let $status_var= slave_received_heartbea
 let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
 let $status_var_comparsion= >;
 --source include/wait_for_status_var.inc
-let $slave_2_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
---echo slave_2 has received heartbeat event
---connection slave_1
-let $slave_1_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
-let $result= query_get_value(SELECT ($slave_1_rcvd_heartbeats DIV $slave_2_rcvd_heartbeats) > 1 AS Result, Result, 1);
---echo slave_1 has received more heartbeats than slave_2 (1 means 'yes'): $result
+--let $assert_cond= [slave_1:SHOW STATUS LIKE "slave_received_heartbeats", Value, 1] > [slave_2:SHOW STATUS LIKE "slave_received_heartbeats", Value, 1]
+--let $assert_text= slave_1 should have received more heartbeats than slave_2
+--source include/assert.inc
 --echo
 
-
 # Create topology master->slave_2->slave_1 and check that slave_1
 # receives heartbeat while slave_2 gets data.
 
@@ -54,6 +62,10 @@ let $result= query_get_value(SELECT ($sl
 --let $rpl_topology= 1->3->2
 --source include/rpl_change_topology.inc
 --source include/rpl_start_slaves.inc
+--connection slave_1
+--source include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=0.1;
+--source include/start_slave.inc
 
 # Check heartbeat for new replication channel slave_2->slave
 let $status_var= slave_received_heartbeats;
@@ -93,8 +105,6 @@ while ($i) {
     let $time_before = `SELECT NOW()`;
   }
   if (`SELECT ((1-$k)*TIMESTAMPDIFF(SECOND,'$time_before',NOW())) > 5`) {
-    --connection slave_1
-    let $slave_1_rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);    
     let $i= 0;
   }
   --connection master
@@ -104,8 +114,9 @@ while ($i) {
 --enable_query_log
 --connection slave_1
 --echo [on slave_1]
-let $result= query_get_value(SELECT ($slave_1_rcvd_heartbeats_after - $slave_1_rcvd_heartbeats_before) > 0 AS Result, Result, 1);
---echo slave_1 has received heartbeats (1 means 'yes'): $result
+--let $assert_cond= [SHOW STATUS LIKE "slave_received_heartbeats", Value, 1] > $slave_1_rcvd_heartbeats_before
+--let $assert_text= slave_1 should have received heartbeats
+--source include/assert.inc
 --echo
 
 #

=== modified file 'mysql-test/suite/rpl/t/rpl_loaddatalocal.test'
--- a/mysql-test/suite/rpl/t/rpl_loaddatalocal.test	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_loaddatalocal.test	2011-01-12 09:31:32 +0000
@@ -151,12 +151,34 @@ eval LOAD DATA LOCAL INFILE '$MYSQLD_DAT
 --echo [slave]
 sync_slave_with_master;
 
-# cleanup
+--echo
+--echo  Bug #59267:
+--echo "LOAD DATA LOCAL INFILE not executed on slave with SBR"
+--echo
 
---remove_file $MYSQLD_DATADIR/bug43746.sql
+--echo [master]
+connection master;
+
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval SELECT * INTO OUTFILE '$MYSQLD_DATADIR/bug59267.sql' FROM t1;
+TRUNCATE TABLE t1;
+
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval LOAD DATA LOCAL INFILE '$MYSQLD_DATADIR/bug59267.sql' INTO TABLE t1;
+
+SELECT 'Master', COUNT(*) FROM t1;
 
+--echo [slave]
+--sync_slave_with_master
+SELECT 'Slave', COUNT(*) FROM t1;
+
+# cleanup
 --echo [master]
 connection master;
+
+--remove_file $MYSQLD_DATADIR/bug43746.sql
+--remove_file $MYSQLD_DATADIR/bug59267.sql
+
 DROP TABLE t1;
 SET SESSION sql_mode=@old_mode;
 

=== added file 'mysql-test/suite/sys_vars/r/secure_file_priv2.result'
--- a/mysql-test/suite/sys_vars/r/secure_file_priv2.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/secure_file_priv2.result	2010-12-16 10:49:40 +0000
@@ -0,0 +1,6 @@
+CREATE TABLE t1 (c1 INT);
+LOAD DATA INFILE "t1.MYI" into table t1;
+ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
+LOAD DATA INFILE "/test" into table t1;
+ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
+DROP TABLE t1;

=== added file 'mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt'
--- a/mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt	2010-12-16 10:49:40 +0000
@@ -0,0 +1 @@
+--secure_file_priv=$SECURE_LOAD_PATH

=== added file 'mysql-test/suite/sys_vars/t/secure_file_priv2.test'
--- a/mysql-test/suite/sys_vars/t/secure_file_priv2.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/secure_file_priv2.test	2010-12-16 10:49:40 +0000
@@ -0,0 +1,23 @@
+#
+# Bug58747 breaks secure_file_priv+not secure yet+still accesses other folders
+#
+CREATE TABLE t1 (c1 INT);
+#
+# Before the patch this statement failed with
+# Linux:
+#  -> errno 13: 'Can't get stat of '
+# Windows:
+#  -> Warning 1366 Incorrect integer value: '■■☺' for
+#  ->              column 'c1' at row 1
+# Now it should consistently fail with ER_OPTION_PREVENTS_STATEMENT
+# on all platforms.
+--error ER_OPTION_PREVENTS_STATEMENT
+LOAD DATA INFILE "t1.MYI" into table t1;
+
+#
+# The following test makes the assuption that /test isn't a valid path in any
+# operating system running the test suite.
+--error ER_OPTION_PREVENTS_STATEMENT
+LOAD DATA INFILE "/test" into table t1;
+
+DROP TABLE t1;

=== modified file 'mysql-test/t/delete.test'
--- a/mysql-test/t/delete.test	2010-10-04 08:25:04 +0000
+++ b/mysql-test/t/delete.test	2011-02-02 10:32:21 +0000
@@ -580,3 +580,33 @@ DELETE v2 FROM v2;
 
 DROP VIEW v2, v1;
 DROP TABLE t1, t2;
+
+
+--echo #
+--echo # Bug#58709 assert in mysql_execute_command
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t2, t1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+CREATE TABLE t1 (i INT PRIMARY KEY) engine=InnoDB;
+CREATE TABLE t2 (i INT, FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION) engine=InnoDB;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+
+DELETE IGNORE FROM t1 WHERE i = 1;
+
+CREATE PROCEDURE p1() DELETE IGNORE FROM t1 WHERE i = 1;
+# This triggered the assert
+CALL p1();
+
+PREPARE stm FROM 'CALL p1()';
+# This also triggered the assert
+EXECUTE stm;
+DEALLOCATE PREPARE stm;
+
+DROP TABLE t2, t1;
+DROP PROCEDURE p1;

=== modified file 'mysql-test/t/filesort_debug.test'
--- a/mysql-test/t/filesort_debug.test	2011-01-10 13:23:11 +0000
+++ b/mysql-test/t/filesort_debug.test	2011-02-02 13:41:10 +0000
@@ -1,5 +1,7 @@
 --source include/have_debug.inc
 
+SET @old_debug= @@session.debug;
+
 --echo #
 --echo # Bug#59331 filesort with priority queue: handling of out-of-memory
 --echo #
@@ -13,5 +15,26 @@ set debug= '+d,bounded_queue_init_fail';
 --replace_regex /Needed [0-9]* bytes/Needed NN bytes/
 --error 5
 SELECT * FROM t1 ORDER BY f1 ASC, f0 LIMIT 1;
+SET session debug= @old_debug;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug#36022 please log more information about "Sort aborted" queries
+--echo #
+
+CREATE TABLE t1(f0 int auto_increment primary key, f1 int);
+INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
+
+SET session debug= '+d,make_char_array_fail';
+CALL mtr.add_suppression("Out of sort memory");
+--error ER_OUT_OF_SORTMEMORY
+SELECT * FROM t1 ORDER BY f1 ASC, f0;
+SET session debug= @old_debug;
+
+CREATE FUNCTION f1() RETURNS INT RETURN 1;
+--error ER_SP_WRONG_NO_OF_ARGS
+DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
 
 DROP TABLE t1;
+DROP FUNCTION f1;

=== modified file 'mysql-test/t/func_time.test'
--- a/mysql-test/t/func_time.test	2010-12-17 11:28:59 +0000
+++ b/mysql-test/t/func_time.test	2011-02-02 18:31:39 +0000
@@ -802,6 +802,26 @@ select LAST_DAY('2007-12-06 08:59:19.05'
 select date_add('1000-01-01 00:00:00', interval '1.03:02:01.05' day_microsecond);
 select date_add('1000-01-01 00:00:00', interval '1.02' day_microsecond);
 
+
+--echo #
+--echo # Bug #52315 part 2 : utc_date() crashes when system time > year 2037
+--echo #
+
+--disable_result_log
+SET TIMESTAMP=-147490000; SELECT UTC_TIMESTAMP();
+--error ER_WRONG_VALUE_FOR_VAR
+SET TIMESTAMP=2147483648; SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=2147483646; SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=2147483647; SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=0; SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=-1; SELECT UTC_TIMESTAMP();
+SET TIMESTAMP=1; SELECT UTC_TIMESTAMP();
+--enable_result_log
+
+#reset back the timestamp value
+SET TIMESTAMP=0;
+
+
 --echo End of 5.0 tests
 
 #

=== modified file 'mysql-test/t/grant.test'
--- a/mysql-test/t/grant.test	2010-10-19 09:26:45 +0000
+++ b/mysql-test/t/grant.test	2010-12-15 16:15:40 +0000
@@ -1295,6 +1295,107 @@ SELECT CURRENT_USER();
 SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
 SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
 
+#
+# Bug#57952: privilege change is not taken into account by EXECUTE.
+#
+
+--echo
+--echo # Bug#57952
+--echo
+
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest1;
+DROP DATABASE IF EXISTS mysqltest2;
+--enable_warnings
+
+CREATE DATABASE mysqltest1;
+CREATE DATABASE mysqltest2;
+
+use mysqltest1;
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (1, 1);
+
+CREATE TABLE t2(a INT);
+INSERT INTO t2 VALUES (2);
+
+CREATE TABLE mysqltest2.t3(a INT);
+INSERT INTO mysqltest2.t3 VALUES (4);
+
+CREATE USER testuser@localhost;
+GRANT CREATE ROUTINE, EXECUTE ON mysqltest1.* TO testuser@localhost;
+GRANT SELECT(b) ON t1 TO testuser@localhost;
+GRANT SELECT    ON t2 TO testuser@localhost;
+GRANT SELECT    ON mysqltest2.* TO testuser@localhost;
+
+--echo
+--echo # Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
+--connect (bug57952_con1,localhost,testuser,,mysqltest1)
+PREPARE s1 FROM 'SELECT b FROM t1';
+PREPARE s2 FROM 'SELECT a FROM t2';
+PREPARE s3 FROM 'SHOW TABLES FROM mysqltest2';
+
+CREATE PROCEDURE p1() SELECT b FROM t1;
+CREATE PROCEDURE p2() SELECT a FROM t2;
+CREATE PROCEDURE p3() SHOW TABLES FROM mysqltest2;
+
+CALL p1;
+CALL p2;
+CALL p3;
+
+--echo
+--echo # Connection: default
+--connection default
+REVOKE SELECT ON t1 FROM testuser@localhost;
+GRANT SELECT(a) ON t1 TO testuser@localhost;
+REVOKE SELECT ON t2 FROM testuser@localhost;
+REVOKE SELECT ON mysqltest2.* FROM testuser@localhost;
+
+--echo
+--echo # Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
+--connection bug57952_con1
+--echo #   - Check column-level privileges...
+--error ER_COLUMNACCESS_DENIED_ERROR
+EXECUTE s1;
+
+--error ER_COLUMNACCESS_DENIED_ERROR
+SELECT b FROM t1;
+
+--error ER_COLUMNACCESS_DENIED_ERROR
+EXECUTE s1;
+
+--error ER_COLUMNACCESS_DENIED_ERROR
+CALL p1;
+
+--echo #   - Check table-level privileges...
+--error ER_TABLEACCESS_DENIED_ERROR
+SELECT a FROM t2;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+EXECUTE s2;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+CALL p2;
+
+--echo #   - Check database-level privileges...
+--error ER_DBACCESS_DENIED_ERROR
+SHOW TABLES FROM mysqltest2;
+
+--error ER_DBACCESS_DENIED_ERROR
+EXECUTE s3;
+
+--error ER_DBACCESS_DENIED_ERROR
+CALL p3;
+
+--echo
+--echo # Connection: default
+--connection default
+--disconnect bug57952_con1
+DROP DATABASE mysqltest1;
+DROP DATABASE mysqltest2;
+DROP USER testuser@localhost;
+use test;
+--echo
+
 --echo End of 5.0 tests
 
 #

=== modified file 'mysql-test/t/join_outer.test'
--- a/mysql-test/t/join_outer.test	2011-01-13 09:08:47 +0000
+++ b/mysql-test/t/join_outer.test	2011-02-02 08:15:16 +0000
@@ -1106,6 +1106,138 @@ FROM BB table1 RIGHT JOIN BB table2
 
 DROP TABLE BB;
 
+
+--echo #
+--echo # Bug#58490: Incorrect result in multi level OUTER JOIN
+--echo # in combination with IS NULL
+--echo #
+
+CREATE TABLE t1 (i INT NOT NULL);
+INSERT INTO t1 VALUES (0),    (2),(3),(4);
+CREATE TABLE t2 (i INT NOT NULL);
+INSERT INTO t2 VALUES (0),(1),    (3),(4);
+CREATE TABLE t3 (i INT NOT NULL);
+INSERT INTO t3 VALUES (0),(1),(2),    (4);
+CREATE TABLE t4 (i INT NOT NULL);
+INSERT INTO t4 VALUES (0),(1),(2),(3)   ;
+
+--sorted_result
+SELECT * FROM
+ t1 LEFT JOIN
+ ( t2 LEFT JOIN
+   ( t3 LEFT JOIN
+     t4
+     ON t4.i = t3.i
+   )
+   ON t3.i = t2.i
+ )
+ ON t2.i = t1.i
+ ;
+
+--sorted_result
+SELECT * FROM
+ t1 LEFT JOIN
+ ( t2 LEFT JOIN
+   ( t3 LEFT JOIN
+     t4
+     ON t4.i = t3.i
+   )
+   ON t3.i = t2.i
+ )
+ ON t2.i = t1.i
+ WHERE t4.i IS NULL;
+
+
+# Most simplified testcase to reproduce the bug.
+# (Has to be at least a two level nested outer join)
+--sorted_result
+SELECT * FROM
+ t1 LEFT JOIN
+ ( ( t2 LEFT JOIN
+     t3
+     ON t3.i = t2.i
+   )
+ )
+ ON t2.i = t1.i
+ WHERE t3.i IS NULL;
+
+
+# Extended testing:
+# We then add some equi-join inside the query above:
+# (There Used to be some problems here with first
+#  proposed patch for this bug)
+--sorted_result
+SELECT * FROM
+ t1 LEFT JOIN
+ ( ( t2 LEFT JOIN
+     t3
+     ON t3.i = t2.i
+   )
+   JOIN t4
+   ON t4.i=t2.i
+ )
+ ON t2.i = t1.i
+ WHERE t3.i IS NULL;
+
+--sorted_result
+SELECT * FROM
+ t1 LEFT JOIN
+ ( ( t2 LEFT JOIN
+     t3
+     ON t3.i = t2.i
+   )
+   JOIN (t4 AS t4a JOIN t4 AS t4b ON t4a.i=t4b.i)
+   ON t4a.i=t2.i
+ )
+ ON t2.i = t1.i
+ WHERE t3.i IS NULL;
+
+--sorted_result
+SELECT * FROM
+ t1 LEFT JOIN
+ ( ( t2 LEFT JOIN
+     t3
+     ON t3.i = t2.i
+   )
+   JOIN (t4 AS t4a, t4 AS t4b)
+   ON t4a.i=t2.i
+ )
+ ON t2.i = t1.i
+ WHERE t3.i IS NULL;
+
+
+DROP TABLE t1,t2,t3,t4;
+
+## Bug#49322 & bug#58490 are duplicates. However, we include testcases
+## for both.
+--echo #
+--echo # Bug#49322(Duplicate): Server is adding extra NULL row
+--echo # on processing a WHERE clause
+--echo #
+
+CREATE TABLE h (pk INT NOT NULL, col_int_key INT);
+INSERT INTO h VALUES (1,NULL),(4,2),(5,2),(3,4),(2,8);
+
+CREATE TABLE m (pk INT NOT NULL, col_int_key INT);
+INSERT INTO m VALUES (1,2),(2,7),(3,5),(4,7),(5,5),(6,NULL),(7,NULL),(8,9);
+CREATE TABLE k (pk INT NOT NULL, col_int_key INT);
+INSERT INTO k VALUES (1,9),(2,2),(3,5),(4,2),(5,7),(6,0),(7,5);
+
+# Baseline query wo/ 'WHERE ... IS NULL' - was correct
+--sorted_result
+SELECT TABLE1.pk FROM k TABLE1
+RIGHT JOIN h TABLE2 ON TABLE1.col_int_key=TABLE2.col_int_key
+RIGHT JOIN m TABLE4 ON TABLE2.col_int_key=TABLE4.col_int_key;
+
+# Adding 'WHERE ... IS NULL' -> incorrect result
+--sorted_result
+SELECT TABLE1.pk FROM k TABLE1
+RIGHT JOIN h TABLE2 ON TABLE1.col_int_key=TABLE2.col_int_key
+RIGHT JOIN m TABLE4 ON TABLE2.col_int_key=TABLE4.col_int_key
+WHERE TABLE1.pk IS NULL;
+
+DROP TABLE h,m,k;
+
 --echo End of 5.1 tests
 
 --echo #

=== modified file 'mysql-test/t/mysql.test'
--- a/mysql-test/t/mysql.test	2010-12-01 07:01:44 +0000
+++ b/mysql-test/t/mysql.test	2011-02-05 05:06:29 +0000
@@ -425,6 +425,12 @@ drop table t1;
 --echo
 --exec $MYSQL --skip-column-names --vertical test -e "select 1 as a"
 
+#
+# Bug#57450: mysql client enter in an infinite loop if the standard input is a directory
+#
+--error 1
+--exec $MYSQL < .
+
 --echo
 
 --echo #

=== modified file 'mysql-test/t/not_embedded_server.test'
--- a/mysql-test/t/not_embedded_server.test	2011-01-07 12:08:05 +0000
+++ b/mysql-test/t/not_embedded_server.test	2011-02-04 04:59:55 +0000
@@ -14,6 +14,16 @@ call mtr.add_suppression("Can't open and
 
 SHOW VARIABLES like 'slave_skip_errors';
 
+--echo #
+--echo # Bug#58026: massive recursion and crash in regular expression handling
+--echo #
+
+--disable_result_log
+--error ER_STACK_OVERRUN_NEED_MORE
+SELECT '1' RLIKE RPAD('1', 10000, '(');
+--enable_result_log
+
+
 # End of 5.1 tests
 
 --echo #

=== modified file 'mysql-test/t/optimizer_switch.test'
--- a/mysql-test/t/optimizer_switch.test	2010-10-15 10:32:50 +0000
+++ b/mysql-test/t/optimizer_switch.test	2011-01-24 14:17:03 +0000
@@ -280,8 +280,6 @@ eval $query;
 
 set @@optimizer_switch='materialization=off,semijoin=on';
 
---echo # The query result with semijoin is WRONG
-
 eval EXPLAIN $query;
 eval $query;
 
@@ -303,8 +301,6 @@ eval $query;
 
 set @@optimizer_switch='materialization=off,semijoin=on';
 
---echo # The query result with semijoin is WRONG
-
 eval EXPLAIN $query;
 eval $query;
 

=== modified file 'mysql-test/t/plugin_auth.test'
--- a/mysql-test/t/plugin_auth.test	2011-01-31 15:55:58 +0000
+++ b/mysql-test/t/plugin_auth.test	2011-02-08 17:48:20 +0000
@@ -1,6 +1,7 @@
 --source include/have_plugin_auth.inc
 --source include/not_embedded.inc
 --source include/mysql_upgrade_preparation.inc
+CALL mtr.add_suppression("Plugin test_plugin_server reported: 'Wrong password supplied for plug_dest'");
 
 query_vertical SELECT PLUGIN_STATUS, PLUGIN_TYPE, PLUGIN_DESCRIPTION
   FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='test_plugin_server';

=== modified file 'mysql-test/t/plugin_auth_qa_1.test'
--- a/mysql-test/t/plugin_auth_qa_1.test	2010-10-25 10:24:26 +0000
+++ b/mysql-test/t/plugin_auth_qa_1.test	2011-02-08 17:48:20 +0000
@@ -2,6 +2,7 @@
 
 --source include/have_plugin_auth.inc
 --source include/not_embedded.inc
+CALL mtr.add_suppression("Plugin test_plugin_server reported: 'Wrong password supplied for plug_dest'");
 
 CREATE DATABASE test_user_db;
 

=== added file 'mysql-test/t/ssl_and_innodb.test'
--- a/mysql-test/t/ssl_and_innodb.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/ssl_and_innodb.test	2011-02-07 23:54:23 +0000
@@ -0,0 +1,11 @@
+-- source include/have_innodb.inc
+-- source include/have_ssl_crypto_functs.inc
+
+CREATE TABLE t1(a int) engine=innodb;
+INSERT INTO t1 VALUES (1);
+
+SELECT DISTINCT
+convert((SELECT des_decrypt(2,1) AS a FROM t1 WHERE @a:=1), signed) as d
+FROM t1 ;
+
+DROP TABLE t1;

=== modified file 'mysql-test/t/type_year.test'
--- a/mysql-test/t/type_year.test	2010-03-22 13:28:51 +0000
+++ b/mysql-test/t/type_year.test	2011-01-12 10:27:31 +0000
@@ -150,5 +150,15 @@ SELECT ta.y AS ta_y, ta.s, tb.y AS tb_y,
 DROP TABLE t1;
 
 --echo #
+--echo # Bug #59211: Select Returns Different Value for min(year) Function
+--echo #
+
+CREATE TABLE t1(c1 YEAR(4));
+INSERT INTO t1 VALUES (1901),(2155),(0000);
+SELECT * FROM t1;
+SELECT COUNT(*) AS total_rows, MIN(c1) AS min_value, MAX(c1) FROM t1;
+DROP TABLE t1;
+
+--echo #
 
 --echo End of 5.1 tests

=== modified file 'mysql-test/t/user_var.test'
--- a/mysql-test/t/user_var.test	2010-11-22 09:13:46 +0000
+++ b/mysql-test/t/user_var.test	2010-12-08 14:36:52 +0000
@@ -351,6 +351,18 @@ DROP TABLE t1;
 
 select @v:=@v:=sum(1) from dual;
 
+#
+# Bug #57187: more user variable fun with multiple assignments and
+#             comparison in query
+#
+
+CREATE TABLE t1(a DECIMAL(31,21));
+INSERT INTO t1 VALUES (0);
+
+SELECT (@v:=a) <> (@v:=1) FROM t1;
+
+DROP TABLE t1;
+
 --echo End of 5.1 tests
 
 #

=== modified file 'mysql-test/t/variables.test'
--- a/mysql-test/t/variables.test	2010-11-29 16:27:58 +0000
+++ b/mysql-test/t/variables.test	2011-02-02 18:31:39 +0000
@@ -767,7 +767,7 @@ SET @@myisam_mmap_size= 500M;
 --echo # Bug #52315: utc_date() crashes when system time > year 2037
 --echo #
 
---error 0, ER_UNKNOWN_ERROR
+--error 0, ER_WRONG_VALUE_FOR_VAR
 SET TIMESTAMP=2*1024*1024*1024;
 --echo #Should not crash
 --disable_result_log

=== modified file 'mysql-test/valgrind.supp'
--- a/mysql-test/valgrind.supp	2011-01-18 11:09:49 +0000
+++ b/mysql-test/valgrind.supp	2011-02-08 17:34:42 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Library General Public
@@ -806,7 +806,6 @@
    fun:my_malloc
    fun:_lf_dynarray_lvalue
    fun:_lf_pinbox_get_pins
-   fun:lf_pinbox_get_pins
 }
 
 {
@@ -836,3 +835,126 @@
    fun:lf_hash_search
 }
 
+{
+   Bug 59874 Valgrind warning in InnoDB compression code
+   Memcheck:Cond
+   fun:*
+   fun:*
+   fun:deflate
+   fun:btr_store_big_rec_extern_fields_func
+   fun:row_ins_index_entry_low
+   fun:row_ins_index_entry
+   fun:row_ins_index_entry_step
+   fun:row_ins
+   fun:row_ins_step
+   fun:row_insert_for_mysql
+}
+
+{
+   In page0zip.c we have already checked that the memory is initialized before calling deflate()
+   Memcheck:Cond
+   fun:*
+   fun:*
+   fun:deflate
+   fun:page_zip_compress
+}
+
+{
+   In page0zip.c we have already checked that the memory is initialized before calling deflate()
+   Memcheck:Cond
+   fun:*
+   fun:*
+   fun:deflate
+   fun:page_zip_compress_deflate
+}
+
+{
+   In page0zip.c we have already checked that the memory is initialized before calling deflate()
+   Memcheck:Cond
+   obj:*/libz.so*
+   obj:*/libz.so*
+   fun:deflate
+   fun:page_zip_compress
+   fun:page_zip_reorganize
+   fun:page_cur_insert_rec_zip_reorg
+   fun:page_cur_insert_rec_zip
+   fun:page_cur_tuple_insert
+   fun:btr_cur_optimistic_insert
+   fun:btr_cur_pessimistic_insert
+   fun:row_ins_index_entry_low
+   fun:row_ins_index_entry
+   fun:row_ins_index_entry_step
+   fun:row_ins
+   fun:row_ins_step
+   fun:row_insert_for_mysql
+}
+
+{
+   In page0zip.c we have already checked that the memory is initialized before calling deflate()
+   Memcheck:Cond
+   obj:*/libz.so*
+   obj:*/libz.so*
+   fun:deflate
+   fun:page_zip_compress
+   fun:page_zip_reorganize
+   fun:page_cur_insert_rec_zip_reorg
+   fun:page_cur_insert_rec_zip
+   fun:page_cur_tuple_insert
+   fun:btr_cur_optimistic_insert
+   fun:row_ins_index_entry_low
+   fun:row_ins_index_entry
+   fun:row_ins_index_entry_step
+   fun:row_ins
+   fun:row_ins_step
+   fun:row_insert_for_mysql
+}
+
+{
+   In page0zip.c we have already checked that the memory is initialized before calling deflate()
+   Memcheck:Cond
+   obj:*/libz.so*
+   obj:*/libz.so*
+   fun:deflate
+   fun:page_zip_compress
+   fun:page_copy_rec_list_end
+   fun:page_move_rec_list_end
+   fun:btr_page_split_and_insert
+   fun:btr_root_raise_and_insert
+   fun:btr_cur_pessimistic_insert
+   fun:row_ins_index_entry_low
+   fun:row_ins_index_entry
+   fun:row_ins_index_entry_step
+   fun:row_ins
+   fun:row_ins_step
+   fun:row_insert_for_mysql
+}
+
+{
+   In page0zip.c we have already checked that the memory is initialized before calling deflate()
+   Memcheck:Cond
+   obj:*/libz.so*
+   obj:*/libz.so*
+   fun:deflate
+   fun:page_zip_compress
+   fun:page_cur_insert_rec_zip_reorg
+   fun:page_cur_insert_rec_zip
+   fun:page_cur_tuple_insert
+   fun:btr_cur_optimistic_insert
+   fun:btr_cur_pessimistic_insert
+   fun:row_ins_index_entry_low
+   fun:row_ins_index_entry
+   fun:row_ins_index_entry_step
+   fun:row_ins
+   fun:row_ins_step
+   fun:row_insert_for_mysql
+}
+
+{
+   Bug 59875 Valgrind warning in buf0buddy.c
+   Memcheck:Addr1
+   fun:mach_read_from_4
+   fun:buf_buddy_relocate
+   fun:buf_buddy_free_low
+   fun:buf_buddy_free
+   fun:buf_LRU_block_remove_hashed_page
+}

=== modified file 'mysys/my_fopen.c'
--- a/mysys/my_fopen.c	2011-01-07 19:30:52 +0000
+++ b/mysys/my_fopen.c	2011-02-08 15:47:33 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'mysys/my_getsystime.c'
--- a/mysys/my_getsystime.c	2011-01-12 20:36:39 +0000
+++ b/mysys/my_getsystime.c	2011-02-08 15:47:33 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB, 2008-2009 Sun Microsystems, Inc
+/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'plugin/auth/test_plugin.c'
--- a/plugin/auth/test_plugin.c	2011-01-31 15:32:57 +0000
+++ b/plugin/auth/test_plugin.c	2011-02-08 17:48:20 +0000
@@ -45,6 +45,20 @@
 /********************* SERVER SIDE ****************************************/
 
 /**
+ Handle assigned when loading the plugin. 
+ Used with the error reporting functions. 
+*/
+static MYSQL_PLUGIN plugin_info_ptr; 
+
+static int
+test_plugin_init (MYSQL_PLUGIN plugin_info)
+{
+  plugin_info_ptr= plugin_info;
+  return 0;
+}
+
+
+/**
   dialog test plugin mimicking the ordinary auth mechanism. Used to test the auth plugin API
 */
 static int auth_test_plugin(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
@@ -64,7 +78,12 @@ static int auth_test_plugin(MYSQL_PLUGIN
 
   /* fail if the password is wrong */
   if (strcmp((const char *) pkt, info->auth_string))
+  {
+    my_plugin_log_message(plugin_info_ptr, MY_ERROR_LEVEL, 
+                          "Wrong password supplied for %s", 
+                          info->auth_string);
     return CR_ERROR;
+  }
 
   /* copy auth string as a destination name to check it */
   strcpy (info->authenticated_as, info->auth_string);
@@ -72,6 +91,8 @@ static int auth_test_plugin(MYSQL_PLUGIN
   /* copy something into the external user name */
   strcpy (info->external_user, info->auth_string);
 
+  my_plugin_log_message(plugin_info_ptr, MY_INFORMATION_LEVEL, 
+                        "successfully authenticated user %s", info->authenticated_as);
   return CR_OK;
 }
 
@@ -120,7 +141,7 @@ mysql_declare_plugin(test_plugin)
   "Georgi Kodinov",
   "plugin API test plugin",
   PLUGIN_LICENSE_GPL,
-  NULL,
+  test_plugin_init,
   NULL,
   0x0100,
   NULL,

=== modified file 'regex/my_regex.h'
--- a/regex/my_regex.h	2010-07-30 08:34:23 +0000
+++ b/regex/my_regex.h	2011-02-04 05:11:09 +0000
@@ -30,6 +30,7 @@ typedef struct {
 
 
 /* === regcomp.c === */
+typedef int (*my_regex_stack_check_t)();
 extern int my_regcomp(my_regex_t *, const char *, int, CHARSET_INFO *charset);
 #define	MY_REG_BASIC	0000
 #define	MY_REG_EXTENDED	0001
@@ -78,7 +79,8 @@ extern void my_regfree(my_regex_t *);
 
 /* === reginit.c === */
 
-extern void my_regex_init(CHARSET_INFO *cs);	/* Should be called for multithread progs */
+/* Should be called for multithread progs */
+extern void my_regex_init(CHARSET_INFO *cs,  my_regex_stack_check_t func);
 extern void my_regex_end(void);	/* If one wants a clean end */
 
 #ifdef __cplusplus

=== modified file 'regex/regcomp.c'
--- a/regex/regcomp.c	2010-07-26 10:39:38 +0000
+++ b/regex/regcomp.c	2011-02-04 05:11:09 +0000
@@ -31,6 +31,9 @@ struct parse {
 	CHARSET_INFO *charset;	/* for ctype things  */
 };
 
+/* Check if there is enough stack space for recursion. */
+my_regex_stack_check_t my_regex_enough_mem_in_stack= NULL;
+
 #include "regcomp.ih"
 
 static char nuls[10];		/* place to point scanner in event of error */
@@ -117,7 +120,7 @@ CHARSET_INFO *charset;
 #	define	GOODFLAGS(f)	((f)&~MY_REG_DUMP)
 #endif
 
-	my_regex_init(charset);	/* Init cclass if neaded */
+	my_regex_init(charset, NULL);	/* Init cclass if neaded */
 	preg->charset=charset;
 	cflags = GOODFLAGS(cflags);
 	if ((cflags&MY_REG_EXTENDED) && (cflags&MY_REG_NOSPEC))
@@ -222,7 +225,15 @@ int stop;			/* character this ERE should
 		/* do a bunch of concatenated expressions */
 		conc = HERE();
 		while (MORE() && (c = PEEK()) != '|' && c != stop)
-			p_ere_exp(p);
+		{
+		  if (my_regex_enough_mem_in_stack &&
+		      my_regex_enough_mem_in_stack())
+		  {
+		    SETERROR(MY_REG_ESPACE);
+		    return;
+		  }
+		  p_ere_exp(p);
+		}
 		if(REQUIRE(HERE() != conc, MY_REG_EMPTY)) {}/* require nonempty */
 
 		if (!EAT('|'))

=== modified file 'regex/reginit.c'
--- a/regex/reginit.c	2008-02-18 22:29:39 +0000
+++ b/regex/reginit.c	2011-02-04 04:47:46 +0000
@@ -4,10 +4,12 @@
 #include <m_ctype.h>
 #include <m_string.h>
 #include "cclass.h"
+#include "my_regex.h"
 
 static my_bool regex_inited=0;
+extern my_regex_stack_check_t my_regex_enough_mem_in_stack;
 
-void my_regex_init(CHARSET_INFO *cs)
+void my_regex_init(CHARSET_INFO *cs, my_regex_stack_check_t func)
 {
   char buff[CCLASS_LAST][256];
   int  count[CCLASS_LAST];
@@ -16,6 +18,7 @@ void my_regex_init(CHARSET_INFO *cs)
   if (!regex_inited)
   {
     regex_inited=1;
+    my_regex_enough_mem_in_stack= func;
     bzero((uchar*) &count,sizeof(count));
 
     for (i=1 ; i<= 255; i++)
@@ -74,6 +77,7 @@ void my_regex_end()
     int i;
     for (i=0; i < CCLASS_LAST ; i++)
       free((char*) cclasses[i].chars);
+    my_regex_enough_mem_in_stack= NULL;
     regex_inited=0;
   }
 }

=== modified file 'sql-common/my_time.c'
--- a/sql-common/my_time.c	2010-11-04 13:18:27 +0000
+++ b/sql-common/my_time.c	2011-02-02 18:13:28 +0000
@@ -992,7 +992,7 @@ my_system_gmt_sec(const MYSQL_TIME *t_sr
     with unsigned time_t tmp+= shift*86400L might result in a number,
     larger then TIMESTAMP_MAX_VALUE, so another check will work.
   */
-  if ((tmp < TIMESTAMP_MIN_VALUE) || (tmp > TIMESTAMP_MAX_VALUE))
+  if (!IS_TIME_T_VALID_FOR_TIMESTAMP(tmp))
     tmp= 0;
 
   return (my_time_t) tmp;

=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	2011-01-03 13:12:01 +0000
+++ b/sql/CMakeLists.txt	2011-02-02 08:30:13 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,19 +14,19 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
 INCLUDE_DIRECTORIES(
-${CMAKE_SOURCE_DIR}/include 
-${CMAKE_SOURCE_DIR}/sql 
-${CMAKE_SOURCE_DIR}/regex 
-${ZLIB_INCLUDE_DIR}
-${SSL_INCLUDE_DIRS}
-${CMAKE_BINARY_DIR}/sql
+  ${CMAKE_SOURCE_DIR}/include 
+  ${CMAKE_SOURCE_DIR}/sql 
+  ${CMAKE_SOURCE_DIR}/regex 
+  ${ZLIB_INCLUDE_DIR}
+  ${SSL_INCLUDE_DIRS}
+  ${CMAKE_BINARY_DIR}/sql
 )
 
 SET(GEN_SOURCES
-${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h 
-${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
-${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc
-${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h 
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h 
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc
+  ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h 
 )
 
 SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED 1)
@@ -36,52 +36,142 @@ IF(SSL_DEFINES)
  ADD_DEFINITIONS(${SSL_DEFINES})
 ENDIF()
 
+SET(SQL_SHARED_SOURCES
+  datadict.cc
+  debug_sync.cc
+  derror.cc
+  des_key_file.cc
+  discover.cc
+  field.cc
+  field_conv.cc 
+  filesort.cc
+  filesort_utils.cc
+  gcalc_slicescan.cc
+  gcalc_tools.cc
+  gstream.cc
+  handler.cc
+  hostname.cc
+  init.cc
+  item.cc
+  item_buff.cc
+  item_cmpfunc.cc 
+  item_create.cc
+  item_func.cc
+  item_geofunc.cc
+  item_row.cc 
+  item_strfunc.cc
+  item_subselect.cc
+  item_sum.cc
+  item_timefunc.cc 
+  item_xmlfunc.cc 
+  key.cc
+  keycaches.cc
+  lock.cc
+  log.cc
+  mdl.cc
+  mf_iocache.cc
+  my_decimal.cc
+  net_serv.cc
+  opt_range.cc
+  opt_sum.cc 
+  parse_file.cc
+  partition_info.cc
+  password.c
+  procedure.cc 
+  protocol.cc
+  records.cc
+  rpl_handler.cc
+  scheduler.cc 
+  set_var.cc 
+  sha2.cc
+  sp.cc
+  sp_cache.cc
+  sp_head.cc
+  sp_pcontext.cc 
+  sp_rcontext.cc
+  spatial.cc
+  sql_acl.cc
+  sql_admin.cc
+  sql_alloc_error_handler.cc
+  sql_alter.cc
+  sql_analyse.cc
+  sql_audit.cc
+  sql_base.cc 
+  sql_bootstrap.cc
+  sql_cache.cc
+  sql_class.cc
+  sql_connect.cc
+  sql_crypt.cc
+  sql_cursor.cc
+  sql_db.cc
+  sql_delete.cc
+  sql_derived.cc
+  sql_do.cc 
+  sql_error.cc
+  sql_handler.cc
+  sql_help.cc
+  sql_insert.cc
+  sql_join_cache.cc
+  sql_lex.cc 
+  sql_list.cc
+  sql_load.cc
+  sql_locale.cc
+  sql_manager.cc
+  sql_parse.cc
+  sql_partition.cc
+  sql_partition_admin.cc
+  sql_plugin.cc
+  sql_prepare.cc
+  sql_profile.cc
+  sql_reload.cc
+  sql_rename.cc 
+  sql_select.cc
+  sql_servers.cc
+  sql_show.cc
+  sql_signal.cc
+  sql_state.c
+  sql_string.cc 
+  sql_table.cc
+  sql_tablespace.cc
+  sql_test.cc
+  sql_time.cc
+  sql_trigger.cc
+  sql_truncate.cc
+  sql_udf.cc
+  sql_union.cc
+  sql_update.cc
+  sql_view.cc
+  strfunc.cc
+  sys_vars.cc
+  table.cc
+  thr_malloc.cc 
+  transaction.cc
+  tztime.cc
+  uniques.cc
+  unireg.cc
+)
+
+SET(SQL_EXPORTED_SOURCES ${SQL_SHARED_SOURCES} PARENT_SCOPE)
 
-SET (SQL_SOURCE
-              ../sql-common/client.c derror.cc des_key_file.cc
-               discover.cc ../libmysql/errmsg.c field.cc  field_conv.cc 
-               filesort_utils.cc
-               filesort.cc gstream.cc sha2.cc
-               handler.cc hash_filo.h sql_plugin_services.h
-               hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc 
-               item_create.cc item_func.cc item_geofunc.cc item_row.cc 
-               item_strfunc.cc item_subselect.cc item_sum.cc item_timefunc.cc 
-               key.cc log.cc lock.cc
-               message.h mf_iocache.cc my_decimal.cc ../sql-common/my_time.c
-               mysqld.cc net_serv.cc  keycaches.cc
-               ../sql-common/client_plugin.c
-               opt_range.cc opt_range.h opt_sum.cc 
-               ../sql-common/pack.c parse_file.cc password.c procedure.cc 
-               protocol.cc records.cc set_var.cc 
-               sp.cc sp_cache.cc sp_head.cc sp_pcontext.cc 
-               sp_rcontext.cc spatial.cc sql_acl.cc sql_analyse.cc sql_base.cc 
-               sql_cache.cc sql_class.cc sql_client.cc sql_crypt.cc sql_crypt.h 
-               sql_cursor.cc sql_db.cc sql_delete.cc sql_derived.cc sql_do.cc 
-               sql_error.cc sql_handler.cc sql_help.cc sql_insert.cc sql_lex.cc 
-               sql_list.cc sql_load.cc sql_manager.cc sql_parse.cc
-               sql_partition.cc sql_plugin.cc sql_prepare.cc sql_rename.cc 
-               sql_join_cache.cc debug_sync.cc debug_sync.h
-               sql_select.cc sql_show.cc sql_state.c sql_string.cc 
-               sql_table.cc sql_test.cc sql_trigger.cc sql_udf.cc sql_union.cc
-               sql_update.cc sql_view.cc strfunc.cc table.cc thr_malloc.cc 
-               sql_time.cc tztime.cc uniques.cc unireg.cc item_xmlfunc.cc 
-               event_scheduler.cc event_data_objects.cc
-               event_queue.cc event_db_repository.cc 
-               sql_tablespace.cc events.cc ../sql-common/my_user.c 
-               partition_info.cc sql_locale.cc
-               sql_servers.cc sql_audit.cc
-               sql_connect.cc scheduler.cc 
-               sql_profile.cc event_parse_data.cc
-               sql_bootstrap.cc
-               sql_signal.cc mdl.cc
-               gcalc_slicescan.cc gcalc_tools.cc
-               sql_alloc_error_handler.cc
-               transaction.cc sys_vars.cc  rpl_handler.cc sql_truncate.cc
-               datadict.cc sql_reload.cc
-               sql_partition_admin.cc
-               sql_admin.cc sql_alter.cc
-               ${GEN_SOURCES}
-               ${MYSYS_LIBWRAP_SOURCE})
+SET(SQL_SOURCE
+  ${GEN_SOURCES}
+  ${MYSYS_LIBWRAP_SOURCE}
+  ${SQL_SHARED_SOURCES}
+  ../libmysql/errmsg.c
+  ../sql-common/client.c
+  ../sql-common/client_plugin.c
+  ../sql-common/my_time.c
+  ../sql-common/my_user.c 
+  ../sql-common/pack.c
+  event_data_objects.cc
+  event_db_repository.cc 
+  event_parse_data.cc
+  event_queue.cc
+  event_scheduler.cc
+  events.cc
+  mysqld.cc
+  sql_client.cc
+  )
 
 MYSQL_ADD_PLUGIN(partition ha_partition.cc STORAGE_ENGINE DEFAULT STATIC_ONLY
 RECOMPILE_FOR_EMBEDDED)

=== modified file 'sql/field.cc'
--- a/sql/field.cc	2011-01-12 15:28:35 +0000
+++ b/sql/field.cc	2011-02-08 15:54:12 +0000
@@ -9104,6 +9104,7 @@ void Create_field::create_length_to_inte
   case MYSQL_TYPE_MEDIUM_BLOB:
   case MYSQL_TYPE_LONG_BLOB:
   case MYSQL_TYPE_BLOB:
+  case MYSQL_TYPE_GEOMETRY:
   case MYSQL_TYPE_VAR_STRING:
   case MYSQL_TYPE_STRING:
   case MYSQL_TYPE_VARCHAR:

=== modified file 'sql/filesort.cc'
--- a/sql/filesort.cc	2011-01-11 09:09:21 +0000
+++ b/sql/filesort.cc	2011-02-02 13:41:10 +0000
@@ -356,8 +356,24 @@ ha_rows filesort(THD *thd, TABLE *table,
     }
   }
   if (error)
-    my_message(ER_FILSORT_ABORT, ER(ER_FILSORT_ABORT),
-               MYF(ME_ERROR+ME_WAITTANG));
+  {
+    DBUG_ASSERT(thd->is_error());
+    my_printf_error(ER_FILSORT_ABORT,
+                    "%s: %s",
+                    MYF(ME_ERROR + ME_WAITTANG),
+                    ER_THD(thd, ER_FILSORT_ABORT),
+                    thd->stmt_da->message());
+                    
+    if (global_system_variables.log_warnings > 1)
+    {
+      sql_print_warning("%s, host: %s, user: %s, thread: %lu, query: %-.4096s",
+                        ER_THD(thd, ER_FILSORT_ABORT),
+                        thd->security_ctx->host_or_ip,
+                        &thd->security_ctx->priv_user[0],
+                        (ulong) thd->thread_id,
+                        thd->query());
+    }
+  }
   else
     statistic_add(thd->status_var.filesort_rows,
                   (ulong) num_rows, &LOCK_status);
@@ -408,6 +424,9 @@ static void make_char_array(FILESORT_INF
 
   DBUG_PRINT("info", ("num_records %u length %u", num_records, length));
 
+  DBUG_EXECUTE_IF("make_char_array_fail",
+                  DBUG_SET("+d,simulate_out_of_memory"););
+
   if (!info->sort_keys)
     info->sort_keys= 
       (uchar**) my_malloc(num_records * (length + sizeof(uchar*)), MYF(0));

=== modified file 'sql/gcalc_slicescan.cc'
--- a/sql/gcalc_slicescan.cc	2010-11-08 11:34:12 +0000
+++ b/sql/gcalc_slicescan.cc	2011-02-03 13:51:02 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011 Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -62,15 +62,15 @@ void Gcalc_dyn_list::format_blk(void* bl
 }
 
 
-Gcalc_dyn_list::Item *Gcalc_dyn_list::alloc_new_blk()
+bool Gcalc_dyn_list::alloc_new_blk()
 {
   void *new_block= my_malloc(m_blk_size, MYF(MY_WME));
   if (!new_block)
-    return NULL;
+    return true;
   *m_blk_hook= new_block;
   m_blk_hook= (void**)new_block;
   format_blk(new_block);
-  return new_item();
+  return false;
 }
 
 
@@ -260,8 +260,8 @@ Gcalc_scan_iterator::Gcalc_scan_iterator
 Gcalc_scan_iterator::point
   *Gcalc_scan_iterator::new_slice(Gcalc_scan_iterator::point *example)
 {
-  point *result= NULL;
-  Gcalc_dyn_list::Item **result_hook= (Gcalc_dyn_list::Item **)&result;
+  Gcalc_dyn_list::Item *item_result= NULL;
+  Gcalc_dyn_list::Item **result_hook= &item_result;
   while (example)
   {
     *result_hook= new_slice_point();
@@ -269,6 +269,7 @@ Gcalc_scan_iterator::point
     example= example->get_next();
   }
   *result_hook= NULL;
+  point *result= static_cast<point*>(item_result);
   return result;
 }
 
@@ -321,13 +322,10 @@ static inline bool slice_first(const Gca
 
 int Gcalc_scan_iterator::insert_top_point()
 {
-  point *sp= m_slice1;
-  Gcalc_dyn_list::Item **prev_hook= (Gcalc_dyn_list::Item **)&m_slice1;
-  point *sp1;
   point *sp0= new_slice_point();
-
   if (!sp0)
     return 1;
+
   sp0->pi= m_cur_pi;
   sp0->next_pi= m_cur_pi->left;
   sp0->thread= m_cur_thread++;
@@ -338,7 +336,8 @@ int Gcalc_scan_iterator::insert_top_poin
     m_event1= scev_thread;
 
     /*Now just to increase the size of m_slice0 to be same*/
-    if (!(sp1= new_slice_point()))
+    point *sp1= new_slice_point();
+    if (!sp1)
       return 1;
     sp1->next= m_slice0;
     m_slice0= sp1;
@@ -354,15 +353,18 @@ int Gcalc_scan_iterator::insert_top_poin
      Binary search could probably make things faster here,
      but structures used aren't suitable, and the
      scan is usually not really long */
-  for (; sp && slice_first(sp, sp0);
-       prev_hook= &sp->next, sp=sp->get_next())
-  {}
+  point *sp= m_slice1;
+  point **prev_hook= &m_slice1;
+  for (; sp && slice_first(sp, sp0); sp=sp->get_next())
+  {
+    prev_hook= reinterpret_cast<point**>(&(sp->next));
+  }
 
   if (m_cur_pi->right)
   {
     m_event1= scev_two_threads;
     /*We have two threads so should decide which one will be first*/
-    sp1= new_slice_point();
+    point *sp1= new_slice_point();
     if (!sp1)
       return 1;
     sp1->pi= m_cur_pi;
@@ -549,7 +551,6 @@ int Gcalc_scan_iterator::add_intersectio
 int Gcalc_scan_iterator::find_intersections()
 {
   point *sp1= m_slice1;
-  Gcalc_dyn_list::Item **hook;
 
   m_n_intersections= 0;
   {
@@ -564,7 +565,8 @@ int Gcalc_scan_iterator::find_intersecti
     }
   }
 
-  hook= (Gcalc_dyn_list::Item **)&m_intersections;
+  Gcalc_dyn_list::Item **hook=
+    reinterpret_cast<Gcalc_dyn_list::Item **>(&m_intersections);
   bool intersections_found;
 
   point *last_possible_isc= NULL;

=== modified file 'sql/gcalc_slicescan.h'
--- a/sql/gcalc_slicescan.h	2010-11-05 09:34:03 +0000
+++ b/sql/gcalc_slicescan.h	2011-02-03 13:51:02 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011 Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -42,14 +42,14 @@ public:
   Item *new_item()
   {
     Item *result;
-    if (m_free)
-    {
-      result= m_free;
-      m_free= m_free->next;
-    }
-    else
-      result= alloc_new_blk();
+    if (!m_free && alloc_new_blk())
+      return NULL;
+
+    DBUG_ASSERT(m_free);
+    result= m_free;
+    m_free= m_free->next;
 
+    result->next= NULL;
     return result;
   }
   inline void free_item(Item *item)
@@ -83,7 +83,7 @@ protected:
   Item *m_free;
   Item *m_keep;
 
-  Item *alloc_new_blk();
+  bool alloc_new_blk();
   void format_blk(void* block);
   inline Item *ptr_add(Item *ptr, int n_items)
   {

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2011-01-21 10:50:31 +0000
+++ b/sql/handler.cc	2011-02-08 15:54:12 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -705,7 +705,7 @@ void ha_close_connection(THD* thd)
   end. Such nested transaction was internally referred to as
   a "statement transaction" and gave birth to the term.
 
-  <Historical note ends>
+  (Historical note ends)
 
   Since then a statement transaction is started for each statement
   that accesses transactional tables or uses the binary log.  If

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2011-01-18 10:32:38 +0000
+++ b/sql/item.cc	2011-01-31 10:37:16 +0000
@@ -649,7 +649,6 @@ void Item_ident::cleanup()
   db_name= orig_db_name; 
   table_name= orig_table_name;
   field_name= orig_field_name;
-  depended_from= 0;
   DBUG_VOID_RETURN;
 }
 
@@ -2310,7 +2309,7 @@ table_map Item_field::resolved_used_tabl
   return field->table->map;
 }
 
-void Item_field::fix_after_pullout(st_select_lex *parent_select,
+void Item_ident::fix_after_pullout(st_select_lex *parent_select,
                                    st_select_lex *removed_select,
                                    Item **ref)
 {
@@ -2350,17 +2349,16 @@ void Item_field::fix_after_pullout(st_se
     */
     st_select_lex *child_select= context->select_lex;
 
-    if (child_select->outer_select() != depended_from)
+    while (child_select->outer_select() != depended_from)
     {
       /*
         The subquery on this level is outer-correlated with respect to the field
       */
       Item_subselect *subq_predicate= child_select->master_unit()->item;
-      subq_predicate->used_tables_cache|= OUTER_REF_TABLE_BIT;
-    }
 
-    while (child_select->outer_select() != depended_from)
+      subq_predicate->used_tables_cache|= OUTER_REF_TABLE_BIT;
       child_select= child_select->outer_select();
+    }
 
     /*
       child_select is select_lex immediately inner to the depended_from level.
@@ -6509,6 +6507,13 @@ void Item_ref::set_properties()
 }
 
 
+table_map Item_ref::resolved_used_tables() const
+{
+  DBUG_ASSERT((*ref)->type() == FIELD_ITEM);
+  return ((Item_field*)(*ref))->resolved_used_tables();
+}
+
+
 void Item_ref::cleanup()
 {
   DBUG_ENTER("Item_ref::cleanup");
@@ -6885,29 +6890,12 @@ void Item_ref::fix_after_pullout(st_sele
                                  st_select_lex *removed_select,
                                  Item **ref_arg)
 {
-  // @todo: Find an actual test case where depended_from == new_parent.
-  DBUG_ASSERT(depended_from != parent_select);
-  if (depended_from == parent_select)
-    depended_from= NULL;
-}
-
-void Item_direct_view_ref::fix_after_pullout(st_select_lex *parent_select,
-                                             st_select_lex *removed_select,
-                                             Item **refptr)
-{
-  DBUG_EXECUTE("where",
-               print_where(*refptr,
-                           "Item_direct_view_ref::fix_after_pullout",
-                           QT_ORDINARY););
-
   (*ref)->fix_after_pullout(parent_select, removed_select, ref);
 
-  // @todo: Find an actual test case where depended_from == parent_select.
-  DBUG_ASSERT(depended_from != parent_select);
-  if (depended_from == parent_select)
-    depended_from= NULL;
+  Item_ident::fix_after_pullout(parent_select, removed_select, ref_arg);
 }
 
+
 /**
   Compare two view column references for equality.
 

=== modified file 'sql/item.h'
--- a/sql/item.h	2011-01-28 13:49:59 +0000
+++ b/sql/item.h	2011-02-08 15:54:12 +0000
@@ -1675,7 +1675,13 @@ public:
              const char *field_name_arg);
   Item_ident(THD *thd, Item_ident *item);
   Item_ident(TABLE_LIST *view_arg, const char *field_name_arg);
+  /*
+    Return used table information for the level on which this table is resolved.
+  */
+  virtual table_map resolved_used_tables() const= 0;
   const char *full_name() const;
+  virtual void fix_after_pullout(st_select_lex *parent_select,
+                                 st_select_lex *removed_select, Item **ref);
   void cleanup();
   bool remove_dependence_processor(uchar * arg);
   virtual void print(String *str, enum_query_type query_type);
@@ -1761,16 +1767,11 @@ public:
   bool send(Protocol *protocol, String *str_arg);
   void reset_field(Field *f);
   bool fix_fields(THD *, Item **);
-  void fix_after_pullout(st_select_lex *parent_select,
-                         st_select_lex *removed_select, Item **ref);
   void make_field(Send_field *tmp_field);
   int save_in_field(Field *field,bool no_conversions);
   void save_org_in_field(Field *field);
   table_map used_tables() const;
-  /*
-    Return used table information for the level on which this table is resolved.
-  */
-  table_map resolved_used_tables() const;
+  virtual table_map resolved_used_tables() const;
   enum Item_result result_type () const
   {
     return field->result_type();
@@ -2604,6 +2605,7 @@ public:
     if (!depended_from) 
       (*ref)->update_used_tables(); 
   }
+  virtual table_map resolved_used_tables() const;
   table_map not_null_tables() const { return (*ref)->not_null_tables(); }
   void set_result_field(Field *field)	{ result_field= field; }
   bool is_result_field() { return 1; }
@@ -2726,8 +2728,6 @@ public:
   {}
 
   bool fix_fields(THD *, Item **);
-  void fix_after_pullout(st_select_lex *parent_select,
-                         st_select_lex *removed_select, Item **ref);
   bool eq(const Item *item, bool binary_cmp) const;
   Item *get_tmp_table_item(THD *thd)
   {
@@ -3312,11 +3312,10 @@ class Item_cache: public Item_basic_cons
 protected:
   Item *example;
   table_map used_table_map;
-  /*
-    Field that this object will get value from. This is set/used by 
+  /**
+    Field that this object will get value from. This is used by 
     index-based subquery engines to detect and remove the equality injected 
     by IN->EXISTS transformation.
-    For all other uses of Item_cache, cached_field doesn't matter.
   */  
   Field *cached_field;
   enum enum_field_types cached_field_type;
@@ -3384,6 +3383,14 @@ public:
   {
     return (value_cached || cache_value()) && !null_value;
   }
+
+  /** 
+    If this item caches a field value, return pointer to underlying field.
+
+    @return Pointer to field, or NULL if this is not a cache for a field value.
+  */
+  Field* field() { return cached_field; }
+
   virtual void store(Item *item);
   virtual bool cache_value()= 0;
   bool basic_const_item() const

=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc	2011-01-19 14:39:13 +0000
+++ b/sql/item_cmpfunc.cc	2011-02-08 15:54:12 +0000
@@ -1208,9 +1208,12 @@ get_year_value(THD *thd, Item ***item_ar
          value of 2000.
   */
   Item *real_item= item->real_item();
-  if (!(real_item->type() == Item::FIELD_ITEM &&
-        ((Item_field *)real_item)->field->type() == MYSQL_TYPE_YEAR &&
-        ((Item_field *)real_item)->field->field_length == 4))
+  Field *field= NULL;
+  if (real_item->type() == Item::FIELD_ITEM)
+    field= ((Item_field *)real_item)->field;
+  else if (real_item->type() == Item::CACHE_ITEM)
+    field= ((Item_cache *)real_item)->field();
+  if (!(field && field->type() == MYSQL_TYPE_YEAR && field->field_length == 4))
   {
     if (value < 70)
       value+= 100;

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2011-01-14 15:36:19 +0000
+++ b/sql/item_func.cc	2011-02-08 15:54:12 +0000
@@ -4496,7 +4496,7 @@ my_decimal *user_var_entry::val_decimal(
     int2my_decimal(E_DEC_FATAL_ERROR, *(longlong*) value, 0, val);
     break;
   case DECIMAL_RESULT:
-    val= (my_decimal *)value;
+    my_decimal2decimal((my_decimal *) value, val);
     break;
   case STRING_RESULT:
     str2my_decimal(E_DEC_FATAL_ERROR, value, length, collation.collation, val);

=== modified file 'sql/item_geofunc.h'
--- a/sql/item_geofunc.h	2011-01-12 17:24:53 +0000
+++ b/sql/item_geofunc.h	2011-02-08 15:54:12 +0000
@@ -1,7 +1,7 @@
 #ifndef ITEM_GEOFUNC_INCLUDED
 #define ITEM_GEOFUNC_INCLUDED
 
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'sql/item_strfunc.h'
--- a/sql/item_strfunc.h	2011-01-17 12:35:58 +0000
+++ b/sql/item_strfunc.h	2011-02-07 23:54:23 +0000
@@ -1,7 +1,7 @@
 #ifndef ITEM_STRFUNC_INCLUDED
 #define ITEM_STRFUNC_INCLUDED
 
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -382,7 +382,9 @@ public:
   {
     maybe_null=1;
     /* 9 = MAX ((8- (arg_len % 8)) + 1) */
-    max_length = args[0]->max_length - 9;
+    max_length= args[0]->max_length;
+    if (max_length >= 9U)
+      max_length-= 9U;
   }
   const char *func_name() const { return "des_decrypt"; }
 };

=== modified file 'sql/item_subselect.h'
--- a/sql/item_subselect.h	2010-12-14 11:15:13 +0000
+++ b/sql/item_subselect.h	2011-01-24 14:17:03 +0000
@@ -171,7 +171,7 @@ public:
   friend bool Item_field::fix_fields(THD *, Item **);
   friend int  Item_field::fix_outer_field(THD *, Field **, Item **);
   friend bool Item_ref::fix_fields(THD *, Item **);
-  friend void Item_field::fix_after_pullout(st_select_lex *parent_select,
+  friend void Item_ident::fix_after_pullout(st_select_lex *parent_select,
                                             st_select_lex *removed_select,
                                             Item **ref);
   friend void mark_select_range_as_dependent(THD*,

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2011-01-07 19:54:11 +0000
+++ b/sql/log.cc	2011-02-09 07:31:17 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@
 #include "tztime.h"             // my_tz_OFFSET0, struct Time_zone
 #include "sql_acl.h"            // SUPER_ACL
 #include "sql_audit.h"
+#include "mysql/service_my_plugin_log.h"
 
 #include <my_dir.h>
 #include <stdarg.h>
@@ -1879,7 +1880,6 @@ const char *MYSQL_LOG::generate_name(con
 }
 
 
-
 int error_log_print(enum loglevel level, const char *format,
                     va_list args)
 {
@@ -2199,6 +2199,35 @@ void sql_print_information(const char *f
 }
 
 
+extern "C"
+int my_plugin_log_message(MYSQL_PLUGIN *plugin_ptr, plugin_log_level level,
+                          const char *format, ...)
+{
+  char format2[MYSQL_ERRMSG_SIZE];
+  int ret;
+  loglevel lvl;
+  struct st_plugin_int *plugin = (st_plugin_int *) plugin_ptr;
+  va_list args;
+
+  DBUG_ASSERT(level >= MY_ERROR_LEVEL || level <= MY_INFORMATION_LEVEL);
+
+  switch (level)
+  {
+  case MY_ERROR_LEVEL:       lvl= ERROR_LEVEL; break;
+  case MY_WARNING_LEVEL:     lvl= WARNING_LEVEL; break;
+  case MY_INFORMATION_LEVEL: lvl= INFORMATION_LEVEL; break;
+  default:                   return 1;
+  }
+
+  va_start(args, format);
+  snprintf(format2, sizeof (format2) - 1, "Plugin %.*s reported: '%s'", 
+           (int) plugin->name.length, plugin->name.str, format);
+  ret= error_log_print(lvl, format2, args);
+  va_end(args);
+  return ret;
+}
+
+
 /********* transaction coordinator log for 2pc - mmap() based solution *******/
 
 /*

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-02-01 07:52:46 +0000
+++ b/sql/mysqld.cc	2011-02-04 05:11:09 +0000
@@ -2886,6 +2886,19 @@ sizeof(load_default_groups)/sizeof(load_
 #endif
 
 
+#ifndef EMBEDDED_LIBRARY
+static
+int
+check_enough_stack_size()
+{
+  uchar stack_top;
+
+  return check_stack_overrun(current_thd, STACK_MIN_SIZE,
+                             &stack_top);
+}
+#endif
+
+
 /**
   Initialize one of the global date/time format variables.
 
@@ -3115,12 +3128,6 @@ static int init_common_variables()
 
   max_system_variables.pseudo_thread_id= (ulong)~0;
   server_start_time= flush_status_time= my_time(0);
-  /* TODO: remove this when my_time_t is 64 bit compatible */
-  if (server_start_time >= (time_t) MY_TIME_T_MAX)
-  {
-    sql_print_error("This MySQL server doesn't support dates later then 2038");
-    return 1;
-  }
 
   rpl_filter= new Rpl_filter;
   binlog_filter= new Rpl_filter;
@@ -3159,6 +3166,13 @@ static int init_common_variables()
   */
   mysql_bin_log.init_pthread_objects();
 
+  /* TODO: remove this when my_time_t is 64 bit compatible */
+  if (!IS_TIME_T_VALID_FOR_TIMESTAMP(server_start_time))
+  {
+    sql_print_error("This MySQL server doesn't support dates later then 2038");
+    return 1;
+  }
+
   if (gethostname(glob_hostname,sizeof(glob_hostname)) < 0)
   {
     strmake(glob_hostname, STRING_WITH_LEN("localhost"));
@@ -3375,7 +3389,11 @@ static int init_common_variables()
   if (item_create_init())
     return 1;
   item_init();
-  my_regex_init(&my_charset_latin1);
+#ifndef EMBEDDED_LIBRARY
+  my_regex_init(&my_charset_latin1, check_enough_stack_size);
+#else
+  my_regex_init(&my_charset_latin1, NULL);
+#endif
   /*
     Process a comma-separated character set list and choose
     the first available character set. This is mostly for

=== modified file 'sql/net_serv.cc'
--- a/sql/net_serv.cc	2011-01-11 15:33:55 +0000
+++ b/sql/net_serv.cc	2011-02-08 15:54:12 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'sql/protocol.cc'
--- a/sql/protocol.cc	2010-12-21 12:23:49 +0000
+++ b/sql/protocol.cc	2011-02-02 13:41:10 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011 Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -543,9 +543,10 @@ bool Protocol::send_ok(uint server_statu
                        const char *message)
 {
   DBUG_ENTER("Protocol::send_ok");
-
-  DBUG_RETURN(net_send_ok(thd, server_status, statement_warn_count,
-                          affected_rows, last_insert_id, message));
+  const bool retval= 
+    net_send_ok(thd, server_status, statement_warn_count,
+                affected_rows, last_insert_id, message);
+  DBUG_RETURN(retval);
 }
 
 
@@ -558,8 +559,8 @@ bool Protocol::send_ok(uint server_statu
 bool Protocol::send_eof(uint server_status, uint statement_warn_count)
 {
   DBUG_ENTER("Protocol::send_eof");
-
-  DBUG_RETURN(net_send_eof(thd, server_status, statement_warn_count));
+  const bool retval= net_send_eof(thd, server_status, statement_warn_count);
+  DBUG_RETURN(retval);
 }
 
 
@@ -573,8 +574,8 @@ bool Protocol::send_error(uint sql_errno
                           const char *sql_state)
 {
   DBUG_ENTER("Protocol::send_error");
-
-  DBUG_RETURN(net_send_error_packet(thd, sql_errno, err_msg, sql_state));
+  const bool retval= net_send_error_packet(thd, sql_errno, err_msg, sql_state);
+  DBUG_RETURN(retval);
 }
 
 

=== modified file 'sql/rpl_info_handler.h'
--- a/sql/rpl_info_handler.h	2010-10-25 10:39:01 +0000
+++ b/sql/rpl_info_handler.h	2011-02-04 11:55:17 +0000
@@ -55,13 +55,13 @@ public:
   /**
     Flushes and syncs in-memory information into a stable storage (i.e.
     repository). Usually, syncing after flushing depends on other options
-    such as @code relay-log-info-sync, master-info-sync. These options
+    such as @c relay-log-info-sync, @c master-info-sync. These options
     dictate after how many events or transactions the information
     should be synced. We can ignore them and always sync by setting the
-    parameter @code force, which is by default false, to @code true.
+    parameter @c force, which is by default @c false, to @c true.
 
     So if the number of events is below a threshold, the parameter
-    @code force is FALSE and we are using a file system as a storage
+    @c force is FALSE and we are using a file system as a storage
     system, it may happen that the changes will only end up in the
     operating system's cache and a crash may lead to inconsistencies.
 

=== modified file 'sql/rpl_injector.cc'
--- a/sql/rpl_injector.cc	2010-12-10 16:55:50 +0000
+++ b/sql/rpl_injector.cc	2011-02-01 08:51:58 +0000
@@ -99,6 +99,20 @@ int injector::transaction::commit()
 }
 
 
+int injector::transaction::rollback()
+{
+   DBUG_ENTER("injector::transaction::rollback()");
+   trans_rollback_stmt(m_thd);
+   if (!trans_rollback(m_thd))
+   {
+     close_thread_tables(m_thd);
+     if (!m_thd->locked_tables_mode)
+       m_thd->mdl_context.release_transactional_locks();
+   }
+   DBUG_RETURN(0);
+}
+
+
 int injector::transaction::use_table(server_id_type sid, table tbl)
 {
   DBUG_ENTER("injector::transaction::use_table");

=== modified file 'sql/rpl_injector.h'
--- a/sql/rpl_injector.h	2010-09-04 00:46:58 +0000
+++ b/sql/rpl_injector.h	2011-02-01 08:51:58 +0000
@@ -231,6 +231,14 @@ public:
       int commit();
 
       /*
+        Rollback a transaction.
+
+        This member function will clean up after a sequence of *_row calls by,
+        for example, releasing resource and unlocking files.
+      */
+      int rollback();
+
+      /*
         Get the position for the start of the transaction.
 
         Returns the position in the binary log of the first event in this

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2011-01-24 03:58:22 +0000
+++ b/sql/rpl_slave.cc	2011-02-03 10:13:06 +0000
@@ -10,8 +10,8 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+   along with this program; if not, write to the Free Software Foundation,
+   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA */
 
 
 /**
@@ -6126,7 +6126,6 @@ err:
   thd_proc_info(thd, 0);
   if (ret == FALSE)
     my_ok(thd);
-  delete_dynamic(&lex_mi->repl_ignore_server_ids); //freeing of parser-time alloc
   DBUG_RETURN(ret);
 }
 

=== modified file 'sql/share/errmsg-utf8.txt'
--- a/sql/share/errmsg-utf8.txt	2010-12-05 22:51:49 +0000
+++ b/sql/share/errmsg-utf8.txt	2011-02-08 17:48:20 +0000
@@ -897,7 +897,7 @@ ER_OUT_OF_SORTMEMORY HY001 S1001
         cze "M-Bálo paměti pro třídění. Zvyšte velikost třídícího bufferu"
         dan "Ikke mere sorteringshukommelse. Øg sorteringshukommelse (sort buffer size) for serveren"
         nla "Geen geheugen om te sorteren. Verhoog de server sort buffer size"
-        eng "Out of sort memory; increase server sort buffer size"
+        eng "Out of sort memory, consider increasing server sort buffer size"
         jps "Out of sort memory. sort buffer size が足りないよuurenda MySQL-i sorteerimispuhvrit"
         fre "Manque de mémoire pour le tri. Augmentez-la."
@@ -907,10 +907,10 @@ ER_OUT_OF_SORTMEMORY HY001 S1001
         ita "Memoria per gli ordinamenti esaurita. Incrementare il 'sort_buffer' al demone"
         jpn "Out of sort memory. sort buffer size が足りないようです."
         kor "Out of sort memory. daemon sort buffer의 크기를 증가sorteringsminnet (sort buffer size) for tjenesten"
-        norwegian-ny "Ikkje meir sorteringsminne. Auk sorteringsminnet (sorteringsbffer storleik) for tenesten"
+        nor "Ikke mer sorteringsminne. Vurder å øke sorteringsminnet (sort buffer size) for tjenesten"
+        norwegian-ny "Ikkje meir sorteringsminne. Vurder å auke sorteringsminnet (sorteringsbuffer storleik) for tenesten"
         pol "Zbyt mało pamięci dla sortowania. Zwiększ wielko?ć bufora demona dla sortowania"
-        por "Sem memória para ordenação. Aumente tamanho do 'buffer' de ordenação"
+        por "Não há memória suficiente para ordenação. Considere aumentar o tamanho do retentor (buffer) de ordenação."
         rum "Out of memory pentru sortare. Largeste marimea buffer-ului pentru sortare in daemon (sort buffer size)"
         rus "Недостаточно памяти для сортировки. Увеличьте размер буфера сортировки на сервере"
         serbian "Nema memorije za sortiranje. Povećajte veličinu sort buffer-a MySQL server-u"

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2011-01-27 15:31:18 +0000
+++ b/sql/sql_base.cc	2011-02-08 15:54:12 +0000
@@ -6174,6 +6174,8 @@ find_field_in_natural_join(THD *thd, TAB
 /*
   Find field by name in a base table or a view with temp table algorithm.
 
+  The caller is expected to check column-level privileges.
+
   SYNOPSIS
     find_field_in_table()
     thd				thread handler
@@ -6281,6 +6283,8 @@ find_field_in_table(THD *thd, TABLE *tab
     This procedure detects the type of the table reference 'table_list'
     and calls the corresponding search routine.
 
+    The routine checks column-level privieleges for the found field.
+
   RETURN
     0			field is not found
     view_ref_found	found value in VIEW (real result is in *ref)
@@ -6556,8 +6560,16 @@ find_field_in_tables(THD *thd, Item_iden
       when table_ref->field_translation != NULL.
       */
     if (table_ref->table && !table_ref->view)
+    {
       found= find_field_in_table(thd, table_ref->table, name, length,
                                  TRUE, &(item->cached_field_index));
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+      /* Check if there are sufficient access rights to the found field. */
+      if (found && check_privileges &&
+          check_column_grant_in_table_ref(thd, table_ref, name, length))
+        found= WRONG_GRANT;
+#endif
+    }
     else
       found= find_field_in_table_ref(thd, table_ref, name, length, item->name,
                                      NULL, NULL, ref, check_privileges,

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2011-02-01 07:52:46 +0000
+++ b/sql/sql_class.cc	2011-02-03 10:13:06 +0000
@@ -11,7 +11,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
-   51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
 
 
 /*****************************************************************************
@@ -1458,6 +1458,11 @@ void THD::cleanup_after_query()
   /* reset table map for multi-table update */
   table_map_for_update= 0;
   m_binlog_invoker= FALSE;
+  /* reset replication info structure */
+  if (lex && lex->mi.repl_ignore_server_ids.buffer) 
+  {
+    delete_dynamic(&lex->mi.repl_ignore_server_ids);
+  }
 }
 
 
@@ -2558,26 +2563,24 @@ bool select_max_min_finder_subselect::cm
 {
   Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
   double val1= cache->val_real(), val2= maxmin->val_real();
-  if (fmax)
-    return (cache->null_value && !maxmin->null_value) ||
-      (!cache->null_value && !maxmin->null_value &&
-       val1 > val2);
-  return (maxmin->null_value && !cache->null_value) ||
-    (!cache->null_value && !maxmin->null_value &&
-     val1 < val2);
+  if (cache->null_value)
+    return false;
+  else if (maxmin->null_value)
+    return true;
+  else 
+    return (fmax) ? (val1 > val2) : (val1 < val2);
 }
 
 bool select_max_min_finder_subselect::cmp_int()
 {
   Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
   longlong val1= cache->val_int(), val2= maxmin->val_int();
-  if (fmax)
-    return (cache->null_value && !maxmin->null_value) ||
-      (!cache->null_value && !maxmin->null_value &&
-       val1 > val2);
-  return (maxmin->null_value && !cache->null_value) ||
-    (!cache->null_value && !maxmin->null_value &&
-     val1 < val2);
+  if (cache->null_value)
+    return false;
+  else if (maxmin->null_value)
+    return true;
+  else 
+    return (fmax) ? (val1 > val2) : (val1 < val2);
 }
 
 bool select_max_min_finder_subselect::cmp_decimal()
@@ -2585,13 +2588,14 @@ bool select_max_min_finder_subselect::cm
   Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
   my_decimal cval, *cvalue= cache->val_decimal(&cval);
   my_decimal mval, *mvalue= maxmin->val_decimal(&mval);
-  if (fmax)
-    return (cache->null_value && !maxmin->null_value) ||
-      (!cache->null_value && !maxmin->null_value &&
-       my_decimal_cmp(cvalue, mvalue) > 0) ;
-  return (maxmin->null_value && !cache->null_value) ||
-    (!cache->null_value && !maxmin->null_value &&
-     my_decimal_cmp(cvalue,mvalue) < 0);
+  if (cache->null_value)
+    return false;
+  else if (maxmin->null_value)
+    return true;
+  else 
+    return (fmax) 
+      ? (my_decimal_cmp(cvalue,mvalue) > 0)
+      : (my_decimal_cmp(cvalue,mvalue) < 0);
 }
 
 bool select_max_min_finder_subselect::cmp_str()
@@ -2604,13 +2608,14 @@ bool select_max_min_finder_subselect::cm
   */
   val1= cache->val_str(&buf1);
   val2= maxmin->val_str(&buf1);
-  if (fmax)
-    return (cache->null_value && !maxmin->null_value) ||
-      (!cache->null_value && !maxmin->null_value &&
-       sortcmp(val1, val2, cache->collation.collation) > 0) ;
-  return (maxmin->null_value && !cache->null_value) ||
-    (!cache->null_value && !maxmin->null_value &&
-     sortcmp(val1, val2, cache->collation.collation) < 0);
+  if (cache->null_value)
+    return false;
+  else if (maxmin->null_value)
+    return true;
+  else 
+    return (fmax) 
+      ? (sortcmp(val1, val2, cache->collation.collation) > 0)
+      : (sortcmp(val1, val2, cache->collation.collation) < 0);
 }
 
 bool select_exists_subselect::send_data(List<Item> &items)

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2011-02-01 07:52:46 +0000
+++ b/sql/sql_class.h	2011-02-02 18:31:39 +0000
@@ -2394,7 +2394,7 @@ public:
   /*TODO: this will be obsolete when we have support for 64 bit my_time_t */
   inline bool	is_valid_time() 
   { 
-    return (start_time < (time_t) MY_TIME_T_MAX); 
+    return (IS_TIME_T_VALID_FOR_TIMESTAMP(start_time));
   }
   void set_time_after_lock()  { utime_after_lock= my_micro_time(); }
   ulonglong current_utime()  { return my_micro_time(); }
@@ -3393,6 +3393,7 @@ public:
   {}
   void cleanup();
   bool send_data(List<Item> &items);
+private:
   bool cmp_real();
   bool cmp_int();
   bool cmp_decimal();

=== modified file 'sql/sql_delete.cc'
--- a/sql/sql_delete.cc	2010-12-17 09:41:21 +0000
+++ b/sql/sql_delete.cc	2011-02-02 10:32:21 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -413,7 +413,7 @@ cleanup:
     my_ok(thd, deleted);
     DBUG_PRINT("info",("%ld records deleted",(long) deleted));
   }
-  DBUG_RETURN(error >= 0 || thd->is_error());
+  DBUG_RETURN(thd->is_error() || thd->killed);
 }
 
 

=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc	2011-01-26 07:37:18 +0000
+++ b/sql/sql_lex.cc	2011-02-03 10:13:06 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -10,8 +10,9 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+   along with this program; if not, write to the Free Software 
+   Foundation, Inc.,  51 Franklin Street, Fifth Floor, Boston, 
+   MA 02110-1301 USA */
 
 
 /* A lexical scanner on a temporary buffer with a yacc interface */
@@ -2366,6 +2367,7 @@ LEX::LEX()
                          plugins_static_buffer,
                          INITIAL_LEX_PLUGIN_LIST_SIZE, 
                          INITIAL_LEX_PLUGIN_LIST_SIZE);
+  memset(&mi, 0, sizeof(LEX_MASTER_INFO));
   reset_query_tables_list(TRUE);
 }
 

=== modified file 'sql/sql_load.cc'
--- a/sql/sql_load.cc	2010-12-10 16:55:50 +0000
+++ b/sql/sql_load.cc	2011-01-12 16:05:45 +0000
@@ -363,58 +363,59 @@ int mysql_load(THD *thd,sql_exchange *ex
       (void) fn_format(name, ex->file_name, mysql_real_data_home, "",
                        MY_RELATIVE_PATH | MY_UNPACK_FILENAME |
                        MY_RETURN_REAL_PATH);
-#if !defined(__WIN__)
-      MY_STAT stat_info;
-      if (!mysql_file_stat(key_file_load, name, &stat_info, MYF(MY_WME)))
-	DBUG_RETURN(TRUE);
-
-      // if we are not in slave thread, the file must be:
-      if (!thd->slave_thread &&
-	  !((stat_info.st_mode & S_IROTH) == S_IROTH &&  // readable by others
-	    (stat_info.st_mode & S_IFLNK) != S_IFLNK && // and not a symlink
-	    ((stat_info.st_mode & S_IFREG) == S_IFREG ||
-	     (stat_info.st_mode & S_IFIFO) == S_IFIFO)))
-      {
-	my_error(ER_TEXTFILE_NOT_READABLE, MYF(0), name);
-	DBUG_RETURN(TRUE);
-      }
-      if ((stat_info.st_mode & S_IFIFO) == S_IFIFO)
-	is_fifo = 1;
-#endif
+    }
 
-      if (thd->slave_thread)
-      {
+    if (thd->slave_thread)
+    {
 #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
-        if (strncmp(active_mi->rli->slave_patternload_file, name,
-            active_mi->rli->slave_patternload_file_size))
-        {
-          /*
-            LOAD DATA INFILE in the slave SQL Thread can only read from
-            --slave-load-tmpdir". This should never happen. Please, report a bug.
-           */
-
-          sql_print_error("LOAD DATA INFILE in the slave SQL Thread can only read from --slave-load-tmpdir. " \
-                          "Please, report a bug.");
-          my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--slave-load-tmpdir");
-          DBUG_RETURN(TRUE);
-        }
-#else
+      if (strncmp(active_mi->rli->slave_patternload_file, name,
+                  active_mi->rli->slave_patternload_file_size))
+      {
         /*
-          This is impossible and should never happen.
+          LOAD DATA INFILE in the slave SQL Thread can only read from 
+          --slave-load-tmpdir". This should never happen. Please, report a bug.
         */
-        DBUG_ASSERT(FALSE); 
-#endif
-      }
-      else if (!is_secure_file_path(name))
-      {
-        /* Read only allowed from within dir specified by secure_file_priv */
-        my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv");
+
+        sql_print_error("LOAD DATA INFILE in the slave SQL Thread can only read from --slave-load-tmpdir. " \
+                        "Please, report a bug.");
+        my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--slave-load-tmpdir");
         DBUG_RETURN(TRUE);
       }
+#else
+      /*
+        This is impossible and should never happen.
+      */
+      DBUG_ASSERT(FALSE); 
+#endif
+    }
+    else if (!is_secure_file_path(name))
+    {
+      /* Read only allowed from within dir specified by secure_file_priv */
+      my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv");
+      DBUG_RETURN(TRUE);
+    }
 
+#if !defined(__WIN__) && ! defined(__NETWARE__)
+    MY_STAT stat_info;
+    if (!my_stat(name,&stat_info,MYF(MY_WME)))
+	    DBUG_RETURN(TRUE);
+
+    // if we are not in slave thread, the file must be:
+    if (!thd->slave_thread &&
+	      !((stat_info.st_mode & S_IROTH) == S_IROTH &&  // readable by others
+	        (stat_info.st_mode & S_IFLNK) != S_IFLNK && // and not a symlink
+	        ((stat_info.st_mode & S_IFREG) == S_IFREG ||
+	         (stat_info.st_mode & S_IFIFO) == S_IFIFO)))
+    {
+	    my_error(ER_TEXTFILE_NOT_READABLE, MYF(0), name);
+	    DBUG_RETURN(TRUE);
     }
+    if ((stat_info.st_mode & S_IFIFO) == S_IFIFO)
+            is_fifo = 1;
+#endif
     if ((file= mysql_file_open(key_file_load,
                                name, O_RDONLY, MYF(MY_WME))) < 0)
+
       DBUG_RETURN(TRUE);
   }
 

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2011-01-26 07:37:18 +0000
+++ b/sql/sql_parse.cc	2011-02-07 11:49:18 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1491,7 +1491,6 @@ void log_slow_statement(THD *thd)
   if (thd->enable_slow_log)
   {
     ulonglong end_utime_of_query= thd->current_utime();
-    thd_proc_info(thd, "logging slow query");
 
     if (((thd->server_status & SERVER_QUERY_WAS_SLOW) ||
          ((thd->server_status &

=== modified file 'sql/sql_plugin_services.h'
--- a/sql/sql_plugin_services.h	2010-09-01 13:05:01 +0000
+++ b/sql/sql_plugin_services.h	2011-02-08 17:48:20 +0000
@@ -46,6 +46,11 @@ static struct my_thread_scheduler_servic
   my_thread_scheduler_reset,
 };
 
+static struct my_plugin_log_service my_plugin_log_handler= {
+  my_plugin_log_message
+};
+
+
 
 static struct st_service_ref list_of_services[]=
 {
@@ -54,5 +59,6 @@ static struct st_service_ref list_of_ser
   { "thd_wait_service",    VERSION_thd_wait,    &thd_wait_handler },
   { "my_thread_scheduler_service",
     VERSION_my_thread_scheduler, &my_thread_scheduler_handler },
+  { "my_plugin_log_service", VERSION_my_plugin_log, &my_plugin_log_handler },
 };
 

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-02-01 12:47:39 +0000
+++ b/sql/sql_select.cc	2011-02-08 15:54:12 +0000
@@ -4160,22 +4160,38 @@ skip_conversion:
     (*subq)->fixed= 1;
 
     Item *substitute= (*subq)->substitution;
-    bool do_fix_fields= !(*subq)->substitution->fixed;
-    Item **tree= ((*subq)->embedding_join_nest == (TABLE_LIST*)1)?
-                   &conds : &((*subq)->embedding_join_nest->on_expr);
+    const bool do_fix_fields= !(*subq)->substitution->fixed;
+    const bool subquery_in_join_clause=
+      ((*subq)->embedding_join_nest != (TABLE_LIST*)1);
+
+    Item **tree= subquery_in_join_clause ?
+                   &((*subq)->embedding_join_nest->on_expr) :
+                   &conds;
     if (replace_subcondition(this, tree, *subq, substitute, do_fix_fields))
       DBUG_RETURN(TRUE);
     (*subq)->substitution= NULL;
      
     if (!thd->stmt_arena->is_conventional())
     {
-      tree= ((*subq)->embedding_join_nest == (TABLE_LIST*)1)?
-                     &select_lex->prep_where :
-                     &((*subq)->embedding_join_nest->prep_on_expr);
+      if (subquery_in_join_clause)
+      {
+        tree= &((*subq)->embedding_join_nest->prep_on_expr);
+        /*
+          Some precaution is needed when dealing with PS/SP:
+          fix_prepare_info_in_table_list() sets prep_on_expr, but only for
+          tables, not for join nest objects. This is instead populated in
+          simplify_joins(), which is called after this function. Hence, we need
+          to check that *tree is non-NULL before calling replace_subcondition.
+        */
+        DBUG_ASSERT((*subq)->embedding_join_nest->nested_join ?
+                    *tree == NULL :
+                    *tree != NULL);
+      }
+      else
+        tree= &select_lex->prep_where;
 
-      if (replace_subcondition(this, tree, *subq, substitute, 
-                                     FALSE))
-        DBUG_RETURN(TRUE);
+      if (*tree && replace_subcondition(this, tree, *subq, substitute, false))
+        DBUG_RETURN(true);
     }
   }
 
@@ -9220,7 +9236,7 @@ inline void add_cond_and_fix(Item **e1, 
       @code
       SELECT A.f2 FROM t1 LEFT JOIN t2 A ON A.f2 = f1
       WHERE A.f3=(SELECT MIN(f3) FROM  t2 C WHERE A.f4 = C.f4) OR A.f3 IS NULL;
-      @endocde
+      @endcode
       Here condition A.f3 IS NOT NULL is going to be added to the WHERE
       condition of the embedding query.
       Another example:
@@ -17147,6 +17163,9 @@ sub_select_sjm(JOIN *join, JOIN_TAB *joi
       last_tab->read_record.copy_field_end= sjm->copy_field +
                                             sjm->table_cols.elements;
       last_tab->read_record.read_record= rr_sequential_and_unpack;
+
+      // Clear possible outer join information from earlier use of this join tab
+      last_tab->last_inner= NULL;
     }
   }
   else
@@ -17642,26 +17661,41 @@ evaluate_join_record(JOIN *join, JOIN_TA
       first_unmatched->found= 1;
       for (JOIN_TAB *tab= first_unmatched; tab <= join_tab; tab++)
       {
-        if (tab->table->reginfo.not_exists_optimize)
-        {
-          /*
-            When not_exists_optimizer is set and a matching row is found, the
-            outer row should be excluded from the result set: no need to
-            explore this record and other records of 'tab', so we return "no
-            records". But as we set 'found' above, evaluate_join_record() at
-            the upper level will not yield a NULL-complemented record.
-          */
-          DBUG_RETURN(NESTED_LOOP_NO_MORE_ROWS);
-        }
         /* Check all predicates that has just been activated. */
         /*
           Actually all predicates non-guarded by first_unmatched->found
           will be re-evaluated again. It could be fixed, but, probably,
           it's not worth doing now.
         */
+        /*
+          not_exists_optimize has been created from a
+          select_cond containing 'is_null'. This 'is_null'
+          predicate is still present on any 'tab' with
+          'not_exists_optimize'. Furthermore, the usual rules
+          for condition guards also applies for
+          'not_exists_optimize' -> When 'is_null==false' we
+          know all cond. guards are open and we can apply
+          the 'not_exists_optimize'.
+        */
+        DBUG_ASSERT(!(tab->table->reginfo.not_exists_optimize &&
+                     !tab->select_cond));
+
         if (tab->select_cond && !tab->select_cond->val_int())
         {
           /* The condition attached to table tab is false */
+
+          if (tab->table->reginfo.not_exists_optimize)
+          {
+            /*
+              When not_exists_optimizer is set and a matching row is found, the
+              outer row should be excluded from the result set: no need to
+              explore this record and other records of 'tab', so we return "no
+              records". But as we set 'found' above, evaluate_join_record() at
+              the upper level will not yield a NULL-complemented record.
+            */
+            DBUG_RETURN(NESTED_LOOP_NO_MORE_ROWS);
+          }
+
           if (tab == join_tab)
             found= 0;
           else
@@ -19863,11 +19897,12 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
 {
   int ref_key;
   uint ref_key_parts;
-  int order_direction;
+  int order_direction= 0;
   uint used_key_parts;
   TABLE *table=tab->table;
   SQL_SELECT *select=tab->select;
   QUICK_SELECT_I *save_quick= 0;
+  int best_key= -1;
   Item *orig_select_cond= 0;
   bool orig_select_cond_saved= false;
   bool changed_key= false;
@@ -19986,6 +20021,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
           key_map new_ref_key_map;  // Force the creation of quick select
           new_ref_key_map.set_bit(new_ref_key); // only for new_ref_key.
 
+          select->quick= 0;
           if (select->test_quick_select(tab->join->thd, new_ref_key_map, 0,
                                         (tab->join->select_options &
                                          OPTION_FOUND_ROWS) ?
@@ -20009,7 +20045,6 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
     uint best_key_parts= 0;
     uint saved_best_key_parts= 0;
     int best_key_direction= 0;
-    int best_key= -1;
     JOIN *join= tab->join;
     ha_rows table_records= table->file->stats.records;
 
@@ -20033,77 +20068,16 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
 
     if (best_key >= 0)
     {
-      bool quick_created= FALSE;
       if (table->quick_keys.is_set(best_key) && best_key != ref_key)
       {
         key_map map;           // Force the creation of quick select
         map.set_bit(best_key); // only best_key.
-        quick_created=         
-          select->test_quick_select(join->thd, map, 0,
-                                    join->select_options & OPTION_FOUND_ROWS ?
-                                    HA_POS_ERROR :
-                                    join->unit->select_limit_cnt,
-                                    TRUE, FALSE) > 0;
-      }
-      if (!no_changes)
-      {
-        /* 
-           If ref_key used index tree reading only ('Using index' in EXPLAIN),
-           and best_key doesn't, then revert the decision.
-        */
-        if (!table->covering_keys.is_set(best_key))
-          table->set_keyread(FALSE);
-        if (!quick_created)
-	{
-          tab->index= best_key;
-          tab->read_first_record= best_key_direction > 0 ?
-                                  join_read_first:join_read_last;
-          tab->type=JT_NEXT;           // Read with index_first(), index_next()
-          if (select && select->quick)
-          {
-            delete select->quick;
-            select->quick= 0;
-          }
-          if (table->covering_keys.is_set(best_key))
-            table->set_keyread(TRUE);
-          if (tab->pre_idx_push_select_cond)
-          {
-            tab->set_cond(tab->pre_idx_push_select_cond, __LINE__);
-            /*
-              orig_select_cond is a part of pre_idx_push_select_cond,
-              no need to restore it.
-            */
-            orig_select_cond= 0;
-            orig_select_cond_saved= false;
-          }
-          table->file->ha_index_or_rnd_end();
-          if (join->select_options & SELECT_DESCRIBE)
-          {
-            tab->ref.key= -1;
-            tab->ref.key_parts= 0;
-            if (select_limit < table_records) 
-              tab->limit= select_limit;
-          }
-        }
-        else if (tab->type != JT_ALL)
-        {
-          /*
-            We're about to use a quick access to the table.
-            We need to change the access method so as the quick access
-            method is actually used.
-          */
-          DBUG_ASSERT(tab->select->quick);
-          tab->type=JT_ALL;
-          tab->use_quick=QS_RANGE;
-          tab->ref.key= -1;
-          tab->ref.key_parts=0;		// Don't use ref key.
-          tab->read_first_record= join_init_read_record;
-          if (tab->is_using_loose_index_scan())
-            join->tmp_table_param.precomputed_group_by= TRUE;
-          /*
-            TODO: update the number of records in join->best_positions[tablenr]
-          */
-        }
+        select->quick= 0;
+        select->test_quick_select(join->thd, map, 0,
+                                  join->select_options & OPTION_FOUND_ROWS ?
+                                  HA_POS_ERROR :
+                                  join->unit->select_limit_cnt,
+                                  TRUE, FALSE);
       }
       order_direction= best_key_direction;
       /*
@@ -20121,6 +20095,8 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
   } 
 
 check_reverse_order:                  
+  DBUG_ASSERT(order_direction != 0);
+
   if (order_direction == -1)		// If ORDER BY ... DESC
   {
     if (select && select->quick)
@@ -20129,9 +20105,10 @@ check_reverse_order:                  
 	Don't reverse the sort order, if it's already done.
         (In some cases test_if_order_by_key() can be called multiple times
       */
-      if (!select->quick->reverse_sorted())
+      if (select->quick->reverse_sorted())
+        goto skipped_filesort;
+      else
       {
-        QUICK_SELECT_I *tmp;
         int quick_type= select->quick->get_type();
         if (quick_type == QUICK_SELECT_I::QS_TYPE_INDEX_MERGE ||
             quick_type == QUICK_SELECT_I::QS_TYPE_ROR_INTERSECT ||
@@ -20139,36 +20116,128 @@ check_reverse_order:                  
             quick_type == QUICK_SELECT_I::QS_TYPE_GROUP_MIN_MAX)
         {
           tab->limit= 0;
-          select->quick= save_quick;
           goto use_filesort;                   // Use filesort
         }
-            
-        /* ORDER BY range_key DESC */
-	tmp= select->quick->make_reverse(used_key_parts);
-	if (!tmp)
-	{
-          select->quick= save_quick;
-          tab->limit= 0;
-	  goto use_filesort;		// Reverse sort not supported
-	}
-	select->set_quick(tmp);
       }
     }
-    else if (tab->type != JT_NEXT && tab->type != JT_REF_OR_NULL &&
-             tab->ref.key >= 0 && tab->ref.key_parts <= used_key_parts)
+  }
+
+  /*
+    Update query plan with access pattern for doing 
+    ordered access according to what we have decided
+    above.
+  */
+  if (!no_changes) // We are allowed to update QEP
+  {
+    if (best_key >= 0)
     {
-      /*
-	SELECT * FROM t1 WHERE a=1 ORDER BY a DESC,b DESC
+      bool quick_created= 
+        (select && select->quick && select->quick!=save_quick);
 
-	Use a traversal function that starts by reading the last row
-	with key part (A) and then traverse the index backwards.
+      /* 
+         If ref_key used index tree reading only ('Using index' in EXPLAIN),
+         and best_key doesn't, then revert the decision.
       */
-      tab->read_first_record= join_read_last_key;
-      tab->read_record.read_record= join_read_prev_same;
+      if (!table->covering_keys.is_set(best_key))
+        table->set_keyread(FALSE);
+      if (!quick_created)
+      {
+        if (select)                  // Throw any existing quick select
+          select->quick= 0;          // Cleanup either reset to save_quick,
+                                     // or 'delete save_quick'
+        tab->index= best_key;
+        tab->read_first_record= order_direction > 0 ?
+                                join_read_first:join_read_last;
+        tab->type=JT_NEXT;           // Read with index_first(), index_next()
+
+        if (table->covering_keys.is_set(best_key))
+          table->set_keyread(TRUE);
+        if (tab->pre_idx_push_select_cond)
+        {
+          tab->set_cond(tab->pre_idx_push_select_cond, __LINE__);
+          /*
+            orig_select_cond is a part of pre_idx_push_select_cond,
+            no need to restore it.
+          */
+          orig_select_cond= 0;
+          orig_select_cond_saved= false;
+        }
+        table->file->ha_index_or_rnd_end();
+        if (tab->join->select_options & SELECT_DESCRIBE)
+        {
+          tab->ref.key= -1;
+          tab->ref.key_parts= 0;
+          if (select_limit < table->file->stats.records) 
+            tab->limit= select_limit;
+        }
+      }
+      else if (tab->type != JT_ALL)
+      {
+        /*
+          We're about to use a quick access to the table.
+          We need to change the access method so as the quick access
+          method is actually used.
+        */
+        DBUG_ASSERT(tab->select->quick);
+        tab->type=JT_ALL;
+        tab->use_quick=QS_RANGE;
+        tab->ref.key= -1;
+        tab->ref.key_parts=0;		// Don't use ref key.
+        tab->read_first_record= join_init_read_record;
+        if (tab->is_using_loose_index_scan())
+          tab->join->tmp_table_param.precomputed_group_by= TRUE;
+        /*
+          TODO: update the number of records in join->best_positions[tablenr]
+        */
+      }
+    } // best_key >= 0
+
+    if (order_direction == -1)		// If ORDER BY ... DESC
+    {
+      if (select && select->quick)
+      {
+        /* ORDER BY range_key DESC */
+        QUICK_SELECT_I *tmp= select->quick->make_reverse(used_key_parts);
+        if (!tmp)
+        {
+          tab->limit= 0;
+          goto use_filesort;            // Reverse sort failed -> filesort
+        }
+        if (select->quick == save_quick)
+          save_quick= 0;                // make_reverse() consumed it
+        select->set_quick(tmp);
+      }
+      else if (tab->type != JT_NEXT && tab->type != JT_REF_OR_NULL &&
+               tab->ref.key >= 0 && tab->ref.key_parts <= used_key_parts)
+      {
+        /*
+          SELECT * FROM t1 WHERE a=1 ORDER BY a DESC,b DESC
+
+          Use a traversal function that starts by reading the last row
+          with key part (A) and then traverse the index backwards.
+        */
+        tab->read_first_record= join_read_last_key;
+        tab->read_record.read_record= join_read_prev_same;
+      }
     }
+    else if (select && select->quick)
+      select->quick->need_sorted_output();
+
+  } // QEP has been modified
+
+  /*
+    Cleanup:
+    We may have both a 'select->quick' and 'save_quick' (original)
+    at this point. Delete the one that we wan't use.
+  */
+
+skipped_filesort:
+  // Keep current (ordered) select->quick 
+  if (select && save_quick != select->quick)
+  {
+    delete save_quick;
+    save_quick= NULL;
   }
-  else if (select && select->quick)
-    select->quick->need_sorted_output();
   /*
     Restore condition only if we didn't chose index different to what we used
     for ICP.
@@ -20178,6 +20247,12 @@ check_reverse_order:                  
   DBUG_RETURN(1);
 
 use_filesort:
+  // Restore original save_quick
+  if (select && select->quick != save_quick)
+  {
+    delete select->quick;
+    select->quick= save_quick;
+  }
   if (orig_select_cond_saved)
     tab->set_cond(orig_select_cond, __LINE__);
   DBUG_RETURN(0);

=== modified file 'sql/sql_view.cc'
--- a/sql/sql_view.cc	2011-01-12 14:22:13 +0000
+++ b/sql/sql_view.cc	2011-02-08 15:54:12 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2011-01-10 12:45:53 +0000
+++ b/sql/sql_yacc.yy	2011-02-03 10:13:06 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011 Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -11,7 +11,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
+   MA 02110-1301  USA */
 
 /* sql_yacc.yy */
 
@@ -1874,7 +1875,7 @@ change:
             /*
               Clear LEX_MASTER_INFO struct and allocate memory for
               repl_ignore_server_ids. repl_ignore_server_ids is freed
-              at the end of change_master. So it is guaranteed to be
+              in THD::cleanup_after_query.  So it is guaranteed to be
               uninitialized before here.
             */
             lex->mi.set_unspecified();

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2011-01-03 14:50:58 +0000
+++ b/sql/sys_vars.cc	2011-02-02 18:31:39 +0000
@@ -2532,17 +2532,17 @@ static ulonglong read_timestamp(THD *thd
 
 static bool check_timestamp(sys_var *self, THD *thd, set_var *var)
 {
-  time_t val;
+  longlong val;
 
   if (!var->value)
     return FALSE;
 
-  val= (time_t) var->save_result.ulonglong_value;
-  if (val < (time_t) MY_TIME_T_MIN || val > (time_t) MY_TIME_T_MAX)
+  val= (longlong) var->save_result.ulonglong_value;
+  if (val != 0 &&          // this is how you set the default value
+      (val < TIMESTAMP_MIN_VALUE || val > TIMESTAMP_MAX_VALUE))
   {
-    my_message(ER_UNKNOWN_ERROR, 
-               "This version of MySQL doesn't support dates later than 2038",
-               MYF(0));
+    char buf[64];
+    my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), "timestamp", llstr(val, buf));
     return TRUE;
   }
   return FALSE;

=== modified file 'sql/unireg.h'
--- a/sql/unireg.h	2010-07-16 21:00:50 +0000
+++ b/sql/unireg.h	2011-02-02 13:41:10 +0000
@@ -1,7 +1,7 @@
 #ifndef UNIREG_INCLUDED
 #define UNIREG_INCLUDED
 
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -56,8 +56,6 @@ typedef struct st_ha_create_information 
 #define ER_THD_OR_DEFAULT(thd,X) ((thd) ? ER_THD(thd, X) : ER_DEFAULT(X))
 
 
-#define ERRMAPP 1				/* Errormap f|r my_error */
-
 #define ME_INFO (ME_HOLDTANG+ME_OLDWIN+ME_NOREFRESH)
 #define ME_ERROR (ME_BELL+ME_OLDWIN+ME_NOREFRESH)
 #define MYF_RW MYF(MY_WME+MY_NABP)		/* Vid my_read & my_write */

=== modified file 'storage/innobase/btr/btr0btr.c'
--- a/storage/innobase/btr/btr0btr.c	2011-01-25 09:24:38 +0000
+++ b/storage/innobase/btr/btr0btr.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/btr/btr0cur.c'
--- a/storage/innobase/btr/btr0cur.c	2011-01-28 09:15:39 +0000
+++ b/storage/innobase/btr/btr0cur.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -197,7 +197,7 @@ static
 ulint
 btr_rec_get_externally_stored_len(
 /*==============================*/
-	rec_t*		rec,	/*!< in: record */
+	const rec_t*	rec,	/*!< in: record */
 	const ulint*	offsets);/*!< in: array returned by rec_get_offsets() */
 #endif /* !UNIV_HOTBACKUP */
 
@@ -1886,8 +1886,8 @@ btr_cur_update_in_place(
 		NOT call it if index is secondary */
 
 		if (!dict_index_is_clust(index)
-		    || row_upd_changes_ord_field_binary(NULL, NULL,
-							index, update)) {
+		    || row_upd_changes_ord_field_binary(index, update, thr,
+							NULL, NULL)) {
 
 			/* Remove possible hash index pointer to this record */
 			btr_search_update_hash_on_delete(cursor);
@@ -3765,34 +3765,62 @@ btr_estimate_number_of_different_key_val
 /*================== EXTERNAL STORAGE OF BIG FIELDS ===================*/
 
 /***********************************************************//**
+Gets the offset of the pointer to the externally stored part of a field.
+@return	offset of the pointer to the externally stored part */
+static
+ulint
+btr_rec_get_field_ref_offs(
+/*=======================*/
+	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	ulint		n)	/*!< in: index of the external field */
+{
+	ulint	field_ref_offs;
+	ulint	local_len;
+
+	ut_a(rec_offs_nth_extern(offsets, n));
+	field_ref_offs = rec_get_nth_field_offs(offsets, n, &local_len);
+	ut_a(local_len != UNIV_SQL_NULL);
+	ut_a(local_len >= BTR_EXTERN_FIELD_REF_SIZE);
+
+	return(field_ref_offs + local_len - BTR_EXTERN_FIELD_REF_SIZE);
+}
+
+/** Gets a pointer to the externally stored part of a field.
+@param rec	record
+@param offsets	rec_get_offsets(rec)
+@param n	index of the externally stored field
+@return pointer to the externally stored part */
+#define btr_rec_get_field_ref(rec, offsets, n)			\
+	((rec) + btr_rec_get_field_ref_offs(offsets, n))
+
+/***********************************************************//**
 Gets the externally stored size of a record, in units of a database page.
 @return	externally stored part, in units of a database page */
 static
 ulint
 btr_rec_get_externally_stored_len(
 /*==============================*/
-	rec_t*		rec,	/*!< in: record */
+	const rec_t*	rec,	/*!< in: record */
 	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ulint	n_fields;
-	byte*	data;
-	ulint	local_len;
-	ulint	extern_len;
 	ulint	total_extern_len = 0;
 	ulint	i;
 
 	ut_ad(!rec_offs_comp(offsets) || !rec_get_node_ptr_flag(rec));
+
+	if (!rec_offs_any_extern(offsets)) {
+		return(0);
+	}
+
 	n_fields = rec_offs_n_fields(offsets);
 
 	for (i = 0; i < n_fields; i++) {
 		if (rec_offs_nth_extern(offsets, i)) {
 
-			data = rec_get_nth_field(rec, offsets, i, &local_len);
-
-			local_len -= BTR_EXTERN_FIELD_REF_SIZE;
-
-			extern_len = mach_read_from_4(data + local_len
-						      + BTR_EXTERN_LEN + 4);
+			ulint	extern_len = mach_read_from_4(
+				btr_rec_get_field_ref(rec, offsets, i)
+				+ BTR_EXTERN_LEN + 4);
 
 			total_extern_len += ut_calc_align(extern_len,
 							  UNIV_PAGE_SIZE);
@@ -3822,7 +3850,7 @@ btr_cur_set_ownership_of_extern_field(
 	ulint	byte_val;
 
 	data = rec_get_nth_field(rec, offsets, i, &local_len);
-
+	ut_ad(rec_offs_nth_extern(offsets, i));
 	ut_a(local_len >= BTR_EXTERN_FIELD_REF_SIZE);
 
 	local_len -= BTR_EXTERN_FIELD_REF_SIZE;
@@ -3832,6 +3860,9 @@ btr_cur_set_ownership_of_extern_field(
 	if (val) {
 		byte_val = byte_val & (~BTR_EXTERN_OWNER_FLAG);
 	} else {
+#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
+		ut_a(!(byte_val & BTR_EXTERN_OWNER_FLAG));
+#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
 		byte_val = byte_val | BTR_EXTERN_OWNER_FLAG;
 	}
 
@@ -4068,8 +4099,8 @@ file segment of the index tree.
 @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
 UNIV_INTERN
 ulint
-btr_store_big_rec_extern_fields(
-/*============================*/
+btr_store_big_rec_extern_fields_func(
+/*=================================*/
 	dict_index_t*	index,		/*!< in: index of rec; the index tree
 					MUST be X-latched */
 	buf_block_t*	rec_block,	/*!< in/out: block containing rec */
@@ -4078,11 +4109,17 @@ btr_store_big_rec_extern_fields(
 					the "external storage" flags in offsets
 					will not correspond to rec when
 					this function returns */
-	big_rec_t*	big_rec_vec,	/*!< in: vector containing fields
+#ifdef UNIV_DEBUG
+	mtr_t*		local_mtr,	/*!< in: mtr containing the
+					latch to rec and to the tree */
+#endif /* UNIV_DEBUG */
+#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
+	ibool		update_in_place,/*! in: TRUE if the record is updated
+					in place (not delete+insert) */
+#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
+	const big_rec_t*big_rec_vec)	/*!< in: vector containing fields
 					to be stored externally */
-	mtr_t*		local_mtr __attribute__((unused))) /*!< in: mtr
-					containing the latch to rec and to the
-					tree */
+
 {
 	ulint	rec_page_no;
 	byte*	field_ref;
@@ -4100,6 +4137,7 @@ btr_store_big_rec_extern_fields(
 	z_stream c_stream;
 
 	ut_ad(rec_offs_validate(rec, index, offsets));
+	ut_ad(rec_offs_any_extern(offsets));
 	ut_ad(mtr_memo_contains(local_mtr, dict_index_get_lock(index),
 				MTR_MEMO_X_LOCK));
 	ut_ad(mtr_memo_contains(local_mtr, rec_block, MTR_MEMO_PAGE_X_FIX));
@@ -4131,21 +4169,37 @@ btr_store_big_rec_extern_fields(
 		ut_a(err == Z_OK);
 	}
 
+#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
+	/* All pointers to externally stored columns in the record
+	must either be zero or they must be pointers to inherited
+	columns, owned by this record or an earlier record version. */
+	for (i = 0; i < rec_offs_n_fields(offsets); i++) {
+		if (!rec_offs_nth_extern(offsets, i)) {
+			continue;
+		}
+		field_ref = btr_rec_get_field_ref(rec, offsets, i);
+
+		ut_a(!(field_ref[BTR_EXTERN_LEN] & BTR_EXTERN_OWNER_FLAG));
+		/* Either this must be an update in place,
+		or the BLOB must be inherited, or the BLOB pointer
+		must be zero (will be written in this function). */
+		ut_a(update_in_place
+		     || (field_ref[BTR_EXTERN_LEN] & BTR_EXTERN_INHERITED_FLAG)
+		     || !memcmp(field_ref, field_ref_zero,
+				BTR_EXTERN_FIELD_REF_SIZE));
+	}
+#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
 	/* We have to create a file segment to the tablespace
 	for each field and put the pointer to the field in rec */
 
 	for (i = 0; i < big_rec_vec->n_fields; i++) {
-		ut_ad(rec_offs_nth_extern(offsets,
-					  big_rec_vec->fields[i].field_no));
-		{
-			ulint	local_len;
-			field_ref = rec_get_nth_field(
-				rec, offsets, big_rec_vec->fields[i].field_no,
-				&local_len);
-			ut_a(local_len >= BTR_EXTERN_FIELD_REF_SIZE);
-			local_len -= BTR_EXTERN_FIELD_REF_SIZE;
-			field_ref += local_len;
-		}
+		field_ref = btr_rec_get_field_ref(
+			rec, offsets, big_rec_vec->fields[i].field_no);
+#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
+		/* A zero BLOB pointer should have been initially inserted. */
+		ut_a(!memcmp(field_ref, field_ref_zero,
+			     BTR_EXTERN_FIELD_REF_SIZE));
+#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
 		extern_len = big_rec_vec->fields[i].len;
 		UNIV_MEM_ASSERT_RW(big_rec_vec->fields[i].data,
 				   extern_len);
@@ -4427,6 +4481,23 @@ next_zip_page:
 		mem_heap_free(heap);
 	}
 
+#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
+	/* All pointers to externally stored columns in the record
+	must be valid. */
+	for (i = 0; i < rec_offs_n_fields(offsets); i++) {
+		if (!rec_offs_nth_extern(offsets, i)) {
+			continue;
+		}
+
+		field_ref = btr_rec_get_field_ref(rec, offsets, i);
+
+		/* The pointer must not be zero. */
+		ut_a(0 != memcmp(field_ref, field_ref_zero,
+				 BTR_EXTERN_FIELD_REF_SIZE));
+		/* The column must not be disowned by this record. */
+		ut_a(!(field_ref[BTR_EXTERN_LEN] & BTR_EXTERN_OWNER_FLAG));
+	}
+#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
 	return(DB_SUCCESS);
 }
 
@@ -4449,6 +4520,7 @@ btr_check_blob_fil_page_type(
 	if (UNIV_UNLIKELY(type != FIL_PAGE_TYPE_BLOB)) {
 		ulint	flags = fil_space_get_flags(space_id);
 
+#ifndef UNIV_DEBUG /* Improve debug test coverage */
 		if (UNIV_LIKELY
 		    ((flags & DICT_TF_FORMAT_MASK) == DICT_TF_FORMAT_51)) {
 			/* Old versions of InnoDB did not initialize
@@ -4457,6 +4529,7 @@ btr_check_blob_fil_page_type(
 			a BLOB page that is in Antelope format.*/
 			return;
 		}
+#endif /* !UNIV_DEBUG */
 
 		ut_print_timestamp(stderr);
 		fprintf(stderr,
@@ -4506,23 +4579,13 @@ btr_free_externally_stored_field(
 	ulint		page_no;
 	ulint		next_page_no;
 	mtr_t		mtr;
-#ifdef UNIV_DEBUG
+
 	ut_ad(mtr_memo_contains(local_mtr, dict_index_get_lock(index),
 				MTR_MEMO_X_LOCK));
 	ut_ad(mtr_memo_contains_page(local_mtr, field_ref,
 				     MTR_MEMO_PAGE_X_FIX));
 	ut_ad(!rec || rec_offs_validate(rec, index, offsets));
-
-	if (rec) {
-		ulint	local_len;
-		const byte*	f = rec_get_nth_field(rec, offsets,
-						      i, &local_len);
-		ut_a(local_len >= BTR_EXTERN_FIELD_REF_SIZE);
-		local_len -= BTR_EXTERN_FIELD_REF_SIZE;
-		f += local_len;
-		ut_ad(f == field_ref);
-	}
-#endif /* UNIV_DEBUG */
+	ut_ad(!rec || field_ref == btr_rec_get_field_ref(rec, offsets, i));
 
 	if (UNIV_UNLIKELY(!memcmp(field_ref, field_ref_zero,
 				  BTR_EXTERN_FIELD_REF_SIZE))) {
@@ -4685,13 +4748,8 @@ btr_rec_free_externally_stored_fields(
 
 	for (i = 0; i < n_fields; i++) {
 		if (rec_offs_nth_extern(offsets, i)) {
-			ulint	len;
-			byte*	data
-				= rec_get_nth_field(rec, offsets, i, &len);
-			ut_a(len >= BTR_EXTERN_FIELD_REF_SIZE);
-
 			btr_free_externally_stored_field(
-				index, data + len - BTR_EXTERN_FIELD_REF_SIZE,
+				index, btr_rec_get_field_ref(rec, offsets, i),
 				rec, offsets, page_zip, i, rb_ctx, mtr);
 		}
 	}

=== modified file 'storage/innobase/btr/btr0sea.c'
--- a/storage/innobase/btr/btr0sea.c	2011-01-25 09:24:38 +0000
+++ b/storage/innobase/btr/btr0sea.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by

=== modified file 'storage/innobase/buf/buf0buddy.c'
--- a/storage/innobase/buf/buf0buddy.c	2011-01-25 09:24:38 +0000
+++ b/storage/innobase/buf/buf0buddy.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2006, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/buf/buf0buf.c'
--- a/storage/innobase/buf/buf0buf.c	2011-01-25 09:24:38 +0000
+++ b/storage/innobase/buf/buf0buf.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -873,9 +873,9 @@ buf_block_init(
 
 	block->modify_clock = 0;
 
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	block->page.file_page_was_freed = FALSE;
-#endif /* UNIV_DEBUG_FILE_ACCESSES */
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 
 	block->check_index_page_at_flush = FALSE;
 	block->index = NULL;
@@ -2344,7 +2344,7 @@ buf_page_peek_if_search_hashed(
 	return(is_hashed);
 }
 
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 /********************************************************************//**
 Sets file_page_was_freed TRUE if the page is found in the buffer pool.
 This function should be called when we free a file page and want the
@@ -2367,6 +2367,8 @@ buf_page_set_file_page_was_freed(
 
 	if (bpage) {
 		ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage));
+		/* bpage->file_page_was_freed can already hold
+		when this code is invoked from dict_drop_index_tree() */
 		bpage->file_page_was_freed = TRUE;
 		rw_lock_s_unlock(hash_lock);
 	}
@@ -2401,7 +2403,7 @@ buf_page_reset_file_page_was_freed(
 
 	return(bpage);
 }
-#endif /* UNIV_DEBUG_FILE_ACCESSES */
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 
 /********************************************************************//**
 Attempts to discard the uncompressed frame of a compressed page. The
@@ -2539,7 +2541,7 @@ got_block:
 
 	buf_page_set_accessed_make_young(bpage, access_time);
 
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	ut_a(!bpage->file_page_was_freed);
 #endif
 
@@ -3273,7 +3275,7 @@ wait_until_unfixed:
 
 	buf_page_set_accessed_make_young(&block->page, access_time);
 
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	ut_a(!block->page.file_page_was_freed);
 #endif
 
@@ -3436,7 +3438,7 @@ buf_page_optimistic_get(
 	ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
 #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
 
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	ut_a(block->page.file_page_was_freed == FALSE);
 #endif
 	if (UNIV_UNLIKELY(!access_time)) {
@@ -3548,7 +3550,7 @@ buf_page_get_known_nowait(
 	ut_a(block->page.buf_fix_count > 0);
 	ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
 #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	ut_a(block->page.file_page_was_freed == FALSE);
 #endif
 
@@ -3637,9 +3639,9 @@ buf_page_try_get_func(
 	ut_a(block->page.buf_fix_count > 0);
 	ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
 #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	ut_a(block->page.file_page_was_freed == FALSE);
-#endif /* UNIV_DEBUG_FILE_ACCESSES */
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 	buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
 
 	buf_pool->stat.n_page_gets++;
@@ -3668,9 +3670,9 @@ buf_page_init_low(
 	bpage->newest_modification = 0;
 	bpage->oldest_modification = 0;
 	HASH_INVALIDATE(bpage, hash);
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	bpage->file_page_was_freed = FALSE;
-#endif /* UNIV_DEBUG_FILE_ACCESSES */
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 }
 
 /********************************************************************//**
@@ -4057,9 +4059,9 @@ buf_page_create(
 #ifdef UNIV_IBUF_COUNT_DEBUG
 		ut_a(ibuf_count_get(space, offset) == 0);
 #endif
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 		block->page.file_page_was_freed = FALSE;
-#endif /* UNIV_DEBUG_FILE_ACCESSES */
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 
 		/* Page can be found in buf_pool */
 		buf_pool_mutex_exit(buf_pool);

=== modified file 'storage/innobase/buf/buf0lru.c'
--- a/storage/innobase/buf/buf0lru.c	2011-01-25 09:24:38 +0000
+++ b/storage/innobase/buf/buf0lru.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/dict/dict0dict.c'
--- a/storage/innobase/dict/dict0dict.c	2011-01-15 08:31:58 +0000
+++ b/storage/innobase/dict/dict0dict.c	2011-02-08 17:33:31 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -1281,7 +1281,7 @@ dict_table_rename_in_cache(
 	dict_foreign_t*	foreign;
 	dict_index_t*	index;
 	ulint		fold;
-	char		old_name[MAX_TABLE_NAME_LEN + 1];
+	char		old_name[MAX_FULL_NAME_LEN + 1];
 
 	ut_ad(table);
 	ut_ad(mutex_own(&(dict_sys->mutex)));
@@ -1293,7 +1293,7 @@ dict_table_rename_in_cache(
 		ut_print_timestamp(stderr);
 		fprintf(stderr, "InnoDB: too long table name: '%s', "
 			"max length is %d\n", table->name,
-			MAX_TABLE_NAME_LEN);
+			MAX_FULL_NAME_LEN);
 		ut_error;
 	}
 
@@ -1343,11 +1343,11 @@ dict_table_rename_in_cache(
 		    ut_fold_string(old_name), table);
 
 	if (strlen(new_name) > strlen(table->name)) {
-		/* We allocate MAX_TABLE_NAME_LEN+1 bytes here to avoid
+		/* We allocate MAX_FULL_NAME_LEN + 1 bytes here to avoid
 		memory fragmentation, we assume a repeated calls of
 		ut_realloc() with the same size do not cause fragmentation */
-		ut_a(strlen(new_name) <= MAX_TABLE_NAME_LEN);
-		table->name = ut_realloc(table->name, MAX_TABLE_NAME_LEN + 1);
+		ut_a(strlen(new_name) <= MAX_FULL_NAME_LEN);
+		table->name = ut_realloc(table->name, MAX_FULL_NAME_LEN + 1);
 	}
 	memcpy(table->name, new_name, strlen(new_name) + 1);
 

=== modified file 'storage/innobase/dict/dict0load.c'
--- a/storage/innobase/dict/dict0load.c	2011-01-17 12:20:52 +0000
+++ b/storage/innobase/dict/dict0load.c	2011-02-04 15:04:19 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -1550,7 +1550,7 @@ err_len:
 				"InnoDB: in InnoDB data dictionary"
 				" has unknown type %lx.\n",
 				(ulong) flags);
-			return(NULL);
+			return("incorrect flags in SYS_TABLES");
 		}
 	} else {
 		flags = 0;

=== modified file 'storage/innobase/dict/dict0stats.c'
--- a/storage/innobase/dict/dict0stats.c	2011-01-15 08:31:58 +0000
+++ b/storage/innobase/dict/dict0stats.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2009, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2009, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/fsp/fsp0fsp.c'
--- a/storage/innobase/fsp/fsp0fsp.c	2011-01-06 07:21:08 +0000
+++ b/storage/innobase/fsp/fsp0fsp.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -3419,9 +3419,9 @@ fseg_free_page(
 
 	fseg_free_page_low(seg_inode, space, zip_size, page, mtr);
 
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	buf_page_set_file_page_was_freed(space, page);
-#endif
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 }
 
 /**********************************************************************//**
@@ -3487,13 +3487,13 @@ fseg_free_extent(
 
 	fsp_free_extent(space, zip_size, page, mtr);
 
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	for (i = 0; i < FSP_EXTENT_SIZE; i++) {
 
 		buf_page_set_file_page_was_freed(space,
 						 first_page_in_extent + i);
 	}
-#endif
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 }
 
 /**********************************************************************//**

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	2011-01-30 16:56:39 +0000
+++ b/storage/innobase/handler/ha_innodb.cc	2011-02-08 17:33:31 +0000
@@ -2266,9 +2266,14 @@ ha_innobase::reset_template(void)
 
 	prebuilt->keep_other_fields_on_keyread = 0;
 	prebuilt->read_just_key = 0;
-	/* Reset index condition pushdown state */
-	prebuilt->idx_cond = NULL;
-	prebuilt->idx_cond_n_cols = 0;
+	/* Reset index condition pushdown state. */
+	if (prebuilt->idx_cond) {
+		prebuilt->idx_cond = NULL;
+		prebuilt->idx_cond_n_cols = 0;
+		/* Invalidate prebuilt->mysql_template
+		in ha_innobase::write_row(). */
+		prebuilt->template_type = ROW_MYSQL_NO_TEMPLATE;
+	}
 }
 
 /*****************************************************************//**
@@ -6659,6 +6664,17 @@ create_table_def(
 		DBUG_RETURN(HA_ERR_GENERIC);
 	}
 
+	/* MySQL does the name length check. But we do additional check
+	on the name length here */
+	if (strlen(table_name) > MAX_FULL_NAME_LEN) {
+		push_warning_printf(
+			(THD*) trx->mysql_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+			ER_TABLE_NAME,
+			"InnoDB: Table Name or Database Name is too long");
+
+		DBUG_RETURN(ER_TABLE_NAME);
+	}
+
 	n_cols = form->s->fields;
 
 	/* We pass 0 as the space id, and determine at a lower level the space

=== modified file 'storage/innobase/handler/handler0alter.cc'
--- a/storage/innobase/handler/handler0alter.cc	2011-01-26 13:57:04 +0000
+++ b/storage/innobase/handler/handler0alter.cc	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2005, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/handler/i_s.cc'
--- a/storage/innobase/handler/i_s.cc	2011-01-07 04:06:36 +0000
+++ b/storage/innobase/handler/i_s.cc	2011-02-08 17:33:31 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2007, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -857,16 +857,7 @@ fill_innodb_locks_from_cache(
 	for (i = 0; i < rows_num; i++) {
 
 		i_s_locks_row_t*	row;
-
-		/* note that the decoded database or table name is
-		never expected to be longer than NAME_LEN;
-		NAME_LEN for database name
-		2 for surrounding quotes around database name
-		NAME_LEN for table name
-		2 for surrounding quotes around table name
-		1 for the separating dot (.)
-		9 for the #mysql50# prefix */
-		char			buf[2 * NAME_LEN + 14];
+		char			buf[MAX_FULL_NAME_LEN + 1];
 		const char*		bufend;
 
 		char			lock_trx_id[TRX_ID_MAX_LEN + 1];
@@ -3283,19 +3274,6 @@ i_s_innodb_buffer_page_get_info(
 		page_type = fil_page_get_type(frame);
 
 		i_s_innodb_set_page_type(page_info, page_type, frame);
-
-	} else if (page_info->page_state == BUF_BLOCK_MEMORY) {
-		const byte*	frame;
-		const buf_block_t*block;
-		ulint		page_type;
-
-		block = reinterpret_cast<const buf_block_t*>(bpage);
-
-		frame = block->frame;
-
-		page_type = fil_page_get_type(frame);
-
-		i_s_innodb_set_page_type(page_info, page_type, frame);
 	} else {
 		page_info->page_type = I_S_PAGE_TYPE_UNKNOWN;
 	}
@@ -4066,7 +4044,7 @@ static ST_FIELD_INFO	innodb_sys_tables_f
 
 #define SYS_TABLE_NAME		1
 	{STRUCT_FLD(field_name,		"NAME"),
-	 STRUCT_FLD(field_length,	NAME_LEN + 1),
+	 STRUCT_FLD(field_length,	MAX_FULL_NAME_LEN + 1),
 	 STRUCT_FLD(field_type,		MYSQL_TYPE_STRING),
 	 STRUCT_FLD(value,		0),
 	 STRUCT_FLD(field_flags,	0),

=== modified file 'storage/innobase/ibuf/ibuf0ibuf.c'
--- a/storage/innobase/ibuf/ibuf0ibuf.c	2011-01-27 08:19:06 +0000
+++ b/storage/innobase/ibuf/ibuf0ibuf.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -2276,9 +2276,9 @@ ibuf_remove_free_page(void)
 	fseg_free_page(header_page + IBUF_HEADER + IBUF_TREE_SEG_HEADER,
 		       IBUF_SPACE_ID, page_no, &mtr);
 
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	buf_page_reset_file_page_was_freed(IBUF_SPACE_ID, page_no);
-#endif
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 
 	ibuf_enter();
 
@@ -2322,9 +2322,9 @@ ibuf_remove_free_page(void)
 	ibuf_bitmap_page_set_bits(
 		bitmap_page, page_no, zip_size, IBUF_BITMAP_IBUF, FALSE, &mtr);
 
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	buf_page_set_file_page_was_freed(IBUF_SPACE_ID, page_no);
-#endif
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 	mtr_commit(&mtr);
 
 	ibuf_exit();

=== modified file 'storage/innobase/include/btr0cur.h'
--- a/storage/innobase/include/btr0cur.h	2011-01-15 08:31:58 +0000
+++ b/storage/innobase/include/btr0cur.h	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -501,8 +501,8 @@ file segment of the index tree.
 @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
 UNIV_INTERN
 ulint
-btr_store_big_rec_extern_fields(
-/*============================*/
+btr_store_big_rec_extern_fields_func(
+/*=================================*/
 	dict_index_t*	index,		/*!< in: index of rec; the index tree
 					MUST be X-latched */
 	buf_block_t*	rec_block,	/*!< in/out: block containing rec */
@@ -511,10 +511,42 @@ btr_store_big_rec_extern_fields(
 					the "external storage" flags in offsets
 					will not correspond to rec when
 					this function returns */
-	big_rec_t*	big_rec_vec,	/*!< in: vector containing fields
+#ifdef UNIV_DEBUG
+	mtr_t*		local_mtr,	/*!< in: mtr containing the
+					latch to rec and to the tree */
+#endif /* UNIV_DEBUG */
+#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
+	ibool		update_in_place,/*! in: TRUE if the record is updated
+					in place (not delete+insert) */
+#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
+	const big_rec_t*big_rec_vec)	/*!< in: vector containing fields
 					to be stored externally */
-	mtr_t*		local_mtr);	/*!< in: mtr containing the latch to
-					rec and to the tree */
+	__attribute__((nonnull));
+
+/** Stores the fields in big_rec_vec to the tablespace and puts pointers to
+them in rec.  The extern flags in rec will have to be set beforehand.
+The fields are stored on pages allocated from leaf node
+file segment of the index tree.
+@param index	in: clustered index; MUST be X-latched by mtr
+@param b	in/out: block containing rec; MUST be X-latched by mtr
+@param rec	in/out: clustered index record
+@param offsets	in: rec_get_offsets(rec, index);
+		the "external storage" flags in offsets will not be adjusted
+@param mtr	in: mini-transaction that holds x-latch on index and b
+@param upd	in: TRUE if the record is updated in place (not delete+insert)
+@param big	in: vector containing fields to be stored externally
+@return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
+#ifdef UNIV_DEBUG
+# define btr_store_big_rec_extern_fields(index,b,rec,offsets,mtr,upd,big) \
+	btr_store_big_rec_extern_fields_func(index,b,rec,offsets,mtr,upd,big)
+#elif defined UNIV_BLOB_LIGHT_DEBUG
+# define btr_store_big_rec_extern_fields(index,b,rec,offsets,mtr,upd,big) \
+	btr_store_big_rec_extern_fields_func(index,b,rec,offsets,upd,big)
+#else
+# define btr_store_big_rec_extern_fields(index,b,rec,offsets,mtr,upd,big) \
+	btr_store_big_rec_extern_fields_func(index,b,rec,offsets,big)
+#endif
+
 /*******************************************************************//**
 Frees the space in an externally stored field to the file space
 management if the field in data is owned the externally stored field,

=== modified file 'storage/innobase/include/buf0buf.h'
--- a/storage/innobase/include/buf0buf.h	2011-01-25 09:24:38 +0000
+++ b/storage/innobase/include/buf0buf.h	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -485,7 +485,7 @@ buf_reset_check_index_page_at_flush(
 /*================================*/
 	ulint	space,	/*!< in: space id */
 	ulint	offset);/*!< in: page number */
-#ifdef UNIV_DEBUG_FILE_ACCESSES
+#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 /********************************************************************//**
 Sets file_page_was_freed TRUE if the page is found in the buffer pool.
 This function should be called when we free a file page and want the
@@ -510,7 +510,7 @@ buf_page_reset_file_page_was_freed(
 /*===============================*/
 	ulint	space,	/*!< in: space id */
 	ulint	offset);	/*!< in: page number */
-#endif /* UNIV_DEBUG_FILE_ACCESSES */
+#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 /********************************************************************//**
 Reads the freed_page_clock of a buffer block.
 @return	freed_page_clock */
@@ -1491,11 +1491,11 @@ struct buf_page_struct{
 					0 if the block was never accessed
 					in the buffer pool */
 	/* @} */
-# ifdef UNIV_DEBUG_FILE_ACCESSES
+# if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
 	ibool		file_page_was_freed;
 					/*!< this is set to TRUE when fsp
 					frees a page in buffer pool */
-# endif /* UNIV_DEBUG_FILE_ACCESSES */
+# endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 #endif /* !UNIV_HOTBACKUP */
 };
 

=== modified file 'storage/innobase/include/buf0lru.h'
--- a/storage/innobase/include/buf0lru.h	2011-01-25 09:24:38 +0000
+++ b/storage/innobase/include/buf0lru.h	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/include/dict0types.h'
--- a/storage/innobase/include/dict0types.h	2011-01-17 12:15:40 +0000
+++ b/storage/innobase/include/dict0types.h	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/include/os0sync.h'
--- a/storage/innobase/include/os0sync.h	2011-01-21 04:22:26 +0000
+++ b/storage/innobase/include/os0sync.h	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by

=== modified file 'storage/innobase/include/os0sync.ic'
--- a/storage/innobase/include/os0sync.ic	2011-01-21 04:22:26 +0000
+++ b/storage/innobase/include/os0sync.ic	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/include/rem0cmp.h'
--- a/storage/innobase/include/rem0cmp.h	2011-01-15 08:31:58 +0000
+++ b/storage/innobase/include/rem0cmp.h	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/include/rem0cmp.ic'
--- a/storage/innobase/include/rem0cmp.ic	2011-01-15 08:31:58 +0000
+++ b/storage/innobase/include/rem0cmp.ic	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/include/row0upd.h'
--- a/storage/innobase/include/row0upd.h	2010-12-21 12:49:41 +0000
+++ b/storage/innobase/include/row0upd.h	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -280,19 +280,29 @@ NOTE: we compare the fields as binary st
 @return TRUE if update vector changes an ordering field in the index record */
 UNIV_INTERN
 ibool
-row_upd_changes_ord_field_binary(
-/*=============================*/
+row_upd_changes_ord_field_binary_func(
+/*==================================*/
+	dict_index_t*	index,	/*!< in: index of the record */
+	const upd_t*	update,	/*!< in: update vector for the row; NOTE: the
+				field numbers in this MUST be clustered index
+				positions! */
+#ifdef UNIV_DEBUG
+	const que_thr_t*thr,	/*!< in: query thread */
+#endif /* UNIV_DEBUG */
 	const dtuple_t*	row,	/*!< in: old value of row, or NULL if the
 				row and the data values in update are not
 				known when this function is called, e.g., at
 				compile time */
-	const row_ext_t*ext,	/*!< NULL, or prefixes of the externally
+	const row_ext_t*ext)	/*!< NULL, or prefixes of the externally
 				stored columns in the old row */
-	dict_index_t*	index,	/*!< in: index of the record */
-	const upd_t*	update)	/*!< in: update vector for the row; NOTE: the
-				field numbers in this MUST be clustered index
-				positions! */
-	__attribute__((nonnull(3,4), warn_unused_result));
+	__attribute__((nonnull(1,2), warn_unused_result));
+#ifdef UNIV_DEBUG
+# define row_upd_changes_ord_field_binary(index,update,thr,row,ext)	\
+	row_upd_changes_ord_field_binary_func(index,update,thr,row,ext)
+#else /* UNIV_DEBUG */
+# define row_upd_changes_ord_field_binary(index,update,thr,row,ext)	\
+	row_upd_changes_ord_field_binary_func(index,update,row,ext)
+#endif /* UNIV_DEBUG */
 /***********************************************************//**
 Checks if an update vector changes an ordering field of an index record.
 This function is fast if the update vector is short or the number of ordering

=== modified file 'storage/innobase/include/srv0srv.h'
--- a/storage/innobase/include/srv0srv.h	2011-01-27 09:48:41 +0000
+++ b/storage/innobase/include/srv0srv.h	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, 2009, Google Inc.
 Copyright (c) 2009, Percona Inc.
 

=== modified file 'storage/innobase/include/trx0trx.h'
--- a/storage/innobase/include/trx0trx.h	2011-01-27 11:45:15 +0000
+++ b/storage/innobase/include/trx0trx.h	2011-01-30 21:11:14 +0000
@@ -319,13 +319,17 @@ trx_set_dict_operation(
 Determines if a transaction is in the given state.
 The caller must hold trx_sys->lock, or it must be the thread
 that is serving a running transaction.
+A running transaction must be in trx_sys->trx_list.
 @return	TRUE if trx->state == state */
 UNIV_INLINE
 ibool
 trx_state_eq(
 /*=========*/
 	const trx_t*	trx,	/*!< in: transaction */
-	trx_state_t	state)	/*!< in: state */
+	trx_state_t	state)	/*!< in: state;
+				if state != TRX_STATE_NOT_STARTED
+				asserts that
+				trx->state != TRX_STATE_NOT_STARTED */
 	__attribute__((nonnull, warn_unused_result));
 # ifdef UNIV_DEBUG
 /**********************************************************************//**

=== modified file 'storage/innobase/include/trx0trx.ic'
--- a/storage/innobase/include/trx0trx.ic	2011-01-24 10:28:28 +0000
+++ b/storage/innobase/include/trx0trx.ic	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -27,13 +27,17 @@ Created 3/26/1996 Heikki Tuuri
 Determines if a transaction is in the given state.
 The caller must hold trx_sys->lock, or it must be the thread
 that is serving a running transaction.
+A running transaction must be in trx_sys->trx_list.
 @return	TRUE if trx->state == state */
 UNIV_INLINE
 ibool
 trx_state_eq(
 /*=========*/
 	const trx_t*	trx,	/*!< in: transaction */
-	trx_state_t	state)	/*!< in: state */
+	trx_state_t	state)	/*!< in: state;
+				if state != TRX_STATE_NOT_STARTED
+				asserts that
+				trx->state != TRX_STATE_NOT_STARTED */
 {
 #ifdef UNIV_DEBUG
 	switch (trx->state) {

=== modified file 'storage/innobase/include/univ.i'
--- a/storage/innobase/include/univ.i	2011-01-21 16:14:47 +0000
+++ b/storage/innobase/include/univ.i	2011-02-08 17:34:42 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 Copyright (c) 2009, Sun Microsystems, Inc.
 
@@ -179,14 +179,15 @@ command. Not tested on Windows. */
 						debugging without UNIV_DEBUG */
 #define UNIV_BUF_DEBUG				/* Enable buffer pool
 						debugging without UNIV_DEBUG */
+#define UNIV_BLOB_LIGHT_DEBUG			/* Enable off-page column
+						debugging without UNIV_DEBUG */
 #define UNIV_DEBUG				/* Enable ut_ad() assertions
 						and disable UNIV_INLINE */
 #define UNIV_DEBUG_LOCK_VALIDATE		/* Enable
 						ut_ad(lock_rec_validate_page())
 						assertions. */
-#define UNIV_DEBUG_FILE_ACCESSES		/* Debug .ibd file access
-						(field file_page_was_freed
-						in buf_page_t) */
+#define UNIV_DEBUG_FILE_ACCESSES		/* Enable freed block access
+						debugging without UNIV_DEBUG */
 #define UNIV_LRU_DEBUG				/* debug the buffer pool LRU */
 #define UNIV_HASH_DEBUG				/* debug HASH_ macros */
 #define UNIV_LIST_DEBUG				/* debug UT_LIST_ macros */
@@ -313,6 +314,14 @@ longer names internally */
 the MySQL's NAME_LEN, see check_and_convert_db_name(). */
 #define MAX_DATABASE_NAME_LEN	MAX_TABLE_NAME_LEN
 
+/* MAX_FULL_NAME_LEN defines the full name path including the
+database name and table name. In addition, 14 bytes is added for:
+	2 for surrounding quotes around table name
+	1 for the separating dot (.)
+	9 for the #mysql50# prefix */
+#define MAX_FULL_NAME_LEN				\
+	(MAX_TABLE_NAME_LEN + MAX_DATABASE_NAME_LEN + 14)
+
 /*
 			UNIVERSAL TYPE DEFINITIONS
 			==========================

=== modified file 'storage/innobase/include/ut0vec.h'
--- a/storage/innobase/include/ut0vec.h	2010-07-16 21:00:50 +0000
+++ b/storage/innobase/include/ut0vec.h	2010-11-30 11:03:30 +0000
@@ -94,6 +94,25 @@ ib_vector_get(
 	ulint		n);	/*!< in: element index to get */
 
 /****************************************************************//**
+Get last element. The vector must not be empty.
+@return	last element */
+UNIV_INLINE
+void*
+ib_vector_get_last(
+/*===============*/
+	ib_vector_t*	vec);	/*!< in: vector */
+
+/****************************************************************//**
+Set the n'th element. */
+UNIV_INLINE
+void
+ib_vector_set(
+/*==========*/
+	ib_vector_t*	vec,	/*!< in/out: vector */
+	ulint		n,	/*!< in: element index to set */
+	void*		elem);	/*!< in: data element */
+
+/****************************************************************//**
 Remove the last element from the vector. */
 UNIV_INLINE
 void*

=== modified file 'storage/innobase/include/ut0vec.ic'
--- a/storage/innobase/include/ut0vec.ic	2010-07-16 21:00:50 +0000
+++ b/storage/innobase/include/ut0vec.ic	2010-11-30 11:03:30 +0000
@@ -51,6 +51,35 @@ ib_vector_get(
 }
 
 /****************************************************************//**
+Get last element. The vector must not be empty.
+@return	last element */
+UNIV_INLINE
+void*
+ib_vector_get_last(
+/*===============*/
+	ib_vector_t*	vec)	/*!< in: vector */
+{
+	ut_a(vec->used > 0);
+
+	return(vec->data[vec->used - 1]);
+}
+
+/****************************************************************//**
+Set the n'th element. */
+UNIV_INLINE
+void
+ib_vector_set(
+/*==========*/
+	ib_vector_t*	vec,	/*!< in/out: vector */
+	ulint		n,	/*!< in: element index to set */
+	void*		elem)	/*!< in: data element */
+{
+	ut_a(n < vec->used);
+
+	vec->data[n] = elem;
+}
+
+/****************************************************************//**
 Remove the last element from the vector.
 @return	last vector element */
 UNIV_INLINE

=== modified file 'storage/innobase/lock/lock0lock.c'
--- a/storage/innobase/lock/lock0lock.c	2011-01-27 08:15:24 +0000
+++ b/storage/innobase/lock/lock0lock.c	2011-02-08 17:33:31 +0000
@@ -2261,14 +2261,13 @@ lock_grant(
 {
 	ut_ad(lock_mutex_own());
 
-	trx_mutex_enter(lock->trx);
-
 	lock_reset_lock_and_trx_wait(lock);
+	trx_mutex_enter(lock->trx);
 
 	if (lock_get_mode(lock) == LOCK_AUTO_INC) {
 		dict_table_t*	table = lock->un_member.tab_lock.table;
 
-		if (table->autoinc_trx == lock->trx) {
+		if (UNIV_UNLIKELY(table->autoinc_trx == lock->trx)) {
 			fprintf(stderr,
 				"InnoDB: Error: trx already had"
 				" an AUTO-INC lock!\n");
@@ -2319,8 +2318,6 @@ lock_rec_cancel(
 	ut_ad(lock_mutex_own());
 	ut_ad(lock_get_type_low(lock) == LOCK_REC);
 
-	trx_mutex_enter(lock->trx);
-
 	/* Reset the bit (there can be only one set bit) in the lock bitmap */
 	lock_rec_reset_nth_bit(lock, lock_rec_find_set_bit(lock));
 
@@ -2330,6 +2327,8 @@ lock_rec_cancel(
 
 	/* The following function releases the trx from lock wait */
 
+	trx_mutex_enter(lock->trx);
+
 	thr = que_thr_end_lock_wait(lock->trx);
 
 	if (thr != NULL) {
@@ -3488,7 +3487,6 @@ lock_deadlock_occurs(
 	trx_t*	trx)	/*!< in/out: transaction */
 {
 	trx_t*		mark_trx;
-	ulint		ret;
 	ulint		cost	= 0;
 
 	ut_ad(trx);
@@ -3520,15 +3518,22 @@ retry:
 
 	trx_mutex_enter(trx);
 
-	ret = lock_deadlock_recursive(trx, trx, lock, &cost, 0);
-
-	switch (ret) {
+	switch (lock_deadlock_recursive(trx, trx, lock, &cost, 0)) {
 	case LOCK_VICTIM_IS_OTHER:
 		/* We chose some other trx as a victim: retry if there still
 		is a deadlock */
 		goto retry;
 
 	case LOCK_VICTIM_EXCEED_MAX_DEPTH:
+		/* Release the mutex to obey the latching order.
+		This is safe, because lock_deadlock_occurs() is invoked
+		when a lock wait is enqueued for the currently running
+		transaction. Because trx is a running transaction
+		(it is not currently suspended because of a lock wait),
+		its state can only be changed by this thread, which is
+		currently associated with the transaction. */
+		trx_mutex_exit(trx);
+
 		/* If the lock search exceeds the max step
 		or the max depth, the current trx will be
 		the victim. Print its information. */
@@ -3540,32 +3545,31 @@ retry:
 			" FOLLOWING TRANSACTION \n\n"
 			"*** TRANSACTION:\n");
 
-		/* To obey the latching order */
-		trx_mutex_exit(trx);
-
 		lock_deadlock_trx_print(trx, 3000);
 
-		trx_mutex_enter(trx);
-
 		lock_deadlock_fputs(
 			"*** WAITING FOR THIS LOCK TO BE GRANTED:\n");
 
 		lock_deadlock_lock_print(lock);
 
+		trx_mutex_enter(trx);
 		break;
 
 	case LOCK_VICTIM_IS_START:
 		lock_deadlock_fputs("*** WE ROLL BACK TRANSACTION (2)\n");
 		break;
 
-	default:
-		/* No deadlock detected*/
+	case LOCK_VICTIM_NONE:
+		/* No deadlock detected */
+		ut_ad(trx_mutex_own(trx));
+		ut_ad(lock_mutex_own());
 		return(FALSE);
 	}
 
 	lock_deadlock_found = TRUE;
 
 	ut_ad(trx_mutex_own(trx));
+	ut_ad(lock_mutex_own());
 
 	return(TRUE);
 }
@@ -3658,7 +3662,6 @@ lock_deadlock_recursive(
 
 			if (lock_trx == start) {
 
-				/* To obey the latching order */
 				trx_mutex_exit(start);
 
 				/* We came back to the recursion starting
@@ -3843,6 +3846,80 @@ lock_table_create(
 }
 
 /*************************************************************//**
+Pops autoinc lock requests from the transaction's autoinc_locks. We
+handle the case where there are gaps in the array and they need to
+be popped off the stack. */
+UNIV_INLINE
+void
+lock_table_pop_autoinc_locks(
+/*=========================*/
+	trx_t*	trx)	/*!< in/out: transaction that owns the AUTOINC locks */
+{
+	ut_ad(lock_mutex_own());
+	ut_ad(!ib_vector_is_empty(trx->autoinc_locks));
+
+	/* Skip any gaps, gaps are NULL lock entries in the
+	trx->autoinc_locks vector. */
+
+	do {
+		ib_vector_pop(trx->autoinc_locks);
+
+		if (ib_vector_is_empty(trx->autoinc_locks)) {
+			return;
+		}
+
+	} while (ib_vector_get_last(trx->autoinc_locks) == NULL);
+}
+
+/*************************************************************//**
+Removes an autoinc lock request from the transaction's autoinc_locks. */
+UNIV_INLINE
+void
+lock_table_remove_autoinc_lock(
+/*===========================*/
+	lock_t*	lock,	/*!< in: table lock */
+	trx_t*	trx)	/*!< in/out: transaction that owns the lock */
+{
+	lock_t*	autoinc_lock;
+	lint	i = ib_vector_size(trx->autoinc_locks) - 1;
+
+	ut_ad(lock_mutex_own());
+	ut_ad(lock_get_mode(lock) == LOCK_AUTO_INC);
+	ut_ad(lock_get_type_low(lock) & LOCK_TABLE);
+	ut_ad(!ib_vector_is_empty(trx->autoinc_locks));
+
+	/* With stored functions and procedures the user may drop
+	a table within the same "statement". This special case has
+	to be handled by deleting only those AUTOINC locks that were
+	held by the table being dropped. */
+
+	autoinc_lock = ib_vector_get(trx->autoinc_locks, i);
+
+	/* This is the default fast case. */
+
+	if (autoinc_lock == lock) {
+		lock_table_pop_autoinc_locks(trx);
+	} else {
+		/* The last element should never be NULL */
+		ut_a(autoinc_lock != NULL);
+
+		/* Handle freeing the locks from within the stack. */
+
+		while (--i >= 0) {
+			autoinc_lock = ib_vector_get(trx->autoinc_locks, i);
+
+			if (UNIV_LIKELY(autoinc_lock == lock)) {
+				ib_vector_set(trx->autoinc_locks, i, NULL);
+				return;
+			}
+		}
+
+		/* Must find the autoinc lock. */
+		ut_error;
+	}
+}
+
+/*************************************************************//**
 Removes a table lock request from the queue and the trx list of locks;
 this is a low-level function which does NOT check if waiting requests
 can now be granted. */
@@ -3881,10 +3958,8 @@ lock_table_remove_low(
 
 		if (!lock_get_wait(lock)
 		    && !ib_vector_is_empty(trx->autoinc_locks)) {
-			lock_t*	autoinc_lock;
 
-			autoinc_lock = ib_vector_pop(trx->autoinc_locks);
-			ut_a(autoinc_lock == lock);
+			lock_table_remove_autoinc_lock(lock, trx);
 		}
 
 		ut_a(table->n_waiting_or_granted_auto_inc_locks > 0);
@@ -4771,9 +4846,8 @@ loop:
 
 	if (trx == NULL) {
 
-		rw_lock_s_unlock(&trx_sys->lock);
-
 		lock_mutex_exit();
+		rw_lock_s_unlock(&trx_sys->lock);
 
 		ut_ad(lock_validate());
 
@@ -4858,9 +4932,8 @@ loop:
 				goto print_rec;
 			}
 
-			rw_lock_s_unlock(&trx_sys->lock);
-
 			lock_mutex_exit();
+			rw_lock_s_unlock(&trx_sys->lock);
 
 			mtr_start(&mtr);
 
@@ -4897,8 +4970,6 @@ print_rec:
 
 		nth_trx++;
 		nth_lock = 0;
-
-		goto loop;
 	}
 
 	goto loop;
@@ -5257,10 +5328,10 @@ lock_validate(void)
 		}
 	}
 
-	rw_lock_s_unlock(&trx_sys->lock);
-
 	lock_mutex_exit();
 
+	rw_lock_s_unlock(&trx_sys->lock);
+
 	return(TRUE);
 }
 #endif /* UNIV_DEBUG */
@@ -5307,8 +5378,9 @@ lock_rec_insert_check_and_lock(
 	next_rec_heap_no = page_rec_get_heap_no(next_rec);
 
 	lock_mutex_enter();
-
-	trx_mutex_enter(trx);
+	/* Because this code is invoked for a running transaction by
+	the thread that is serving the transaction, it is not necessary
+	to hold trx->mutex here. */
 
 	/* When inserting a record into an index, the table must be at
 	least IX-locked or we must be building an index, in which case
@@ -5322,8 +5394,6 @@ lock_rec_insert_check_and_lock(
 	if (UNIV_LIKELY(lock == NULL)) {
 		/* We optimize CPU time usage in the simplest case */
 
-		trx_mutex_exit(trx);
-
 		lock_mutex_exit();
 
 		if (!dict_index_is_clust(index)) {
@@ -5355,16 +5425,16 @@ lock_rec_insert_check_and_lock(
 		    block, next_rec_heap_no, trx)) {
 
 		/* Note that we may get DB_SUCCESS also here! */
+		trx_mutex_enter(trx);
 		err = lock_rec_enqueue_waiting(LOCK_X | LOCK_GAP
 					       | LOCK_INSERT_INTENTION,
 					       block, next_rec_heap_no,
 					       index, thr);
+		trx_mutex_exit(trx);
 	} else {
 		err = DB_SUCCESS;
 	}
 
-	trx_mutex_exit(trx);
-
 	lock_mutex_exit();
 
 	switch (err) {
@@ -6222,9 +6292,8 @@ lock_trx_handle_wait(
 		err = DB_SUCCESS;
 	}
 
-	trx_mutex_exit(trx);
-
 	lock_mutex_exit();
+	trx_mutex_exit(trx);
 
 	return(err);
 }

=== modified file 'storage/innobase/lock/lock0wait.c'
--- a/storage/innobase/lock/lock0wait.c	2011-01-27 09:48:41 +0000
+++ b/storage/innobase/lock/lock0wait.c	2011-02-07 21:12:43 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -150,59 +150,49 @@ lock_wait_table_reserve_slot(
 
 	slot = lock_sys->waiting_threads;
 
-	for (i = 0; i < OS_THREAD_MAX_N; ++i, ++slot) {
+	for (i = OS_THREAD_MAX_N; i--; ++slot) {
 		if (!slot->in_use) {
-			break;
-		}
-	}
-
-	/* Check if we have run out of slots. */
-	if (slot == lock_sys->waiting_threads+ OS_THREAD_MAX_N) {
-
-		ut_print_timestamp(stderr);
-
-		fprintf(stderr,
-			"  InnoDB: There appear to be %lu user"
-			" threads currently waiting\n"
-			"InnoDB: inside InnoDB, which is the"
-			" upper limit. Cannot continue operation.\n"
-			"InnoDB: We intentionally generate"
-			" a seg fault to print a stack trace\n"
-			"InnoDB: on Linux. But first we print"
-			" a list of waiting threads.\n", (ulong) i);
+			slot->in_use = TRUE;
+			slot->thr = thr;
+			slot->thr->slot = slot;
+			slot->id = os_thread_get_curr_id();
+			slot->handle = os_thread_get_curr();
+
+			if (slot->event == NULL) {
+				slot->event = os_event_create(NULL);
+				ut_a(slot->event);
+			}
 
-		lock_wait_table_print();
+			os_event_reset(slot->event);
+			slot->suspended = TRUE;
+			slot->suspend_time = ut_time();
+			slot->wait_timeout = wait_timeout;
 
-		ut_error;
-	} else {
+			if (slot == lock_sys->last_slot) {
+				++lock_sys->last_slot;
+			}
 
-		ut_a(slot->in_use == FALSE);
+			ut_ad(lock_sys->last_slot
+			      <= lock_sys->waiting_threads + OS_THREAD_MAX_N);
 
-		slot->in_use = TRUE;
-		slot->thr = thr;
-		slot->thr->slot = slot;
-		slot->id = os_thread_get_curr_id();
-		slot->handle = os_thread_get_curr();
-
-		if (slot->event == NULL) {
-			slot->event = os_event_create(NULL);
-			ut_a(slot->event);
+			return(slot);
 		}
-
-		os_event_reset(slot->event);
-		slot->suspended = TRUE;
-		slot->suspend_time = ut_time();
-		slot->wait_timeout = wait_timeout;
 	}
 
-	if (slot == lock_sys->last_slot) {
-		++lock_sys->last_slot;
-	}
+	ut_print_timestamp(stderr);
 
-	ut_ad(lock_sys->last_slot
-	      <= lock_sys->waiting_threads+ OS_THREAD_MAX_N);
+	fprintf(stderr,
+		"  InnoDB: There appear to be %lu user"
+		" threads currently waiting\n"
+		"InnoDB: inside InnoDB, which is the"
+		" upper limit. Cannot continue operation.\n"
+		"InnoDB: As a last thing, we print"
+		" a list of waiting threads.\n", (ulong) OS_THREAD_MAX_N);
 
-	return(slot);
+	lock_wait_table_print();
+
+	ut_error;
+	return(NULL);
 }
 
 /***************************************************************//**
@@ -245,7 +235,7 @@ lock_wait_suspend_thread(
 
 	if (thr->state == QUE_THR_RUNNING) {
 
-		ut_ad(thr->is_active == TRUE);
+		ut_ad(thr->is_active);
 
 		/* The lock has already been released or this transaction
 		was chosen as a deadlock victim: no need to suspend */
@@ -256,13 +246,12 @@ lock_wait_suspend_thread(
 			trx->lock.was_chosen_as_deadlock_victim = FALSE;
 		}
 
-		trx_mutex_exit(trx);
-
 		lock_wait_mutex_exit();
+		trx_mutex_exit(trx);
 		return;
 	}
 
-	ut_ad(thr->is_active == FALSE);
+	ut_ad(!thr->is_active);
 
 	slot = lock_wait_table_reserve_slot(thr, lock_wait_timeout);
 
@@ -283,8 +272,8 @@ lock_wait_suspend_thread(
 
 	os_event_set(srv_timeout_event);
 
-	trx_mutex_exit(trx);
 	lock_wait_mutex_exit();
+	trx_mutex_exit(trx);
 
 	if (trx->declared_to_be_inside_innodb) {
 
@@ -395,7 +384,7 @@ lock_wait_release_thread_if_suspended(
 
 	/* We own both the lock mutex and the trx_t::mutex but not the
 	lock wait mutex. This is OK because other threads will see the state
-	of this mutex as being in use and no other thread can change the state
+	of this slot as being in use and no other thread can change the state
 	of the slot to free unless that thread also owns the lock mutex. */
 
 	if (thr->slot != NULL && thr->slot->in_use && thr->slot->thr == thr) {

=== modified file 'storage/innobase/mem/mem0mem.c'
--- a/storage/innobase/mem/mem0mem.c	2011-01-25 09:24:38 +0000
+++ b/storage/innobase/mem/mem0mem.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/page/page0zip.c'
--- a/storage/innobase/page/page0zip.c	2011-01-25 09:24:38 +0000
+++ b/storage/innobase/page/page0zip.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2005, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/que/que0que.c'
--- a/storage/innobase/que/que0que.c	2010-11-03 03:18:47 +0000
+++ b/storage/innobase/que/que0que.c	2011-02-07 11:23:17 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -206,6 +206,7 @@ que_thr_end_lock_wait(
 	ibool		was_active;
 
 	ut_ad(lock_mutex_own());
+	ut_ad(trx_mutex_own(trx));
 
 	thr = trx->lock.wait_thr;
 
@@ -215,8 +216,6 @@ que_thr_end_lock_wait(
 	/* In MySQL this is the only possible state here */
 	ut_a(thr->state == QUE_THR_LOCK_WAIT);
 
-	ut_ad(thr->state == QUE_THR_LOCK_WAIT);
-
 	was_active = thr->is_active;
 
 	que_thr_move_to_run_state(thr);
@@ -704,7 +703,6 @@ que_thr_stop(
 	que_thr_t*	thr)	/*!< in: query thread */
 {
 	que_t*		graph;
-	ibool		ret	= TRUE;
 	trx_t*		trx = thr_get_trx(thr);;
 
 	graph = thr->graph;
@@ -732,10 +730,10 @@ que_thr_stop(
 	} else {
 		ut_ad(graph->state == QUE_FORK_ACTIVE);
 
-		ret = FALSE;
+		return(FALSE);
 	}
 
-	return(ret);
+	return(TRUE);
 }
 
 /**********************************************************************//**

=== modified file 'storage/innobase/rem/rem0cmp.c'
--- a/storage/innobase/rem/rem0cmp.c	2011-01-15 08:31:58 +0000
+++ b/storage/innobase/rem/rem0cmp.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software

=== modified file 'storage/innobase/row/row0ins.c'
--- a/storage/innobase/row/row0ins.c	2011-01-18 10:55:35 +0000
+++ b/storage/innobase/row/row0ins.c	2011-02-02 14:08:30 +0000
@@ -2146,7 +2146,7 @@ function_exit:
 
 		err = btr_store_big_rec_extern_fields(
 			index, btr_cur_get_block(&cursor),
-			rec, offsets, big_rec, &mtr);
+			rec, offsets, &mtr, FALSE, big_rec);
 
 		if (modify) {
 			dtuple_big_rec_free(big_rec);

=== modified file 'storage/innobase/row/row0merge.c'
--- a/storage/innobase/row/row0merge.c	2011-01-28 09:42:04 +0000
+++ b/storage/innobase/row/row0merge.c	2011-02-08 17:33:31 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2005, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 2005, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -2160,7 +2160,7 @@ row_merge_drop_temp_indexes(void)
 }
 
 /*********************************************************************//**
-Creates temperary merge files, and if UNIV_PFS_IO defined, register
+Creates temporary merge files, and if UNIV_PFS_IO defined, register
 the file descriptor with Performance Schema.
 @return File descriptor */
 UNIV_INLINE
@@ -2400,7 +2400,7 @@ row_merge_rename_tables(
 {
 	ulint		err	= DB_ERROR;
 	pars_info_t*	info;
-	char		old_name[MAX_TABLE_NAME_LEN + 1];
+	char		old_name[MAX_FULL_NAME_LEN + 1];
 
 	ut_ad(trx->mysql_thd == NULL
 	      || trx->mysql_thread_id == os_thread_get_curr_id());
@@ -2416,7 +2416,7 @@ row_merge_rename_tables(
 		ut_print_timestamp(stderr);
 		fprintf(stderr, "InnoDB: too long table name: '%s', "
 			"max length is %d\n", old_table->name,
-			MAX_TABLE_NAME_LEN);
+			MAX_FULL_NAME_LEN);
 		ut_error;
 	}
 

=== modified file 'storage/innobase/row/row0mysql.c'
--- a/storage/innobase/row/row0mysql.c	2011-01-06 07:21:08 +0000
+++ b/storage/innobase/row/row0mysql.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2000, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 2000, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -1938,15 +1938,13 @@ err_exit:
 
 	err = trx->error_state;
 
-	if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
+	switch (err) {
+	case DB_SUCCESS:
+		break;
+	case DB_OUT_OF_FILE_SPACE:
 		trx->error_state = DB_SUCCESS;
 		trx_general_rollback_for_mysql(trx, NULL);
-		/* TO DO: free table?  The code below will dereference
-		table->name, though. */
-	}
 
-	switch (err) {
-	case DB_OUT_OF_FILE_SPACE:
 		ut_print_timestamp(stderr);
 		fputs("  InnoDB: Warning: cannot create table ",
 		      stderr);
@@ -1969,9 +1967,13 @@ err_exit:
 		break;
 
 	case DB_DUPLICATE_KEY:
+	default:
 		/* We may also get err == DB_ERROR if the .ibd file for the
 		table already exists */
 
+		trx->error_state = DB_SUCCESS;
+		trx_general_rollback_for_mysql(trx, NULL);
+		dict_mem_table_free(table);
 		break;
 	}
 

=== modified file 'storage/innobase/row/row0purge.c'
--- a/storage/innobase/row/row0purge.c	2010-12-21 12:49:41 +0000
+++ b/storage/innobase/row/row0purge.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -489,8 +489,11 @@ Purges an update of an existing record. 
 marked record if that record contained an externally stored field. */
 static
 void
-row_purge_upd_exist_or_extern(
-/*==========================*/
+row_purge_upd_exist_or_extern_func(
+/*===============================*/
+#ifdef UNIV_DEBUG
+	const que_thr_t*thr,		/*!< in: query thread */
+#endif /* UNIV_DEBUG */
 	purge_node_t*	node,		/*!< in: row purge node */
 	trx_undo_rec_t*	undo_rec)	/*!< in: record to purge */
 {
@@ -516,8 +519,8 @@ row_purge_upd_exist_or_extern(
 	while (node->index != NULL) {
 		index = node->index;
 
-		if (row_upd_changes_ord_field_binary(NULL, NULL, node->index,
-						     node->update)) {
+		if (row_upd_changes_ord_field_binary(node->index, node->update,
+						     thr, NULL, NULL)) {
 			/* Build the older version of the index entry */
 			entry = row_build_index_entry(node->row, NULL,
 						      index, heap);
@@ -599,6 +602,14 @@ skip_secondaries:
 	}
 }
 
+#ifdef UNIV_DEBUG
+# define row_purge_upd_exist_or_extern(thr,node,undo_rec)	\
+	row_purge_upd_exist_or_extern_func(thr,node,undo_rec)
+#else /* UNIV_DEBUG */
+# define row_purge_upd_exist_or_extern(thr,node,undo_rec)	\
+	row_purge_upd_exist_or_extern_func(node,undo_rec)
+#endif /* UNIV_DEBUG */
+
 /***********************************************************//**
 Parses the row reference and other info in a modify undo log record.
 @return TRUE if purge operation required */
@@ -708,10 +719,13 @@ err_exit:
 Purges the parsed record. */
 static
 void
-row_purge_record(
-/*=============*/
+row_purge_record_func(
+/*==================*/
 	purge_node_t*	node,		/*!< in: row purge node */
 	trx_undo_rec_t*	undo_rec,	/*!< in: record to purge */
+#ifdef UNIV_DEBUG
+	const que_thr_t*thr,		/*!< in: query thread */
+#endif /* UNIV_DEBUG */
 	ibool		updated_extern)	/*!< in: TRUE if external columns
 					were updated */
 {
@@ -727,7 +741,7 @@ row_purge_record(
 	} else if (updated_extern
 		   || node->rec_type == TRX_UNDO_UPD_EXIST_REC) {
 
-		row_purge_upd_exist_or_extern(node, undo_rec);
+		row_purge_upd_exist_or_extern(thr, node, undo_rec);
 	}
 
 	MONITOR_INC(MONITOR_NUM_ROW_PURGE);
@@ -743,11 +757,19 @@ row_purge_record(
 
 }
 
+#ifdef UNIV_DEBUG
+# define row_purge_record(node,undo_rec,thr,updated_extern)	\
+	row_purge_record_func(node,undo_rec,thr,updated_extern)
+#else /* UNIV_DEBUG */
+# define row_purge_record(node,undo_rec,thr,updated_extern)	\
+	row_purge_record_func(node,undo_rec,updated_extern)
+#endif /* UNIV_DEBUG */
+
 /***********************************************************//**
 Fetches an undo log record and does the purge for the recorded operation.
 If none left, or the current purge completed, returns the control to the
 parent node, which is always a query thread node. */
-static
+static __attribute__((nonnull))
 void
 row_purge(
 /*======*/
@@ -755,7 +777,8 @@ row_purge(
 	trx_undo_rec_t*	undo_rec,	/*!< in: record to purge */
 	que_thr_t*	thr)		/*!< in: query thread */
 {
-	ut_ad(node && thr);
+	ut_ad(node);
+	ut_ad(thr);
 
 	if (undo_rec != &trx_purge_dummy_rec) {
 		ibool	updated_extern;
@@ -763,7 +786,7 @@ row_purge(
 		if (row_purge_parse_undo_rec(
 			node, undo_rec, &updated_extern, thr)) {
 
-			row_purge_record(node, undo_rec, updated_extern);
+			row_purge_record(node, undo_rec, thr, updated_extern);
 
 			rw_lock_s_unlock_gen(&dict_operation_lock, 0);
 		}

=== modified file 'storage/innobase/row/row0sel.c'
--- a/storage/innobase/row/row0sel.c	2011-01-18 21:14:22 +0000
+++ b/storage/innobase/row/row0sel.c	2011-02-07 11:23:17 +0000
@@ -4366,7 +4366,8 @@ no_gap_lock:
 
 			err = lock_trx_handle_wait(trx);
 
-			if (err == DB_SUCCESS) {
+			switch (err) {
+			case DB_SUCCESS:
 				/* The lock was granted while we were
 				searching for the last committed version.
 				Do a normal locking read. */
@@ -4374,12 +4375,14 @@ no_gap_lock:
 				offsets = rec_get_offsets(
 					rec, index, offsets, ULINT_UNDEFINED,
 					&heap);
-				break;
-			} else if (err == DB_DEADLOCK) {
+				goto locks_ok;
+			case DB_DEADLOCK:
 				goto lock_wait_or_error;
- 			} else {
-				ut_a(err == DB_LOCK_WAIT);
+			case DB_LOCK_WAIT:
 				err = DB_SUCCESS;
+				break;
+			default:
+				ut_error;
 			}
 
 			if (old_vers == NULL) {
@@ -4469,6 +4472,7 @@ no_gap_lock:
 		}
 	}
 
+locks_ok:
 	/* NOTE that at this point rec can be an old version of a clustered
 	index record built for a consistent read. We cannot assume after this
 	point that rec is on a buffer pool page. Functions like

=== modified file 'storage/innobase/row/row0umod.c'
--- a/storage/innobase/row/row0umod.c	2011-01-18 10:55:35 +0000
+++ b/storage/innobase/row/row0umod.c	2011-02-02 14:08:30 +0000
@@ -173,40 +173,26 @@ row_undo_mod_remove_clust_low(
 	mtr_t*		mtr,	/*!< in: mtr */
 	ulint		mode)	/*!< in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE */
 {
-	btr_pcur_t*	pcur;
 	btr_cur_t*	btr_cur;
 	ulint		err;
-	ibool		success;
 
 	ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC);
-	pcur = &(node->pcur);
-	btr_cur = btr_pcur_get_btr_cur(pcur);
 
-	success = btr_pcur_restore_position(mode, pcur, mtr);
+	/* Find out if the record has been purged already
+	or if we can remove it. */
 
-	if (!success) {
+	if (!btr_pcur_restore_position(mode, &node->pcur, mtr)
+	    || row_vers_must_preserve_del_marked(node->new_trx_id, mtr)) {
 
 		return(DB_SUCCESS);
 	}
 
-	/* Find out if we can remove the whole clustered index record */
-
-	if (node->rec_type == TRX_UNDO_UPD_DEL_REC
-	    && !row_vers_must_preserve_del_marked(node->new_trx_id, mtr)) {
-
-		/* Ok, we can remove */
-	} else {
-		return(DB_SUCCESS);
-	}
+	btr_cur = btr_pcur_get_btr_cur(&node->pcur);
 
 	if (mode == BTR_MODIFY_LEAF) {
-		success = btr_cur_optimistic_delete(btr_cur, mtr);
-
-		if (success) {
-			err = DB_SUCCESS;
-		} else {
-			err = DB_FAIL;
-		}
+		err = btr_cur_optimistic_delete(btr_cur, mtr)
+			? DB_SUCCESS
+			: DB_FAIL;
 	} else {
 		ut_ad(mode == BTR_MODIFY_TREE);
 
@@ -693,8 +679,9 @@ row_undo_mod_upd_exist_sec(
 	while (node->index != NULL) {
 		index = node->index;
 
-		if (row_upd_changes_ord_field_binary(
-			    node->row, node->ext, node->index, node->update)) {
+		if (row_upd_changes_ord_field_binary(node->index, node->update,
+						     thr,
+						     node->row, node->ext)) {
 
 			/* Build the newest version of the index entry */
 			entry = row_build_index_entry(node->row, node->ext,

=== modified file 'storage/innobase/row/row0upd.c'
--- a/storage/innobase/row/row0upd.c	2011-01-26 08:10:28 +0000
+++ b/storage/innobase/row/row0upd.c	2011-02-02 14:08:30 +0000
@@ -1190,25 +1190,31 @@ NOTE: we compare the fields as binary st
 @return TRUE if update vector changes an ordering field in the index record */
 UNIV_INTERN
 ibool
-row_upd_changes_ord_field_binary(
-/*=============================*/
+row_upd_changes_ord_field_binary_func(
+/*==================================*/
+	dict_index_t*	index,	/*!< in: index of the record */
+	const upd_t*	update,	/*!< in: update vector for the row; NOTE: the
+				field numbers in this MUST be clustered index
+				positions! */
+#ifdef UNIV_DEBUG
+	const que_thr_t*thr,	/*!< in: query thread */
+#endif /* UNIV_DEBUG */
 	const dtuple_t*	row,	/*!< in: old value of row, or NULL if the
 				row and the data values in update are not
 				known when this function is called, e.g., at
 				compile time */
-	const row_ext_t*ext,	/*!< NULL, or prefixes of the externally
+	const row_ext_t*ext)	/*!< NULL, or prefixes of the externally
 				stored columns in the old row */
-	dict_index_t*	index,	/*!< in: index of the record */
-	const upd_t*	update)	/*!< in: update vector for the row; NOTE: the
-				field numbers in this MUST be clustered index
-				positions! */
 {
 	ulint			n_unique;
 	ulint			i;
 	const dict_index_t*	clust_index;
 
-	ut_ad(update);
 	ut_ad(index);
+	ut_ad(update);
+	ut_ad(thr);
+	ut_ad(thr->graph);
+	ut_ad(thr->graph->trx);
 
 	n_unique = dict_index_get_n_unique(index);
 
@@ -1261,9 +1267,14 @@ row_upd_changes_ord_field_binary(
 
 			if (UNIV_LIKELY_NULL(buf)) {
 				if (UNIV_UNLIKELY(buf == field_ref_zero)) {
-					/* This should never happen, but
-					we try to fail safe here. */
-					ut_ad(0);
+					/* The externally stored field
+					was not written yet. This
+					record should only be seen by
+					recv_recovery_rollback_active(),
+					when the server had crashed before
+					storing the field. */
+					ut_ad(thr->graph->trx->is_recovered);
+					ut_ad(trx_is_recv(thr->graph->trx));
 					return(TRUE);
 				}
 
@@ -1636,8 +1647,8 @@ row_upd_sec_step(
 	ut_ad(!dict_index_is_clust(node->index));
 
 	if (node->state == UPD_NODE_UPDATE_ALL_SEC
-	    || row_upd_changes_ord_field_binary(node->row, node->ext,
-						node->index, node->update)) {
+	    || row_upd_changes_ord_field_binary(node->index, node->update,
+						thr, node->row, node->ext)) {
 		return(row_upd_sec_index_entry(node, thr));
 	}
 
@@ -1967,7 +1978,7 @@ row_upd_clust_rec(
 			index, btr_cur_get_block(btr_cur), rec,
 			rec_get_offsets(rec, index, offsets_,
 					ULINT_UNDEFINED, &heap),
-			big_rec, mtr);
+			mtr, TRUE, big_rec);
 		mtr_commit(mtr);
 	}
 
@@ -2165,8 +2176,8 @@ exit_func:
 
 	row_upd_store_row(node);
 
-	if (row_upd_changes_ord_field_binary(node->row, node->ext, index,
-					     node->update)) {
+	if (row_upd_changes_ord_field_binary(index, node->update, thr,
+					     node->row, node->ext)) {
 
 		/* Update causes an ordering field (ordering fields within
 		the B-tree) of the clustered index record to change: perform

=== modified file 'storage/innobase/srv/srv0start.c'
--- a/storage/innobase/srv/srv0start.c	2011-01-06 11:42:30 +0000
+++ b/storage/innobase/srv/srv0start.c	2011-02-07 23:51:55 +0000
@@ -1327,13 +1327,16 @@ innobase_start_or_create_for_mysql(void)
 
 	ut_a(srv_n_file_io_threads <= SRV_MAX_N_IO_THREADS);
 
-	/* TODO: Investigate if SRV_N_PENDING_IOS_PER_THREAD (32) limit
-	still applies to windows. */
-	if (!srv_use_native_aio) {
-		io_limit = 8 * SRV_N_PENDING_IOS_PER_THREAD;
-	} else {
+	io_limit = 8 * SRV_N_PENDING_IOS_PER_THREAD;
+
+	/* On Windows when using native aio the number of aio requests
+	that a thread can handle at a given time is limited to 32
+	i.e.: SRV_N_PENDING_IOS_PER_THREAD */
+# ifdef __WIN__
+	if (srv_use_native_aio) {
 		io_limit = SRV_N_PENDING_IOS_PER_THREAD;
 	}
+# endif /* __WIN__ */
 
 	os_aio_init(io_limit,
 		    srv_n_read_io_threads,

=== modified file 'storage/innobase/sync/sync0sync.c'
--- a/storage/innobase/sync/sync0sync.c	2011-01-25 22:49:40 +0000
+++ b/storage/innobase/sync/sync0sync.c	2011-02-03 22:18:48 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by

=== modified file 'storage/innobase/trx/trx0purge.c'
--- a/storage/innobase/trx/trx0purge.c	2011-01-19 10:37:10 +0000
+++ b/storage/innobase/trx/trx0purge.c	2011-02-07 11:23:17 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
+Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -160,8 +160,6 @@ trx_purge_sys_create(
 
 	ut_a(purge_sys->trx->sess == purge_sys->sess);
 
-	trx_mutex_enter(purge_sys->trx);
-
 	/* A purge transaction is not a real transaction, we use a transaction
 	here only because the query threads code requires it. It is otherwise
 	quite unnecessary. We should get rid of it eventually. */
@@ -169,8 +167,6 @@ trx_purge_sys_create(
 	purge_sys->trx->start_time = ut_time();
 	purge_sys->trx->state = TRX_STATE_ACTIVE;
 
-	trx_mutex_exit(purge_sys->trx);
-
 	purge_sys->query = trx_purge_graph_build(
 		purge_sys->trx, n_purge_threads);
 
@@ -187,8 +183,9 @@ trx_purge_sys_close(void)
 	que_graph_free(purge_sys->query);
 
 	ut_a(purge_sys->trx->id == 0);
+	ut_a(purge_sys->sess->trx == purge_sys->trx);
 
-	purge_sys->sess->trx->state = TRX_STATE_NOT_STARTED;
+	purge_sys->trx->state = TRX_STATE_NOT_STARTED;
 
 	sess_close(purge_sys->sess);
 

=== modified file 'storage/innobase/trx/trx0roll.c'
--- a/storage/innobase/trx/trx0roll.c	2011-01-24 10:28:28 +0000
+++ b/storage/innobase/trx/trx0roll.c	2011-02-07 21:12:43 +0000
@@ -50,8 +50,8 @@ Created 3/26/1996 Heikki Tuuri
 rollback */
 #define TRX_ROLL_TRUNC_THRESHOLD	1
 
-/** In crash recovery, the current trx to be rolled back */
-static trx_t*		trx_roll_crash_recv_trx	= NULL;
+/** In crash recovery, the current trx to be rolled back; NULL otherwise */
+static const trx_t*	trx_roll_crash_recv_trx	= NULL;
 
 /** In crash recovery we set this to the undo n:o of the current trx to be
 rolled back. Then we can print how many % the rollback has progressed. */
@@ -244,6 +244,7 @@ trx_rollback_last_sql_stat_for_mysql(
 	}
 
 	ut_error;
+	return(DB_CORRUPTION);
 }
 
 /*******************************************************************//**
@@ -743,7 +744,7 @@ trx_rollback_or_clean_recovered(
 			ut_ad(trx->in_trx_list);
 
 			/* If this function does a cleanup or rollback
-			then it will release the trx sys mutex, therefore
+			then it will release the trx_sys->lock, therefore
 			we need to reacquire it before retrying the loop. */
 
 			if (trx_rollback_resurrected(trx, all)) {

=== modified file 'storage/innobase/trx/trx0trx.c'
--- a/storage/innobase/trx/trx0trx.c	2011-01-27 11:45:15 +0000
+++ b/storage/innobase/trx/trx0trx.c	2011-02-07 11:23:17 +0000
@@ -1445,18 +1445,19 @@ static
 void
 trx_prepare(
 /*========*/
-	trx_t*	trx)	/*!< in: transaction */
+	trx_t*	trx)	/*!< in/out: transaction */
 {
 	trx_rseg_t*	rseg;
-	ib_uint64_t	lsn		= 0;
+	ib_uint64_t	lsn;
 	mtr_t		mtr;
 
 	rseg = trx->rseg;
+	/* Only fresh user transactions can be prepared.
+	Recovered transactions cannot. */
+	ut_a(!trx->is_recovered);
 
 	if (trx->insert_undo != NULL || trx->update_undo != NULL) {
 
-		trx_mutex_exit(trx);
-
 		mtr_start(&mtr);
 
 		/* Change the undo log segment states from TRX_UNDO_ACTIVE
@@ -1489,16 +1490,13 @@ trx_prepare(
 					world */
 		/*--------------*/
 		lsn = mtr.end_lsn;
-
-		trx_mutex_enter(trx);
+		ut_ad(lsn);
+	} else {
+		lsn = 0;
 	}
 
-	ut_ad(trx_mutex_own(trx));
-
-	/* Note: This state change is only covered by the trx_t::mutex and
-	not the trx_sys_t::lock. */
-
 	/*--------------------------------------*/
+	ut_a(trx->state == TRX_STATE_ACTIVE);
 	trx->state = TRX_STATE_PREPARED;
 	/*--------------------------------------*/
 
@@ -1520,8 +1518,6 @@ trx_prepare(
 		TODO: find out if MySQL holds some mutex when calling this.
 		That would spoil our group prepare algorithm. */
 
-		trx_mutex_exit(trx);
-
 		if (srv_flush_log_at_trx_commit == 0) {
 			/* Do nothing */
 		} else if (srv_flush_log_at_trx_commit == 1) {
@@ -1544,8 +1540,6 @@ trx_prepare(
 		} else {
 			ut_error;
 		}
-
-		trx_mutex_enter(trx);
 	}
 }
 
@@ -1559,15 +1553,11 @@ trx_prepare_for_mysql(
 {
 	trx_start_if_not_started_xa(trx);
 
-	trx_mutex_enter(trx);
-
 	trx->op_info = "preparing";
 
 	trx_prepare(trx);
 
 	trx->op_info = "";
-
-	trx_mutex_exit(trx);
 }
 
 /**********************************************************************//**
@@ -1685,8 +1675,6 @@ trx_get_trx_by_xid(
 			trx->xid.formatID = -1;
 			break;
 		}
-
-		trx = UT_LIST_GET_NEXT(trx_list, trx);
 	}
 
 	rw_lock_s_unlock(&trx_sys->lock);

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2010-12-09 16:17:13 +0000
+++ b/storage/perfschema/pfs.cc	2011-02-04 11:55:17 +0000
@@ -899,19 +899,30 @@ static inline int mysql_mutex_lock(...)
   @ingroup Performance_schema_implementation
 */
 
+/** TIMED bit in the state flags bitfield. */
 #define STATE_FLAG_TIMED (1<<0)
+/** THREAD bit in the state flags bitfield. */
 #define STATE_FLAG_THREAD (1<<1)
+/** EVENT bit in the state flags bitfield. */
 #define STATE_FLAG_WAIT (1<<2)
 
 pthread_key(PFS_thread*, THR_PFS);
 bool THR_PFS_initialized= false;
 
+/**
+  Conversion map from PSI_mutex_operation to enum_operation_type.
+  Indexed by enum PSI_mutex_operation.
+*/
 static enum_operation_type mutex_operation_map[]=
 {
   OPERATION_TYPE_LOCK,
   OPERATION_TYPE_TRYLOCK
 };
 
+/**
+  Conversion map from PSI_rwlock_operation to enum_operation_type.
+  Indexed by enum PSI_rwlock_operation.
+*/
 static enum_operation_type rwlock_operation_map[]=
 {
   OPERATION_TYPE_READLOCK,
@@ -920,6 +931,10 @@ static enum_operation_type rwlock_operat
   OPERATION_TYPE_TRYWRITELOCK
 };
 
+/**
+  Conversion map from PSI_cond_operation to enum_operation_type.
+  Indexed by enum PSI_cond_operation.
+*/
 static enum_operation_type cond_operation_map[]=
 {
   OPERATION_TYPE_WAIT,
@@ -1072,6 +1087,10 @@ static int build_prefix(const LEX_STRING
 
 C_MODE_START
 
+/**
+  Implementation of the mutex instrumentation interface.
+  @sa PSI_v1::register_mutex.
+*/
 static void register_mutex_v1(const char *category,
                               PSI_mutex_info_v1 *info,
                               int count)
@@ -1081,6 +1100,10 @@ static void register_mutex_v1(const char
                    register_mutex_class)
 }
 
+/**
+  Implementation of the rwlock instrumentation interface.
+  @sa PSI_v1::register_rwlock.
+*/
 static void register_rwlock_v1(const char *category,
                                PSI_rwlock_info_v1 *info,
                                int count)
@@ -1090,6 +1113,10 @@ static void register_rwlock_v1(const cha
                    register_rwlock_class)
 }
 
+/**
+  Implementation of the cond instrumentation interface.
+  @sa PSI_v1::register_cond.
+*/
 static void register_cond_v1(const char *category,
                              PSI_cond_info_v1 *info,
                              int count)
@@ -1099,6 +1126,10 @@ static void register_cond_v1(const char 
                    register_cond_class)
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::register_thread.
+*/
 static void register_thread_v1(const char *category,
                                PSI_thread_info_v1 *info,
                                int count)
@@ -1108,6 +1139,10 @@ static void register_thread_v1(const cha
                    register_thread_class)
 }
 
+/**
+  Implementation of the file instrumentation interface.
+  @sa PSI_v1::register_file.
+*/
 static void register_file_v1(const char *category,
                              PSI_file_info_v1 *info,
                              int count)
@@ -1304,6 +1339,11 @@ static void create_file_v1(PSI_file_key 
   file_handle_array[index]= pfs_file;
 }
 
+/**
+  Arguments given from a parent to a child thread, packaged in one structure.
+  This data is used when spawning a new instrumented thread.
+  @sa pfs_spawn_thread.
+*/
 struct PFS_spawn_thread_arg
 {
   PFS_thread *m_parent_thread;
@@ -1619,12 +1659,20 @@ static void set_thread_info_v1(const cha
   }
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::set_thread.
+*/
 static void set_thread_v1(PSI_thread* thread)
 {
   PFS_thread *pfs= reinterpret_cast<PFS_thread*> (thread);
   my_pthread_setspecific_ptr(THR_PFS, pfs);
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::delete_current_thread.
+*/
 static void delete_current_thread_v1(void)
 {
   PFS_thread *thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
@@ -1636,6 +1684,10 @@ static void delete_current_thread_v1(voi
   }
 }
 
+/**
+  Implementation of the thread instrumentation interface.
+  @sa PSI_v1::delete_thread.
+*/
 static void delete_thread_v1(PSI_thread *thread)
 {
   PFS_thread *pfs= reinterpret_cast<PFS_thread*> (thread);
@@ -2471,6 +2523,10 @@ get_thread_file_descriptor_locker_v1(PSI
   return reinterpret_cast<PSI_file_locker*> (state);
 }
 
+/**
+  Implementation of the mutex instrumentation interface.
+  @sa PSI_v1::unlock_mutex.
+*/
 static void unlock_mutex_v1(PSI_mutex *mutex)
 {
   PFS_mutex *pfs_mutex= reinterpret_cast<PFS_mutex*> (mutex);
@@ -2510,6 +2566,10 @@ static void unlock_mutex_v1(PSI_mutex *m
 #endif
 }
 
+/**
+  Implementation of the rwlock instrumentation interface.
+  @sa PSI_v1::unlock_rwlock.
+*/
 static void unlock_rwlock_v1(PSI_rwlock *rwlock)
 {
   PFS_rwlock *pfs_rwlock= reinterpret_cast<PFS_rwlock*> (rwlock);
@@ -2586,6 +2646,10 @@ static void unlock_rwlock_v1(PSI_rwlock 
 #endif
 }
 
+/**
+  Implementation of the cond instrumentation interface.
+  @sa PSI_v1::signal_cond.
+*/
 static void signal_cond_v1(PSI_cond* cond)
 {
   PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);
@@ -2594,6 +2658,10 @@ static void signal_cond_v1(PSI_cond* con
   pfs_cond->m_cond_stat.m_signal_count++;
 }
 
+/**
+  Implementation of the cond instrumentation interface.
+  @sa PSI_v1::broadcast_cond.
+*/
 static void broadcast_cond_v1(PSI_cond* cond)
 {
   PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);

=== modified file 'storage/perfschema/pfs_engine_table.cc'
--- a/storage/perfschema/pfs_engine_table.cc	2011-01-03 13:39:18 +0000
+++ b/storage/perfschema/pfs_engine_table.cc	2011-02-04 11:55:17 +0000
@@ -100,6 +100,7 @@ void PFS_engine_table_share::check_all_t
     (*current)->check_one_table(thd);
 }
 
+/** Error reporting for schema integrity checks. */
 class PFS_check_intact : public Table_check_intact
 {
 protected:
@@ -465,6 +466,7 @@ int PFS_engine_table::update_row_values(
   return HA_ERR_WRONG_COMMAND;
 }
 
+/** Implementation of internal ACL checks, for the performance schema. */
 class PFS_internal_schema_access : public ACL_internal_schema_access
 {
 public:

=== modified file 'storage/perfschema/pfs_engine_table.h'
--- a/storage/perfschema/pfs_engine_table.h	2010-07-30 09:02:32 +0000
+++ b/storage/perfschema/pfs_engine_table.h	2011-02-04 11:55:17 +0000
@@ -140,7 +140,9 @@ struct PFS_engine_table_share
   void check_one_table(THD *thd);
   static void init_all_locks(void);
   static void delete_all_locks(void);
+  /** Get the row count. */
   ha_rows get_row_count(void) const;
+  /** Write a row. */
   int write_row(TABLE *table, unsigned char *buf, Field **fields) const;
 
   /** Table name. */
@@ -172,6 +174,10 @@ struct PFS_engine_table_share
   bool m_checked;
 };
 
+/**
+  Privileges for read only tables.
+  The only operation allowed is SELECT.
+*/
 class PFS_readonly_acl : public ACL_internal_table_access
 {
 public:
@@ -184,8 +190,13 @@ public:
   ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
 };
 
+/** Singleton instance of PFS_readonly_acl. */
 extern PFS_readonly_acl pfs_readonly_acl;
 
+/**
+  Privileges for truncatable tables.
+  Operations allowed are SELECT and TRUNCATE.
+*/
 class PFS_truncatable_acl : public ACL_internal_table_access
 {
 public:
@@ -198,8 +209,13 @@ public:
   ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
 };
 
+/** Singleton instance of PFS_truncatable_acl. */
 extern PFS_truncatable_acl pfs_truncatable_acl;
 
+/**
+  Privileges for updatable tables.
+  Operations allowed are SELECT and UPDATE.
+*/
 class PFS_updatable_acl : public ACL_internal_table_access
 {
 public:
@@ -212,8 +228,13 @@ public:
   ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
 };
 
+/** Singleton instance of PFS_updatable_acl. */
 extern PFS_updatable_acl pfs_updatable_acl;
 
+/**
+  Privileges for editable tables.
+  Operations allowed are SELECT, INSERT, UPDATE, DELETE and TRUNCATE.
+*/
 class PFS_editable_acl : public ACL_internal_table_access
 {
 public:
@@ -226,8 +247,12 @@ public:
   ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
 };
 
+/** Singleton instance of PFS_editable_acl. */
 extern PFS_editable_acl pfs_editable_acl;
 
+/**
+  Privileges for unknown tables.
+*/
 class PFS_unknown_acl : public ACL_internal_table_access
 {
 public:
@@ -240,6 +265,7 @@ public:
   ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
 };
 
+/** Singleton instance of PFS_unknown_acl. */
 extern PFS_unknown_acl pfs_unknown_acl;
 
 /** Position of a cursor, for simple iterations. */
@@ -262,6 +288,7 @@ struct PFS_simple_index
   { m_index++; }
 };
 
+/** Position of a double cursor, for iterations using 2 nested loops. */
 struct PFS_double_index
 {
   /** Outer index. */
@@ -286,6 +313,7 @@ struct PFS_double_index
   }
 };
 
+/** Position of a triple cursor, for iterations using 3 nested loops. */
 struct PFS_triple_index
 {
   /** Outer index. */

=== modified file 'storage/perfschema/pfs_instr.h'
--- a/storage/perfschema/pfs_instr.h	2010-12-09 16:17:13 +0000
+++ b/storage/perfschema/pfs_instr.h	2011-02-04 11:55:17 +0000
@@ -42,6 +42,7 @@ struct PFS_thread_class;
 
 struct PFS_thread;
 
+/** Base structure for wait instruments. */
 struct PFS_instr
 {
   /** Internal lock. */

=== modified file 'storage/perfschema/pfs_instr_class.cc'
--- a/storage/perfschema/pfs_instr_class.cc	2010-12-09 16:17:13 +0000
+++ b/storage/perfschema/pfs_instr_class.cc	2011-02-04 11:55:17 +0000
@@ -335,7 +335,7 @@ void cleanup_table_share_hash(void)
 }
 
 /**
-  Get the hash pins for @table_share_hash.
+  Get the hash pins for @sa table_share_hash.
   @param thread The running thread.
   @returns The LF_HASH pins for the thread.
 */
@@ -1004,7 +1004,7 @@ void purge_table_share(PFS_thread *threa
   @param schema_name The table schema name
   @param schema_name_length The table schema name length
   @param table_name The table name
-  @parem table_name_length The table name length
+  @param table_name_length The table name length
 */
 void drop_table_share(PFS_thread *thread,
                       bool temporary,

=== modified file 'storage/perfschema/pfs_setup_actor.h'
--- a/storage/perfschema/pfs_setup_actor.h	2010-07-10 03:31:35 +0000
+++ b/storage/perfschema/pfs_setup_actor.h	2011-02-04 11:55:17 +0000
@@ -35,6 +35,7 @@ struct PFS_global_param;
   @{
 */
 
+/** Hash key for @sa PFS_setup_actor. */
 struct PFS_setup_actor_key
 {
   /**
@@ -47,6 +48,7 @@ struct PFS_setup_actor_key
   uint m_key_length;
 };
 
+/** A setup_actor record. */
 struct PFS_setup_actor
 {
   /** Internal lock. */

=== modified file 'storage/perfschema/pfs_setup_object.h'
--- a/storage/perfschema/pfs_setup_object.h	2010-09-23 16:08:54 +0000
+++ b/storage/perfschema/pfs_setup_object.h	2011-02-04 11:55:17 +0000
@@ -32,6 +32,7 @@ struct PFS_global_param;
   @{
 */
 
+/** Hash key for @sa PFS_setup_object. */
 struct PFS_setup_object_key
 {
   /**
@@ -43,6 +44,7 @@ struct PFS_setup_object_key
   uint m_key_length;
 };
 
+/** A setup_object record. */
 struct PFS_setup_object
 {
   enum_object_type get_object_type()

=== modified file 'storage/perfschema/pfs_stat.h'
--- a/storage/perfschema/pfs_stat.h	2010-12-09 16:17:13 +0000
+++ b/storage/perfschema/pfs_stat.h	2011-02-04 11:55:17 +0000
@@ -199,6 +199,7 @@ enum PFS_TL_LOCK_TYPE
 
 #define COUNT_PFS_TL_LOCK_TYPE 11
 
+/** Statistics for table locks. */
 struct PFS_table_lock_stat
 {
   PFS_single_stat m_stat[COUNT_PFS_TL_LOCK_TYPE];

=== modified file 'storage/perfschema/pfs_timer.h'
--- a/storage/perfschema/pfs_timer.h	2010-09-23 16:08:54 +0000
+++ b/storage/perfschema/pfs_timer.h	2011-02-04 11:55:17 +0000
@@ -23,6 +23,12 @@
 #include <my_rdtsc.h>
 #include "pfs_column_types.h"
 
+/**
+  A time normalizer.
+  A time normalizer consist of a transformation that
+  converts raw timer values (expressed in the timer unit)
+  to normalized values, expressed in picoseconds.
+*/
 struct time_normalizer
 {
   static time_normalizer* get(enum_timer_name timer_name);

=== modified file 'storage/perfschema/table_helper.h'
--- a/storage/perfschema/table_helper.h	2011-01-07 16:20:19 +0000
+++ b/storage/perfschema/table_helper.h	2011-02-04 11:55:17 +0000
@@ -32,6 +32,7 @@
   @{
 */
 
+/** Namespace, internal views used within table setup_instruments. */
 struct PFS_instrument_view_constants
 {
   static const uint FIRST_VIEW= 1;
@@ -43,6 +44,7 @@ struct PFS_instrument_view_constants
   static const uint LAST_VIEW= 5;
 };
 
+/** Namespace, internal views used within object summaries. */
 struct PFS_object_view_constants
 {
   static const uint FIRST_VIEW= 1;

=== modified file 'unittest/gunit/CMakeLists.txt'
--- a/unittest/gunit/CMakeLists.txt	2011-02-01 07:52:46 +0000
+++ b/unittest/gunit/CMakeLists.txt	2011-02-07 13:03:47 +0000
@@ -239,7 +239,7 @@ FOREACH(test ${SERVER_TESTS})
     ADD_EXECUTABLE(${test}-t ${test}-t.cc)
   ENDIF()
   TARGET_LINK_LIBRARIES(${test}-t sql binlog rpl master slave sql)
-  TARGET_LINK_LIBRARIES(${test}-t gunit sqlgunitlib strings dbug regex)
+  TARGET_LINK_LIBRARIES(${test}-t gunit sqlgunitlib strings dbug regex mysys)
   IF (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
     SET_TARGET_PROPERTIES(${test}-t  PROPERTIES LINK_FLAGS "-library=stlport4")
   ENDIF()

=== modified file 'unittest/gunit/item-t.cc'
--- a/unittest/gunit/item-t.cc	2011-02-01 07:52:46 +0000
+++ b/unittest/gunit/item-t.cc	2011-02-07 13:03:47 +0000
@@ -53,7 +53,8 @@ protected:
   virtual void SetUp()
   {
     m_thd= new THD(false);
-    m_thd->thread_stack= (char*) &m_thd;
+    THD *stack_thd= m_thd;
+    m_thd->thread_stack= (char*) &stack_thd;
     m_thd->store_globals();
   }
 
@@ -63,7 +64,6 @@ protected:
     delete m_thd;
   }
 
-private:
   THD      *m_thd;
 };
 
@@ -167,4 +167,20 @@ TEST_F(ItemTest, ItemInt)
   */
 }
 
+
+TEST_F(ItemTest, ItemFuncDesDecrypt)
+{
+  // Bug #59632 Assertion failed: arg_length > length
+  const uint length= 1U;
+  Item_int *item_one= new Item_int(1, length);
+  Item_int *item_two= new Item_int(2, length);
+  Item_func_des_decrypt *item_decrypt=
+    new Item_func_des_decrypt(item_two, item_one);
+  
+  EXPECT_FALSE(item_decrypt->fix_fields(m_thd, NULL));
+  EXPECT_EQ(length, item_one->max_length);
+  EXPECT_EQ(length, item_two->max_length);
+  EXPECT_LE(item_decrypt->max_length, length);
+}
+
 }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (marc.alff:3204 to 3205) Marc Alff9 Feb