List:Commits« Previous MessageNext Message »
From:Matthias Leich Date:May 17 2010 7:13pm
Subject:bzr push into mysql-pe branch (matthias.leich:4066)
View as plain text  
 4066 Matthias Leich	2010-05-17 [merge]
      Merge last changes into local tree

    added:
      mysql-test/include/have_federated_plugin.inc
      mysql-test/suite/engines/funcs/r/comment_index.result
      mysql-test/suite/engines/funcs/r/jp_comment_index.result
      mysql-test/suite/engines/funcs/t/comment_index.test
      mysql-test/suite/engines/funcs/t/jp_comment_index.test
      mysql-test/suite/federated/federated_plugin-master.opt
      mysql-test/suite/federated/federated_plugin.result
      mysql-test/suite/federated/federated_plugin.test
      mysql-test/suite/parts/r/partition_debug_sync_innodb.result
      mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt
      mysql-test/suite/parts/t/partition_debug_sync_innodb.test
    modified:
      CMakeLists.txt
      Makefile.am
      cmake/abi_check.cmake
      include/CMakeLists.txt
      include/Makefile.am
      mysql-test/collections/default.experimental
      mysql-test/extra/binlog_tests/blackhole.test
      mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
      mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test
      mysql-test/extra/rpl_tests/rpl_insert_id.test
      mysql-test/extra/rpl_tests/rpl_loaddata.test
      mysql-test/extra/rpl_tests/rpl_mixing_engines.test
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
      mysql-test/extra/rpl_tests/rpl_stm_000001.test
      mysql-test/extra/rpl_tests/rpl_stop_middle_group.test
      mysql-test/r/archive.result
      mysql-test/r/commit_1innodb.result
      mysql-test/r/ctype_cp932_binlog_stm.result
      mysql-test/r/delete.result
      mysql-test/r/greedy_optimizer.result
      mysql-test/r/group_by.result
      mysql-test/r/join_cache.result
      mysql-test/r/loadxml.result
      mysql-test/r/log_state.result
      mysql-test/r/null.result
      mysql-test/r/partition_innodb_stmt.result
      mysql-test/r/status.result
      mysql-test/r/subselect3.result
      mysql-test/r/subselect3_jcl6.result
      mysql-test/r/subselect4.result
      mysql-test/r/subselect_mat.result
      mysql-test/r/type_datetime.result
      mysql-test/r/user_var.result
      mysql-test/suite/backup_ptr/r/backup_ptr_objects.result
      mysql-test/suite/backup_ptr/t/backup_ptr_objects.test
      mysql-test/suite/binlog/r/binlog_innodb.result
      mysql-test/suite/binlog/r/binlog_killed.result
      mysql-test/suite/binlog/r/binlog_multi_engine.result
      mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
      mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result
      mysql-test/suite/binlog/r/binlog_stm_blackhole.result
      mysql-test/suite/binlog/r/binlog_stm_do_db.result
      mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
      mysql-test/suite/binlog/r/binlog_stm_ps.result
      mysql-test/suite/binlog/r/binlog_stm_row.result
      mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
      mysql-test/suite/binlog/r/binlog_unsafe.result
      mysql-test/suite/binlog/t/binlog_killed.test
      mysql-test/suite/binlog/t/binlog_multi_engine.test
      mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test
      mysql-test/suite/binlog/t/binlog_stm_ps.test
      mysql-test/suite/binlog/t/binlog_stm_row.test
      mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
      mysql-test/suite/binlog/t/binlog_tmp_table.test
      mysql-test/suite/binlog/t/binlog_unsafe.test
      mysql-test/suite/engines/funcs/r/ai_init_insert.result
      mysql-test/suite/engines/funcs/r/comment_column.result
      mysql-test/suite/engines/funcs/r/comment_column2.result
      mysql-test/suite/engines/funcs/r/comment_table.result
      mysql-test/suite/engines/funcs/r/db_alter_character_set.result
      mysql-test/suite/engines/funcs/r/db_alter_character_set_collate.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/db_create_character_set.result
      mysql-test/suite/engines/funcs/r/db_create_character_set_collate.result
      mysql-test/suite/engines/funcs/r/db_create_drop.result
      mysql-test/suite/engines/funcs/r/db_create_error.result
      mysql-test/suite/engines/funcs/r/db_create_error_reserved.result
      mysql-test/suite/engines/funcs/r/db_create_if_not_exists.result
      mysql-test/suite/engines/funcs/r/db_drop_error.result
      mysql-test/suite/engines/funcs/r/db_use_error.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/jp_comment_column.result
      mysql-test/suite/engines/funcs/r/jp_comment_table.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_create_database.result
      mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result
      mysql-test/suite/engines/funcs/r/rpl_loaddata_m.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_multi_delete2.result
      mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result
      mysql-test/suite/engines/funcs/r/rpl_row_max_relay_size.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_slave_status.result
      mysql-test/suite/engines/funcs/r/rpl_sp.result
      mysql-test/suite/engines/funcs/r/rpl_stm_max_relay_size.result
      mysql-test/suite/engines/funcs/r/rpl_stm_reset_slave.result
      mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
      mysql-test/suite/engines/funcs/r/rpl_temporary.result
      mysql-test/suite/engines/funcs/r/rpl_trigger.result
      mysql-test/suite/engines/funcs/r/rpl_variables.result
      mysql-test/suite/engines/funcs/t/comment_column.test
      mysql-test/suite/engines/funcs/t/comment_column2.test
      mysql-test/suite/engines/funcs/t/comment_table.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/jp_comment_column.test
      mysql-test/suite/engines/funcs/t/jp_comment_table.test
      mysql-test/suite/engines/funcs/t/rpl_err_ignoredtable.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_multi_delete2.test
      mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test
      mysql-test/suite/engines/funcs/t/rpl_row_max_relay_size.test
      mysql-test/suite/engines/funcs/t/rpl_sp-master.opt
      mysql-test/suite/engines/funcs/t/rpl_sp-slave.opt
      mysql-test/suite/engines/funcs/t/rpl_sp.test
      mysql-test/suite/engines/funcs/t/rpl_sp_effects-master.opt
      mysql-test/suite/engines/funcs/t/rpl_sp_effects-slave.opt
      mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test
      mysql-test/suite/engines/funcs/t/rpl_trigger.test
      mysql-test/suite/engines/funcs/t/rpl_variables.test
      mysql-test/suite/engines/iuds/r/delete_decimal.result
      mysql-test/suite/engines/iuds/r/insert_decimal.result
      mysql-test/suite/engines/iuds/r/insert_number.result
      mysql-test/suite/engines/iuds/r/insert_time.result
      mysql-test/suite/engines/iuds/r/type_bit_iuds.result
      mysql-test/suite/engines/iuds/r/update_decimal.result
      mysql-test/suite/engines/iuds/r/update_time.result
      mysql-test/suite/engines/iuds/t/disabled.def
      mysql-test/suite/engines/iuds/t/type_bit_iuds.test
      mysql-test/suite/ndb_binlog/r/ndb_binlog_format.result
      mysql-test/suite/ndb_binlog/t/ndb_binlog_format.test
      mysql-test/suite/perfschema/include/binlog_common.inc
      mysql-test/suite/perfschema/include/cleanup_helper.inc
      mysql-test/suite/perfschema/include/privilege.inc
      mysql-test/suite/perfschema/include/setup_helper.inc
      mysql-test/suite/perfschema/include/start_server_common.inc
      mysql-test/suite/perfschema/r/binlog_stmt.result
      mysql-test/suite/perfschema/r/myisam_file_io.result
      mysql-test/suite/perfschema/r/query_cache.result
      mysql-test/suite/perfschema/t/aggregate.test
      mysql-test/suite/perfschema/t/bad_option_1.test
      mysql-test/suite/perfschema/t/bad_option_2.test
      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/cnf_option.cnf
      mysql-test/suite/perfschema/t/cnf_option.test
      mysql-test/suite/perfschema/t/column_privilege.test
      mysql-test/suite/perfschema/t/ddl_cond_instances.test
      mysql-test/suite/perfschema/t/ddl_events_waits_current.test
      mysql-test/suite/perfschema/t/ddl_events_waits_history.test
      mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test
      mysql-test/suite/perfschema/t/ddl_ews_by_event_name.test
      mysql-test/suite/perfschema/t/ddl_ews_by_instance.test
      mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test
      mysql-test/suite/perfschema/t/ddl_file_instances.test
      mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test
      mysql-test/suite/perfschema/t/ddl_fs_by_instance.test
      mysql-test/suite/perfschema/t/ddl_mutex_instances.test
      mysql-test/suite/perfschema/t/ddl_performance_timers.test
      mysql-test/suite/perfschema/t/ddl_processlist.test
      mysql-test/suite/perfschema/t/ddl_rwlock_instances.test
      mysql-test/suite/perfschema/t/ddl_setup_consumers.test
      mysql-test/suite/perfschema/t/ddl_setup_instruments.test
      mysql-test/suite/perfschema/t/ddl_setup_objects.test
      mysql-test/suite/perfschema/t/ddl_setup_timers.test
      mysql-test/suite/perfschema/t/dml_cond_instances.test
      mysql-test/suite/perfschema/t/dml_events_waits_current.test
      mysql-test/suite/perfschema/t/dml_events_waits_history.test
      mysql-test/suite/perfschema/t/dml_events_waits_history_long.test
      mysql-test/suite/perfschema/t/dml_ews_by_event_name.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_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_performance_timers.test
      mysql-test/suite/perfschema/t/dml_processlist.test
      mysql-test/suite/perfschema/t/dml_rwlock_instances.test
      mysql-test/suite/perfschema/t/dml_setup_consumers.test
      mysql-test/suite/perfschema/t/dml_setup_instruments.test
      mysql-test/suite/perfschema/t/dml_setup_objects.test
      mysql-test/suite/perfschema/t/dml_setup_timers.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/information_schema.test
      mysql-test/suite/perfschema/t/myisam_file_io.test
      mysql-test/suite/perfschema/t/no_threads.test
      mysql-test/suite/perfschema/t/one_thread_per_con.test
      mysql-test/suite/perfschema/t/privilege.test
      mysql-test/suite/perfschema/t/query_cache.test
      mysql-test/suite/perfschema/t/read_only.test
      mysql-test/suite/perfschema/t/schema.test
      mysql-test/suite/perfschema/t/selects.test
      mysql-test/suite/perfschema/t/start_server_no_cond_class.test
      mysql-test/suite/perfschema/t/start_server_no_cond_inst.test
      mysql-test/suite/perfschema/t/start_server_no_file_class.test
      mysql-test/suite/perfschema/t/start_server_no_file_inst.test
      mysql-test/suite/perfschema/t/start_server_no_mutex_class.test
      mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test
      mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test
      mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test
      mysql-test/suite/perfschema/t/start_server_no_thread_class.test
      mysql-test/suite/perfschema/t/start_server_no_thread_inst.test
      mysql-test/suite/perfschema/t/start_server_off.test
      mysql-test/suite/perfschema/t/start_server_on.test
      mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result
      mysql-test/suite/rpl/r/rpl_blackhole.result
      mysql-test/suite/rpl/r/rpl_concurrency_error.result
      mysql-test/suite/rpl/r/rpl_get_lock.result
      mysql-test/suite/rpl/r/rpl_insert_id.result
      mysql-test/suite/rpl/r/rpl_insert_ignore.result
      mysql-test/suite/rpl/r/rpl_locktrans_innodb.result
      mysql-test/suite/rpl/r/rpl_locktrans_myisam.result
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_mysql_upgrade.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_read_only.result
      mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result
      mysql-test/suite/rpl/r/rpl_row_mixing_engines.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_stm_000001.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_loadfile.result
      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.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_temp_temporary.result
      mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
      mysql-test/suite/rpl/r/rpl_variables_stm.result
      mysql-test/suite/rpl/t/disabled.def
      mysql-test/suite/rpl/t/rpl000013.test
      mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test
      mysql-test/suite/rpl/t/rpl_blackhole.test
      mysql-test/suite/rpl/t/rpl_concurrency_error.test
      mysql-test/suite/rpl/t/rpl_err_ignoredtable.test
      mysql-test/suite/rpl/t/rpl_get_lock.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_ignore.test
      mysql-test/suite/rpl/t/rpl_invoked_features.test
      mysql-test/suite/rpl/t/rpl_locktrans_innodb.test
      mysql-test/suite/rpl/t/rpl_locktrans_myisam.test
      mysql-test/suite/rpl/t/rpl_misc_functions.test
      mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test
      mysql-test/suite/rpl/t/rpl_mysql_upgrade.test
      mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test
      mysql-test/suite/rpl/t/rpl_optimize.test
      mysql-test/suite/rpl/t/rpl_read_only.test
      mysql-test/suite/rpl/t/rpl_semi_sync.test
      mysql-test/suite/rpl/t/rpl_semi_sync_event.test
      mysql-test/suite/rpl/t/rpl_session_var.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_stm_auto_increment_bug33029.test
      mysql-test/suite/rpl/t/rpl_stm_found_rows.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_temp_table.test
      mysql-test/suite/rpl/t/rpl_temp_temporary.test
      mysql-test/suite/rpl/t/rpl_temporary.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_udf.test
      mysql-test/suite/rpl/t/rpl_user_variables.test
      mysql-test/suite/rpl/t/rpl_variables_stm.test
      mysql-test/suite/rpl/t/rpl_view_multi.test
      mysql-test/suite/rpl_ndb/my.cnf
      mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result
      mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test
      mysql-test/suite/rpl_ndb_big/r/rpl_ndb_stm_innodb.result
      mysql-test/suite/rpl_ndb_big/t/rpl_ndb_stm_innodb.test
      mysql-test/suite/sys_vars/t/rpl_init_slave_func.test
      mysql-test/t/archive.test
      mysql-test/t/commit_1innodb.test
      mysql-test/t/create_select_tmp.test
      mysql-test/t/ctype_cp932_binlog_stm.test
      mysql-test/t/delete.test
      mysql-test/t/group_by.test
      mysql-test/t/join_cache.test
      mysql-test/t/loadxml.test
      mysql-test/t/lock_sync.test
      mysql-test/t/log_state.test
      mysql-test/t/mysqlbinlog.test
      mysql-test/t/mysqldump.test
      mysql-test/t/query_cache_debug.test
      mysql-test/t/sp_trans.test
      mysql-test/t/subselect3.test
      mysql-test/t/subselect4.test
      mysql-test/t/type_datetime.test
      mysql-test/t/user_var.test
      sql/authors.h
      sql/ha_ndbcluster_binlog.cc
      sql/ha_partition.cc
      sql/item.cc
      sql/item_func.h
      sql/log_event.cc
      sql/mysqld.cc
      sql/opt_sum.cc
      sql/share/errmsg-utf8.txt
      sql/sp.cc
      sql/sql_base.cc
      sql/sql_base.h
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_delete.cc
      sql/sql_join_cache.cc
      sql/sql_load.cc
      sql/sql_partition.cc
      sql/sql_select.cc
      sql/sql_show.cc
      sql/sql_update.cc
      sql/tztime.cc
      storage/federated/Makefile.am
      storage/ndb/src/common/util/Makefile.am
      storage/perfschema/pfs_instr.cc
      unittest/examples/CMakeLists.txt
      unittest/examples/Makefile.am
      unittest/examples/core-t.c
      unittest/examples/no_plan-t.c
      unittest/mysys/Makefile.am
      unittest/mytap/CMakeLists.txt
      unittest/mytap/t/Makefile.am
      unittest/mytap/tap.c
      unittest/mytap/tap.h
