From 474fe6d9d9e0b4d8803bdf439dd017ba0c729729 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 27 Sep 2012 20:09:46 +0200 Subject: [PATCH] fixes for test failures and small collateral changes mysql-test/lib/My/Test.pm: somehow with "print" we get truncated writes sometimes mysql-test/suite/perfschema/r/digest_table_full.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/dml_handler.result: host table is not ported over yet mysql-test/suite/perfschema/r/information_schema.result: host table is not ported over yet mysql-test/suite/perfschema/r/nesting.result: this differs, because we don't rewrite general log queries, and multi-statement packets are logged as a one entry. this result file is identical to what mysql-5.6.5 produces with the --log-raw option. mysql-test/suite/perfschema/r/relaylog.result: MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB. mysql-test/suite/perfschema/r/server_init.result: MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup. mysql-test/suite/perfschema/r/stage_mdl_global.result: this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not do that, and this causes useless mutex locks and waits. mysql-test/suite/perfschema/r/statement_digest.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_consumers.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_long_query.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result: will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result: will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged --- .bzrignore | 1 + TODO | 23 +- client/mysqldump.c | 23 +- client/mysqlslap.c | 2 +- cmake/create_initial_db.cmake.in | 4 +- include/my_global.h | 3 +- include/my_sys.h | 6 +- include/mysql.h | 6 +- include/mysql/psi/psi_abi_v0.h | 2 +- include/mysql/psi/psi_abi_v2.h | 2 +- include/mysql/service_debug_sync.h | 6 - include/mysql_com.h | 4 +- mysql-test/extra/rpl_tests/rpl_charset.test | 12 - .../rpl_tests/rpl_drop_create_temp_table.inc | 76 + .../rpl_tests/rpl_drop_create_temp_table.test | 116 +- .../extra/rpl_tests/rpl_mixing_engines.inc | 266 +- .../extra/rpl_tests/rpl_mixing_engines.test | 721 ++-- mysql-test/include/check-warnings.test | 2 +- mysql-test/include/default_mysqld.cnf | 24 +- mysql-test/include/filter_file.inc | 145 + mysql-test/include/have_innodb.combinations | 1 + mysql-test/include/show_binlog_events.inc | 48 +- mysql-test/include/show_events.inc | 95 +- mysql-test/include/write_result_to_file.inc | 77 + mysql-test/lib/My/Test.pm | 5 +- mysql-test/r/ctype_cp932_binlog_row.result | 2 +- mysql-test/r/ctype_cp932_binlog_stm.result | 4 +- mysql-test/r/events_2.result | 4 +- mysql-test/r/events_bugs.result | 4 +- .../r/flush_block_commit_notembedded.result | 6 +- mysql-test/r/grant.result | 10 +- mysql-test/r/group_by.result | 10 +- mysql-test/r/insert_notembedded.result | 6 +- mysql-test/r/multi_update.result | 4 +- mysql-test/r/mysqlbinlog.result | 2 +- mysql-test/r/mysqldump.result | 4 +- mysql-test/r/old-mode.result | 2 +- mysql-test/r/partition_binlog.result | 2 +- mysql-test/r/query_cache.result | 16 +- mysql-test/r/sp-code.result | 4 +- mysql-test/r/sp-destruct.result | 4 +- mysql-test/r/sp-threads.result | 2 +- mysql-test/r/sp_trans_log.result | 8 +- mysql-test/r/subselect_cache.result | 4 +- mysql-test/r/trigger_notembedded.result | 2 +- mysql-test/r/type_blob.result | 4 +- mysql-test/r/user_var-binlog.result | 2 +- mysql-test/suite.pm | 4 + .../suite/binlog/r/binlog_checksum.result | 4 +- .../suite/binlog/r/binlog_database.result | 18 +- .../r/binlog_delete_and_flush_index.result | 4 +- .../binlog/r/binlog_drop_if_exists.result | 6 +- .../binlog/r/binlog_implicit_commit.result | 133 +- .../suite/binlog/r/binlog_innodb.result | 8 +- .../suite/binlog/r/binlog_innodb_row.result | 8 +- .../suite/binlog/r/binlog_killed.result | 4 +- .../binlog/r/binlog_killed_simulate.result | 2 +- .../suite/binlog/r/binlog_mdev342.result | 4 +- .../binlog/r/binlog_mixed_load_data.result | 2 +- .../suite/binlog/r/binlog_row_binlog.result | 22 +- .../binlog/r/binlog_row_ctype_ucs.result | 2 +- .../suite/binlog/r/binlog_row_drop_tbl.result | 2 +- .../binlog/r/binlog_row_drop_tmp_tbl.result | 4 +- .../binlog/r/binlog_row_insert_select.result | 5 +- .../r/binlog_row_mix_innodb_myisam.result | 80 +- .../r/binlog_statement_insert_delayed.result | 4 +- .../suite/binlog/r/binlog_stm_binlog.result | 26 +- .../binlog/r/binlog_stm_blackhole.result | 2 +- .../binlog/r/binlog_stm_ctype_ucs.result | 2 +- .../suite/binlog/r/binlog_stm_do_db.result | 2 +- .../suite/binlog/r/binlog_stm_drop_tbl.result | 2 +- .../binlog/r/binlog_stm_drop_tmp_tbl.result | 4 +- .../binlog/r/binlog_stm_insert_select.result | 5 +- .../r/binlog_stm_mix_innodb_myisam.result | 76 +- .../suite/binlog/r/binlog_stm_ps.result | 2 +- .../suite/binlog/r/binlog_stm_row.result | 2 +- .../binlog/r/binlog_stm_user_variables.result | 4 +- .../binlog/r/binlog_truncate_myisam.result | 8 +- .../suite/binlog/r/binlog_unsafe.result | 6 +- .../suite/funcs_1/r/is_columns_mysql.result | 2 - .../funcs_1/r/processlist_priv_no_prot.result | 24 +- .../funcs_1/r/processlist_val_no_prot.result | 10 +- mysql-test/suite/innodb/r/innodb.result | 4 +- .../suite/innodb/r/innodb_bug12661768.result | 2 +- .../suite/innodb/r/innodb_bug53592.result | 2 +- mysql-test/suite/innodb/t/innodb.test | 4 +- .../suite/innodb/t/innodb_bug12661768.test | 2 +- .../suite/innodb/t/innodb_bug53592.test | 2 +- mysql-test/suite/perfschema/disabled.def | 57 +- .../suite/perfschema/include/schema.inc | 1 + .../include/start_server_common.inc | 1 + .../suite/perfschema/r/binlog_mix.result | 8 - .../suite/perfschema/r/binlog_row.result | 8 - .../suite/perfschema/r/binlog_stmt.result | 2 + .../perfschema/r/digest_table_full.result | 2 +- .../suite/perfschema/r/dml_handler.result | 39 +- .../perfschema/r/dml_setup_instruments.result | 2 +- .../perfschema/r/information_schema.result | 9 - mysql-test/suite/perfschema/r/misc.result | 4 +- mysql-test/suite/perfschema/r/nesting.result | 94 +- .../suite/perfschema/r/ortho_iter.result | 2 +- .../suite/perfschema/r/pfs_upgrade.result | 515 ++- .../suite/perfschema/r/privilege.result | 32 +- .../perfschema/r/privilege_table_io.result | 2 +- mysql-test/suite/perfschema/r/relaylog.result | 25 +- .../perfschema/r/rollback_table_io.result | 1 + mysql-test/suite/perfschema/r/schema.result | 34 +- .../suite/perfschema/r/server_init.result | 8 +- .../r/setup_instruments_defaults.result | 1 - .../r/socket_summary_by_instance_func.result | 2 +- .../perfschema/r/stage_mdl_global.result | 2 - .../r/start_server_disable_idle.result | 2 +- .../r/start_server_disable_stages.result | 2 +- .../r/start_server_disable_statements.result | 2 +- .../r/start_server_disable_waits.result | 2 +- .../perfschema/r/start_server_innodb.result | 2 +- .../r/start_server_no_account.result | 2 +- .../r/start_server_no_cond_class.result | 2 +- .../r/start_server_no_cond_inst.result | 2 +- .../r/start_server_no_file_class.result | 2 +- .../r/start_server_no_file_inst.result | 2 +- .../perfschema/r/start_server_no_host.result | 2 +- .../r/start_server_no_mutex_class.result | 2 +- .../r/start_server_no_mutex_inst.result | 2 +- .../r/start_server_no_rwlock_class.result | 2 +- .../r/start_server_no_rwlock_inst.result | 2 +- .../r/start_server_no_setup_actors.result | 2 +- .../r/start_server_no_setup_objects.result | 2 +- .../r/start_server_no_socket_class.result | 2 +- .../r/start_server_no_socket_inst.result | 2 +- .../r/start_server_no_stage_class.result | 2 +- .../r/start_server_no_stages_history.result | 2 +- ...start_server_no_stages_history_long.result | 2 +- .../start_server_no_statements_history.result | 2 +- ...t_server_no_statements_history_long.result | 2 +- .../r/start_server_no_table_hdl.result | 2 +- .../r/start_server_no_table_inst.result | 2 +- .../r/start_server_no_thread_class.result | 2 +- .../r/start_server_no_thread_inst.result | 2 +- .../perfschema/r/start_server_no_user.result | 2 +- .../r/start_server_no_waits_history.result | 2 +- .../start_server_no_waits_history_long.result | 2 +- .../perfschema/r/start_server_off.result | 2 +- .../suite/perfschema/r/start_server_on.result | 2 +- .../perfschema/r/statement_digest.result | 44 +- .../r/statement_digest_consumers.result | 44 +- .../r/statement_digest_long_query.result | 4 +- .../r/table_aggregate_global_2u_2t.result | 2 +- .../r/table_aggregate_global_2u_3t.result | 2 +- .../r/table_aggregate_global_4u_2t.result | 2 +- .../r/table_aggregate_global_4u_3t.result | 2 +- .../r/table_aggregate_hist_2u_2t.result | 2 +- .../r/table_aggregate_hist_2u_3t.result | 2 +- .../r/table_aggregate_hist_4u_2t.result | 2 +- .../r/table_aggregate_hist_4u_3t.result | 2 +- .../perfschema/r/table_aggregate_off.result | 2 +- .../r/table_aggregate_thread_2u_2t.result | 2 +- .../r/table_aggregate_thread_2u_3t.result | 2 +- .../r/table_aggregate_thread_4u_2t.result | 2 +- .../r/table_aggregate_thread_4u_3t.result | 2 +- .../r/table_io_aggregate_global_2u_2t.result | 2 +- .../r/table_io_aggregate_global_2u_3t.result | 2 +- .../r/table_io_aggregate_global_4u_2t.result | 2 +- .../r/table_io_aggregate_global_4u_3t.result | 2 +- .../r/table_io_aggregate_hist_2u_2t.result | 2 +- .../r/table_io_aggregate_hist_2u_3t.result | 2 +- .../r/table_io_aggregate_hist_4u_2t.result | 2 +- .../r/table_io_aggregate_hist_4u_3t.result | 2 +- .../r/table_io_aggregate_thread_2u_2t.result | 2 +- .../r/table_io_aggregate_thread_2u_3t.result | 2 +- .../r/table_io_aggregate_thread_4u_2t.result | 2 +- .../r/table_io_aggregate_thread_4u_3t.result | 2 +- .../table_lock_aggregate_global_2u_2t.result | 2 +- .../table_lock_aggregate_global_2u_3t.result | 2 +- .../table_lock_aggregate_global_4u_2t.result | 2 +- .../table_lock_aggregate_global_4u_3t.result | 2 +- .../r/table_lock_aggregate_hist_2u_2t.result | 2 +- .../r/table_lock_aggregate_hist_2u_3t.result | 2 +- .../r/table_lock_aggregate_hist_4u_2t.result | 2 +- .../r/table_lock_aggregate_hist_4u_3t.result | 2 +- .../table_lock_aggregate_thread_2u_2t.result | 2 +- .../table_lock_aggregate_thread_2u_3t.result | 2 +- .../table_lock_aggregate_thread_4u_2t.result | 2 +- .../table_lock_aggregate_thread_4u_3t.result | 2 +- .../suite/perfschema/r/table_schema.result | 29 - .../suite/perfschema/t/innodb_table_io.test | 1 + mysql-test/suite/perfschema/t/misc.test | 1 + .../suite/perfschema/t/pfs_upgrade.test | 1 + .../suite/perfschema/t/rollback_table_io.test | 1 + .../perfschema/t/socket_instances_func.test | 2 +- .../t/socket_instances_func_win.test | 2 +- .../t/socket_summary_by_instance_func.test | 4 +- .../socket_summary_by_instance_func_win.test | 2 +- .../rpl_auto_increment_update_failure.result | 20 +- .../rpl/r/rpl_begin_commit_rollback.result | 2 +- .../suite/rpl/r/rpl_binlog_errors.result | 2 +- mysql-test/suite/rpl/r/rpl_charset.result | 16 - .../suite/rpl/r/rpl_concurrency_error.result | 8 +- .../rpl/r/rpl_conditional_comments.result | 6 +- .../rpl/r/rpl_create_if_not_exists.result | 9 +- .../rpl_create_tmp_table_if_not_exists.result | 2 +- mysql-test/suite/rpl/r/rpl_do_grant.result | 2 +- mysql-test/suite/rpl/r/rpl_drop_temp.result | 2 +- .../suite/rpl/r/rpl_innodb_mixed_ddl.result | 2 +- .../suite/rpl/r/rpl_innodb_mixed_dml.result | 3 +- .../suite/rpl/r/rpl_insert_delayed,stmt.rdiff | 2 +- .../suite/rpl/r/rpl_loaddata_map.result | 2 +- mysql-test/suite/rpl/r/rpl_loaddata_s.result | 3 +- .../r/rpl_mixed_binlog_max_cache_size.result | 3 +- .../r/rpl_mixed_drop_create_temp_table.result | 556 ++- .../r/rpl_mixed_implicit_commit_binlog.result | 41 + .../rpl/r/rpl_mixed_mixing_engines.result | 3267 +++++++++++----- ...rpl_non_direct_mixed_mixing_engines.result | 3267 +++++++++++----- .../rpl_non_direct_row_mixing_engines.result | 3267 +++++++++++----- .../rpl_non_direct_stm_mixing_engines.result | 3326 +++++++++++------ mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result | 4 +- .../suite/rpl/r/rpl_replicate_do.result | 12 - mysql-test/suite/rpl/r/rpl_rewrt_db.result | 2 +- .../suite/rpl/r/rpl_row_basic_11bugs.result | 4 +- .../r/rpl_row_binlog_max_cache_size.result | 3 +- mysql-test/suite/rpl/r/rpl_row_drop.result | 2 +- .../r/rpl_row_drop_create_temp_table.result | 578 ++- .../suite/rpl/r/rpl_row_flsh_tbls.result | 2 +- .../r/rpl_row_implicit_commit_binlog.result | 41 + .../rpl/r/rpl_row_loaddata_concurrent.result | 2 +- mysql-test/suite/rpl/r/rpl_row_log.result | 22 +- .../suite/rpl/r/rpl_row_log_innodb.result | 22 +- .../suite/rpl/r/rpl_row_mixing_engines.result | 3267 +++++++++++----- .../rpl/r/rpl_row_show_relaylog_events.result | 68 +- mysql-test/suite/rpl/r/rpl_slave_skip.result | 4 +- mysql-test/suite/rpl/r/rpl_sp.result | 2 +- .../r/rpl_stm_auto_increment_bug33029.result | 4 +- .../r/rpl_stm_binlog_max_cache_size.result | 3 +- .../r/rpl_stm_drop_create_temp_table.result | 600 ++- .../suite/rpl/r/rpl_stm_flsh_tbls.result | 2 +- .../r/rpl_stm_implicit_commit_binlog.result | 41 + .../rpl/r/rpl_stm_loaddata_concurrent.result | 2 +- mysql-test/suite/rpl/r/rpl_stm_log.result | 24 +- .../r/rpl_stm_mix_show_relaylog_events.result | 68 +- .../suite/rpl/r/rpl_stm_mixing_engines.result | 3280 +++++++++++----- .../suite/rpl/r/rpl_stm_multi_query.result | 2 +- .../suite/rpl/r/rpl_temp_table_mix_row.result | 6 +- mysql-test/suite/rpl/r/rpl_user.result | 2 +- .../t/rpl_mixed_drop_create_temp_table.test | 2 +- .../suite/rpl/t/rpl_mixed_mixing_engines.test | 1 + .../rpl_non_direct_mixed_mixing_engines.test | 1 + .../t/rpl_non_direct_row_mixing_engines.test | 3 +- .../t/rpl_non_direct_stm_mixing_engines.test | 3 +- mysql-test/suite/rpl/t/rpl_replicate_do.test | 21 - .../rpl/t/rpl_row_drop_create_temp_table.test | 2 +- .../suite/rpl/t/rpl_row_mixing_engines.test | 4 +- .../suite/rpl/t/rpl_stm_mixing_engines.test | 3 +- ...nodb_adaptive_max_sleep_delay_basic.result | 46 + .../innodb_analyze_is_persistent_basic.result | 103 + ..._buffer_pool_dump_at_shutdown_basic.result | 18 + .../innodb_buffer_pool_dump_now_basic.result | 8 + .../innodb_buffer_pool_filename_basic.result | 12 + ...innodb_buffer_pool_load_abort_basic.result | 8 + ...b_buffer_pool_load_at_startup_basic.result | 8 + .../innodb_buffer_pool_load_now_basic.result | 11 + ...innodb_change_buffer_max_size_basic.result | 77 + .../r/innodb_checksum_algorithm_basic.result | 47 + ...nnodb_disable_sort_file_cache_basic.result | 92 + ...innodb_doublewrite_batch_size_basic.result | 24 + .../r/innodb_flush_neighbors_basic.result | 92 + .../r/innodb_ft_aux_table_basic.result | 32 + .../r/innodb_ft_cache_size_basic.result | 21 + .../innodb_ft_enable_diag_print_basic.result | 92 + .../r/innodb_ft_enable_stopword_basic.result | 121 + .../r/innodb_ft_max_token_size_basic.result | 21 + .../r/innodb_ft_min_token_size_basic.result | 21 + .../innodb_ft_num_word_optimize_basic.result | 56 + ...nodb_ft_server_stopword_table_basic.result | 32 + .../r/innodb_ft_sort_pll_degree_basic.result | 21 + ...innodb_ft_user_stopword_table_basic.result | 29 + .../r/innodb_lru_scan_depth_basic.result | 69 + .../r/innodb_max_purge_lag_delay_basic.result | 43 + .../r/innodb_monitor_disable_basic.result | 2180 +++++++++++ .../r/innodb_monitor_enable_basic.result | 2180 +++++++++++ .../r/innodb_monitor_reset_all_basic.result | 2180 +++++++++++ .../r/innodb_monitor_reset_basic.result | 2180 +++++++++++ ...innodb_optimize_fulltext_only_basic.result | 92 + .../r/innodb_page_hash_locks_basic.result | 24 + .../r/innodb_print_all_deadlocks_basic.result | 104 + .../r/innodb_purge_batch_size_basic.result | 8 +- .../r/innodb_sort_buffer_size_basic.result | 21 + ...stats_persistent_sample_pages_basic.result | 61 + .../r/innodb_stats_sample_pages_basic.result | 5 + ..._stats_transient_sample_pages_basic.result | 61 + .../r/innodb_sync_array_size_basic.result | 79 + .../r/innodb_undo_directory_basic.result | 48 + .../sys_vars/r/innodb_undo_logs_basic.result | 68 + .../r/innodb_undo_tablespaces_basic.result | 38 + .../sys_vars/r/pfs_accounts_size_basic.result | 23 + .../suite/sys_vars/r/pfs_digests_size.result | 23 + ...ents_stages_history_long_size_basic.result | 23 + ...fs_events_stages_history_size_basic.result | 23 + ..._statements_history_long_size_basic.result | 23 + ...vents_statements_history_size_basic.result | 23 + .../sys_vars/r/pfs_hosts_size_basic.result | 23 + .../r/pfs_max_socket_classes_basic.result | 23 + .../r/pfs_max_socket_instances_basic.result | 23 + .../r/pfs_max_stage_classes_basic.result | 23 + .../r/pfs_max_statement_classes_basic.result | 23 + .../r/pfs_setup_actors_size_basic.result | 23 + .../r/pfs_setup_objects_size_basic.result | 23 + .../sys_vars/r/pfs_users_size_basic.result | 23 + .../suite/sys_vars/r/ssl_crl_basic.result | 5 + .../suite/sys_vars/r/ssl_crlpath_basic.result | 5 + .../sys_vars/r/tx_read_only_basic.result | 181 + .../t/general_log_file_basic-master.opt | 3 +- .../t/general_log_file_func-master.opt | 3 +- ...innodb_adaptive_max_sleep_delay_basic.test | 75 + .../t/innodb_analyze_is_persistent_basic.test | 81 + ...db_buffer_pool_dump_at_shutdown_basic.test | 42 + .../t/innodb_buffer_pool_dump_now_basic.test | 25 + .../t/innodb_buffer_pool_filename_basic.test | 40 + .../innodb_buffer_pool_load_abort_basic.test | 15 + ...odb_buffer_pool_load_at_startup_basic.test | 15 + .../t/innodb_buffer_pool_load_now_basic.test | 39 + .../innodb_change_buffer_max_size_basic.test | 63 + .../t/innodb_checksum_algorithm_basic.test | 38 + .../innodb_disable_sort_file_cache_basic.test | 70 + .../innodb_doublewrite_batch_size_basic.test | 22 + .../t/innodb_flush_neighbors_basic.test | 70 + .../sys_vars/t/innodb_ft_aux_table_basic.test | 41 + .../t/innodb_ft_cache_size_basic.test | 26 + .../t/innodb_ft_enable_diag_print_basic.test | 70 + .../t/innodb_ft_enable_stopword_basic.test | 85 + .../t/innodb_ft_max_token_size_basic.test | 26 + .../t/innodb_ft_min_token_size_basic.test | 26 + .../t/innodb_ft_num_word_optimize_basic.test | 52 + ...innodb_ft_server_stopword_table_basic.test | 41 + .../t/innodb_ft_sort_pll_degree_basic.test | 26 + .../innodb_ft_user_stopword_table_basic.test | 37 + .../t/innodb_lru_scan_depth_basic.test | 58 + .../t/innodb_max_purge_lag_delay_basic.test | 43 + .../t/innodb_monitor_disable_basic.test | 375 ++ .../t/innodb_monitor_enable_basic.test | 375 ++ .../t/innodb_monitor_reset_all_basic.test | 375 ++ .../t/innodb_monitor_reset_basic.test | 375 ++ .../innodb_optimize_fulltext_only_basic.test | 70 + .../t/innodb_page_hash_locks_basic.test | 22 + .../t/innodb_print_all_deadlocks_basic.test | 81 + .../t/innodb_sort_buffer_size_basic.test | 26 + ...b_stats_persistent_sample_pages_basic.test | 57 + ...db_stats_transient_sample_pages_basic.test | 57 + .../t/innodb_sync_array_size_basic.test | 66 + .../t/innodb_undo_directory_basic.test | 85 + .../sys_vars/t/innodb_undo_logs_basic.test | 95 + .../t/innodb_undo_tablespaces_basic.test | 77 + .../t/pfs_accounts_size_basic-master.opt | 2 + .../sys_vars/t/pfs_accounts_size_basic.test | 32 + .../t/pfs_digests_size-master_basic.opt | 2 + .../sys_vars/t/pfs_digests_size_basic.test | 47 + ..._stages_history_long_size_basic-master.opt | 2 + ...events_stages_history_long_size_basic.test | 32 + ...vents_stages_history_size_basic-master.opt | 2 + .../pfs_events_stages_history_size_basic.test | 32 + ...tements_history_long_size_basic-master.opt | 2 + ...ts_statements_history_long_size_basic.test | 32 + ...s_statements_history_size_basic-master.opt | 2 + ..._events_statements_history_size_basic.test | 32 + .../t/pfs_hosts_size_basic-master.opt | 2 + .../sys_vars/t/pfs_hosts_size_basic.test | 32 + .../t/pfs_max_socket_classes_basic-master.opt | 1 + .../t/pfs_max_socket_classes_basic.test | 32 + .../pfs_max_socket_instances_basic-master.opt | 1 + .../t/pfs_max_socket_instances_basic.test | 32 + .../t/pfs_max_stage_classes_basic-master.opt | 2 + .../t/pfs_max_stage_classes_basic.test | 32 + ...pfs_max_statement_classes_basic-master.opt | 2 + .../t/pfs_max_statement_classes_basic.test | 32 + .../t/pfs_setup_actors_size_basic-master.opt | 2 + .../t/pfs_setup_actors_size_basic.test | 32 + .../t/pfs_setup_objects_size_basic-master.opt | 2 + .../t/pfs_setup_objects_size_basic.test | 32 + .../t/pfs_users_size_basic-master.opt | 2 + .../sys_vars/t/pfs_users_size_basic.test | 32 + .../t/rpl_max_binlog_size_func-master.opt | 3 +- .../suite/sys_vars/t/ssl_crl_basic.test | 3 + .../suite/sys_vars/t/ssl_crlpath_basic.test | 3 + .../suite/sys_vars/t/tx_read_only_basic.test | 199 + mysql-test/t/ctype_cp932_binlog_stm.test | 2 +- mysql-test/t/events_1.test | 2 - mysql-test/t/group_by.test | 10 +- mysql-test/t/openssl_1.test | 6 +- mysql-test/t/query_cache.test | 14 +- mysql-test/t/sp-destruct.test | 12 +- mysql-test/t/sp_trans_log.test | 12 +- mysql-test/t/subselect_cache.test | 4 +- mysql-test/t/type_blob.test | 4 +- mysys/my_init.c | 9 +- mysys/my_static.c | 22 +- mysys/my_thr_init.c | 4 +- mysys/mysys_priv.h | 6 +- mysys/thr_lock.c | 23 +- plugin/feedback/sender_thread.cc | 2 +- plugin/semisync/semisync.h | 1 + plugin/semisync/semisync_master.cc | 26 +- plugin/semisync/semisync_master.h | 2 + plugin/semisync/semisync_master_plugin.cc | 20 +- scripts/mysql_system_tables.sql | 2 +- scripts/mysql_system_tables_fix.sql | 2 - sql-common/client.c | 41 +- sql/debug_sync.cc | 2 + sql/event_db_repository.cc | 7 +- sql/event_queue.cc | 30 +- sql/event_queue.h | 8 +- sql/event_scheduler.cc | 29 +- sql/event_scheduler.h | 8 +- sql/events.cc | 26 +- sql/events.h | 5 + sql/filesort.cc | 14 +- sql/ha_partition.cc | 29 + sql/ha_partition.h | 2 + sql/handler.cc | 213 +- sql/handler.h | 52 +- sql/item_func.cc | 6 +- sql/lock.cc | 9 +- sql/log.cc | 47 +- sql/log_event.cc | 12 +- sql/mdl.cc | 65 +- sql/mdl.h | 42 +- sql/mysqld.cc | 113 +- sql/mysqld.h | 2 + sql/net_serv.cc | 67 +- sql/opt_subselect.cc | 2 +- sql/opt_subselect.h | 4 +- sql/repl_failsafe.cc | 2 - sql/replication.h | 32 +- sql/rpl_mi.cc | 43 +- sql/rpl_rli.cc | 15 +- sql/set_var.cc | 15 +- sql/set_var.h | 1 + sql/share/errmsg-utf8.txt | 94 +- sql/slave.cc | 65 +- sql/sp.cc | 6 +- sql/sql_acl.cc | 42 +- sql/sql_base.cc | 55 +- sql/sql_cache.cc | 39 +- sql/sql_class.cc | 90 +- sql/sql_class.h | 317 +- sql/sql_connect.cc | 3 +- sql/sql_delete.cc | 18 +- sql/sql_insert.cc | 38 +- sql/sql_parse.cc | 34 +- sql/sql_prepare.cc | 6 +- sql/sql_repl.cc | 39 +- sql/sql_select.cc | 153 +- sql/sql_select.h | 21 +- sql/sql_show.cc | 10 +- sql/sql_table.cc | 44 +- sql/sql_union.cc | 6 +- sql/sql_update.cc | 22 +- sql/sql_view.cc | 2 +- sql/table.cc | 8 +- storage/csv/ha_tina.cc | 21 +- storage/heap/hp_static.c | 2 +- storage/innobase/dict/dict0stats.cc | 8 +- storage/innobase/row/row0ins.cc | 3 +- storage/innobase/sync/sync0sync.cc | 3 - storage/maria/ha_maria.cc | 20 +- storage/maria/ma_static.c | 4 +- storage/maria/ma_write.c | 9 +- storage/maria/maria_def.h | 2 + storage/myisam/mi_static.c | 15 +- storage/myisammrg/myrg_static.c | 7 +- storage/perfschema/gen_pfs_lex_token | Bin 132216 -> 0 bytes storage/perfschema/gen_pfs_lex_token.THIS | Bin 0 -> 38168 bytes storage/perfschema/pfs_engine_table.cc | 2 +- storage/perfschema/pfs_server.cc | 5 + .../perfschema/unittest/pfs_account-oom-t.cc | 1 + storage/perfschema/unittest/pfs_host-oom-t.cc | 1 + storage/perfschema/unittest/pfs_user-oom-t.cc | 1 + tests/mysql_client_test.c | 302 +- vio/viosocket.c | 10 +- 477 files changed, 33813 insertions(+), 9082 deletions(-) create mode 100644 mysql-test/include/filter_file.inc create mode 100644 mysql-test/include/write_result_to_file.inc create mode 100644 mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_analyze_is_persistent_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_now_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_abort_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_at_startup_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_change_buffer_max_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_disable_sort_file_cache_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_doublewrite_batch_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_flush_neighbors_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_aux_table_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_enable_diag_print_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_enable_stopword_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_max_token_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_min_token_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_num_word_optimize_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_server_stopword_table_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_sort_pll_degree_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_ft_user_stopword_table_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_lru_scan_depth_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_max_purge_lag_delay_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_optimize_fulltext_only_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_page_hash_locks_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_print_all_deadlocks_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_sort_buffer_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_sync_array_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_undo_directory_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_undo_logs_basic.result create mode 100644 mysql-test/suite/sys_vars/r/innodb_undo_tablespaces_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_accounts_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_digests_size.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_events_stages_history_long_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_events_stages_history_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_events_statements_history_long_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_events_statements_history_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_hosts_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_max_socket_classes_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_max_socket_instances_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_max_stage_classes_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_max_statement_classes_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_setup_actors_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_setup_objects_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/pfs_users_size_basic.result create mode 100644 mysql-test/suite/sys_vars/r/ssl_crl_basic.result create mode 100644 mysql-test/suite/sys_vars/r/ssl_crlpath_basic.result create mode 100644 mysql-test/suite/sys_vars/r/tx_read_only_basic.result create mode 100644 mysql-test/suite/sys_vars/t/innodb_adaptive_max_sleep_delay_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_analyze_is_persistent_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_abort_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_at_startup_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_change_buffer_max_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_disable_sort_file_cache_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_flush_neighbors_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_aux_table_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_enable_diag_print_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_enable_stopword_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_max_token_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_min_token_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_num_word_optimize_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_server_stopword_table_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_sort_pll_degree_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_ft_user_stopword_table_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_lru_scan_depth_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_max_purge_lag_delay_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_optimize_fulltext_only_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_print_all_deadlocks_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_sort_buffer_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_stats_persistent_sample_pages_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_sync_array_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_undo_directory_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_undo_tablespaces_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_accounts_size_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_accounts_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_digests_size-master_basic.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_digests_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_hosts_size_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_hosts_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_max_socket_classes_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_max_socket_classes_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_max_socket_instances_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_max_socket_instances_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_setup_actors_size_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_setup_actors_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_setup_objects_size_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_setup_objects_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/pfs_users_size_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/pfs_users_size_basic.test create mode 100644 mysql-test/suite/sys_vars/t/ssl_crl_basic.test create mode 100644 mysql-test/suite/sys_vars/t/ssl_crlpath_basic.test create mode 100644 mysql-test/suite/sys_vars/t/tx_read_only_basic.test delete mode 100755 storage/perfschema/gen_pfs_lex_token create mode 100644 storage/perfschema/gen_pfs_lex_token.THIS diff --git a/.bzrignore b/.bzrignore index 409b6148125..efb5febb210 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1144,3 +1144,4 @@ sql/db.opt ./_CPack_Packages ./install_manifest_*.txt typescript +storage/perfschema/gen_pfs_lex_token diff --git a/TODO b/TODO index b269863428c..3924daaf85d 100644 --- a/TODO +++ b/TODO @@ -25,7 +25,6 @@ Features recoded Fetures half done: - Support for TRANSACTION READ ONLY | READ WRITE - CF_XXX states added to init_update_queries() but not otherwise used. -- Merge sql/rpl_mi.cc (To get Sys_ssl_crl & crlpath) Short time TODO: - Add test cases for InnoDB @@ -40,9 +39,27 @@ Short time TODO: - Add Sys_my_bind_addr(); Needed for perfschema -- Add THD_STAGE_INFO everywhere. - - mysql_socket_shutdown() was removed from vio/viosocket.cc. It was replaced with inline function in include/mysql/psi/mysql_socket.h but this doesn't call DisconnectEx(). We should check if we need to add this to the inline function... + +Sergei's notes: + davi.arnaut@oracle.com-20110531135209-8kxz4np8c4gav6s2 (soket timeouts) + jorgen.loland@oracle.com-20100830063809-z3n0eu7qp1h5v3ip + georgi.kodinov@oracle.com-20100705115749-wbpt45mgjqmpvp07 (--drop-trigger) + magnus.blaudd@sun.com-20100526100500-4cmalb9khnsj4ptt (--bind-addr) + alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni (binlogging of DROP TEMPORARY) + anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y (don't binlog rolled back changes) + mysql-test/suite/perfschema/disabled.def + why --source include/have_innodb.inc in lots of tests? (with no other changes) + WTF "invisible sysvars" ? + Sys_var_tx_read_only not needed (must be the same as Sys_var_tx_isolation) + SIGNAL/RESIGNAL ? + fix mysql-test to know the difference between compiled-in innodb and compiled-in xtradb + remove my_getopt_use_args_separator + Master_info::read_info & Master_info::write_info + rpl_slave.cc + XXX in mysql_client_test + net_serv.cc + diff --git a/client/mysqldump.c b/client/mysqldump.c index 572537ac3f9..a28def57b44 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1,5 +1,6 @@ /* Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2010, 2012, Monty Program Ab. 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 @@ -232,8 +233,8 @@ static struct my_option my_long_options[] = &opt_slave_apply, &opt_slave_apply, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"character-sets-dir", OPT_CHARSETS_DIR, - "Directory for character set files.", (char**) &charsets_dir, - (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + "Directory for character set files.", &charsets_dir, + &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"comments", 'i', "Write additional information.", &opt_comments, &opt_comments, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, @@ -270,8 +271,8 @@ static struct my_option my_long_options[] = {"debug", '#', "This is a non-debug version. Catch this and exit.", 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, #else - {"debug", '#', "Output debug log.", (char**) &default_dbug_option, - (char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"debug", '#', "Output debug log.", &default_dbug_option, + &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, @@ -872,7 +873,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), &err_ptr, &err_len); if (err_len) { - strmake(buff, err_ptr, min(sizeof(buff) - 1, err_len)); + strmake(buff, err_ptr, MY_MIN(sizeof(buff) - 1, err_len)); fprintf(stderr, "Invalid mode to --compatible: %s\n", buff); exit(1); } @@ -1918,7 +1919,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name, const char *str_create) { uint i; - my_bool __attribute__((unused)) body_found= 0; + my_bool body_found __attribute__((unused)) = 0; char *create_stmt_ptr= NULL; ulong create_stmt_len= 0; MYSQL_FIELD *field; @@ -2551,7 +2552,7 @@ static uint get_table_structure(char *table, char *db, char *table_type, verbose_msg("-- Retrieving table structure for table %s...\n", table); len= my_snprintf(query_buff, sizeof(query_buff), - "SET OPTION SQL_QUOTE_SHOW_CREATE=%d", + "SET SQL_QUOTE_SHOW_CREATE=%d", (opt_quoted || opt_keywords)); if (!create_options) strmov(query_buff+len, @@ -4788,11 +4789,9 @@ static int add_slave_statements(void) static int do_show_slave_status(MYSQL *mysql_con) { - MYSQL_RES *slave; + MYSQL_RES *UNINIT_VAR(slave); const char *comment_prefix= (opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : ""; - LINT_INIT(slave); - if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS")) { if (!ignore_errors) @@ -4985,7 +4984,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length, for (; pos != end && *pos != ','; pos++) ; var_len= (uint) (pos - start); - strmake(buff, start, min(sizeof(buff) - 1, var_len)); + strmake(buff, start, MY_MIN(sizeof(buff) - 1, var_len)); find= find_type(buff, lib, FIND_TYPE_BASIC); if (!find) { @@ -5273,7 +5272,7 @@ static my_bool get_view_structure(char *table, char* db) verbose_msg("-- Retrieving view structure for table %s...\n", table); #ifdef NOT_REALLY_USED_YET - sprintf(insert_pat,"SET OPTION SQL_QUOTE_SHOW_CREATE=%d", + sprintf(insert_pat,"SET SQL_QUOTE_SHOW_CREATE=%d", (opt_quoted || opt_keywords)); #endif diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 45846948b21..3c9b8566abd 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -66,7 +66,7 @@ TODO: */ -#define SLAP_VERSION "1.1" +#define SLAP_VERSION "1.0" #define HUGE_STRING_LENGTH 8196 #define RAND_STRING_SIZE 126 diff --git a/cmake/create_initial_db.cmake.in b/cmake/create_initial_db.cmake.in index 252fe712b58..0b11a73e02a 100644 --- a/cmake/create_initial_db.cmake.in +++ b/cmake/create_initial_db.cmake.in @@ -39,8 +39,8 @@ FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql) ENDIF() ENDFOREACH() ENDFOREACH() -#FILE(READ ${CMAKE_SOURCE_DIR}/scripts/fill_help_tables.sql CONTENTS) -#FILE(APPEND bootstrap.sql ${CONTENTS}) +FILE(READ ${CMAKE_SOURCE_DIR}/scripts/fill_help_tables.sql CONTENTS) +FILE(APPEND bootstrap.sql ${CONTENTS}) FILE(REMOVE_RECURSE mysql) diff --git a/include/my_global.h b/include/my_global.h index 12a93bd7712..a6d3a595d3e 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -16,8 +16,7 @@ /* This is the include file that should be included 'first' in every C file. */ -#ifndef _global_h -#define _global_h +#ifndef MY_GLOBAL_INCLUDED #define MY_GLOBAL_INCLUDED /* Client library users on Windows need this macro defined here. */ diff --git a/include/my_sys.h b/include/my_sys.h index d6ed4f29e72..f4f41b3b108 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -206,8 +206,8 @@ extern void (*fatal_error_handler_hook)(uint my_err, const char *str, extern uint my_file_limit; extern ulonglong my_thread_stack_size; -extern const char *(*proc_info_hook)(MYSQL_THD, const char *, const char *, - const char *, const unsigned int); +extern void (*proc_info_hook)(void *, const PSI_stage_info *, PSI_stage_info *, + const char *, const char *, const unsigned int); #ifdef HAVE_LARGE_PAGES extern my_bool my_use_large_pages; @@ -252,9 +252,7 @@ extern const char *my_defaults_extra_file; extern const char *my_defaults_group_suffix; extern const char *my_defaults_file; -#ifndef timed_mutexes extern my_bool timed_mutexes; -#endif enum loglevel { ERROR_LEVEL, diff --git a/include/mysql.h b/include/mysql.h index 4144b6c1ca4..6bbcdd96482 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -43,7 +43,7 @@ extern "C" { #endif -#ifndef _global_h /* If not standard header */ +#ifndef MY_GLOBAL_INCLUDED /* If not standard header */ #ifndef MYSQL_ABI_CHECK #include #endif @@ -67,7 +67,7 @@ typedef char my_bool; typedef int my_socket; #endif /* __WIN__ */ #endif /* my_socket_defined */ -#endif /* _global_h */ +#endif /* MY_GLOBAL_INCLUDED */ #include "mysql_version.h" #include "mysql_com.h" @@ -119,7 +119,7 @@ typedef struct st_mysql_field { typedef char **MYSQL_ROW; /* return data as array of strings */ typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */ -#ifndef _global_h +#ifndef MY_GLOBAL_INCLUDED #if defined(NO_CLIENT_LONG_LONG) typedef unsigned long my_ulonglong; #elif defined (__WIN__) diff --git a/include/mysql/psi/psi_abi_v0.h b/include/mysql/psi/psi_abi_v0.h index 7444cb0b276..c896f15a532 100644 --- a/include/mysql/psi/psi_abi_v0.h +++ b/include/mysql/psi/psi_abi_v0.h @@ -19,6 +19,6 @@ This file is only used to automate detection of changes between versions. Do not include this file, include mysql/psi/psi.h instead. */ -#define _global_h +#define MY_GLOBAL_INCLUDED #include "mysql/psi/psi.h" diff --git a/include/mysql/psi/psi_abi_v2.h b/include/mysql/psi/psi_abi_v2.h index 08bca609b41..d2e6f2527b0 100644 --- a/include/mysql/psi/psi_abi_v2.h +++ b/include/mysql/psi/psi_abi_v2.h @@ -21,6 +21,6 @@ */ #define USE_PSI_2 #define HAVE_PSI_INTERFACE -#define _global_h +#define MY_GLOBAL_INCLUDED #include "mysql/psi/psi.h" diff --git a/include/mysql/service_debug_sync.h b/include/mysql/service_debug_sync.h index 55615b8f198..bb1202c5e63 100644 --- a/include/mysql/service_debug_sync.h +++ b/include/mysql/service_debug_sync.h @@ -339,14 +339,8 @@ extern void (*debug_sync_C_callback_ptr)(MYSQL_THD, const char *, size_t); if (debug_sync_service) \ debug_sync_service(thd, STRING_WITH_LEN(name)); \ } while(0) -#define DEBUG_SYNC_C_IF_THD(thd, name) \ - do { \ - if (debug_sync_service && thd) \ - (*debug_sync_service)(thd, STRING_WITH_LEN(name)); } \ - while(0) #else #define DEBUG_SYNC(thd,name) do { } while(0) -#define DEBUG_SYNC_C_IF_THD(thd, name) do { } while(0) #endif /* compatibility macro */ diff --git a/include/mysql_com.h b/include/mysql_com.h index 375de933b64..c5fd2d84425 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -488,7 +488,7 @@ my_bool net_write_command(NET *net,unsigned char command, int net_real_write(NET *net,const unsigned char *packet, size_t len); unsigned long my_net_read(NET *net); -#ifdef _global_h +#ifdef MY_GLOBAL_INCLUDED void my_net_set_write_timeout(NET *net, uint timeout); void my_net_set_read_timeout(NET *net, uint timeout); #endif @@ -583,7 +583,7 @@ const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); my_bool my_thread_init(void); void my_thread_end(void); -#ifdef _global_h +#ifdef MY_GLOBAL_INCLUDED ulong STDCALL net_field_length(uchar **packet); my_ulonglong net_field_length_ll(uchar **packet); uchar *net_store_length(uchar *pkg, ulonglong length); diff --git a/mysql-test/extra/rpl_tests/rpl_charset.test b/mysql-test/extra/rpl_tests/rpl_charset.test index fa83b06597d..5009dff8d73 100644 --- a/mysql-test/extra/rpl_tests/rpl_charset.test +++ b/mysql-test/extra/rpl_tests/rpl_charset.test @@ -100,18 +100,6 @@ connection master; set global character_set_server=latin2; set global character_set_server=latin1; # back -# Check that SET ONE_SHOT is really one shot - -set one_shot @@character_set_server=latin5; -set @@max_join_size=1000; -select @@character_set_server; -select @@character_set_server; -set @@character_set_server=latin5; -select @@character_set_server; -select @@character_set_server; - -set one_shot max_join_size=1000000; - # Test of wrong character set numbers; error 1115; set character_set_client=9999999; diff --git a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc index 094e84537db..cea8ac56931 100644 --- a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc +++ b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc @@ -5,6 +5,12 @@ if (`SELECT HEX(@commands) = HEX('configure')`) { connection master; + # + # Index that is used as an Id to tables that trigger errors. + # + --let $tt_error_counter=0 + --let $nt_error_counter=0 + # # Creates a T-table that is never dropped. # @@ -15,6 +21,37 @@ if (`SELECT HEX(@commands) = HEX('configure')`) # --eval CREATE TABLE nt_xx_1 ( id INT ) ENGINE = MyIsam + # + # Creates a T-table that is never dropped. + # + --eval CREATE TABLE tt_error_1 ( id INT, PRIMARY KEY (id) ) ENGINE = Innodb + + # + # Creates a N-table that is never dropped. + # + --eval CREATE TABLE nt_error_1 ( id INT, PRIMARY KEY (id) ) ENGINE = MyIsam + + # + # Creates a T-table that is never dropped. + # + --eval CREATE TABLE tt_error_2 ( id INT, PRIMARY KEY (id) ) ENGINE = Innodb + + # + # Creates a N-table that is never dropped. + # + --eval CREATE TABLE nt_error_2 ( id INT, PRIMARY KEY (id) ) ENGINE = MyIsam + + # + # Create a trigger nt_error_2 --> tt_error_2 + # + DELIMITER |; + CREATE TRIGGER tr_i_nt_2_to_tt_2 AFTER INSERT ON nt_error_2 FOR EACH ROW + BEGIN + DECLARE in_stmt_id INTEGER; + INSERT INTO tt_error_2(id) VALUES (NEW.id); + END| + DELIMITER ;| + # # Creates a Temporary N-table that is never dropped. # @@ -162,6 +199,14 @@ if (`SELECT HEX(@commands) = HEX('clean')`) DROP TABLE IF EXISTS nt_xx_1; + DROP TABLE IF EXISTS tt_error_1; + + DROP TABLE IF EXISTS nt_error_1; + + DROP TABLE IF EXISTS tt_error_2; + + DROP TABLE IF EXISTS nt_error_2; + --let $n= $tot_table while ($n) { @@ -280,6 +325,30 @@ while (`SELECT HEX(@commands) != HEX('')`) --disable_query_log } + if (`SELECT HEX(@command) = HEX('Te')`) + { + --enable_query_log + --inc $tt_error_counter + eval INSERT INTO tt_error_1() VALUES ($tt_error_counter), ($tt_error_counter); + --disable_query_log + } + + if (`SELECT HEX(@command) = HEX('Ne')`) + { + --enable_query_log + --inc $nt_error_counter + eval INSERT INTO nt_error_1() VALUES ($nt_error_counter), ($nt_error_counter); + --disable_query_log + } + + if (`SELECT HEX(@command) = HEX('NeT-trig')`) + { + --enable_query_log + --inc $nt_error_counter + eval INSERT INTO nt_error_1() VALUES ($nt_error_counter), ($nt_error_counter); + --disable_query_log + } + if (`SELECT HEX(@command) = HEX('N-Temp')`) { --enable_query_log @@ -869,6 +938,7 @@ while (`SELECT HEX(@commands) != HEX('')`) { --enable_query_log --error 0, ER_GET_ERRMSG + --replace_column 2 # eval ROLLBACK; --disable_query_log } @@ -878,7 +948,13 @@ while (`SELECT HEX(@commands) != HEX('')`) { let $binlog_start= $pos_trans_command; --echo -b-b-b-b-b-b-b-b-b-b-b- >> $commands << -b-b-b-b-b-b-b-b-b-b-b- + # Use other connection because include/show_binlog_events.inc + # executes SELECT UUID(), which switches to row-logging when + # binlog_format=mixed, if there are open temporary tables. This is + # due to BUG#13692513. + --connection server_1 --source include/show_binlog_events.inc + --connection master --echo -e-e-e-e-e-e-e-e-e-e-e- >> $commands << -e-e-e-e-e-e-e-e-e-e-e- --echo diff --git a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test index 67bf0f5b8ac..ffd7fe1a5c4 100644 --- a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test +++ b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test @@ -2,7 +2,66 @@ # In this test case, we check how changes to temporary tables are written # to the binary log. # -# (TODO --- GET INFO AS SOON AS THE SITE IS AVAILABLE) +# +# B - Begin +# C - Commit +# R - Rollback +# +# +# T - Inserts a row into a T-table +# +# +# T-SELECT-N-Temp - Selects from a temporary N-table and inserts +# into a T-table. +# N-SELECT-N-Temp - Selects from a temporary N-table and inserts +# into a N-table. +# T-SELECT-T-Temp - Selects from a temporary T-table and inserts +# into a T-table. +# N-SELECT-T-Temp - Selects from a temporary T-table and inserts +# into a N-table. + +# Create-N-Temp - Creates a temporary N-table if a temporary N-table +# was dropped before +# Create-T-Temp - Creates a temporary T-table if a temporary T-table +# was dropped before +# +# +# Drop-Temp-T-Temp - Drops a temporary T-table if there is any +# Drop-Temp-N-Temp - Drops a temporary N-table if there is any +# Drop-Temp-TN-Temp - Drops both a temporary T-table and N-table if there +# is any +# Drop-Temp-TT-Temp - Drops two temporary T-tables if there is any +# Drop-Temp-NN-Temp - Drops two temporary N-tables if there is any +# Drop-Temp-Xe-Temp - Tries to drop a temporary table that does not exist +# Drop-Temp-NXe-Temp - Drops a temporary N-table if there is any and +# a temporary table that does not exist +# Drop-Temp-TXe-Temp - Drops a temporary T-table if there is any and +# a temporary table that does not exist +# +# +# Drop-Temp-If-Xe-Temp - Tries to drop a temporary table that does not exist +# Drop-Temp-If-TXe-Temp - Drops a temporary T-table if there is any and +# a temporary table that does not exist +# +# +# Drop-T - Drops a T-table if there is any +# Drop-N - Drops a N-table if there is any +# Drop-Xe - Tries to drop a table that does not exist +# Drop-TXe - Drops a T-table if there is any and a table that does +# not exist +# Drop-NXe - Drops a N-table if there is any and a table that does +# not exist +# Drop-TN - Drops both a T-table and N-table if there is any +# Drop-TT - Drops two T-tables if there is any +# Drop-NN - Drops two N-tables if there is any +# Drop-N-TN-Temp - Drops a N-table and both a temporary T-table and +# N-table if there is any +# +# +# Drop-If-Xe - Tries to drop a table that does not exist +# Drop-If-TXe - Drops a T-table if there is any and a table that does +# not exist +# # # This test uses the commands available at: # extra/rpl_tests/rpl_drop_create_temp_table.inc @@ -62,7 +121,6 @@ SET @commands= 'Drop-Temp-TT-Temp'; SET @commands= 'Drop-Temp-NN-Temp'; --source extra/rpl_tests/rpl_drop_create_temp_table.inc - --echo --echo # --echo #2) Generates in the binlog what follows: @@ -133,6 +191,14 @@ SET @commands= 'B T Drop-Temp-NN-Temp C'; SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C'; --source extra/rpl_tests/rpl_drop_create_temp_table.inc +SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Ne C'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Te C'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp NeT-trig C'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc --echo --echo # @@ -204,6 +270,14 @@ SET @commands= 'B T Drop-Temp-NN-Temp R'; SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R'; --source extra/rpl_tests/rpl_drop_create_temp_table.inc +SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Ne R'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Te R'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp NeT-trig R'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc --echo ######################################################################### --echo # 2 - Tables dropped by "DROP TABLE" @@ -321,6 +395,15 @@ SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N- SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C'; --source extra/rpl_tests/rpl_drop_create_temp_table.inc +SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Ne C'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te C'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig C'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + --echo --echo # --echo #3) Generates in the binlog what follows: @@ -331,6 +414,14 @@ SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N- SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R'; --source extra/rpl_tests/rpl_drop_create_temp_table.inc +SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Ne R'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te R'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig R'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc --echo ######################################################################### --echo # 4 - CHANGING TEMPORARY TABLES @@ -353,6 +444,15 @@ SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp C'; SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp C'; --source extra/rpl_tests/rpl_drop_create_temp_table.inc +SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp Ne C'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp Te C'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig C'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + --echo --echo --echo # @@ -370,6 +470,15 @@ SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp R'; SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp R'; --source extra/rpl_tests/rpl_drop_create_temp_table.inc +SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp Ne R'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp Te R'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + +SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R'; +--source extra/rpl_tests/rpl_drop_create_temp_table.inc + --echo ################################################################################### --echo # CHECK CONSISTENCY --echo ################################################################################### @@ -382,7 +491,8 @@ if (`select @@session.binlog_format != 'STATEMENT'`) { --exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-master.sql --exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-slave.sql - --diff_files $MYSQLD_DATADIR/test-temporary-master.sql $MYSQLD_DATADIR/test-temporary-slave.sql + # uncomment when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y from mysql-5.6 is merged + #--diff_files $MYSQLD_DATADIR/test-temporary-master.sql $MYSQLD_DATADIR/test-temporary-slave.sql } --echo ######################################################################### diff --git a/mysql-test/extra/rpl_tests/rpl_mixing_engines.inc b/mysql-test/extra/rpl_tests/rpl_mixing_engines.inc index 6dde3e079a1..8941779947a 100644 --- a/mysql-test/extra/rpl_tests/rpl_mixing_engines.inc +++ b/mysql-test/extra/rpl_tests/rpl_mixing_engines.inc @@ -1,15 +1,51 @@ -################################################################################ -# This is an auxiliary file used by rpl_mixing_engines.test, and that it +# ==== Purpose ==== +# +# This is an auxiliary file used by rpl_mixing_engines.test. It # executes SQL statements according to a format string, as specified in # rpl_mixing_engines.test. In addition, it accepts the special format # strings 'configure' and 'clean', used before and after everything else. -################################################################################ +# +# ==== Usage ==== +# +# --let $commands= command1 command2 ... +# --let $database_name= name +# [--let $verbose= 1] +# --source include/rpl_mixing_engines.inc +# +# Parameters: +# +# $commands +# Space-separated list of commands. See rpl_mixing_engines.test +# for a list of all commands. +# +# $database_name +# Name of database to use. If $commands is 'configure' or +# 'clean', and the database name is not 'test', then the +# database is created or dropped, respectively. +# +# $verbose +# By default, show_binlog_events.inc is sourced after all +# commands have been processed, showing the result of all +# commands. If this flag is set, then show_binlog_events.inc is +# also sourced once after each command, showing only the result +# of that command. -if (`SELECT HEX(@commands) = HEX('configure')`) +--echo rpl_mixing_engines.inc [commands=$commands] + +--let $rme_initial_commands= $commands + +if ($commands == 'configure') { connection master; + + --disable_query_log + if ($database_name != 'test') + { + --eval CREATE DATABASE $database_name + } + --eval use $database_name + --enable_query_log - SET SQL_LOG_BIN=0; eval CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; eval CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; eval CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; @@ -22,26 +58,6 @@ if (`SELECT HEX(@commands) = HEX('configure')`) eval CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; eval CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; eval CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; - eval SET SQL_LOG_BIN=1; - - connection slave; - - SET SQL_LOG_BIN=0; - eval CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; - eval CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; - eval CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; - eval CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; - eval CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; - eval CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; - eval CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; - eval CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; - eval CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; - eval CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; - eval CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; - eval CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type; - SET SQL_LOG_BIN=1; - - connection master; INSERT INTO nt_1(trans_id, stmt_id) VALUES(1,1); INSERT INTO nt_2(trans_id, stmt_id) VALUES(1,1); @@ -140,15 +156,18 @@ if (`SELECT HEX(@commands) = HEX('configure')`) let $trans_id= 7; let $tb_id= 1; let $stmt_id= 1; - let $commands= ''; - - SET @commands= ''; + --let $commands= + let $sn= 0; } -if (`SELECT HEX(@commands) = HEX('clean')`) +if ($commands == 'clean') { connection master; + --disable_query_log + --eval use $database_name + --enable_query_log + DROP TABLE tt_1; DROP TABLE tt_2; DROP TABLE tt_3; @@ -168,53 +187,61 @@ if (`SELECT HEX(@commands) = HEX('clean')`) DROP FUNCTION fc_i_tt_5_suc; DROP FUNCTION fc_i_nt_5_suc; + --disable_query_log + if ($database_name != 'test') + { + --eval DROP DATABASE $database_name + } + --enable_query_log + sync_slave_with_master; - SET @commands= ''; + --let $commands= } -while (`SELECT HEX(@commands) != HEX('')`) +while ($commands != '') { --disable_query_log - SET @command= SUBSTRING_INDEX(@commands, ' ', 1); - let $command= `SELECT @command`; - --eval SET @check_commands= '$commands' - if (`SELECT HEX(@check_commands) = HEX('''')`) - { - let $commands= `SELECT @commands`; - } - --echo -b-b-b-b-b-b-b-b-b-b-b- >> $command << -b-b-b-b-b-b-b-b-b-b-b- - let $pos_command= query_get_value("SHOW MASTER STATUS", Position, 1); + --eval use $database_name --enable_query_log - if (`SELECT HEX(@command) = HEX('B')`) + + --disable_query_log + --let $command= `SELECT SUBSTRING_INDEX('$commands', ' ', 1)` + if ($verbose) + { + --echo -b-b-b-b-b-b-b-b-b-b-b- >> $command << -b-b-b-b-b-b-b-b-b-b-b- + let $pos_command= query_get_value("SHOW MASTER STATUS", Position, 1); + } + --enable_query_log + if ($command == 'B') { eval BEGIN; } - if (`SELECT HEX(@command) = HEX('T')`) + if ($command == 'T') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO tt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('T-trig')`) + if ($command == 'T-trig') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO tt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('T-func')`) + if ($command == 'T-func') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval SELECT fc_i_tt_5_suc ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('T-proc')`) + if ($command == 'T-proc') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval CALL pc_i_tt_5_suc ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('eT')`) + if ($command == 'eT') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from tt_1`; @@ -223,7 +250,7 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO tt_1(trans_id, stmt_id) VALUES ($old_trans_id, $old_stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('Te')`) + if ($command == 'Te') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from tt_1`; @@ -232,7 +259,7 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO tt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('Te-trig')`) + if ($command == 'Te-trig') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from tt_5`; @@ -241,7 +268,7 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO tt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('Te-func')`) + if ($command == 'Te-func') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from tt_1`; @@ -250,31 +277,31 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO tt_1(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_tt_5_suc ($trans_id, $stmt_id)); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('N')`) + if ($command == 'N') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO nt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('N-trig')`) + if ($command == 'N-trig') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO nt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('N-func')`) + if ($command == 'N-func') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval SELECT fc_i_nt_5_suc ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('N-proc')`) + if ($command == 'N-proc') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval CALL pc_i_nt_5_suc ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('eN')`) + if ($command == 'eN') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from nt_1`; @@ -283,7 +310,7 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO nt_1(trans_id, stmt_id) VALUES ($old_trans_id, $old_stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('Ne')`) + if ($command == 'Ne') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from nt_1`; @@ -292,7 +319,7 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO nt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('Ne-trig')`) + if ($command == 'Ne-trig') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from nt_5`; @@ -301,7 +328,7 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO nt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('Ne-func')`) + if ($command == 'Ne-func') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from nt_1`; @@ -310,13 +337,13 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO nt_1(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_nt_5_suc ($trans_id, $stmt_id)); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('tN')`) + if ($command == 'tN') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO nt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM tt_1; inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('tNe')`) + if ($command == 'tNe') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from nt_1`; @@ -325,13 +352,13 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO nt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM tt_1 UNION SELECT $old_trans_id, $old_stmt_id, COUNT(*) FROM tt_1; inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('nT')`) + if ($command == 'nT') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO tt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM nt_1; inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('nTe')`) + if ($command == 'nTe') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from tt_1`; @@ -340,25 +367,25 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO tt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM nt_1 UNION SELECT $old_trans_id, $old_stmt_id, COUNT(*) FROM nt_1; inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('NT')`) + if ($command == 'NT') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval UPDATE nt_3, tt_3 SET nt_3.info= "new text $trans_id --> $stmt_id", tt_3.info= "new text $trans_id --> $stmt_id" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1; inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('NT-trig')`) + if ($command == 'NT-trig') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO nt_4(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('NT-func')`) + if ($command == 'NT-func') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO nt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, fc_i_tt_5_suc($trans_id, $stmt_id)); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('NeT-trig')`) + if ($command == 'NeT-trig') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from nt_4`; @@ -367,7 +394,7 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO nt_4(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('NeT-func')`) + if ($command == 'NeT-func') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from nt_5`; @@ -376,25 +403,25 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO nt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_tt_5_suc ($trans_id, $stmt_id)); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('TN')`) + if ($command == 'TN') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval UPDATE tt_4, nt_4 SET tt_4.info= "new text $trans_id --> $stmt_id", nt_4.info= "new text $trans_id --> $stmt_id" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1; inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('TN-trig')`) + if ($command == 'TN-trig') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO tt_3(trans_id, stmt_id) VALUES ($trans_id, $stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('TN-func')`) + if ($command == 'TN-func') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) eval INSERT INTO tt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, fc_i_nt_5_suc($trans_id, $stmt_id)); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('TeN-trig')`) + if ($command == 'TeN-trig') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from tt_3`; @@ -403,7 +430,7 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO tt_3(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('TeN-func')`) + if ($command == 'TeN-func') { #--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id) let $old_trans_id= `SELECT max(trans_id) from tt_5`; @@ -412,143 +439,170 @@ while (`SELECT HEX(@commands) != HEX('')`) eval INSERT INTO tt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_nt_5_suc ($trans_id, $stmt_id)); inc $stmt_id; } - if (`SELECT HEX(@command) = HEX('CS-T->T')`) + if ($command == 'CS-T->T') { --eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=$engine_type SELECT * FROM tt_1; } - if (`SELECT HEX(@command) = HEX('CS-N->N')`) + if ($command == 'CS-N->N') { --eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1; } - if (`SELECT HEX(@command) = HEX('CS-T->N')`) + if ($command == 'CS-T->N') { --eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=$engine_type SELECT * FROM nt_1; } - if (`SELECT HEX(@command) = HEX('CS-N->T')`) + if ($command == 'CS-N->T') { --eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1; } - if (`SELECT HEX(@command) = HEX('CSe-T->T')`) + if ($command == 'CSe-T->T') { --error ER_DUP_ENTRY, ER_DUP_KEY --eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM tt_1; } - if (`SELECT HEX(@command) = HEX('CSe-N->N')`) + if ($command == 'CSe-N->N') { --error ER_DUP_ENTRY, ER_DUP_KEY --eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM nt_1; } - if (`SELECT HEX(@command) = HEX('CSe-T->N')`) + if ($command == 'CSe-T->N') { --error ER_DUP_ENTRY, ER_DUP_KEY --eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM nt_1; } - if (`SELECT HEX(@command) = HEX('CSe-N->T')`) + if ($command == 'CSe-N->T') { --error ER_DUP_ENTRY, ER_DUP_KEY --eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM tt_1; } - if (`SELECT HEX(@command) = HEX('CT')`) + if ($command == 'CT') { --eval CREATE TEMPORARY TABLE tt_xx_$tb_id (a int) engine=$engine_type; } - if (`SELECT HEX(@command) = HEX('IS-T<-N')`) + if ($command == 'IS-T<-N') { --eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1; } - if (`SELECT HEX(@command) = HEX('ISe-T<-N')`) + if ($command == 'ISe-T<-N') { --error ER_DUP_ENTRY, ER_DUP_KEY --eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1; } - if (`SELECT HEX(@command) = HEX('IS-N<-T')`) + if ($command == 'IS-N<-T') { --eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1; } - if (`SELECT HEX(@command) = HEX('ISe-N<-T')`) + if ($command == 'ISe-N<-T') { --error ER_DUP_ENTRY, ER_DUP_KEY --eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1; } - if (`SELECT HEX(@command) = HEX('IS-T<-T')`) + if ($command == 'IS-T<-T') { --eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1; } - if (`SELECT HEX(@command) = HEX('ISe-T<-T')`) + if ($command == 'ISe-T<-T') { --error ER_DUP_ENTRY, ER_DUP_KEY --eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1; } - if (`SELECT HEX(@command) = HEX('IS-N<-N')`) + if ($command == 'IS-N<-N') { --eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1; } - if (`SELECT HEX(@command) = HEX('ISe-N<-N')`) + if ($command == 'ISe-N<-N') { --error ER_DUP_ENTRY, ER_DUP_KEY --eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1; } - if (`SELECT HEX(@command) = HEX('trunc-CS-T')`) + if ($command == 'trunc-CS-T') { eval TRUNCATE TABLE tt_xx_$tb_id; } - if (`SELECT HEX(@command) = HEX('trunc-CS-N')`) + if ($command == 'trunc-CS-N') { eval TRUNCATE TABLE nt_xx_$tb_id; } - if (`SELECT HEX(@command) = HEX('trunc-CT')`) + if ($command == 'trunc-CT') { eval TRUNCATE TABLE tt_xx_$tb_id; } - if (`SELECT HEX(@command) = HEX('drop-CS')`) + if ($command == 'drop-CS') { --disable_warnings eval DROP TABLE IF EXISTS tt_xx_$tb_id, nt_xx_$tb_id; inc $tb_id; --enable_warnings } - if (`SELECT HEX(@command) = HEX('drop-CT')`) + if ($command == 'drop-CT') { --disable_warnings eval DROP TEMPORARY TABLE IF EXISTS tt_xx_$tb_id; inc $tb_id; --enable_warnings } - if (`SELECT HEX(@command) = HEX('C')`) + if ($command == 'C') { --error 0, ER_GET_ERRMSG eval COMMIT; } - if (`SELECT HEX(@command) = HEX('R')`) + if ($command == 'R') { + --replace_column 2 # --error 0, ER_GET_ERRMSG eval ROLLBACK; } - if (`SELECT HEX(@command) = HEX('S1')`) + if ($command == 'Sn') { - eval SAVEPOINT s1; + eval SAVEPOINT S_$sn; + --inc $sn } - if (`SELECT HEX(@command) = HEX('R1')`) + if ($command == 'Rn') { - eval ROLLBACK TO s1; + if ($sn) + { + --dec $sn + } + --replace_column 2 # + eval ROLLBACK TO S_$sn; + } + if ($command == 'Cn') + { + if ($sn) + { + --dec $sn + } + eval RELEASE SAVEPOINT S_$sn; } --disable_query_log - SET @commands= LTRIM(SUBSTRING(@commands, LENGTH(@command) + 1)); + --let $commands= `SELECT LTRIM(SUBSTRING('$commands', LENGTH('$command') + 1))` inc $stmt_id; let $binlog_start= $pos_command; - --source include/show_binlog_events.inc - --echo -e-e-e-e-e-e-e-e-e-e-e- >> $command << -e-e-e-e-e-e-e-e-e-e-e- - if (`SELECT HEX(@commands) = HEX('')`) + if ($verbose) + { + # Use other connection because include/show_binlog_events.inc + # executes SELECT UUID(), which switches to row-logging when + # binlog_format=mixed, if there are open temporary tables. This is + # due to BUG#13692513. + --connection server_1 + --source include/show_binlog_events.inc + --connection master + --echo -e-e-e-e-e-e-e-e-e-e-e- >> $command << -e-e-e-e-e-e-e-e-e-e-e- + } + if ($commands == '') { let $binlog_start= $pos_trans_command; - --echo -b-b-b-b-b-b-b-b-b-b-b- >> $commands << -b-b-b-b-b-b-b-b-b-b-b- + --echo -b-b-b-b-b-b-b-b-b-b-b- >> $rme_initial_commands << -b-b-b-b-b-b-b-b-b-b-b- + --connection server_1 --source include/show_binlog_events.inc - --echo -e-e-e-e-e-e-e-e-e-e-e- >> $commands << -e-e-e-e-e-e-e-e-e-e-e- + --connection master + --echo -e-e-e-e-e-e-e-e-e-e-e- >> $rme_initial_commands << -e-e-e-e-e-e-e-e-e-e-e- --echo let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1); let $stmt_id= 1; inc $trans_id; - let $commands= ''; } } + +--let $commands= $rme_initial_commands diff --git a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test index 3a6326fe814..32a33835ccc 100644 --- a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test +++ b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test @@ -159,8 +159,8 @@ # B - Begin. # C - Commit. # R - Rollback. -# S1 - Savepoint. -# R1 - Rollback to S1. +# Sn - Savepoint Sn. +# Rn - Rollback to Sn. # # - Change only T-Tables: # T - Updates a T-Table. @@ -247,7 +247,8 @@ call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -SET @commands= 'configure'; +--let $verbose= 1 +--let $commands= configure --source extra/rpl_tests/rpl_mixing_engines.inc --echo ######################################################################### @@ -265,16 +266,16 @@ connection master; --echo # --> ROW "B T C" entries, format R. --echo # --> MIXED "B T C" entries, format S. --echo # -SET @commands= 'T'; +--let $commands= T --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'T-trig'; +--let $commands= T-trig --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'T-func'; +--let $commands= T-func --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'T-proc'; +--let $commands= T-proc --source extra/rpl_tests/rpl_mixing_engines.inc @@ -288,16 +289,16 @@ SET @commands= 'T-proc'; --echo # --> ROW empty. --echo # --> MIXED empty. --echo # -SET @commands= 'eT'; +--let $commands= eT --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'Te'; +--let $commands= Te --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'Te-trig'; +--let $commands= Te-trig --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'Te-func'; +--let $commands= Te-func --source extra/rpl_tests/rpl_mixing_engines.inc --echo @@ -310,16 +311,16 @@ SET @commands= 'Te-func'; --echo # --> ROW "B N C" entry, format R. --echo # --> MIXED "B N C" entry, format S. --echo # -SET @commands= 'N'; +--let $commands= N --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'N-trig'; +--let $commands= N-trig --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'N-func'; +--let $commands= N-func --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'N-proc'; +--let $commands= N-proc --source extra/rpl_tests/rpl_mixing_engines.inc @@ -333,16 +334,16 @@ SET @commands= 'N-proc'; --echo # --> ROW "B N C" entry, format R. --echo # --> MIXED "B N C" entry, format S. --echo # -SET @commands= 'eN'; +--let $commands= eN --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'Ne'; +--let $commands= Ne --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'Ne-trig'; +--let $commands= Ne-trig --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'Ne-func'; +--let $commands= Ne-func --source extra/rpl_tests/rpl_mixing_engines.inc --echo @@ -356,28 +357,28 @@ SET @commands= 'Ne-func'; --echo # --> ROW "B N T B T C" entries, format R. --echo # --> MIXED "B N T B T C" entries, format R. --echo # -SET @commands= 'tN'; +--let $commands= tN --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'nT'; +--let $commands= nT --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'NT'; +--let $commands= NT --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'NT-trig'; +--let $commands= NT-trig --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'NT-func'; +--let $commands= NT-func --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'TN'; +--let $commands= TN --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'TN-trig'; +--let $commands= TN-trig --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'TN-func'; +--let $commands= TN-func --source extra/rpl_tests/rpl_mixing_engines.inc @@ -391,22 +392,22 @@ SET @commands= 'TN-func'; --echo # --> STMT "B M R" entries, format S. --echo # --> ROW "B N C" entry, format R. --echo # --> MIXED "B N C" entry, format R. -SET @commands= 'tNe'; +--let $commands= tNe --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'nTe'; +--let $commands= nTe --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'NeT-trig'; +--let $commands= NeT-trig --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'NeT-func'; +--let $commands= NeT-func --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'TeN-trig'; +--let $commands= TeN-trig --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'TeN-func'; +--let $commands= TeN-func --source extra/rpl_tests/rpl_mixing_engines.inc --echo @@ -419,52 +420,52 @@ SET @commands= 'TeN-func'; --echo # --> ROW "B T T C" entries, format R. --echo # --> MIXED "B T T C" entries, format S --echo # -SET @commands= 'B T T C'; +--let $commands= B T T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T T-trig C'; +--let $commands= B T T-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T T-func C'; +--let $commands= B T T-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T T-proc C'; +--let $commands= B T T-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig T C'; +--let $commands= B T-trig T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig T-trig C'; +--let $commands= B T-trig T-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig T-func C'; +--let $commands= B T-trig T-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig T-proc C'; +--let $commands= B T-trig T-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func T C'; +--let $commands= B T-func T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func T-trig C'; +--let $commands= B T-func T-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func T-func C'; +--let $commands= B T-func T-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func T-proc C'; +--let $commands= B T-func T-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc T C'; +--let $commands= B T-proc T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc T-trig C'; +--let $commands= B T-proc T-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc T-func C'; +--let $commands= B T-proc T-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc T-proc C'; +--let $commands= B T-proc T-proc C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -478,28 +479,28 @@ SET @commands= 'B T-proc T-proc C'; --echo # --> ROW "B T C" entries, format R. --echo # --> MIXED "B T C" entries, format S. --echo # -SET @commands= 'B T eT C'; +--let $commands= B T eT C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T Te C'; +--let $commands= B T Te C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T Te-trig C'; +--let $commands= B T Te-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T Te-func C'; +--let $commands= B T Te-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B eT T C'; +--let $commands= B eT T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Te T C'; +--let $commands= B Te T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Te-trig T C'; +--let $commands= B Te-trig T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Te-func T C'; +--let $commands= B Te-func T C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -513,52 +514,52 @@ SET @commands= 'B Te-func T C'; --echo # --> ROW empty. --echo # --> MIXED empty. --echo # -SET @commands= 'B T T R'; +--let $commands= B T T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T T-trig R'; +--let $commands= B T T-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T T-func R'; +--let $commands= B T T-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T T-proc R'; +--let $commands= B T T-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig T R'; +--let $commands= B T-trig T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig T-trig R'; +--let $commands= B T-trig T-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig T-func R'; +--let $commands= B T-trig T-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig T-proc R'; +--let $commands= B T-trig T-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func T R'; +--let $commands= B T-func T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func T-trig R'; +--let $commands= B T-func T-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func T-func R'; +--let $commands= B T-func T-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func T-proc R'; +--let $commands= B T-func T-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc T R'; +--let $commands= B T-proc T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc T-trig R'; +--let $commands= B T-proc T-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc T-func R'; +--let $commands= B T-proc T-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc T-proc R'; +--let $commands= B T-proc T-proc R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -572,28 +573,28 @@ SET @commands= 'B T-proc T-proc R'; --echo # --> ROW empty. --echo # --> MIXED empty. --echo # -SET @commands= 'B T eT R'; +--let $commands= B T eT R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T Te R'; +--let $commands= B T Te R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T Te-trig R'; +--let $commands= B T Te-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T Te-func R'; +--let $commands= B T Te-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B eT T R'; +--let $commands= B eT T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Te T R'; +--let $commands= B Te T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Te-trig T R'; +--let $commands= B Te-trig T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Te-func T R'; +--let $commands= B Te-func T R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -607,52 +608,52 @@ SET @commands= 'B Te-func T R'; --echo # --> ROW "B N C B N C" entries, format R. --echo # --> MIXED "B N C B N C" entries, format S. --echo # -SET @commands= 'B N N C'; +--let $commands= B N N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N N-trig C'; +--let $commands= B N N-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N N-func C'; +--let $commands= B N N-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N N-proc C'; +--let $commands= B N N-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig N C'; +--let $commands= B N-trig N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig N-trig C'; +--let $commands= B N-trig N-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig N-func C'; +--let $commands= B N-trig N-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig N-proc C'; +--let $commands= B N-trig N-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func N C'; +--let $commands= B N-func N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func N-trig C'; +--let $commands= B N-func N-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func N-func C'; +--let $commands= B N-func N-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func N-proc C'; +--let $commands= B N-func N-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc N C'; +--let $commands= B N-proc N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc N-trig C'; +--let $commands= B N-proc N-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc N-func C'; +--let $commands= B N-proc N-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc N-proc C'; +--let $commands= B N-proc N-proc C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -666,28 +667,28 @@ SET @commands= 'B N-proc N-proc C'; --echo # --> ROW "B N C B N C" entries, format R. --echo # --> MIXED "B N C B N C" entries, format S. --echo # -SET @commands= 'B N eN C'; +--let $commands= B N eN C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N Ne C'; +--let $commands= B N Ne C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N Ne-trig C'; +--let $commands= B N Ne-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N Ne-func C'; +--let $commands= B N Ne-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B eN N C'; +--let $commands= B eN N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Ne N C'; +--let $commands= B Ne N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Ne-trig N C'; +--let $commands= B Ne-trig N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Ne-func N C'; +--let $commands= B Ne-func N C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -701,52 +702,52 @@ SET @commands= 'B Ne-func N C'; --echo # --> ROW "B N C B N C" entries, format R. --echo # --> MIXED "B N C B N C" entries, format S. --echo # -SET @commands= 'B N N R'; +--let $commands= B N N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N N-trig R'; +--let $commands= B N N-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N N-func R'; +--let $commands= B N N-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N N-proc R'; +--let $commands= B N N-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig N R'; +--let $commands= B N-trig N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig N-trig R'; +--let $commands= B N-trig N-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig N-func R'; +--let $commands= B N-trig N-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig N-proc R'; +--let $commands= B N-trig N-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func N R'; +--let $commands= B N-func N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func N-trig R'; +--let $commands= B N-func N-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func N-func R'; +--let $commands= B N-func N-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func N-proc R'; +--let $commands= B N-func N-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc N R'; +--let $commands= B N-proc N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc N-trig R'; +--let $commands= B N-proc N-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc N-func R'; +--let $commands= B N-proc N-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc N-proc R'; +--let $commands= B N-proc N-proc R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -760,28 +761,28 @@ SET @commands= 'B N-proc N-proc R'; --echo # --> ROW "B N C B N C" entries, format R. --echo # --> MIXED "B N C B N C" entries, format S. --echo # -SET @commands= 'B N eN R'; +--let $commands= B N eN R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N Ne R'; +--let $commands= B N Ne R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N Ne-trig R'; +--let $commands= B N Ne-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N Ne-func R'; +--let $commands= B N Ne-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B eN N R'; +--let $commands= B eN N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Ne N R'; +--let $commands= B Ne N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Ne-trig N R'; +--let $commands= B Ne-trig N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Ne-func N R'; +--let $commands= B Ne-func N R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -795,52 +796,52 @@ SET @commands= 'B Ne-func N R'; --echo # --> ROW "B N C B T C" entries, format R. --echo # --> MIXED "B N C B T C" entries, format R in N and S in T. --echo # -SET @commands= 'B T N C'; +--let $commands= B T N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T N-trig C'; +--let $commands= B T N-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T N-func C'; +--let $commands= B T N-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T N-proc C'; +--let $commands= B T N-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig N C'; +--let $commands= B T-trig N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig N-trig C'; +--let $commands= B T-trig N-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig N-func C'; +--let $commands= B T-trig N-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig N-proc C'; +--let $commands= B T-trig N-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func N C'; +--let $commands= B T-func N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func N-trig C'; +--let $commands= B T-func N-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func N-func C'; +--let $commands= B T-func N-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func N-proc C'; +--let $commands= B T-func N-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc N C'; +--let $commands= B T-proc N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc N-trig C'; +--let $commands= B T-proc N-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc N-func C'; +--let $commands= B T-proc N-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc N-proc C'; +--let $commands= B T-proc N-proc C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -858,16 +859,16 @@ SET @commands= 'B T-proc N-proc C'; --echo # --> ROW "B N C B T C" entries, format R. --echo # --> MIXED "B N C B T C" entries, format R in N and S in T. --echo # -SET @commands= 'B eT N C'; +--let $commands= B eT N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Te N C'; +--let $commands= B Te N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T eN C'; +--let $commands= B T eN C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T Ne C'; +--let $commands= B T Ne C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -881,52 +882,52 @@ SET @commands= 'B T Ne C'; --echo # --> ROW "B N C" entry, format R. --echo # --> MIXED "B N C" entry, format R. --echo # -SET @commands= 'B T N R'; +--let $commands= B T N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T N-trig R'; +--let $commands= B T N-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T N-func R'; +--let $commands= B T N-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T N-proc R'; +--let $commands= B T N-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig N R'; +--let $commands= B T-trig N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig N-trig R'; +--let $commands= B T-trig N-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig N-func R'; +--let $commands= B T-trig N-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-trig N-proc R'; +--let $commands= B T-trig N-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func N R'; +--let $commands= B T-func N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func N-trig R'; +--let $commands= B T-func N-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func N-func R'; +--let $commands= B T-func N-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-func N-proc R'; +--let $commands= B T-func N-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc N R'; +--let $commands= B T-proc N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc N-trig R'; +--let $commands= B T-proc N-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc N-func R'; +--let $commands= B T-proc N-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T-proc N-proc R'; +--let $commands= B T-proc N-proc R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -944,16 +945,16 @@ SET @commands= 'B T-proc N-proc R'; --echo # --> ROW "B N C" entry, format R. --echo # --> MIXED "B N C" entry, format R. --echo # -SET @commands= 'B eT N R'; +--let $commands= B eT N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B Te N R'; +--let $commands= B Te N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T eN R'; +--let $commands= B T eN R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T Ne R'; +--let $commands= B T Ne R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -968,52 +969,52 @@ SET @commands= 'B T Ne R'; --echo # --> ROW "B N C B T C" entries, format R. --echo # --> MIXED "B N C B T C" entries, format S. --echo # -SET @commands= 'B N T C'; +--let $commands= B N T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N T-trig C'; +--let $commands= B N T-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N T-func C'; +--let $commands= B N T-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N T-proc C'; +--let $commands= B N T-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig T C'; +--let $commands= B N-trig T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig T-trig C'; +--let $commands= B N-trig T-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig T-func C'; +--let $commands= B N-trig T-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig T-proc C'; +--let $commands= B N-trig T-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func T C'; +--let $commands= B N-func T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func T-trig C'; +--let $commands= B N-func T-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func T-func C'; +--let $commands= B N-func T-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func T-proc C'; +--let $commands= B N-func T-proc C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc T C'; +--let $commands= B N-proc T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc T-trig C'; +--let $commands= B N-proc T-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc T-func C'; +--let $commands= B N-proc T-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc T-proc C'; +--let $commands= B N-proc T-proc C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1028,52 +1029,52 @@ SET @commands= 'B N-proc T-proc C'; --echo # --> MIXED "B N C" entries, format S. --echo # -SET @commands= 'B N T R'; +--let $commands= B N T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N T-proc R'; +--let $commands= B N T-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N T-trig R'; +--let $commands= B N T-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N T-func R'; +--let $commands= B N T-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig T R'; +--let $commands= B N-trig T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig T-trig R'; +--let $commands= B N-trig T-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig T-func R'; +--let $commands= B N-trig T-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-trig T-proc R'; +--let $commands= B N-trig T-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func T R'; +--let $commands= B N-func T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func T-trig R'; +--let $commands= B N-func T-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func T-func R'; +--let $commands= B N-func T-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-func T-proc R'; +--let $commands= B N-func T-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc T R'; +--let $commands= B N-proc T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc T-proc R'; +--let $commands= B N-proc T-proc R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc T-trig R'; +--let $commands= B N-proc T-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N-proc T-func R'; +--let $commands= B N-proc T-func R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1088,28 +1089,28 @@ SET @commands= 'B N-proc T-func R'; --echo # --> ROW "B N C B T T C" entries, format R. --echo # --> MIXED "B N C B T T C" entries, format R in N/T and format S in T. --echo # -SET @commands= 'B tN T C'; +--let $commands= B tN T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B nT T C'; +--let $commands= B nT T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT T C'; +--let $commands= B NT T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT-trig T C'; +--let $commands= B NT-trig T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT-func T C'; +--let $commands= B NT-func T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN T C'; +--let $commands= B TN T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN-trig T C'; +--let $commands= B TN-trig T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN-func T C'; +--let $commands= B TN-func T C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1124,22 +1125,22 @@ SET @commands= 'B TN-func T C'; --echo # --> ROW "B N C B T T C" entries, format R. --echo # --> MIXED "B N C B T T C" entries, format R in N/T and format S in T. --echo # -SET @commands= 'B tNe T C'; +--let $commands= B tNe T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B nTe T C'; +--let $commands= B nTe T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NeT-trig T C'; +--let $commands= B NeT-trig T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NeT-func T C'; +--let $commands= B NeT-func T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TeN-trig T C'; +--let $commands= B TeN-trig T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TeN-func T C'; +--let $commands= B TeN-func T C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1154,28 +1155,28 @@ SET @commands= 'B TeN-func T C'; --echo # --> ROW "B N C" entry, format R. --echo # --> MIXED "B N C" entry, format R. --echo # -SET @commands= 'B tN T R'; +--let $commands= B tN T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B nT T R'; +--let $commands= B nT T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT T R'; +--let $commands= B NT T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT-trig T R'; +--let $commands= B NT-trig T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT-func T R'; +--let $commands= B NT-func T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN T R'; +--let $commands= B TN T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN-trig T R'; +--let $commands= B TN-trig T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN-func T R'; +--let $commands= B TN-func T R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1190,22 +1191,22 @@ SET @commands= 'B TN-func T R'; --echo # --> ROW "B N C" entry, format R. --echo # --> MIXED "B N C" entry, format R. --echo # -SET @commands= 'B tNe T R'; +--let $commands= B tNe T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B nTe T R'; +--let $commands= B nTe T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NeT-trig T R'; +--let $commands= B NeT-trig T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NeT-func T R'; +--let $commands= B NeT-func T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TeN-trig T R'; +--let $commands= B TeN-trig T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TeN-func T R'; +--let $commands= B TeN-func T R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1219,28 +1220,28 @@ SET @commands= 'B TeN-func T R'; --echo # --> ROW "B N C B T T C" entries, format R. --echo # --> MIXED "B N C B T T C" entries, format R in N/T and format S in T. --echo # -SET @commands= 'B T tN C'; +--let $commands= B T tN C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T nT C'; +--let $commands= B T nT C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NT C'; +--let $commands= B T NT C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NT-trig C'; +--let $commands= B T NT-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NT-func C'; +--let $commands= B T NT-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TN C'; +--let $commands= B T TN C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TN-trig C'; +--let $commands= B T TN-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TN-func C'; +--let $commands= B T TN-func C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1254,22 +1255,22 @@ SET @commands= 'B T TN-func C'; --echo # --> ROW "B N C B T C" entry, format R. --echo # --> MIXED "B N C B T C" entry, format R. --echo # -SET @commands= 'B T tNe C'; +--let $commands= B T tNe C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T nTe C'; +--let $commands= B T nTe C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NeT-trig C'; +--let $commands= B T NeT-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NeT-func C'; +--let $commands= B T NeT-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TeN-trig C'; +--let $commands= B T TeN-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TeN-func C'; +--let $commands= B T TeN-func C --source extra/rpl_tests/rpl_mixing_engines.inc --echo @@ -1282,28 +1283,28 @@ SET @commands= 'B T TeN-func C'; --echo # --> ROW "B N C" entry, format R. --echo # --> MIXED "B N C" entry, format R. --echo # -SET @commands= 'B T tN R'; +--let $commands= B T tN R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T nT R'; +--let $commands= B T nT R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NT R'; +--let $commands= B T NT R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NT-trig R'; +--let $commands= B T NT-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NT-func R'; +--let $commands= B T NT-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TN R'; +--let $commands= B T TN R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TN-trig R'; +--let $commands= B T TN-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TN-func R'; +--let $commands= B T TN-func R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1317,22 +1318,22 @@ SET @commands= 'B T TN-func R'; --echo # --> ROW "B N C" entry, format R. --echo # --> MIXED "B N C" entry, format R. --echo # -SET @commands= 'B T tNe R'; +--let $commands= B T tNe R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T nTe R'; +--let $commands= B T nTe R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NeT-trig R'; +--let $commands= B T NeT-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T NeT-func R'; +--let $commands= B T NeT-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TeN-trig R'; +--let $commands= B T TeN-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T TeN-func R'; +--let $commands= B T TeN-func R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1348,28 +1349,28 @@ SET @commands= 'B T TeN-func R'; --echo # --> MIXED "B M C B N C" entries if in M only N-Table is changed, format S. --echo # --> MIXED "B N C B N C B T C" entries, format R. --echo # -SET @commands= 'B tN N C'; +--let $commands= B tN N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B nT N C'; +--let $commands= B nT N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT N C'; +--let $commands= B NT N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT-trig N C'; +--let $commands= B NT-trig N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT-func N C'; +--let $commands= B NT-func N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN N C'; +--let $commands= B TN N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN-trig N C'; +--let $commands= B TN-trig N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN-func N C'; +--let $commands= B TN-func N C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1385,22 +1386,22 @@ SET @commands= 'B TN-func N C'; --echo # --> MIXED "B M C B N C" entries if in M only N-Table is changed, format S. --echo # --> MIXED "B N C B N C B T C" entries, format R. --echo # -SET @commands= 'B tNe N C'; +--let $commands= B tNe N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B nTe N C'; +--let $commands= B nTe N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NeT-trig N C'; +--let $commands= B NeT-trig N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NeT-func N C'; +--let $commands= B NeT-func N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TeN-trig N C'; +--let $commands= B TeN-trig N C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TeN-func N C'; +--let $commands= B TeN-func N C --source extra/rpl_tests/rpl_mixing_engines.inc --echo @@ -1415,28 +1416,28 @@ SET @commands= 'B TeN-func N C'; --echo # --> MIXED "B M C B N C" entries if in M only N-Table is changed, format S. --echo # --> MIXED "B N C B N C" entries, format R. --echo # -SET @commands= 'B tN N R'; +--let $commands= B tN N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B nT N R'; +--let $commands= B nT N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT N R'; +--let $commands= B NT N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT-trig N R'; +--let $commands= B NT-trig N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NT-func N R'; +--let $commands= B NT-func N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN N R'; +--let $commands= B TN N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN-trig N R'; +--let $commands= B TN-trig N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TN-func N R'; +--let $commands= B TN-func N R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1452,22 +1453,22 @@ SET @commands= 'B TN-func N R'; --echo # --> MIXED "B M C B N C" entries if in M only N-Table is changed, format S. --echo # --> MIXED "B N C B N C" entries, format R. --echo # -SET @commands= 'B tNe N R'; +--let $commands= B tNe N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B nTe N R'; +--let $commands= B nTe N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NeT-trig N R'; +--let $commands= B NeT-trig N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B NeT-func N R'; +--let $commands= B NeT-func N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TeN-trig N R'; +--let $commands= B TeN-trig N R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B TeN-func N R'; +--let $commands= B TeN-func N R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1483,28 +1484,28 @@ SET @commands= 'B TeN-func N R'; --echo # --> MIXED "B N C B N C B T C" entries, format S in first N and format R in the other. --echo # -SET @commands= 'B N tN C'; +--let $commands= B N tN C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N nT C'; +--let $commands= B N nT C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NT C'; +--let $commands= B N NT C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NT-trig C'; +--let $commands= B N NT-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NT-func C'; +--let $commands= B N NT-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TN C'; +--let $commands= B N TN C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TN-trig C'; +--let $commands= B N TN-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TN-func C'; +--let $commands= B N TN-func C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1520,22 +1521,22 @@ SET @commands= 'B N TN-func C'; --echo # --> ROW "B N C B N C" entries, format R. --echo # --> MIXED "B N C B N C" entries, format S in first N and format R in the other. --echo # -SET @commands= 'B N tNe C'; +--let $commands= B N tNe C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N nTe C'; +--let $commands= B N nTe C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NeT-trig C'; +--let $commands= B N NeT-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NeT-func C'; +--let $commands= B N NeT-func C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TeN-trig C'; +--let $commands= B N TeN-trig C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TeN-func C'; +--let $commands= B N TeN-func C --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1551,28 +1552,28 @@ SET @commands= 'B N TeN-func C'; --echo # --> MIXED "B N C B N C" entries, format S in first N and format R in the other. --echo # -SET @commands= 'B N tN R'; +--let $commands= B N tN R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N nT R'; +--let $commands= B N nT R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NT R'; +--let $commands= B N NT R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NT-trig R'; +--let $commands= B N NT-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NT-func R'; +--let $commands= B N NT-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TN R'; +--let $commands= B N TN R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TN-trig R'; +--let $commands= B N TN-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TN-func R'; +--let $commands= B N TN-func R --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1587,58 +1588,58 @@ SET @commands= 'B N TN-func R'; --echo # --> ROW "B N C B N C" entries, format R. --echo # --> MIXED "B N C B N C" entries, format S in first N and format R in the other. --echo # -SET @commands= 'B N tNe R'; +--let $commands= B N tNe R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N nTe R'; +--let $commands= B N nTe R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NeT-trig R'; +--let $commands= B N NeT-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N NeT-func R'; +--let $commands= B N NeT-func R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TeN-trig R'; +--let $commands= B N TeN-trig R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N TeN-func R'; +--let $commands= B N TeN-func R --source extra/rpl_tests/rpl_mixing_engines.inc --echo ################################################################################### --echo # 2 - SAVEPOINT --echo ################################################################################### -SET @commands= 'B T S1 T R1 C'; +--let $commands= B T Sn T Rn C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N T S1 T R1 C'; +--let $commands= B N T Sn T Rn C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T N S1 T R1 C'; +--let $commands= B T N Sn T Rn C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T S1 N T R1 C'; +--let $commands= B T Sn N T Rn C --source extra/rpl_tests/rpl_mixing_engines.inc --echo ################################################################################### --echo # 3 - CREATE TABLE...SELECT --echo ################################################################################### -SET @commands= 'CSe-T->T CS-T->T drop-CS'; +--let $commands= CSe-T->T CS-T->T drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'CSe-N->N CS-N->N drop-CS'; +--let $commands= CSe-N->N CS-N->N drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'CSe-T->N CS-T->N drop-CS'; +--let $commands= CSe-T->N CS-T->N drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'CSe-N->T CS-N->T drop-CS'; +--let $commands= CSe-N->T CS-N->T drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'CSe-N->T CS-N->T drop-CS'; +--let $commands= CSe-N->T CS-N->T drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'CSe-N->T CS-N->T drop-CS'; +--let $commands= CSe-N->T CS-N->T drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1646,116 +1647,116 @@ SET @commands= 'CSe-N->T CS-N->T drop-CS'; --echo # 4 - INSERT TABLE...SELECT --echo ################################################################################### -SET @commands= 'CS-T->T'; +--let $commands= CS-T->T --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-T B T IS-T<-N T C'; +--let $commands= trunc-CS-T B T IS-T<-N T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-T B T ISe-T<-N T C'; +--let $commands= trunc-CS-T B T ISe-T<-N T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-T B IS-T<-N T C'; +--let $commands= trunc-CS-T B IS-T<-N T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-T B ISe-T<-N T C'; +--let $commands= trunc-CS-T B ISe-T<-N T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CS'; +--let $commands= drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'CS-T->T'; +--let $commands= CS-T->T --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-T B T IS-T<-T T C'; +--let $commands= trunc-CS-T B T IS-T<-T T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-T B T ISe-T<-T T C'; +--let $commands= trunc-CS-T B T ISe-T<-T T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-T B IS-T<-T T C'; +--let $commands= trunc-CS-T B IS-T<-T T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-T B ISe-T<-T T C'; +--let $commands= trunc-CS-T B ISe-T<-T T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CS'; +--let $commands= drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'CS-N->N'; +--let $commands= CS-N->N --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-N B T IS-N<-T T C'; +--let $commands= trunc-CS-N B T IS-N<-T T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-N B T ISe-N<-T T C'; +--let $commands= trunc-CS-N B T ISe-N<-T T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-N B IS-N<-T T C'; +--let $commands= trunc-CS-N B IS-N<-T T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-N B ISe-N<-T T C'; +--let $commands= trunc-CS-N B ISe-N<-T T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CS'; +--let $commands= drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'CS-N->N'; +--let $commands= CS-N->N --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-N B T IS-N<-N T C'; +--let $commands= trunc-CS-N B T IS-N<-N T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-N B T ISe-N<-N T C'; +--let $commands= trunc-CS-N B T ISe-N<-N T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-N B IS-N<-N T C'; +--let $commands= trunc-CS-N B IS-N<-N T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'trunc-CS-N B ISe-N<-N T C'; +--let $commands= trunc-CS-N B ISe-N<-N T C --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CS'; +--let $commands= drop-CS --source extra/rpl_tests/rpl_mixing_engines.inc --echo ################################################################################### --echo # 5 - ROLLBACK TEMPORARY TABLE --echo ################################################################################### -SET @commands= 'B T CT R'; +--let $commands= B T CT R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CT'; +--let $commands= drop-CT --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T S1 T CT R1 R'; +--let $commands= B T Sn T CT Rn R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CT'; +--let $commands= drop-CT --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B T CT T R'; +--let $commands= B T CT T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CT'; +--let $commands= drop-CT --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B tN CT T R'; +--let $commands= B tN CT T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CT'; +--let $commands= drop-CT --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B CT T R'; +--let $commands= B CT T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CT'; +--let $commands= drop-CT --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'B N CT T R'; +--let $commands= B N CT T R --source extra/rpl_tests/rpl_mixing_engines.inc -SET @commands= 'drop-CT'; +--let $commands= drop-CT --source extra/rpl_tests/rpl_mixing_engines.inc @@ -1775,5 +1776,5 @@ if (`select @@session.binlog_direct_non_transactional_updates = 0 || @@session.b --echo ################################################################################### --echo # CLEAN --echo ################################################################################### -SET @commands= 'clean'; +--let $commands= clean --source extra/rpl_tests/rpl_mixing_engines.inc diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index 720f90d7b02..9ecf7de419a 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -14,7 +14,7 @@ set SQL_LOG_BIN=0; # Turn off any debug crashes, allow the variable to be # non existent in release builds --error 0,1193 -set debug=""; +set debug_dbug=""; use mtr; # Allow this session to read-write even if server is started diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index a3dcbe9ffbb..1aa551af57f 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -1,4 +1,5 @@ # Copyright (c) 2007, 2010, Oracle and/or its affiliates +# Copyright (c) 2010, 2012, Monty Program Ab # # 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 @@ -40,6 +41,7 @@ loose-feedback-user-info= mysql-test loose-innodb_data_file_path= ibdata1:10M:autoextend loose-innodb_buffer_pool_size= 8M +loose-innodb_lru_scan_depth= 100 loose-innodb_write_io_threads= 2 loose-innodb_read_io_threads= 2 loose-innodb_log_buffer_size= 1M @@ -52,11 +54,29 @@ slave-net-timeout=120 loose-enable-performance-schema # Run tests with a small number of instrumented objects # to limit memory consumption with MTR -loose-performance-schema-max-mutex-instances=10000 -loose-performance-schema-max-rwlock-instances=10000 +loose-performance-schema-max-mutex-instances=5000 +loose-performance-schema-max-rwlock-instances=5000 loose-performance-schema-max-table-instances=500 loose-performance-schema-max-table-handles=1000 +loose-performance-schema-events-stages-history-long-size=1000 +loose-performance-schema-events-statements-history-long-size=1000 +loose-performance-schema-max-thread-instances=200 + +loose-performance-schema-instrument='%=ON' + +loose-performance-schema-consumer-events-stages-current=ON +loose-performance-schema-consumer-events-stages-history=ON +loose-performance-schema-consumer-events-stages-history-long=ON +loose-performance-schema-consumer-events-statements-current=ON +loose-performance-schema-consumer-events-statements-history=ON +loose-performance-schema-consumer-events-statements-history-long=ON +loose-performance-schema-consumer-events-waits-current=ON +loose-performance-schema-consumer-events-waits-history=ON +loose-performance-schema-consumer-events-waits-history-long=ON +loose-performance-schema-consumer-global-instrumentation=ON +loose-performance-schema-consumer-thread-instrumentation=ON + binlog-direct-non-transactional-updates default-storage-engine=myisam diff --git a/mysql-test/include/filter_file.inc b/mysql-test/include/filter_file.inc new file mode 100644 index 00000000000..17c7c1985d7 --- /dev/null +++ b/mysql-test/include/filter_file.inc @@ -0,0 +1,145 @@ +# ==== Purpose ==== +# +# Read the contents of a file, filter it through a perl script, and +# write it back. +# +# This is useful in conjunction with include/write_result_to_file.inc +# and cat_file or include/read_file_to_var.inc. See +# e.g. include/show_events.inc for an example. +# +# ==== Usage ==== +# +# --let $input_file= +# [--let $output_file= ] +# --let $script= +# [--let $select_columns= ] +# [--let $pre_script= ] +# [--let $rpl_debug= 1] +# --source include/filter_file.inc +# +# Parameters: +# +# $input_file +# File to read from. +# +# $output_file +# File to write to. If omitted, writes to $input_file. +# +# $script +# This script will be executed once for each line in $input_file. +# +# When the script starts, the perl variable $_ will be set to the +# current row (including the terminating newline). The script can +# modify $_ in any way it likes, and the result will be appended +# to $output_file. It is even possible to remove a row by setting +# $_ to '', or to generate extra rows by appending "\n" to $_. +# +# Since mysqltest is incapable of properly escaping dollar +# characters, you have to replace any '$' in your script by +# 'DOLLAR' (otherwise mysqltest would try to interpolate parts of +# your script). filter_file.inc will replace 'DOLLAR' by '$' +# before evaluating your script. +# +# $select_columns +# For convenience, if you set this to a space-separated list of +# numbers, it will print only the numbered columns, in the given +# order. +# +# $pre_script +# This script will be evaluated before starting to iterate over +# the lines of $input_file. It can be useful if you need some +# sort of initialization; for example, you can define a subroutine +# here and call it from $script. +# +# $rpl_debug +# If set, verbose debug info is printed. + +--let $include_filename= filter_file.inc +--source include/begin_include_file.inc + +if ($rpl_debug) +{ + --echo pre_script='$pre_script' + --echo script='$script' + --echo select_columns='$select_columns' + --echo input_file='$input_file' output_file='$output_file' +} + +--let _FF_PRE_SCRIPT= $pre_script +--let _FF_SCRIPT= $script +--let _FF_INPUT_FILE= $input_file +--let _FF_OUTPUT_FILE= $output_file +--let _FF_SELECT_COLUMNS= $select_columns +--let _FF_DEBUG= $rpl_debug +if (!$output_file) +{ + --let _FF_OUTPUT_FILE= $input_file +} +perl; + my $pre_script = $ENV{'_FF_PRE_SCRIPT'}; + $pre_script =~ s/DOLLAR/\$/g; + my $script = $ENV{'_FF_SCRIPT'}; + $script =~ s/DOLLAR/\$/g; + my $input_file = $ENV{'_FF_INPUT_FILE'}; + my $output_file = $ENV{'_FF_OUTPUT_FILE'}; + my $select_columns = $ENV{'_FF_SELECT_COLUMNS'}; + my $debug = $ENV{'_FF_DEBUG'}; + if ($select_columns) + { + chomp($select_columns); + $select_columns =~ s/[, ]+/,/g; + $script = ' + chomp; + my @cols = split(/\t/, $_); + $_ = join("\t", map { $cols[$_ - 1] } ('.$select_columns.'))."\n"; + ' . $script; + } + unless ($keep_quotes) + { + $pre_script = 'my %unquote = ("n"=>"\n","t"=>"\t","\\\\"=>"\\\\");' . $pre_script; + $script .= 's{\\\\(.)}{$unquote{$1}}ge;'; + } + if ($debug) + { + $script = 'print "BEFORE:\'$_\'";' . $script . 'print "AFTER:\'$_\'";' + } + # Generate a script (perl is faster if we avoid many calls to eval). + my $full_script = +' + open FILE, "< $input_file" or die "Error opening $input_file: $!"; + my $filtered_contents = ""; + my %column_names = (); + '.$pre_script.'; + while () + { + chomp; + s/\r//g; + if (!%column_names) + { + my $n = 1; + %column_names = map { $_ => $n++ } split(/\t/, $_); + } + else + { + ' . $script . ' + } + $filtered_contents .= $_."\n"; + } + close FILE or die "Error closing $input_file: $!"; + open FILE, "> $output_file" or die "Error opening $output_file: $!"; + binmode FILE; + print FILE $filtered_contents or die "Error writing filtered contents to $output_file: $!"; + close FILE or die "Error closing $output_file: $!"; + return 0; +'; + if ($debug) + { + print STDOUT "full_script=< | LAST]] +# [--let $binlog_start= ] +# [--let $binlog_limit= 1, 3 ] +# [--let $keep_gtid_events= 1] +# --source include/show_binlog_events.inc # -# It shows all of the events if $binlog_limit is not given. -# $binlog_format has the same semantic with 'LIMIT' option. +# Parameters: # -############################################################################## +# $binlog_file +# Filename for the 'IN' clause of SHOW BINLOG EVENTS. If none +# given, no argument is given to SHOW BINLOG EVENTS, meaning that +# it uses the first binlog. If you set this to "LAST", it prints +# the last binlog (according to SHOW MASTER STATUS). +# +# $binlog_start +# Position for the 'FROM' clause of SHOW BINLOG EVENTS. If none +# given, starts right after the Format_description_log_event. +# +# $binlog_limit +# Limit for the 'LIMIT' clause of SHOW BINLOG EVENTS, i.e.: +# $binlog_limit= 3 -- print three events +# $binlog_limit= 4, 3 -- skip four events, print the three next events +# +# $keep_gtid_events +# By default, Gtid_log_event and Previous_gtid_log_event are +# filtered out, so that the output is independent of whether GTIDs +# are enabled or not. If this flag is set, events are kept but +# the actual GTID values are masked out. + +--let $include_filename= show_binlog_events.inc +--source include/begin_include_file.inc --let $is_relay_log= 0 --source include/show_events.inc + +--let $include_filename= show_binlog_events.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/show_events.inc b/mysql-test/include/show_events.inc index ff5a7105c24..ae2f08f65a6 100644 --- a/mysql-test/include/show_events.inc +++ b/mysql-test/include/show_events.inc @@ -1,7 +1,14 @@ -############################################################################## -# It's an auxiliary file used to show binary log events or relay log events. -# It is only called by show_binlog_events.inc and show_relaylog_events.inc. -############################################################################## +# ==== Purpose ==== +# +# Auxiliary file used in include/show_binlog_events.inc and +# include/show_relaylog_events.inc. +# +# ==== Usage ==== +# +# See include/show_binlog_events.inc + +--let $include_filename= show_events.inc +--source include/begin_include_file.inc if (!$binlog_start) { @@ -12,27 +19,83 @@ if (!$binlog_start) --let $binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1) } ---let $_statement=show binlog events +--let $_se_old_statement= $statement + +--let $statement=show BINLOG events if ($is_relay_log) { - --let $_statement=show relaylog events + --let $statement=show relaylog events } if ($binlog_file) { - --let $_statement= $_statement in '$binlog_file' + --let $_binlog_file= $binlog_file + if ($binlog_file == 'LAST') + { + if ($is_relay_log) + { + --let $_binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1) + } + if (!$is_relay_log) + { + --let $_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) + } + } + --let $statement= $statement in '$_binlog_file' } ---let $_statement= $_statement from $binlog_start +--let $statement= $statement from $binlog_start -# Cannot use if($binlog_limit) since the variable may begin with a 0 - -if (`SELECT '$binlog_limit' <> ''`) +if ($binlog_limit != '') { - --let $_statement= $_statement limit $binlog_limit + --let $statement= $statement limit $binlog_limit } ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start ---replace_column 2 # 4 # 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /Server ver:.*$/SERVER_VERSION, BINLOG_VERSION/ ---eval $_statement +# Execute the statement and write to $output_file +--let $output_file= GENERATE +--source include/write_result_to_file.inc + +# Filter the file through the following script. +--delimiter || +let $script= + # todo: use select_columns instead (requires updating all result files) + s{([^\t]*\t)[^\t]*(\t[^\t]*\t)[^\t]*\t[^\t]*(\t[^\t]*)}{DOLLAR1#DOLLAR2#\t#DOLLAR3}; + s{/\* xid=.* \*/}{/\* XID \*/}; + s{table_id: [0-9]+}{table_id: #}; + s{file_id=[0-9]+}{file_id=#}; + s{block_len=[0-9]+}{block_len=#}; + s{Server ver:.*DOLLAR}{SERVER_VERSION, BINLOG_VERSION}; + s{SQL_LOAD-[a-z,0-9,-]*.[a-z]*}{SQL_LOAD---.}; + s{rand_seed1=[0-9]*,rand_seed2=[0-9]*}{rand_seed1=,rand_seed2=}; + s{((?:master|slave|slave-relay)-bin\.[0-9]{6};pos=)[0-9]+DOLLAR}{DOLLAR1POS}; + s{DOLLARmysqltest_vardir}{MYSQLTEST_VARDIR}g; +|| +--let $pre_script= my DOLLARmysqltest_vardir = DOLLARENV{'MYSQLTEST_VARDIR'}; +if (!$keep_gtid_events) +{ + --let $script= $script DOLLAR_ = '' if (m{\t(?:Gtid|Previous_gtids)\t}); +} +if ($keep_gtid_events) +{ + let $pre_script= $pre_script + my DOLLARuuid_regex = '[0-9A-F]{8}-(?:[0-9A-F]{4}-){3}[0-9A-F]{12}'; + my DOLLARuuid_sidno_regex = DOLLARuuid_regex.'(?::[0-9]+(?:-[0-9]+)?)+'; + || + --let $script= $script s{DOLLARuuid_sidno_regex(?:,DOLLARuuid_sidno_regex)*}{Gtid_set}; +} +--delimiter ; + +#--let $select_columns= 1 3 6 +--let $input_file= $output_file +--source include/filter_file.inc + +# Write to result file +--cat_file $output_file + +# Remove the file +--remove_file $output_file + +--let $statement= $_se_old_statement + +--let $include_filename= show_events.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/write_result_to_file.inc b/mysql-test/include/write_result_to_file.inc new file mode 100644 index 00000000000..3e2ddf48957 --- /dev/null +++ b/mysql-test/include/write_result_to_file.inc @@ -0,0 +1,77 @@ +# ==== Purpose ==== +# +# Execute a statement and write the result to a file. This is useful +# if the output needs more advanced parsing than can be done by +# mysqltest commands. +# +# ==== Usage ==== +# +# --let $statement= +# --let $output_file= {|GENERATE} +# [--let $server_number= ] +# [--let $dont_print_statement= 1] +# --source include/write_result_to_file.inc +# +# Parameters: +# $statement +# The statement to execute. +# +# $server_number +# 1 for the master, 2 for the slave, 3 for next server, etc. +# If omitted, uses current connection. +# +# $output_file +# Name of file to write. If omitted, generates a new filename and +# stores the name both in the mysqltest variable $output_file and +# in the environment variable $OUTPUT_FILE. +# +# $dont_print_statement +# By default, the statement is echoed to the result log. If the +# statement contains non-deterministic output, set this variable +# to suppress it. + +--let _WRTF_SERVER_NUMBER= $server_number +if (!$server_number) +{ + --let _WRTF_SERVER_NUMBER= `SELECT 1 + @@PORT - $MASTER_MYPORT` +} + +--let $_write_result_msg= [server=$_WRTF_SERVER_NUMBER] +if (!$dont_print_statement) +{ + --let $_write_result_msg= [server=$_WRTF_SERVER_NUMBER statement=$statement] +} + +--let $include_filename= write_result_to_file.inc $_write_result_msg +--source include/begin_include_file.inc + +if ($statement == '') +{ + --die !!!ERROR IN TEST: mysqltest variable 'statement' not set in write_result_to_file.inc +} +--let _WRTF_STATEMENT= $statement + +if (!$output_file) +{ + --die !!!ERROR IN TEST: mysqltest variable 'output_file' not set in write_result_to_file.inc +} +if ($output_file == GENERATE) +{ + --let $output_file= `SELECT UUID()` + --let $output_file= $MYSQLTEST_VARDIR/tmp/_stmt_file_$output_file +} +--let _WRTF_OUTPUT_FILE= $output_file + +perl; + my $stmt= $ENV{'_WRTF_STATEMENT'}; + my $server_number= $ENV{'_WRTF_SERVER_NUMBER'}; + my $mysql = $ENV{'MYSQL'}; + $mysql =~ s/( --|$)/ --defaults-group-suffix=.$server_number$1/; + my $outfile = $ENV{'_WRTF_OUTPUT_FILE'}; + open MYSQL, "| $mysql > $outfile" or die "Failed to open pipe to client on server '$server_number': $!"; + print MYSQL $stmt, ';' or die "Error printing statement to MYSQL pipe: $!"; + close MYSQL or die "Error closing MYSQL pipe: $!"; +EOF + +--let $include_filename= write_result_to_file.inc [$write_result_msg] +--source include/end_include_file.inc diff --git a/mysql-test/lib/My/Test.pm b/mysql-test/lib/My/Test.pm index 36f35163c5e..806c90734fd 100644 --- a/mysql-test/lib/My/Test.pm +++ b/mysql-test/lib/My/Test.pm @@ -100,7 +100,7 @@ sub write_test { my $serialized= Storable::freeze($test); $serialized =~ s/([\x0d\x0a\\])/sprintf("\\%02x", ord($1))/eg; - print $sock $header, "\n", $serialized, "\n"; + send $sock,$header. "\n". $serialized. "\n", 0; } @@ -111,8 +111,7 @@ sub read_test { $serialized =~ s/\\([0-9a-fA-F]{2})/chr(hex($1))/eg; my $test= Storable::thaw($serialized); use Data::Dumper; - # We get a stack trace here when - die "wrong class (hack attempt?): ".ref($test)."\n".Dumper(\$test, $serialized) . " Stack trace: " + die "wrong class (hack attempt?): ".ref($test)."\n".Dumper(\$test, $serialized) unless ref($test) eq 'My::Test'; resfile_from_test($test) if $::opt_resfile; return $test; diff --git a/mysql-test/r/ctype_cp932_binlog_row.result b/mysql-test/r/ctype_cp932_binlog_row.result index cbac6b14669..f231c6a519d 100644 --- a/mysql-test/r/ctype_cp932_binlog_row.result +++ b/mysql-test/r/ctype_cp932_binlog_row.result @@ -6,7 +6,7 @@ CREATE TABLE t1(f1 blob); PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)'; SET @var1= x'8300'; EXECUTE stmt1 USING @var1; -show binlog events from ; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob) master-bin.000001 # Query # # BEGIN diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result index 1e62787835f..93e4bebcd8f 100644 --- a/mysql-test/r/ctype_cp932_binlog_stm.result +++ b/mysql-test/r/ctype_cp932_binlog_stm.result @@ -6,7 +6,7 @@ CREATE TABLE t1(f1 blob); PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)'; SET @var1= x'8300'; EXECUTE stmt1 USING @var1; -show binlog events from ; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob) master-bin.000001 # Query # # BEGIN @@ -32,7 +32,7 @@ HEX(s1) HEX(s2) d 466F6F2773206120426172 ED40ED41ED42 47.93 DROP PROCEDURE bug18293| DROP TABLE t4| -show binlog events from | +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1, s2 CHAR(50) CHARACTER SET cp932, diff --git a/mysql-test/r/events_2.result b/mysql-test/r/events_2.result index 66ec00d7357..3b7f3566cab 100644 --- a/mysql-test/r/events_2.result +++ b/mysql-test/r/events_2.result @@ -378,7 +378,7 @@ do select 1; alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00' ends '1999-01-02 00:00:00'; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future. drop event event_35981; create event event_35981 on schedule every 1 hour starts current_timestamp on completion not preserve @@ -399,7 +399,7 @@ Warnings: Note 1544 Event execution time is in the past. Event has been disabled alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00' ends '1999-01-02 00:00:00' on completion not preserve; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future. alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00' ends '1999-01-02 00:00:00' on completion preserve; Warnings: diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 30bc4f89d8c..fe90bd3288b 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -454,10 +454,10 @@ e3 +00:00 CREATE DEFINER=`root`@`localhost` EVENT `e3` ON SCHEDULE EVERY 1 DAY The following should fail, and nothing should be altered. ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00'; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future. ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' DISABLE; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future. The following should give warnings, and nothing should be created. CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' diff --git a/mysql-test/r/flush_block_commit_notembedded.result b/mysql-test/r/flush_block_commit_notembedded.result index 08643527b75..130146bf252 100644 --- a/mysql-test/r/flush_block_commit_notembedded.result +++ b/mysql-test/r/flush_block_commit_notembedded.result @@ -10,13 +10,11 @@ SELECT 1; 1 # Switch to connection con2 FLUSH TABLES WITH READ LOCK; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info +include/show_binlog_events.inc # Switch to connection con1 INSERT INTO t1 VALUES (1); # Switch to connection con2 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info +include/show_binlog_events.inc UNLOCK TABLES; # Switch to connection con1 DROP TABLE t1; diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 10caf4cd10f..f1cf94e4f19 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -612,7 +612,7 @@ create database mysqltest; create table mysqltest.t1 (a int,b int,c int); grant all on mysqltest.t1 to mysqltest_1@localhost; alter table t1 rename t2; -ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; delete from mysql.user where user=_binary'mysqltest_1'; drop database mysqltest; @@ -1106,9 +1106,9 @@ Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' RENAME TABLE t1 TO t2; -ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP, ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' ALTER TABLE t1 RENAME TO t2; -ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP, ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' GRANT DROP ON mysqltest1.t1 TO mysqltest_1@localhost; RENAME TABLE t1 TO t2; ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' @@ -1120,9 +1120,9 @@ Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' RENAME TABLE t1 TO t2; -ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' ALTER TABLE t1 RENAME TO t2; -ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' GRANT INSERT, CREATE ON mysqltest1.t1 TO mysqltest_1@localhost; SHOW GRANTS; Grants for mysqltest_1@localhost diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 222977e5106..85ec79d94a1 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -359,7 +359,7 @@ A 4 B 4 a 1 b 1 -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; SELECT a FROM t1 GROUP BY a; a NULL @@ -398,7 +398,7 @@ A 4 B 4 a 1 b 1 -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; drop table t1; CREATE TABLE t1 ( `a` char(193) default NULL, @@ -515,7 +515,7 @@ a count(*) NULL 9 3 b 1 -set option sql_big_tables=1; +set big_tables=1; select a,count(*) from t1 group by a; a count(*) NULL 9 @@ -1918,7 +1918,7 @@ DROP TABLE t1; # Bug#11765254 (58200): Assertion failed: param.sort_length when grouping # by functions # -SET SQL_BIG_TABLES=1; +SET BIG_TABLES=1; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (0),(0); SELECT 1 FROM t1 GROUP BY IF(`a`,'',''); @@ -1945,7 +1945,7 @@ Warning 1292 Truncated incorrect INTEGER value: 'jxW<' Warning 1292 Truncated incorrect INTEGER value: 'K' Warning 1292 Truncated incorrect INTEGER value: 'jxW<' DROP TABLE t1; -SET SQL_BIG_TABLES=0; +SET BIG_TABLES=0; # End of 5.1 tests # # LP bug#694450 Wrong result with non-standard GROUP BY + ORDER BY diff --git a/mysql-test/r/insert_notembedded.result b/mysql-test/r/insert_notembedded.result index 2315d695abe..ba3e2221922 100644 --- a/mysql-test/r/insert_notembedded.result +++ b/mysql-test/r/insert_notembedded.result @@ -32,7 +32,7 @@ INNER JOIN view_stations AS stations ON table_source.id = stations.icao LEFT JOIN table_target AS old USING (mexs_id); -ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target' +ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table 'table_target' REPLACE INTO view_target2 SELECT stations.mexs_id AS mexs_id, datetime AS messzeit FROM table_source @@ -40,7 +40,7 @@ INNER JOIN view_stations AS stations ON table_source.id = stations.icao LEFT JOIN view_target2 AS old USING (mexs_id); -ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'view_target2' +ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table 'view_target2' REPLACE INTO view_target3 SELECT stations.mexs_id AS mexs_id, datetime AS messzeit FROM table_source @@ -60,7 +60,7 @@ ON table_source.id = stations.icao LEFT JOIN table_target AS old USING (mexs_id); REPLACE INTO table_target2 VALUES ('00X45Y78','2006-07-12 07:50:00'); -ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target2' +ERROR 42000: INSERT, DELETE command denied to user 'user20989'@'localhost' for table 'table_target2' REPLACE INTO view_target2 VALUES ('12X45Y78','2006-07-12 07:50:00'); SELECT stations.mexs_id AS mexs_id, datetime AS messzeit FROM table_source diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index e991326cdce..55e5db231a9 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -603,7 +603,7 @@ select * from t2 /* must be (3,1), (4,4) */; a b 3 1 4 4 -show binlog events from ; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) @@ -616,7 +616,7 @@ insert into t2 values (1,2),(3,4),(4,4); reset master; UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a; ERROR 23000: Duplicate entry '4' for key 'PRIMARY' -show binlog events from ; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 774761a0229..43226436b6d 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -890,7 +890,7 @@ CREATE TABLE t1(id int); DROP TABLE t1; DROP DATABASE test1; FLUSH LOGS; -show binlog events in 'master-bin.000002' from ; +include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Query # # CREATE DATABASE test1 master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int) diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index ff591c6cb69..6f1b43b7b2b 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3642,8 +3642,8 @@ reset master; mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227) mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227) grant RELOAD on *.* to mysqltest_1@localhost; -mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation (1227) -mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation (1227) +mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation (1227) +mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation (1227) grant REPLICATION CLIENT on *.* to mysqltest_1@localhost; drop table t1; drop user mysqltest_1@localhost; diff --git a/mysql-test/r/old-mode.result b/mysql-test/r/old-mode.result index 6e6f9965e73..a27b637d6e3 100644 --- a/mysql-test/r/old-mode.result +++ b/mysql-test/r/old-mode.result @@ -18,4 +18,4 @@ test.t2 2948697075 drop table t1,t2; SHOW PROCESSLIST; Id User Host db Command Time State Info - root test Query