mariadb/mysql-test/suite/perfschema/r
Michael Widenius 2e100cc5a4 Fixes for parallel slave:
- Made slaves temporary table multi-thread slave safe by adding mutex around save_temporary_table usage.
  - rli->save_temporary_tables is the active list of all used temporary tables
  - This is copied to THD->temporary_tables when temporary tables are opened and updated when temporary tables are closed
  - Added THD->lock_temporary_tables() and THD->unlock_temporary_tables() to simplify this.
- Relay_log_info->sql_thd renamed to Relay_log_info->sql_driver_thd to avoid wrong usage for merged code.
- Added is_part_of_group() to mark functions that are part of the next function. This replaces setting IN_STMT when events are executed.
- Added is_begin(), is_commit() and is_rollback() functions to Query_log_event to simplify code.
- If slave_skip_counter is set run things in single threaded mode. This simplifies code for skipping events.
- Updating state of relay log (IN_STMT and IN_TRANSACTION) is moved to one single function: update_state_of_relay_log()
  We can't use OPTION_BEGIN to check for the state anymore as the sql_driver and sql execution threads may be different.
  Clear IN_STMT and IN_TRANSACTION in init_relay_log_pos() and Relay_log_info::cleanup_context() to ensure the flags doesn't survive slave restarts
  is_in_group() is now independent of state of executed transaction.
- Reset thd->transaction.all.modified_non_trans_table() if we did set it for single table row events.
  This was mainly for keeping the flag as documented.
- Changed slave_open_temp_tables to uint32 to be able to use atomic operators on it.
- Relay_log_info::sleep_lock -> rpl_group_info::sleep_lock
- Relay_log_info::sleep_cond -> rpl_group_info::sleep_cond
- Changed some functions to take rpl_group_info instead of Relay_log_info to make them multi-slave safe and to simplify usage
  - do_shall_skip()
  - continue_group()
  - sql_slave_killed()
  - next_event()
- Simplifed arguments to io_salve_killed(), check_io_slave_killed() and sql_slave_killed(); No reason to supply THD as this is part of the given structure.
- set_thd_in_use_temporary_tables() removed as in_use is set on usage
- Added information to thd_proc_info() which thread is waiting for slave mutex to exit.
- In open_table() reuse code from find_temporary_table()

Other things:
- More DBUG statements
- Fixed the rpl_incident.test can be run with --debug
- More comments
- Disabled not used function rpl_connect_master()

mysql-test/suite/perfschema/r/all_instances.result:
  Moved sleep_lock and sleep_cond to rpl_group_info
mysql-test/suite/rpl/r/rpl_incident.result:
  Updated result
mysql-test/suite/rpl/t/rpl_incident-master.opt:
  Not needed anymore
mysql-test/suite/rpl/t/rpl_incident.test:
  Fixed that test can be run with --debug
sql/handler.cc:
  More DBUG_PRINT
sql/log.cc:
  More comments
sql/log_event.cc:
  Added DBUG statements
  do_shall_skip(), continue_group() now takes rpl_group_info param
  Use is_begin(), is_commit() and is_rollback() functions instead of inspecting query string
  We don't have set slaves temporary tables 'in_use' as this is now done when tables are opened.
  Removed IN_STMT flag setting. This is now done in update_state_of_relay_log()
  Use IN_TRANSACTION flag to test state of relay log.
  In rows_event_stmt_cleanup() reset thd->transaction.all.modified_non_trans_table if we had set this before.
sql/log_event.h:
  do_shall_skip(), continue_group() now takes rpl_group_info param
  Added is_part_of_group() to mark events that are part of the next event. This replaces setting IN_STMT when events are executed.
  Added is_begin(), is_commit() and is_rollback() functions to Query_log_event to simplify code.
sql/log_event_old.cc:
  Removed IN_STMT flag setting. This is now done in update_state_of_relay_log()
  do_shall_skip(), continue_group() now takes rpl_group_info param
sql/log_event_old.h:
  Added is_part_of_group() to mark events that are part of the next event.
  do_shall_skip(), continue_group() now takes rpl_group_info param