=== modified file 'mysql-test/include/deadlock.inc'
--- a/mysql-test/include/deadlock.inc	2007-08-27 13:19:58 +0000
+++ b/mysql-test/include/deadlock.inc	2010-05-12 10:12:39 +0000
@@ -5,9 +5,7 @@
 # has to be set before sourcing this script.
 #
 # Last update:
-# 2006-07-26 ML refactoring + print when connection is switched
-#               old name was t/innodb-deadlock.test
-#               main code went into include/deadlock.inc
+# 2010-04-29 mleich   wait routines insetad od sleeps
 #
 
 --echo # Establish connection con1 (user=root)
@@ -37,10 +35,19 @@ set autocommit=0;
 # The following query should hang because con1 is locking the record
 --send
 update t1 set x=2 where id = 0;
---sleep 2
 
 --echo # Switch to connection con1
 connection con1;
+# Wait till it is revealed that the update of connection con2 hangs.
+# Criteria:
+# - We find the update within the processlist
+# - time >= 1 because a non hanging update would most probably never
+#   reach time = 1
+let $wait_condition=
+SELECT COUNT(*) = 1 FROM information_schema.processlist
+WHERE state = 'Updating' AND info = 'update t1 set x=2 where id = 0' AND time >= 1;
+--source include/wait_condition.inc
+
 update t1 set x=1 where id = 0;
 select * from t1;
 commit;
