WL#9394: Move GTID enabled tests to binlog_gtid suite and GTID disabled tests to binlog_nogtid

Status: Complete

Currently in MTR, binlog suite run tests with GTID_MODE=ON and GTID_MODE=OFF. 
However, the binlog tests use the rpl suite configuration files for GTID 
enabled tests.

The objective of this work-log is to identify binlog tests which can run:

1. only with gtid_mode=ON and move them into a separate suite binlog_gtid
2. only with gtid_mode=OFF and move them into a separate suite binlog_nogtid
3. tests which are independent of GTID modes or can run with both gtid_mode=ON
   and gtid_mode=OFF will be retained in the existing binlog suite

The same changes will be done for binlog internal suites.At the end of this WL, 
we will have the following test suites:

1. binlog
2. binlog_gtid
3. binlog_nogtid
4. i_binlog
5. i_binlog_gtid
6. i_binlog_nogtid

Configuration file details:

1. binlog and i_binlog will use default_mysqld.cnf
2. binlog_nogtid and i_binlog_nogtid will use default_mysqld.cnf. 
3. binlog_gtid and i_binlog_gtid will have 2 new .cnf files created.

User Documentation
==================

Work was done for test suite. No user documentation needed.
FR1. All binlog tests that DO require GTID_MODE=ON SHALL be moved to new suites
     binlog_gtid & i_binlog_gtid.

FR2. All binlog tests that DO require GTID_MODE=OFF SHALL be moved to new suites 
     binlog_nogtid & i_binlog_nogtid.

FR3. All binlog tests that DO NOT require any specific GTID mode (can run with
     both GTID_MODE=ON and GTID_MODE=OFF) will be retained in the binlog &
     i_binlog suites
     
FR4. suite binlog_gtid WILL be added in the MTR default suite(s) list.

FR5. suite binlog_nogtid WILL be added in the MTR default suite(s) list.

FR6. binlog_gtid & binlog_nogtid WILL run with 2 new configuration files (.cnf)
     with GTID_MODE=ON and GTID_MODE=OFF respectively.

FR7. Reference of "have_gtid.inc" and "not_gtid_enabled.inc" will be removed from
     all the binlog tests.
Currently, in binlog tests, the presence of have_gtid.inc is internally mapped in 
MTR code to identify it as an rpl_gtid test.

The presence of "have_gtid.inc" will allow the binlog tests to use the 
configuration file of rpl_gtid suite. If "have_gtid.inc" is removed from the 
binlog tests, the test will fail as binlog suite does not have it's own .cnf file.

This is a limitation and should be eliminated.
Below is the list of binlog tests that will be migrated:

Tests that will be migrated to binlog_gtid; Also the corresponding result files 
will also be migrated.

1. binlog_group_commit_gtid_order.test
2. binlog_gtid_cache.test
3. binlog_gtid_errors.test
4. binlog_gtid_exhausted.test
5. binlog_gtid_implicit_commit.test
6. binlog_gtid_innodb.test
7. binlog_gtid_mix_ok_packet_all_gtids.test
8. binlog_gtid_mix_response_packet.test
9. binlog_gtid_mysqlbinlog_row_innodb.test
10. binlog_gtid_mysqlbinlog_row_myisam.test
11. binlog_gtid_mysqlbinlog_row.test
12. binlog_gtid_mysqlbinlog_start_stop.test
13. binlog_gtid_next_begin_caused_trx.test
14. binlog_gtid_next_partially_failed_grant.test
15. binlog_gtid_next_partially_failed_stmts.test
16. binlog_gtid_row_ctype_ucs.test
17. binlog_gtids_table_gcov.test
18. binlog_gtid_stm_ctype_ucs.test
19. binlog_gtid_utils.test
20. binlog_mts_logical_clock_gtid.test
21. binlog_mysqlbinlog_concat.test
22. binlog_simulate_crash_and_error_on_compress_gtid_table.test
23. binlog_wait_for_executed_gtid_set_interrupted.test
24. binlog_wait_for_executed_gtid_set_invalid_input.test
25. binlog_wait_for_executed_gtid_set_unsafe_statement.test
26. binlog_xa_modify_gtid_executed_explicitly.test
27. binlog_xa_select_gtid_executed_explicitly_crash.test
28. binlog_xa_trx_gtid_response_packet.test


Test that will be migrated to binlog_nogtid; Also the corresponding result file 
will also be migrated.