sql/mysqld.cc:
  Changed slave_open_temp_tables to uint32 to be able to use atomic operators on it.
  Relay_log_info::sleep_lock -> Rpl_group_info::sleep_lock
  Relay_log_info::sleep_cond -> Rpl_group_info::sleep_cond
sql/mysqld.h:
  Updated types and names
sql/rpl_gtid.cc:
  More DBUG
sql/rpl_parallel.cc:
  Updated TODO section
  Set thd for event that is execution
  Use new  is_begin(), is_commit() and is_rollback() functions.
  More comments
sql/rpl_rli.cc:
  sql_thd -> sql_driver_thd
  Relay_log_info::sleep_lock -> rpl_group_info::sleep_lock
  Relay_log_info::sleep_cond -> rpl_group_info::sleep_cond
  Clear IN_STMT and IN_TRANSACTION in init_relay_log_pos() and Relay_log_info::cleanup_context() to ensure the flags doesn't survive slave restarts.
  Reset table->in_use for temporary tables as the table may have been used by another THD.
  Use IN_TRANSACTION instead of OPTION_BEGIN to check state of relay log.
  Removed IN_STMT flag setting. This is now done in update_state_of_relay_log()
sql/rpl_rli.h:
  Changed relay log state flags to bit masks instead of bit positions (most other code we have uses bit masks)
  Added IN_TRANSACTION to mark if we are in a BEGIN ... COMMIT section.
  save_temporary_tables is now thread safe
  Relay_log_info::sleep_lock -> rpl_group_info::sleep_lock
  Relay_log_info::sleep_cond -> rpl_group_info::sleep_cond
  Relay_log_info->sql_thd renamed to Relay_log_info->sql_driver_thd to avoid wrong usage for merged code
  is_in_group() is now independent of state of executed transaction.
sql/slave.cc:
  Simplifed arguments to io_salve_killed(), sql_slave_killed() and check_io_slave_killed(); No reason to supply THD as this is part of the given structure.
  set_thd_in_use_temporary_tables() removed as in_use is set on usage in sql_base.cc
  sql_thd -> sql_driver_thd
  More DBUG
  Added update_state_of_relay_log() which will calculate the IN_STMT and IN_TRANSACTION state of the relay log after the current element is executed.
  If slave_skip_counter is set run things in single threaded mode.
  Simplifed arguments to io_salve_killed(), check_io_slave_killed() and sql_slave_killed(); No reason to supply THD as this is part of the given structure.
  Added information to thd_proc_info() which thread is waiting for slave mutex to exit.
  Disabled not used function rpl_connect_master()
  Updated argument to next_event()
sql/sql_base.cc:
  Added mutex around usage of slave's temporary tables. The active list is always kept up to date in sql->rgi_slave->save_temporary_tables.
  Clear thd->temporary_tables after query (safety)
  More DBUG
  When using temporary table, set table->in_use to current thd as the THD may be different for slave threads.
  Some code is ifdef:ed with REMOVE_AFTER_MERGE_WITH_10 as the given code in 10.0 is not yet in this tree.
  In open_table() reuse code from find_temporary_table()
sql/sql_binlog.cc:
  rli->sql_thd -> rli->sql_driver_thd
  Remove duplicate setting of rgi->rli
sql/sql_class.cc:
  Added helper functions rgi_lock_temporary_tables() and rgi_unlock_temporary_tables()
  Would have been nicer to have these inline, but there was no easy way to do that
sql/sql_class.h:
  Added functions to protect slaves temporary tables
sql/sql_parse.cc:
  Added DBUG_PRINT
sql/transaction.cc:
  Added comment