@@ -80,10 +87,18 @@ set autocommit=0;
 # The following query should hang because con1 is locking the record
 --send
 update t1 set x=2 where id = 0;
---sleep 2
 
 --echo # Switch to connection con1
 connection con1;
+# Wait till it is revealed that the update of connection con2 hangs.
+# Criteria:
+# - We find the update within the processlist
+# - time >= 1 because a non hanging update would most probably never
+#   reach time = 1
+let $wait_condition=
+SELECT COUNT(*) = 1 FROM information_schema.processlist
+WHERE state = 'Updating' AND info = 'update t1 set x=2 where id = 0' AND time >= 1;
+--source include/wait_condition.inc
 update t1 set x=1 where id = 0;
 select * from t1;
 commit;
@@ -119,10 +134,18 @@ update t2 set a=2 where b = 0;
 select * from t2;
 --send
 update t1 set x=2 where id = 0;
---sleep 2
 
 --echo # Switch to connection con1
 connection con1;
+# Wait till it is revealed that the update of connection con2 hangs.
+# Criteria:
+# - We find the update within the processlist
+# - time >= 1 because a non hanging update would most probably never
+#   reach time = 1
+let $wait_condition=
+SELECT COUNT(*) = 1 FROM information_schema.processlist
+WHERE state = 'Updating' AND info = 'update t1 set x=2 where id = 0' AND time >= 1;
+--source include/wait_condition.inc
 update t1 set x=1 where id = 0;
 select * from t1;
 commit;