1. binlog_bug23533.test
2. binlog_enforce_gtid_consistency_multiple_warnings.test
3. binlog_enforce_gtid_consistency_option.test
4. binlog_enforce_gtid_consistency_tmp_consistent.test
5. binlog_enforce_gtid_consistency_tmp_violation.test
6. binlog_gtid_mode_set_gtid_next.test
7. binlog_gtid_next_single_stmt_trx_rollback.test
8. binlog_gtid_next_temporary_table.test
9. binlog_gtid_simple_recovery.test
10. binlog_gtid_state_update_deadlock.test
11. binlog_implicit_commit.test
12. binlog_innodb.test
13. binlog_mixed_cache_stat.test
14. binlog_mts_logical_clock.test
15. binlog_mysqlbinlog_row_innodb.test
16. binlog_mysqlbinlog_row_myisam.test
17. binlog_mysqlbinlog_row.test
18. binlog_mysqlbinlog_row_trans.test
19. binlog_mysqlbinlog_start_stop_slave_server_id.test
20. binlog_mysqlbinlog_start_stop.test
21. binlog_nogtid_mix_response_packet.test
22. binlog_old_versions.test
23. binlog_row_binlog.test
24. binlog_row_cache_stat.test
25. binlog_row_create_select_crash.test
26. binlog_row_ctype_cp932.test
27. binlog_row_ctype_ucs.test
28. binlog_row_insert_select.test
29. binlog_row_mix_innodb_myisam.test
30. binlog_set_gtid_mode_ongoing_transaction_errors.test
31. binlog_spurious_ddl_errors.test
32. binlog_stm_binlog.test
33. binlog_stm_cache_stat.test
34. binlog_stm_ctype_cp932.test
35. binlog_stm_ctype_ucs.test
36. binlog_stm_insert_select.test
37. binlog_stm_mix_innodb_myisam.test
38. binlog_unsafe.test
39. binlog_wait_for_executed_gtid_set_no_gtid.test
40. binlog_anonymous_ownership.test

Following .opt files will be migrated to binlog_gtid suite.

1. binlog_gtid_cache-master.opt
2. binlog_gtid_errors-master.opt
3. binlog_gtid_exhausted-master.opt
4. binlog_gtid_mix_ok_packet_all_gtids-master.opt
5. binlog_gtid_mix_response_packet-master.opt
6. binlog_xa_trx_gtid_response_packet-master.opt

Following .opt files will be migrated to binlog_nogtid suite:

1. binlog_enforce_gtid_consistency_multiple_warnings-master.opt
2. binlog_innodb-master.opt
3. binlog_row_binlog-master.opt
4. binlog_row_mix_innodb_myisam-master.opt
5. binlog_set_gtid_mode_ongoing_transaction_errors-master.opt
6. binlog_spurious_ddl_errors-master.opt
7. binlog_stm_binlog-master.opt
8. binlog_stm_cache_stat-master.opt
9. binlog_stm_mix_innodb_myisam-master.opt
10. binlog_unsafe-master.opt

=========
I_BINLOG
=========

Tests that will be migrated to i_binlog_gtid; The corresponding result file 
will also be migrated.

1. binlog_gtid_get_string_length.test
2. binlog_gtid_mixed_mysqlbinlog.test
3. binlog_gtid_next_valgrind.test
4. binlog_gtid_rollback_statement.test
5. binlog_gtid_set_gtid_next.test
6. binlog_load_longsetexpr.test
7. binlog_mix_gtid_errors.test

Opt files that will be migrated to i_binlog_gtid: 

1. binlog_gtid_get_string_length-master.opt
2. binlog_gtid_mixed_mysqlbinlog-master.opt
3. binlog_gtid_next_valgrind-master.opt
4. binlog_gtid_rollback_statement-master.opt
5. binlog_load_longsetexpr-master.opt

Test that will be migrated to i_binlog_nogtid; The corresponding result 
file will also be migrated.

1. binlog_client_5_5_filter_perf_schema.test
2. binlog_corrupted_field_length.test
3. binlog_gtid_for_backups_gtid_mode_off.test

Opt files that will be migrated to i_binlog_gtid:

1. binlog_gtid_for_backups_gtid_mode_off-master.opt

=========
Clean up
=========

As part of clean-up process, dangling opt/result files will be removed from the 
system. Dangling result/opt files are those for which we do not have the 
corresponding test files.

We cases are found below:
 
Dangling opt files will be removed from the suite:

1. binlog_row_innodb_stat-master.opt
2. binlog_stm_innodb_stat-master.opt

Dangling .result file will be removed from the suite:

1. binlog_trx_empty_assertions.result

===========
cnf files
===========

1. Below my.cnf will be used for binlog_gtid:
#############################################################################
my.cnf
#############################################################################
# Use settings from binlog_1slave_base.cnf
# add setting to connect the slave to the master by default
!include binlog_1slave_base.cnf
!include include/default_client.cnf

[mysqld]
gtid-mode=on
enforce-gtid-consistency
log-slave-updates

#############################################################################
binlog_1slave_base.cnf
#############################################################################
# Use default setting for mysqld processes
!include include/default_mysqld.cnf

# Set innodb-write-io-threads and innodb-read-io-threads to 2,
# instead of the default value 4, so that the aio-max-nr limit is
# not exceeded when MTR runs rpl tests with parallel 4 or more due
# to increased number of concurrent mysqld instances.

[mysqld.1]

# Run the master.sh script before starting this process
#!run-master-sh

log-bin=                 master-bin

loose-innodb_write_io_threads=    2
loose-innodb_read_io_threads=     2

2. Below my.cnf file will be used for i_binlog_gtid suite:
#############################################################################
my.cnf
#############################################################################
# Use configuration file of binlog_gtid suite
!include suite/binlog_gtid/my.cnf