2013-10-14 00:24:05 +03:00
..
aggregate.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
all_instances.result Fixes for parallel slave: 2013-10-14 00:24:05 +03:00
bad_option_1.result WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
bad_option_2.result WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
bad_option_3.result Bug#55873 short startup options do not work in 5.5 2010-08-25 18:59:28 -06:00
bad_option_4.result Bug#55873 short startup options do not work in 5.5 2010-08-25 18:59:28 -06:00
bad_option_5.result Bug#55873 short startup options do not work in 5.5 2010-08-25 18:59:28 -06:00
binlog_mix.result MDEV-26: Global transaction ID 2013-03-26 10:35:34 +01:00
binlog_row.result MDEV-26: Global transaction ID 2013-03-26 10:35:34 +01:00
binlog_stmt.result MDEV-26: Global transaction ID 2013-03-26 10:35:34 +01:00
checksum.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
cnf_option.result WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
column_privilege.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_cond_instances.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_events_waits_current.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_events_waits_history.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_events_waits_history_long.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_ews_by_instance.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_ews_by_thread_by_event_name.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_ews_global_by_event_name.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_file_instances.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_fs_by_event_name.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_fs_by_instance.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_mutex_instances.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_performance_timers.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_rwlock_instances.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_setup_consumers.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_setup_instruments.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_setup_timers.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
ddl_threads.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
dml_cond_instances.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_events_waits_current.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_events_waits_history.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_events_waits_history_long.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_ews_by_instance.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_ews_by_thread_by_event_name.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_ews_global_by_event_name.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_file_instances.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_file_summary_by_event_name.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_file_summary_by_instance.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_mutex_instances.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_performance_timers.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_rwlock_instances.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
dml_setup_consumers.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
dml_setup_instruments.result MDEV-4506: Parallel replication: Intermediate commit. 2013-07-09 13:15:53 +02:00
dml_setup_timers.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
dml_threads.result Added text for errno in error messages by: 2012-05-30 00:37:55 +03:00
func_file_io.result Bug#14072995 - PERFSCHEMA.FUNC_FILE_IO FAILS WITH RESULT CONTENT MISMATCH OCASSIONALLY ON PB2 2012-09-07 11:07:20 +02:00
func_mutex.result Speed up connection time: 2013-03-25 11:13:42 +02:00
global_read_lock.result Merge from mysql-5.5-bugteam to mysql-5.5-runtime 2010-11-12 12:23:17 +01:00
information_schema.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
misc.result error messages: name the storage engine explicitly, 2013-04-09 23:27:07 +02:00
myisam_file_io.result Added procedures to delete records by keys from statistical tables. 2012-07-10 16:34:39 -07:00
no_threads.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
one_thread_per_con.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
pfs_upgrade.result Buildbot fixes and cleanups: 2013-01-11 02:03:43 +02:00
privilege.result error messages: name the storage engine explicitly, 2013-04-09 23:27:07 +02:00
query_cache.result Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED 2012-07-03 09:55:51 +05:30
read_only.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
relaylog.result MDEV-26: Global transaction ID. 2013-03-28 10:34:43 +01:00
schema.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
selects.result Fix for 2011-06-16 22:35:01 +02:00
server_init.result 5.3.4 merge 2012-02-15 18:08:08 +01:00
short_option_1.result merge with 5.3 2011-10-19 21:45:18 +02:00
short_option_2.result Bug#55873 short startup options do not work in 5.5 2010-08-25 18:59:28 -06:00
start_server_no_cond_class.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_cond_inst.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_file_class.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_file_inst.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_mutex_class.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_mutex_inst.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_rwlock_class.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_rwlock_inst.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_thread_class.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_thread_inst.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_no_waits_history.result Bug#16060864 SEGMENTATION FAULT IN PERFORMANCE_SCHEMA WITH HISTORY SIZE 0 2013-01-02 11:00:55 +01:00
start_server_no_waits_history_long.result Bug#16060864 SEGMENTATION FAULT IN PERFORMANCE_SCHEMA WITH HISTORY SIZE 0 2013-01-02 11:00:55 +01:00
start_server_nothing.result Bug#16060864 SEGMENTATION FAULT IN PERFORMANCE_SCHEMA WITH HISTORY SIZE 0 2013-01-02 11:00:55 +01:00
start_server_off.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
start_server_on.result Bug#57609 performance_schema does not work with lower_case_table_names 2010-11-03 16:42:33 +01:00
tampered_perfschema_table1.result Merge mysql-5.5-bugteam --> local bugfixing branch 2010-11-08 18:14:30 +01:00
thread_cache.result Bug#56618 Thread_ID is not assigned in ascending sequence (after disconnect) 2010-12-01 11:10:15 +01:00