=== modified file 'mysql-test/include/diff_tables.inc'
--- a/mysql-test/include/diff_tables.inc	2009-12-24 16:38:19 +0000
+++ b/mysql-test/include/diff_tables.inc	2010-05-12 17:18:28 +0000
@@ -65,7 +65,7 @@ let $_diff_i=2;
 while ($_diff_i) {
 
   # Parse out any leading "master:" or "slave:" from the table
-  # specification and connect the appropriate server.
+  # specification and connect to the appropriate server.
   let $_diff_conn_master=`SELECT SUBSTR('$_diff_table', 1, 7) = 'master:'`;
   if ($_diff_conn_master) {
     let $_diff_table=`SELECT SUBSTR('$_diff_table', 8)`;
@@ -78,10 +78,17 @@ while ($_diff_i) {
   }
 
   # Sanity-check the input.
-  let $_diff_error= `SELECT '$_diff_table' NOT LIKE '_%._%'`;
-  if ($_diff_error) {
-    --echo !!!ERROR IN TEST: \$diff_table_$_diff_i='$_diff_table' is not in the form database.table
-    exit;
+  if (`SELECT '$_diff_table' NOT LIKE '_%._%'`) {
+    --echo !!!ERROR IN TEST: \$diff_table_$_diff_i='$_diff_table'
+    --echo                   is not in the form   database.table
+    --die
+  }
+
+  # Check if the table exists
+  if (`SELECT COUNT(*) = 0 FROM information_schema.tables
+       WHERE CONCAT(table_schema, '.', table_name) = '$_diff_table'`) {
+    --echo !!!ERROR IN TEST: The table '$_diff_table' does not exist
+    --die
   }
 
   # We need the output files to be sorted (so that diff_files does not
@@ -94,6 +101,30 @@ while ($_diff_i) {
                            FROM information_schema.columns
                            WHERE CONCAT(table_schema, '.', table_name) =
                                  '$_diff_table'`;
+
+  # The content of $_diff_column_index must be an integer >= 0.
+  # If not the following might happen:
+  # Result of SELECT | $_diff_column_index | dec $_diff_column_index
+  #    NULL          | empty string        | -1
+  #    ''            | empty string        | -1
+  #    'a1'          | a1                  | -1
+  #    '1a'          | 1a                  |  0
+  #    ........................
+  # (Bug#51057 Weak code in diff_tables.inc can lead to 100% CPU consumption)
+  # In case $i = 1 the soone following loop
+  # while ($i) {
+  #   ...
+  #   dec $i;
+  # }
+  # will never terminate.
+  if (`SELECT CAST(CAST('$_diff_column_index' AS UNSIGNED) AS CHAR(65))
+              <> '$_diff_column_index'
+           OR CAST('$_diff_column_index' AS UNSIGNED) < 1`) {
+    --echo !!!ERROR IN TEST: \$_diff_column_index is '$_diff_column_index'
+    --echo                   but must be an unsigned integer > 0
+    --die
+  }
+
   let $_diff_column_list=$_diff_column_index;
   dec $_diff_column_index;
   while ($_diff_column_index) {

=== modified file 'mysql-test/include/index_merge_ror.inc'
--- a/mysql-test/include/index_merge_ror.inc	2006-12-26 14:04:31 +0000
+++ b/mysql-test/include/index_merge_ror.inc	2010-05-12 10:12:39 +0000
@@ -10,9 +10,7 @@
 #       They might be not valid for other storage engines.
 #
 # Last update:
-# 2006-08-02 ML test refactored
-#               old name was t/index_merge_ror.test
-#               main code went into include/index_merge_ror.inc
+# 2010-04-29 mleich Optimize the data loading loops
 #
 
 --echo #---------------- ROR-index_merge tests -----------------------
@@ -68,10 +66,21 @@ create table t1
 create table t0 as select * from t1;
 --disable_query_log
 --echo # Printing of many insert into t0 values (....) disabled.
-let $cnt=1000;
+# mleich: The data loading loop is already optimized for minimum runtime.
+#         Please do not modify it.
+let $cnt=100;
 while ($cnt)
 {
-  eval insert into t0 values (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6');
+  insert into t0 values (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6');
   dec $cnt;
 }
 --enable_query_log
@@ -101,16 +110,38 @@ while ($1)
 # -1 is used for values 'out of any range we are using'
 # insert enough rows for index intersection to be used for (key1,key2)
 insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 100, 100,'key1-key2-key3-key4');
-let $cnt=400;
+# mleich: The data loading loop is already optimized for minimum runtime.
+#         Please do not modify it.
+let $cnt=40;
 while ($cnt)
 {
-  eval insert into t1 (key1, key2, key3, key4, filler1) values (100, -1, 100, -1,'key1-key3');
+  insert into t1 (key1, key2, key3, key4, filler1) values (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3');
   dec $cnt;
 }
-let $cnt=400;
+# mleich: The data loading loop is already optimized for minimum runtime.
+#         Please do not modify it.
+let $cnt=40;
 while ($cnt)
 {
-  eval insert into t1 (key1, key2, key3, key4, filler1) values (-1, 100, -1, 100,'key2-key4');
+  insert into t1 (key1, key2, key3, key4, filler1) values (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4');
   dec $cnt;
 }
 --enable_query_log

=== modified file 'mysql-test/include/index_merge_ror_cpk.inc'
--- a/mysql-test/include/index_merge_ror_cpk.inc	2006-08-16 12:58:49 +0000
+++ b/mysql-test/include/index_merge_ror_cpk.inc	2010-05-12 10:12:39 +0000
@@ -57,10 +57,32 @@ create table t1
 
 --disable_query_log
 set autocommit=0;
-let $1=10000;
+# mleich: The data loading loop is optimized for minimum runtime.
+#         Please do not modify it.
+let $1=1000;
 while ($1)
 {
-  eval insert into t1 values ($1 div 10,$1 mod 100,   $1/100,$1/100,   $1/100,$1/100,$1/100,$1/100,$1/100, $1 mod 100, $1/1000,'filler-data-$1','filler2');
+eval insert into t1 values
+(($1 * 10 - 0) div 10,($1 * 10 - 0) mod 100,($1 * 10 - 0)/100,($1 * 10 - 0)/100, ($1 * 10 - 0)/100,($1 * 10 - 0)/100,
+ ($1 * 10 - 0)/100,($1 * 10 - 0)/100,($1 * 10 - 0)/100, ($1 * 10 - 0) mod 100, ($1 * 10 - 0)/1000,'filler-data-$1_9','filler2'),
+(($1 * 10 - 1) div 10,($1 * 10 - 1) mod 100,($1 * 10 - 1)/100,($1 * 10 - 1)/100, ($1 * 10 - 1)/100,($1 * 10 - 1)/100,
+ ($1 * 10 - 1)/100,($1 * 10 - 1)/100,($1 * 10 - 1)/100, ($1 * 10 - 1) mod 100, ($1 * 10 - 1)/1000,'filler-data-$1_8','filler2'),
+(($1 * 10 - 2) div 10,($1 * 10 - 2) mod 100,($1 * 10 - 2)/100,($1 * 10 - 2)/100, ($1 * 10 - 2)/100,($1 * 10 - 2)/100,
+ ($1 * 10 - 2)/100,($1 * 10 - 2)/100,($1 * 10 - 2)/100, ($1 * 10 - 2) mod 100, ($1 * 10 - 2)/1000,'filler-data-$1_7','filler2'),
+(($1 * 10 - 3) div 10,($1 * 10 - 3) mod 100,($1 * 10 - 3)/100,($1 * 10 - 3)/100, ($1 * 10 - 3)/100,($1 * 10 - 3)/100,
+ ($1 * 10 - 3)/100,($1 * 10 - 3)/100,($1 * 10 - 3)/100, ($1 * 10 - 3) mod 100, ($1 * 10 - 3)/1000,'filler-data-$1_6','filler2'),
+(($1 * 10 - 4) div 10,($1 * 10 - 4) mod 100,($1 * 10 - 4)/100,($1 * 10 - 4)/100, ($1 * 10 - 4)/100,($1 * 10 - 4)/100,
+ ($1 * 10 - 4)/100,($1 * 10 - 4)/100,($1 * 10 - 4)/100, ($1 * 10 - 4) mod 100, ($1 * 10 - 4)/1000,'filler-data-$1_5','filler2'),
+(($1 * 10 - 5) div 10,($1 * 10 - 5) mod 100,($1 * 10 - 5)/100,($1 * 10 - 5)/100, ($1 * 10 - 5)/100,($1 * 10 - 5)/100,
+ ($1 * 10 - 5)/100,($1 * 10 - 5)/100,($1 * 10 - 5)/100, ($1 * 10 - 5) mod 100, ($1 * 10 - 5)/1000,'filler-data-$1_4','filler2'),
+(($1 * 10 - 6) div 10,($1 * 10 - 6) mod 100,($1 * 10 - 6)/100,($1 * 10 - 6)/100, ($1 * 10 - 6)/100,($1 * 10 - 6)/100,
+ ($1 * 10 - 6)/100,($1 * 10 - 6)/100,($1 * 10 - 6)/100, ($1 * 10 - 6) mod 100, ($1 * 10 - 6)/1000,'filler-data-$1_3','filler2'),
+(($1 * 10 - 7) div 10,($1 * 10 - 7) mod 100,($1 * 10 - 7)/100,($1 * 10 - 7)/100, ($1 * 10 - 7)/100,($1 * 10 - 7)/100,
+ ($1 * 10 - 7)/100,($1 * 10 - 7)/100,($1 * 10 - 7)/100, ($1 * 10 - 7) mod 100, ($1 * 10 - 7)/1000,'filler-data-$1_2','filler2'),
+(($1 * 10 - 8) div 10,($1 * 10 - 8) mod 100,($1 * 10 - 8)/100,($1 * 10 - 8)/100, ($1 * 10 - 8)/100,($1 * 10 - 8)/100,
+ ($1 * 10 - 8)/100,($1 * 10 - 8)/100,($1 * 10 - 8)/100, ($1 * 10 - 8) mod 100, ($1 * 10 - 8)/1000,'filler-data-$1_1','filler2'),
+(($1 * 10 - 9) div 10,($1 * 10 - 9) mod 100,($1 * 10 - 9)/100,($1 * 10 - 9)/100, ($1 * 10 - 9)/100,($1 * 10 - 9)/100,
+ ($1 * 10 - 9)/100,($1 * 10 - 9)/100,($1 * 10 - 9)/100, ($1 * 10 - 9) mod 100, ($1 * 10 - 9)/1000,'filler-data-$1_0','filler2');
   dec $1;
 }
 set autocommit=1;

=== modified file 'mysql-test/include/mix1.inc'
--- a/mysql-test/include/mix1.inc	2009-12-11 15:44:05 +0000
+++ b/mysql-test/include/mix1.inc	2010-05-12 17:18:28 +0000
@@ -449,8 +449,6 @@ SELECT DISTINCT t1.name, t1.dept FROM t1
 
 DROP TABLE t1;
 
---source include/innodb_rollback_on_timeout.inc
-
 #
 # Bug #27210: INNODB ON DUPLICATE KEY UPDATE
 #
@@ -481,7 +479,6 @@ drop table test;
 set global query_cache_type=@save_qcache_type;
 set global query_cache_size=@save_qcache_size;
 
---source include/innodb_rollback_on_timeout.inc
 
 #
 # Bug #27650: INSERT fails after multi-row INSERT of the form:
@@ -627,10 +624,10 @@ DROP TABLE t1,t2,t3;
 create table t1 (a int) engine=innodb;
 let $MYSQLD_DATADIR= `select @@datadir`;
 copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/bug29807.frm;
---error 1146
+--error ER_NO_SUCH_TABLE
 select * from bug29807;
 drop table t1;
---error 1051
+--error ER_BAD_TABLE_ERROR
 drop table bug29807;
 create table bug29807 (a int);
 drop table bug29807;
@@ -800,7 +797,6 @@ EXPLAIN SELECT b, SUM(c) FROM t1 GROUP B
 EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
 DROP TABLE t1;
 
---source include/innodb_rollback_on_timeout.inc
 
 #
 # Bug#27296 Assertion in ALTER TABLE SET DEFAULT in Linux Debug build
@@ -1145,25 +1141,25 @@ DROP TABLE t1;
 BEGIN;
 SAVEPOINT s1;
 COMMIT;
---error 1305
+--error ER_SP_DOES_NOT_EXIST
 RELEASE SAVEPOINT s1;
 
 BEGIN;
 SAVEPOINT s2;
 COMMIT;
---error 1305
+--error ER_SP_DOES_NOT_EXIST
 ROLLBACK TO SAVEPOINT s2;
 
 BEGIN;
 SAVEPOINT s3;
 ROLLBACK;
---error 1305
+--error ER_SP_DOES_NOT_EXIST
 RELEASE SAVEPOINT s3;
 
 BEGIN;
 SAVEPOINT s4;
 ROLLBACK;
---error 1305
+--error ER_SP_DOES_NOT_EXIST
 ROLLBACK TO SAVEPOINT s4;
 
 #
@@ -1295,17 +1291,17 @@ create table t1(f1 varchar(5) unique, f2
 insert into t1(f1) values(1);
 --replace_column 1 #
 select @a:=f2 from t1;
---sleep 5
+--real_sleep 1.01
 update t1 set f1=1;
 --replace_column 1 #
 select @b:=f2 from t1;
 select if(@a=@b,"ok","wrong");
---sleep 5
+--real_sleep 1.01
 insert into t1(f1) values (1) on duplicate key update f1="1";
 --replace_column 1 #
 select @b:=f2 from t1;
 select if(@a=@b,"ok","wrong");
---sleep 5
+--real_sleep 1.01
 insert into t1(f1) select f1 from t1 on duplicate key update f1="1";
 --replace_column 1 #
 select @b:=f2 from t1;

=== modified file 'mysql-test/r/func_time.result'
--- a/mysql-test/r/func_time.result	2010-03-01 09:54:21 +0000
+++ b/mysql-test/r/func_time.result	2010-05-12 17:18:28 +0000
@@ -1082,7 +1082,7 @@ b timestamp default '2005-05-05 01:01:01
 drop function if exists t_slow_sysdate;
 create function t_slow_sysdate() returns timestamp
 begin
-do sleep(2);
+do sleep(1.1);
 return sysdate();
 end;
 //
@@ -1110,7 +1110,7 @@ drop table t1;
 create procedure t_sysdate()
 begin
 select sysdate() into @a;
-do sleep(2);
+do sleep(1.1);
 select sysdate() into @b;
 select @a != @b;
 end;

=== modified file 'mysql-test/r/index_merge_innodb.result'
--- a/mysql-test/r/index_merge_innodb.result	2009-10-12 09:08:34 +0000
+++ b/mysql-test/r/index_merge_innodb.result	2010-05-12 17:18:28 +0000
@@ -169,16 +169,16 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	range	PRIMARY,key1	PRIMARY	8	NULL	9	Using where
 select * from t1 where pk1 = 1 and pk2 < 80  and key1=0;
 pk1	pk2	key1	key2	pktail1ok	pktail2ok	pktail3bad	pktail4bad	pktail5bad	pk2copy	badkey	filler1	filler2
-1	10	0	0	0	0	0	0	0	10	0	filler-data-10	filler2
-1	11	0	0	0	0	0	0	0	11	0	filler-data-11	filler2
-1	12	0	0	0	0	0	0	0	12	0	filler-data-12	filler2
-1	13	0	0	0	0	0	0	0	13	0	filler-data-13	filler2
-1	14	0	0	0	0	0	0	0	14	0	filler-data-14	filler2
-1	15	0	0	0	0	0	0	0	15	0	filler-data-15	filler2
-1	16	0	0	0	0	0	0	0	16	0	filler-data-16	filler2
-1	17	0	0	0	0	0	0	0	17	0	filler-data-17	filler2
-1	18	0	0	0	0	0	0	0	18	0	filler-data-18	filler2
-1	19	0	0	0	0	0	0	0	19	0	filler-data-19	filler2
+1	10	0	0	0	0	0	0	0	10	0	filler-data-1_9	filler2
+1	11	0	0	0	0	0	0	0	11	0	filler-data-2_0	filler2
+1	12	0	0	0	0	0	0	0	12	0	filler-data-2_1	filler2
+1	13	0	0	0	0	0	0	0	13	0	filler-data-2_2	filler2
+1	14	0	0	0	0	0	0	0	14	0	filler-data-2_3	filler2
+1	15	0	0	0	0	0	0	0	15	0	filler-data-2_4	filler2
+1	16	0	0	0	0	0	0	0	16	0	filler-data-2_5	filler2
+1	17	0	0	0	0	0	0	0	17	0	filler-data-2_6	filler2
+1	18	0	0	0	0	0	0	0	18	0	filler-data-2_7	filler2
+1	19	0	0	0	0	0	0	0	19	0	filler-data-2_8	filler2
 explain select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	index_merge	key1,key2	key1,key2	4,4	NULL	1	Using intersect(key1,key2); Using where; Using index

=== modified file 'mysql-test/r/index_merge_myisam.result'
--- a/mysql-test/r/index_merge_myisam.result	2010-01-20 10:11:29 +0000
+++ b/mysql-test/r/index_merge_myisam.result	2010-05-12 17:18:28 +0000
@@ -1327,16 +1327,16 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	range	PRIMARY,key1	PRIMARY	8	NULL	7	Using index condition; Using where; Using MRR
 select * from t1 where pk1 = 1 and pk2 < 80  and key1=0;
 pk1	pk2	key1	key2	pktail1ok	pktail2ok	pktail3bad	pktail4bad	pktail5bad	pk2copy	badkey	filler1	filler2
-1	19	0	0	0	0	0	0	0	19	0	filler-data-19	filler2
-1	18	0	0	0	0	0	0	0	18	0	filler-data-18	filler2
-1	17	0	0	0	0	0	0	0	17	0	filler-data-17	filler2
-1	16	0	0	0	0	0	0	0	16	0	filler-data-16	filler2
-1	15	0	0	0	0	0	0	0	15	0	filler-data-15	filler2
-1	14	0	0	0	0	0	0	0	14	0	filler-data-14	filler2
-1	13	0	0	0	0	0	0	0	13	0	filler-data-13	filler2
-1	12	0	0	0	0	0	0	0	12	0	filler-data-12	filler2
-1	11	0	0	0	0	0	0	0	11	0	filler-data-11	filler2
-1	10	0	0	0	0	0	0	0	10	0	filler-data-10	filler2
+1	19	0	0	0	0	0	0	0	19	0	filler-data-2_8	filler2
+1	18	0	0	0	0	0	0	0	18	0	filler-data-2_7	filler2
+1	17	0	0	0	0	0	0	0	17	0	filler-data-2_6	filler2
+1	16	0	0	0	0	0	0	0	16	0	filler-data-2_5	filler2
+1	15	0	0	0	0	0	0	0	15	0	filler-data-2_4	filler2
+1	14	0	0	0	0	0	0	0	14	0	filler-data-2_3	filler2
+1	13	0	0	0	0	0	0	0	13	0	filler-data-2_2	filler2
+1	12	0	0	0	0	0	0	0	12	0	filler-data-2_1	filler2
+1	11	0	0	0	0	0	0	0	11	0	filler-data-2_0	filler2
+1	10	0	0	0	0	0	0	0	10	0	filler-data-1_9	filler2
 explain select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	index_merge	key1,key2	key1,key2	4,4	NULL	1	Using intersect(key1,key2); Using where

=== modified file 'mysql-test/r/innodb_mysql.result'
--- a/mysql-test/r/innodb_mysql.result	2010-05-07 05:52:36 +0000
+++ b/mysql-test/r/innodb_mysql.result	2010-05-12 17:18:28 +0000
@@ -392,43 +392,6 @@ id	select_type	table	type	possible_keys
 SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
 name	dept
 DROP TABLE t1;
-drop table if exists t1;
-show variables like 'innodb_rollback_on_timeout';
-Variable_name	Value
-innodb_rollback_on_timeout	OFF
-create table t1 (a int unsigned not null primary key) engine = innodb;
-insert into t1 values (1);
-commit;
-begin work;
-insert into t1 values (2);
-select * from t1;
-a
-1
-2
-begin work;
-insert into t1 values (5);
-select * from t1;
-a
-1
-5
-insert into t1 values (2);
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-select * from t1;
-a
-1
-5
-commit;
-select * from t1;
-a
-1
-2
-commit;
-select * from t1;
-a
-1
-2
-5
-drop table t1;
 set @save_qcache_size=@@global.query_cache_size;
 set @save_qcache_type=@@global.query_cache_type;
 set global query_cache_size=10*1024*1024;
@@ -455,43 +418,6 @@ tes	1234
 drop table test;
 set global query_cache_type=@save_qcache_type;
 set global query_cache_size=@save_qcache_size;
-drop table if exists t1;
-show variables like 'innodb_rollback_on_timeout';
-Variable_name	Value
-innodb_rollback_on_timeout	OFF
-create table t1 (a int unsigned not null primary key) engine = innodb;
-insert into t1 values (1);
-commit;
-begin work;
-insert into t1 values (2);
-select * from t1;
-a
-1
-2
-begin work;
-insert into t1 values (5);
-select * from t1;
-a
-1
-5
-insert into t1 values (2);
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-select * from t1;
-a
-1
-5
-commit;
-select * from t1;
-a
-1
-2
-commit;
-select * from t1;
-a
-1
-2
-5
-drop table t1;
 create table t1(
 id int auto_increment,
 c char(1) not null,
@@ -784,43 +710,6 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	128	Using filesort
 DROP TABLE t1;
 drop table if exists t1;
-show variables like 'innodb_rollback_on_timeout';
-Variable_name	Value
-innodb_rollback_on_timeout	OFF
-create table t1 (a int unsigned not null primary key) engine = innodb;
-insert into t1 values (1);
-commit;
-begin work;
-insert into t1 values (2);
-select * from t1;
-a
-1
-2
-begin work;
-insert into t1 values (5);
-select * from t1;
-a
-1
-5
-insert into t1 values (2);
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-select * from t1;
-a
-1
-5
-commit;
-select * from t1;
-a
-1
-2
-commit;
-select * from t1;
-a
-1
-2
-5
-drop table t1;
-drop table if exists t1;
 create table t1 (a int) engine=innodb;
 alter table t1 alter a set default 1;
 drop table t1;

=== added file 'mysql-test/r/innodb_timeout_rollback1.result'
--- a/mysql-test/r/innodb_timeout_rollback1.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/innodb_timeout_rollback1.result	2010-05-12 10:12:39 +0000
@@ -0,0 +1,38 @@
+drop table if exists t1;
+show variables like 'innodb_rollback_on_timeout';
+Variable_name	Value
+innodb_rollback_on_timeout	OFF
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+begin work;
+insert into t1 values (2);
+select * from t1;
+a
+1
+2
+begin work;
+insert into t1 values (5);
+select * from t1;
+a
+1
+5
+insert into t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1;
+a
+1
+5
+commit;
+select * from t1;
+a
+1
+2
+commit;
+select * from t1;
+a
+1
+2
+5
+drop table t1;
+End of 5.0 tests

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2010-02-24 16:27:03 +0000
+++ b/mysql-test/r/mysqltest.result	2010-05-12 17:18:28 +0000
@@ -177,6 +177,8 @@ mysqltest: At line 1: End of line junk d
 "
 mysqltest: At line 1: Extra delimiter ";" found
 mysqltest: At line 1: Extra delimiter ";" found
+SET @aux = 1 ;
+SET @aux = 1 ;
 mysqltest: At line 1: Missing argument(s) to 'error'
 mysqltest: At line 1: Missing argument(s) to 'error'
 mysqltest: At line 1: The sqlstate definition must start with an uppercase S

=== modified file 'mysql-test/t/func_time.test'
--- a/mysql-test/t/func_time.test	2010-02-17 10:00:21 +0000
+++ b/mysql-test/t/func_time.test	2010-05-12 17:18:28 +0000
@@ -616,7 +616,7 @@ delimiter //;
 drop function if exists t_slow_sysdate;
 create function t_slow_sysdate() returns timestamp
 begin
-  do sleep(2);
+  do sleep(1.1);
   return sysdate();
 end;
 //
@@ -650,7 +650,7 @@ delimiter //;
 create procedure t_sysdate()
 begin
   select sysdate() into @a;
-  do sleep(2);
+  do sleep(1.1);
   select sysdate() into @b;
   select @a != @b;
 end;
@@ -760,14 +760,14 @@ insert into t1 values ('070514-000000');
 select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
 # Error for swe7: it is not ASCII compatible
 set names swe7;
---error 1267
+--error ER_CANT_AGGREGATE_2COLLATIONS
 select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
 set names latin1;
 # Conversion of date_format() result to ASCII
 # is not safe with the non-default locale fr_FR
 # because month and day names can have accented characters
 set lc_time_names=fr_FR;
---error 1267
+--error ER_CANT_AGGREGATE_2COLLATIONS
 select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
 set lc_time_names=en_US;
 drop table t1;

=== added file 'mysql-test/t/innodb_timeout_rollback1-master.opt'
--- a/mysql-test/t/innodb_timeout_rollback1-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/innodb_timeout_rollback1-master.opt	2010-05-12 10:12:39 +0000
@@ -0,0 +1 @@
+--innodb_lock_wait_timeout=1

=== added file 'mysql-test/t/innodb_timeout_rollback1.test'
--- a/mysql-test/t/innodb_timeout_rollback1.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/innodb_timeout_rollback1.test	2010-05-12 10:12:39 +0000
@@ -0,0 +1,6 @@
+# Check impact of server variable innodb_rollback_on_timeout = OFF
+--source include/have_innodb.inc
+
+--source include/innodb_rollback_on_timeout.inc
+
+--echo End of 5.0 tests

=== modified file 'mysql-test/t/merge.test'
--- a/mysql-test/t/merge.test	2010-03-25 09:02:07 +0000
+++ b/mysql-test/t/merge.test	2010-05-12 17:18:28 +0000
@@ -55,12 +55,12 @@ show create table t3;
 
 # The following should give errors
 create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2);
---error 1168
+--error ER_WRONG_MRG_TABLE
 select * from t4;
---error 1168
+--error ER_WRONG_MRG_TABLE
 alter table t4 add column c int;
 flush tables;
---error 1168
+--error ER_WRONG_MRG_TABLE
 select * from t4;
 
 #
@@ -451,7 +451,7 @@ drop table t1, t2, t3;
 CREATE TABLE t1(a INT);
 INSERT INTO t1 VALUES(2),(1);
 CREATE TABLE t2(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t2 WHERE a=2;
 DROP TABLE t1, t2;
 
@@ -461,7 +461,7 @@ DROP TABLE t1, t2;
 #
 CREATE TABLE t1(a INT) ENGINE=MEMORY;
 CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t2;
 DROP TABLE t1, t2;
 CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
@@ -474,25 +474,25 @@ DROP TABLE t2;
 #
 CREATE TABLE t1(a INT, b TEXT);
 CREATE TABLE tm1(a TEXT, b INT) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
 CREATE TABLE t1(a SMALLINT, b SMALLINT);
 CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
 CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(a, b));
 CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
 CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(b));
 CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
@@ -1248,7 +1248,7 @@ SELECT * FROM t3;
 ALTER TABLE t1 ENGINE= MEMORY;
 INSERT INTO t1 VALUES (0, 0);
 # Before fixing, this succeeded, but (0, 0) was missing.
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t3;
 DROP TABLE t1, t2, t3;
 

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2010-02-24 16:27:03 +0000
+++ b/mysql-test/t/mysqltest.test	2010-05-12 17:18:28 +0000
@@ -486,9 +486,11 @@ remove_file $MYSQLTEST_VARDIR/tmp/mysqlt
 --exec echo "--disable_query_log;" | $MYSQL_TEST 2>&1
 
 
-# Allow trailing # comment
---sleep 1 # Wait for insert delayed to be executed.
---sleep 1        # Wait for insert delayed to be executed.
+# Allow trailing comment after SQL and mysqltest builtin commands
+--sleep 0.01 # Trailing comment 1
+--sleep 0.01 # Trailing comment 2
+SET @aux = 1 ; # Trailing comment 3
+SET @aux = 1 ; # Trailing comment 4
 
 # ----------------------------------------------------------------------------
 # Test error
@@ -916,14 +918,14 @@ source $x/tmp/sourced.inc;
 # Test sleep command
 # ----------------------------------------------------------------------------
 
-sleep 0.5;
+sleep 0.1;
 sleep 1;
+real_sleep 0.1;
 real_sleep 1;
 
 # Parameter from variable, legal and illegal
 let $sleep_var= 0.1;
 sleep $sleep_var;
-let $sleep_var= 1;
 --real_sleep $sleep_var
 
 --write_file $MYSQL_TMP_DIR/sleep.inc
@@ -1705,7 +1707,7 @@ select * from t1;
 # 4. Non-query stmt betwen send and reap allowed
 
 --send select * from t1;
---sleep 0.05
+--sleep 0.01
 --echo Result coming up
 --reap
 

=== modified file 'mysql-test/t/partition_innodb_semi_consistent-master.opt'
--- a/mysql-test/t/partition_innodb_semi_consistent-master.opt	2008-12-16 11:44:18 +0000
+++ b/mysql-test/t/partition_innodb_semi_consistent-master.opt	2010-05-12 10:12:39 +0000
@@ -1 +1 @@
---innodb_lock_wait_timeout=2
+--innodb_lock_wait_timeout=1

=== modified file 'mysql-test/t/sp.test'
--- a/mysql-test/t/sp.test	2010-04-14 08:14:57 +0000
+++ b/mysql-test/t/sp.test	2010-05-12 17:18:28 +0000
@@ -2925,7 +2925,7 @@ begin
   create table t2 as select * from t3;
 end|
 
--- error 1146
+-- error ER_NO_SUCH_TABLE
 call bug4904()|
 
 drop procedure bug4904|
@@ -3001,7 +3001,7 @@ end|
 
 select created into @c1 from mysql.proc
   where db='test' and name='bug5251'|
---sleep 2
+--real_sleep 1.01
 alter procedure bug5251 comment 'foobar'|
 select count(*) from mysql.proc
   where  db='test' and name='bug5251' and created = @c1|


Attachment: [text/bzr-bundle] bzr/matthias.leich@sun.com-20100517190443-g3jkv6p14fz1h810.bundle
Thread
bzr push into mysql-pe branch (matthias.leich:4066)Matthias Leich17 May