From fc8a7655327ac389b54be52c05e47f3ea9710851 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 15 Sep 2022 12:06:55 +0200 Subject: [PATCH 1/9] MDEV-29480 spider group by handler wrong result on order by aggregate alias when generating a query to send to a remote server, spider generates new aliases for all tables in the query (at least in the group_by handler). First it walks all the expressions and create a list of new table aliases to use for each field. Then - in init_scan() - it actually generates the query, taking for each field the next alias from the list. It dives recursively into functions, for example, for func(f1) it'll go in, will see the field f1 and append to the list the new name for the table of f1. This works fine for non-aggregate functions and for aggregate functions in the SELECT list. But aggregate functions in the ORDER BY are always references to the select list, they never need to be qualified with a table name. That is, even if there is a field name as an argument of an aggregate function in the ORDER BY it must not append a table alias to the list. Let's just skip aggregate functions when analyzing ORDER BY for table aliases. This fixes spider/bugfix.mdev_29008 (was observed on aarch64, x86, ppc64le, and amd64 --rr) --- storage/spider/spd_group_by_handler.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/spider/spd_group_by_handler.cc b/storage/spider/spd_group_by_handler.cc index de041897239..635bff3d415 100644 --- a/storage/spider/spd_group_by_handler.cc +++ b/storage/spider/spd_group_by_handler.cc @@ -1857,6 +1857,8 @@ group_by_handler *spider_create_group_by_handler( { for (order = query->order_by; order; order = order->next) { + if ((*order->item)->type() == Item::SUM_FUNC_ITEM) + continue; if (spider_db_print_item_type((*order->item), NULL, spider, NULL, NULL, 0, roop_count, TRUE, fields_arg)) { From b6bf7cd192f7fb3c8463c2c924a0b934398f4d5f Mon Sep 17 00:00:00 2001 From: Brandon Nesterenko Date: Fri, 16 Sep 2022 08:36:11 -0600 Subject: [PATCH 2/9] MDEV-28986: rpl tests sometimes failing on freebsd builders The rpl_row_img_sequence test can fail on resource constrained buildbot machines due to its high space consumption. To reduce this footprint, the test is split into three parts, one for each value of the binlog_row_img variable. --- .../suite/rpl/r/rpl_row_img_sequence.result | 2290 ----------------- .../rpl/r/rpl_row_img_sequence_full.result | 767 ++++++ .../rpl/r/rpl_row_img_sequence_min.result | 797 ++++++ .../rpl/r/rpl_row_img_sequence_noblob.result | 796 ++++++ ...ence.cnf => rpl_row_img_sequence_full.cnf} | 0 .../rpl/t/rpl_row_img_sequence_full.test | 48 + .../suite/rpl/t/rpl_row_img_sequence_min.cnf | 21 + ...nce.test => rpl_row_img_sequence_min.test} | 29 +- .../rpl/t/rpl_row_img_sequence_noblob.cnf | 21 + .../rpl/t/rpl_row_img_sequence_noblob.test | 51 + 10 files changed, 2509 insertions(+), 2311 deletions(-) delete mode 100644 mysql-test/suite/rpl/r/rpl_row_img_sequence.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_img_sequence_full.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_img_sequence_min.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_img_sequence_noblob.result rename mysql-test/suite/rpl/t/{rpl_row_img_sequence.cnf => rpl_row_img_sequence_full.cnf} (100%) create mode 100644 mysql-test/suite/rpl/t/rpl_row_img_sequence_full.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf rename mysql-test/suite/rpl/t/{rpl_row_img_sequence.test => rpl_row_img_sequence_min.test} (63%) create mode 100644 mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf create mode 100644 mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.test diff --git a/mysql-test/suite/rpl/r/rpl_row_img_sequence.result b/mysql-test/suite/rpl/r/rpl_row_img_sequence.result deleted file mode 100644 index aa9fb34ec02..00000000000 --- a/mysql-test/suite/rpl/r/rpl_row_img_sequence.result +++ /dev/null @@ -1,2290 +0,0 @@ -include/rpl_init.inc [topology=1->2->3] -connection server_1; -connection server_2; -connection server_3; -connection server_1; -# -# Test Case 1) binlog_row_image=MINIMAL should write only columns -# 1 and 8 to the binary log -# -CON: 'server_1', IMG: 'MINIMAL', RESTART SLAVE: 'N' -connection server_1; -SET SESSION binlog_row_image= 'MINIMAL'; -SET GLOBAL binlog_row_image= 'MINIMAL'; -FLUSH TABLES; -SHOW VARIABLES LIKE 'binlog_row_image'; -Variable_name Value -binlog_row_image MINIMAL -CON: 'server_2', IMG: 'MINIMAL', RESTART SLAVE: 'Y' -connection server_2; -SET SESSION binlog_row_image= 'MINIMAL'; -SET GLOBAL binlog_row_image= 'MINIMAL'; -include/stop_slave.inc -include/start_slave.inc -FLUSH TABLES; -SHOW VARIABLES LIKE 'binlog_row_image'; -Variable_name Value -binlog_row_image MINIMAL -CON: 'server_3', IMG: 'MINIMAL', RESTART SLAVE: 'Y' -connection server_3; -SET SESSION binlog_row_image= 'MINIMAL'; -SET GLOBAL binlog_row_image= 'MINIMAL'; -include/stop_slave.inc -include/start_slave.inc -FLUSH TABLES; -SHOW VARIABLES LIKE 'binlog_row_image'; -Variable_name Value -binlog_row_image MINIMAL -connection server_1; -### engines: MyISAM, MyISAM, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: MyISAM, MyISAM, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: MyISAM, InnoDB, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: MyISAM, InnoDB, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, MyISAM, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, MyISAM, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, InnoDB, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, InnoDB, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -# -# Test Case 2) binlog_row_image=NOBLOB should write all columns to the -# binary log -# -CON: 'server_1', IMG: 'NOBLOB', RESTART SLAVE: 'N' -connection server_1; -SET SESSION binlog_row_image= 'NOBLOB'; -SET GLOBAL binlog_row_image= 'NOBLOB'; -FLUSH TABLES; -SHOW VARIABLES LIKE 'binlog_row_image'; -Variable_name Value -binlog_row_image NOBLOB -CON: 'server_2', IMG: 'NOBLOB', RESTART SLAVE: 'Y' -connection server_2; -SET SESSION binlog_row_image= 'NOBLOB'; -SET GLOBAL binlog_row_image= 'NOBLOB'; -include/stop_slave.inc -include/start_slave.inc -FLUSH TABLES; -SHOW VARIABLES LIKE 'binlog_row_image'; -Variable_name Value -binlog_row_image NOBLOB -CON: 'server_3', IMG: 'NOBLOB', RESTART SLAVE: 'Y' -connection server_3; -SET SESSION binlog_row_image= 'NOBLOB'; -SET GLOBAL binlog_row_image= 'NOBLOB'; -include/stop_slave.inc -include/start_slave.inc -FLUSH TABLES; -SHOW VARIABLES LIKE 'binlog_row_image'; -Variable_name Value -binlog_row_image NOBLOB -connection server_3; -### engines: MyISAM, MyISAM, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: MyISAM, MyISAM, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: MyISAM, InnoDB, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: MyISAM, InnoDB, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, MyISAM, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, MyISAM, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, InnoDB, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, InnoDB, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -# -# Test Case 3) binlog_row_image=NOBLOB should write all columns to the -# binary log -# -CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N' -connection server_1; -SET SESSION binlog_row_image= 'FULL'; -SET GLOBAL binlog_row_image= 'FULL'; -FLUSH TABLES; -SHOW VARIABLES LIKE 'binlog_row_image'; -Variable_name Value -binlog_row_image FULL -CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y' -connection server_2; -SET SESSION binlog_row_image= 'FULL'; -SET GLOBAL binlog_row_image= 'FULL'; -include/stop_slave.inc -include/start_slave.inc -FLUSH TABLES; -SHOW VARIABLES LIKE 'binlog_row_image'; -Variable_name Value -binlog_row_image FULL -CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y' -connection server_3; -SET SESSION binlog_row_image= 'FULL'; -SET GLOBAL binlog_row_image= 'FULL'; -include/stop_slave.inc -include/start_slave.inc -FLUSH TABLES; -SHOW VARIABLES LIKE 'binlog_row_image'; -Variable_name Value -binlog_row_image FULL -connection server_3; -### engines: MyISAM, MyISAM, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: MyISAM, MyISAM, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: MyISAM, InnoDB, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: MyISAM, InnoDB, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, MyISAM, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, MyISAM, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, InnoDB, MyISAM -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -### engines: InnoDB, InnoDB, InnoDB -# Create sequences with specific engines per server -connection server_1; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/save_master_gtid.inc -connection server_2; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -connection server_3; -SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; -include/sync_with_master_gtid.inc -# Pt.1 Ensure SETVAL replicates and binlogs correctly -connection server_1; -SELECT SETVAL(s1, 10); -SETVAL(s1, 10) -10 -include/save_master_gtid.inc -# Validate SETVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged SETVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged SETVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged SETVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Pt.2 Ensure NEXTVAL replicates and binlogs correctly -connection server_1; -SELECT NEXTVAL(s1); -NEXTVAL(s1) -11 -include/save_master_gtid.inc -# Validate NEXTVAL replicated correctly to other servers -connection server_3; -include/sync_with_master_gtid.inc -include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] -# Validate server_1 binlogged NEXTVAL with the correct columns -connection server_1; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_2 binlogged NEXTVAL with the correct columns -connection server_2; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Validate server_3 binlogged NEXTVAL with the correct columns -connection server_3; -FLUSH LOGS; -include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] -# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file -# Verifying all expected column ids appear in binlog event output.. -# ..success -# Verifying only expected column ids appear in binlog event output.. -# ..success -# Cleanup -connection server_1; -DROP TABLE s1; -include/save_master_gtid.inc -connection server_3; -include/sync_with_master_gtid.inc -include/rpl_end.inc -# End of tests diff --git a/mysql-test/suite/rpl/r/rpl_row_img_sequence_full.result b/mysql-test/suite/rpl/r/rpl_row_img_sequence_full.result new file mode 100644 index 00000000000..2303911637f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_img_sequence_full.result @@ -0,0 +1,767 @@ +include/rpl_init.inc [topology=1->2->3] +connection server_1; +connection server_2; +connection server_3; +connection server_1; +# +# binlog_row_image=FULL should write all columns to the binary log +# +CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N' +connection server_1; +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y' +connection server_2; +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y' +connection server_3; +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +connection server_1; +### engines: MyISAM, MyISAM, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: MyISAM, MyISAM, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: MyISAM, InnoDB, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: MyISAM, InnoDB, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, MyISAM, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, MyISAM, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, InnoDB, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, InnoDB, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +include/rpl_end.inc +# End of tests diff --git a/mysql-test/suite/rpl/r/rpl_row_img_sequence_min.result b/mysql-test/suite/rpl/r/rpl_row_img_sequence_min.result new file mode 100644 index 00000000000..eaf770f245c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_img_sequence_min.result @@ -0,0 +1,797 @@ +include/rpl_init.inc [topology=1->2->3] +connection server_1; +connection server_2; +connection server_3; +connection server_1; +# +# binlog_row_image=MINIMAL should write only columns 1 and 8 to the +# binary log +# +CON: 'server_1', IMG: 'MINIMAL', RESTART SLAVE: 'N' +connection server_1; +SET SESSION binlog_row_image= 'MINIMAL'; +SET GLOBAL binlog_row_image= 'MINIMAL'; +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image MINIMAL +CON: 'server_2', IMG: 'MINIMAL', RESTART SLAVE: 'Y' +connection server_2; +SET SESSION binlog_row_image= 'MINIMAL'; +SET GLOBAL binlog_row_image= 'MINIMAL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image MINIMAL +CON: 'server_3', IMG: 'MINIMAL', RESTART SLAVE: 'Y' +connection server_3; +SET SESSION binlog_row_image= 'MINIMAL'; +SET GLOBAL binlog_row_image= 'MINIMAL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image MINIMAL +connection server_1; +### engines: MyISAM, MyISAM, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: MyISAM, MyISAM, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: MyISAM, InnoDB, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: MyISAM, InnoDB, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, MyISAM, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, MyISAM, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, InnoDB, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, InnoDB, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N' +connection server_1; +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y' +connection server_2; +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y' +connection server_3; +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +connection server_3; +include/rpl_end.inc +# End of tests diff --git a/mysql-test/suite/rpl/r/rpl_row_img_sequence_noblob.result b/mysql-test/suite/rpl/r/rpl_row_img_sequence_noblob.result new file mode 100644 index 00000000000..496bd8dc6b8 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_img_sequence_noblob.result @@ -0,0 +1,796 @@ +include/rpl_init.inc [topology=1->2->3] +connection server_1; +connection server_2; +connection server_3; +connection server_1; +# +# binlog_row_image=NOBLOB should write all columns to the binary logs +# +CON: 'server_1', IMG: 'NOBLOB', RESTART SLAVE: 'N' +connection server_1; +SET SESSION binlog_row_image= 'NOBLOB'; +SET GLOBAL binlog_row_image= 'NOBLOB'; +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image NOBLOB +CON: 'server_2', IMG: 'NOBLOB', RESTART SLAVE: 'Y' +connection server_2; +SET SESSION binlog_row_image= 'NOBLOB'; +SET GLOBAL binlog_row_image= 'NOBLOB'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image NOBLOB +CON: 'server_3', IMG: 'NOBLOB', RESTART SLAVE: 'Y' +connection server_3; +SET SESSION binlog_row_image= 'NOBLOB'; +SET GLOBAL binlog_row_image= 'NOBLOB'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image NOBLOB +connection server_1; +### engines: MyISAM, MyISAM, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: MyISAM, MyISAM, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: MyISAM, InnoDB, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: MyISAM, InnoDB, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, MyISAM, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, MyISAM, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, InnoDB, MyISAM +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +### engines: InnoDB, InnoDB, InnoDB +# Create sequences with specific engines per server +connection server_1; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/save_master_gtid.inc +connection server_2; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +connection server_3; +SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB; +include/sync_with_master_gtid.inc +# Pt.1 Ensure SETVAL replicates and binlogs correctly +connection server_1; +SELECT SETVAL(s1, 10); +SETVAL(s1, 10) +10 +include/save_master_gtid.inc +# Validate SETVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged SETVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged SETVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged SETVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Pt.2 Ensure NEXTVAL replicates and binlogs correctly +connection server_1; +SELECT NEXTVAL(s1); +NEXTVAL(s1) +11 +include/save_master_gtid.inc +# Validate NEXTVAL replicated correctly to other servers +connection server_3; +include/sync_with_master_gtid.inc +include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1] +# Validate server_1 binlogged NEXTVAL with the correct columns +connection server_1; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_2 binlogged NEXTVAL with the correct columns +connection server_2; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Validate server_3 binlogged NEXTVAL with the correct columns +connection server_3; +FLUSH LOGS; +include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)] +# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +# Verifying all expected column ids appear in binlog event output.. +# ..success +# Verifying only expected column ids appear in binlog event output.. +# ..success +# Cleanup +connection server_1; +DROP TABLE s1; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N' +connection server_1; +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y' +connection server_2; +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y' +connection server_3; +SET SESSION binlog_row_image= 'FULL'; +SET GLOBAL binlog_row_image= 'FULL'; +include/stop_slave.inc +include/start_slave.inc +FLUSH TABLES; +SHOW VARIABLES LIKE 'binlog_row_image'; +Variable_name Value +binlog_row_image FULL +connection server_3; +include/rpl_end.inc +# End of tests diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf similarity index 100% rename from mysql-test/suite/rpl/t/rpl_row_img_sequence.cnf rename to mysql-test/suite/rpl/t/rpl_row_img_sequence_full.cnf diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.test b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.test new file mode 100644 index 00000000000..a0c6aa4dc7a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_full.test @@ -0,0 +1,48 @@ +# +# Purpose: +# The rpl_row_img_sequence group of tests verify that sequence MDL updates, +# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when +# written into the binary log. In particular, it ensures that only changed +# columns are written with MINIMAL image mode, and all columns are written +# otherwise. This test focuses on validating the behavior of +# binlog_row_img=FULL. +# +# Methodology +# After issuing a sequence update, ensure that both 1) it was replicated +# correctly, and 2) it was binlogged respective to the binlog_row_image value. +# The sequence table does not use caching to ensure each update is immediately +# binlogged. Each command is binlogged into its own unique log file, and the +# entirety of the file is analyzed for correctness of its sequence event. +# Specifically, mysqlbinlog is used in verbose mode so it outputs the columns +# which belong to the event, and the columns are analyzed to ensure the correct +# ones were logged. rpl_row_img_general_loop.inc is used to test with multiple +# chained replicas, varying engines between InnoDB and MyISAM. +# +# References: +# MDEV-28487: sequences not respect value of binlog_row_image with select +# nextval(seq_gen) +# + +--let $rpl_topology= 1->2->3 +--source include/rpl_init.inc +--source include/have_binlog_format_row.inc + +--connection server_1 +--source include/have_innodb.inc +--connection server_2 +--source include/have_innodb.inc +--connection server_3 +--source include/have_innodb.inc +--connection server_1 + +--echo # +--echo # binlog_row_image=FULL should write all columns to the binary log +--echo # +--let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y +--source include/rpl_row_img_set.inc +--let $expected_columns=(1,2,3,4,5,6,7,8) +--let row_img_test_script= include/rpl_row_img_sequence.inc +--source include/rpl_row_img_general_loop.inc + +--source include/rpl_end.inc +--echo # End of tests diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf new file mode 100644 index 00000000000..7104b4e4502 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.cnf @@ -0,0 +1,21 @@ +!include include/default_mysqld.cnf + +[mysqld.1] +log-slave-updates +innodb +gtid_domain_id=0 + +[mysqld.2] +log-slave-updates +innodb +gtid_domain_id=1 + +[mysqld.3] +log-slave-updates +innodb +gtid_domain_id=2 + +[ENV] +SERVER_MYPORT_1= @mysqld.1.port +SERVER_MYPORT_2= @mysqld.2.port +SERVER_MYPORT_3= @mysqld.3.port diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence.test b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.test similarity index 63% rename from mysql-test/suite/rpl/t/rpl_row_img_sequence.test rename to mysql-test/suite/rpl/t/rpl_row_img_sequence_min.test index 23860fb2de5..0a3b2827ffa 100644 --- a/mysql-test/suite/rpl/t/rpl_row_img_sequence.test +++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_min.test @@ -1,9 +1,11 @@ # # Purpose: -# This test verifies that sequence DML updates, i.e. NEXTVAL and SETVAL, -# respect the binlog_row_image variable value when written into the binary log. -# In particular, it ensures that only changed columns are written with MINIMAL -# image mode, and all columns are written otherwise. +# The rpl_row_img_sequence group of tests verify that sequence MDL updates, +# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when +# written into the binary log. In particular, it ensures that only changed +# columns are written with MINIMAL image mode, and all columns are written +# otherwise. This test focuses on validating the behavior of +# binlog_row_img=MINIMAL. # # Methodology # After issuing a sequence update, ensure that both 1) it was replicated @@ -34,8 +36,8 @@ --connection server_1 --echo # ---echo # Test Case 1) binlog_row_image=MINIMAL should write only columns ---echo # 1 and 8 to the binary log +--echo # binlog_row_image=MINIMAL should write only columns 1 and 8 to the +--echo # binary log --echo # --let $row_img_set=server_1:MINIMAL:N,server_2:MINIMAL:Y,server_3:MINIMAL:Y --source include/rpl_row_img_set.inc @@ -43,23 +45,8 @@ --let row_img_test_script= include/rpl_row_img_sequence.inc --source include/rpl_row_img_general_loop.inc ---echo # ---echo # Test Case 2) binlog_row_image=NOBLOB should write all columns to the ---echo # binary log ---echo # ---let $row_img_set=server_1:NOBLOB:N,server_2:NOBLOB:Y,server_3:NOBLOB:Y ---source include/rpl_row_img_set.inc ---let $expected_columns=(1,2,3,4,5,6,7,8) ---source include/rpl_row_img_general_loop.inc - ---echo # ---echo # Test Case 3) binlog_row_image=NOBLOB should write all columns to the ---echo # binary log ---echo # --let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y --source include/rpl_row_img_set.inc ---let $expected_columns=(1,2,3,4,5,6,7,8) ---source include/rpl_row_img_general_loop.inc --source include/rpl_end.inc --echo # End of tests diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf new file mode 100644 index 00000000000..7104b4e4502 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.cnf @@ -0,0 +1,21 @@ +!include include/default_mysqld.cnf + +[mysqld.1] +log-slave-updates +innodb +gtid_domain_id=0 + +[mysqld.2] +log-slave-updates +innodb +gtid_domain_id=1 + +[mysqld.3] +log-slave-updates +innodb +gtid_domain_id=2 + +[ENV] +SERVER_MYPORT_1= @mysqld.1.port +SERVER_MYPORT_2= @mysqld.2.port +SERVER_MYPORT_3= @mysqld.3.port diff --git a/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.test b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.test new file mode 100644 index 00000000000..38ff469f22f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_img_sequence_noblob.test @@ -0,0 +1,51 @@ +# +# Purpose: +# The rpl_row_img_sequence group of tests verify that sequence MDL updates, +# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when +# written into the binary log. In particular, it ensures that only changed +# columns are written with MINIMAL image mode, and all columns are written +# otherwise. This test focuses on validating the behavior of +# binlog_row_img=NOBLOB. +# +# Methodology +# After issuing a sequence update, ensure that both 1) it was replicated +# correctly, and 2) it was binlogged respective to the binlog_row_image value. +# The sequence table does not use caching to ensure each update is immediately +# binlogged. Each command is binlogged into its own unique log file, and the +# entirety of the file is analyzed for correctness of its sequence event. +# Specifically, mysqlbinlog is used in verbose mode so it outputs the columns +# which belong to the event, and the columns are analyzed to ensure the correct +# ones were logged. rpl_row_img_general_loop.inc is used to test with multiple +# chained replicas, varying engines between InnoDB and MyISAM. +# +# References: +# MDEV-28487: sequences not respect value of binlog_row_image with select +# nextval(seq_gen) +# + +--let $rpl_topology= 1->2->3 +--source include/rpl_init.inc +--source include/have_binlog_format_row.inc + +--connection server_1 +--source include/have_innodb.inc +--connection server_2 +--source include/have_innodb.inc +--connection server_3 +--source include/have_innodb.inc +--connection server_1 + +--echo # +--echo # binlog_row_image=NOBLOB should write all columns to the binary logs +--echo # +--let $row_img_set=server_1:NOBLOB:N,server_2:NOBLOB:Y,server_3:NOBLOB:Y +--source include/rpl_row_img_set.inc +--let $expected_columns=(1,2,3,4,5,6,7,8) +--let row_img_test_script= include/rpl_row_img_sequence.inc +--source include/rpl_row_img_general_loop.inc + +--let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y +--source include/rpl_row_img_set.inc + +--source include/rpl_end.inc +--echo # End of tests From b9c1c07f83936ac972ace191c77e6f9d8b03302b Mon Sep 17 00:00:00 2001 From: Ian Gilfillan Date: Wed, 31 Aug 2022 10:22:29 +0200 Subject: [PATCH 3/9] MDEV-29275 Fix server/Docs typos --- Docs/README-wsrep | 6 +++--- Docs/myisam.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Docs/README-wsrep b/Docs/README-wsrep index 79278ed8927..2e3bf52219d 100644 --- a/Docs/README-wsrep +++ b/Docs/README-wsrep @@ -365,7 +365,7 @@ wsrep_forced_binlog_format=none special value NONE, meaning that there is no forced binlog format in effect. This variable was introduced to support STATEMENT format replication during rolling schema upgrade processing. However, in most cases ROW replication - is valid for asymmetrict schema replication. + is valid for asymmetric schema replication. State snapshot transfer options. @@ -416,7 +416,7 @@ wsrep_sst_donor= 6. ONLINE SCHEMA UPGRADE - Schema upgrades mean any data definition statements (DDL statemnents) run + Schema upgrades mean any data definition statements (DDL statements) run for the database. They change the database structure and are non- transactional. @@ -429,7 +429,7 @@ wsrep_sst_donor= With earlier releases, DDL processing happened always by Total Order Isolation (TOI) method. With TOI, the DDL was scheduled to be processed in - same transaction seqeuncing 'slot' in each cluster node. + same transaction sequencing 'slot' in each cluster node. The processing is secured by locking the affected table from any other use. With TOI method, the whole cluster has part of the database locked for the duration of the DDL processing. diff --git a/Docs/myisam.txt b/Docs/myisam.txt index db41fb911ca..f959d8eb775 100644 --- a/Docs/myisam.txt +++ b/Docs/myisam.txt @@ -177,7 +177,7 @@ HA_EXTRA_NO_KEYREAD=8 Normal read of records (def) HA_EXTRA_NO_USER_CHANGE=9 No user is allowed to write HA_EXTRA_KEY_CACHE=10 HA_EXTRA_NO_KEY_CACHE=11 -HA_EXTRA_WAIT_LOCK=12 Wait until file is avalably (def) +HA_EXTRA_WAIT_LOCK=12 Wait until file is available (def) HA_EXTRA_NO_WAIT_LOCK=13 If file is locked, return quickly HA_EXTRA_WRITE_CACHE=14 Use write cache in ha_write() HA_EXTRA_FLUSH_CACHE=15 flush write_record_cache From f5e4e15403a4aaad67eb5ec1755798d2b9e08f9f Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Tue, 13 Sep 2022 11:46:28 +0900 Subject: [PATCH 4/9] Backport fix for MDEV-29352 to 10.3-10.5 The fix for MDEV-29352 was pushed to 10.6+ but the code causing the bug is old and the bug is unlikely to be a recent regression in 10.6. So, we apply the fix also to older versions, 10.3-10.5. The original commit message: MDEV-29352 SIGSEGV's in strlen and unknown location on optimized builds at SHUTDOWN When the UDF creation frails to write the newly created UDF into the related system table, the UDF is still created in memory. However, as it is now, the related DLL is unloaded in this case right in the mysql_create_function. And failure happens when the UDF handle is freed and tries to unload the respective DLL which is still unloaded. --- sql/sql_udf.cc | 5 +++-- .../spider/bugfix/include/restart_spider.inc | 8 ++++++++ .../mysql-test/spider/bugfix/r/mdev_29352.result | 12 ++++++++++++ .../mysql-test/spider/bugfix/t/mdev_29352.test | 11 +++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_29352.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_29352.test diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index d0657cf973e..86423c64f3f 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -606,7 +606,7 @@ int mysql_create_function(THD *thd,udf_func *udf) /* Allow creation of functions even if we can't open func table */ if (unlikely(!table)) - goto err; + goto err_open_func_table; table->use_all_columns(); restore_record(table, s->default_values); // Default values for fields table->field[0]->store(u_d->name.str, u_d->name.length, system_charset_info); @@ -620,7 +620,7 @@ int mysql_create_function(THD *thd,udf_func *udf) { my_error(ER_ERROR_ON_WRITE, MYF(0), "mysql.func", error); del_udf(u_d); - goto err; + goto err_open_func_table; } done: @@ -635,6 +635,7 @@ done: err: if (new_dl) dlclose(dl); +err_open_func_table: mysql_rwlock_unlock(&THR_LOCK_udf); DBUG_RETURN(1); } diff --git a/storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc b/storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc new file mode 100644 index 00000000000..a5446a6188d --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc @@ -0,0 +1,8 @@ +--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.1.expect + +--exec echo "wait" > $_expect_file_name +--shutdown_server +--source include/wait_until_disconnected.inc +--exec echo "restart" > $_expect_file_name +--enable_reconnect +--source include/wait_until_connected_again.inc diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_29352.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_29352.result new file mode 100644 index 00000000000..5715edf2bd6 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_29352.result @@ -0,0 +1,12 @@ +CREATE TABLE t (c INT); +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `c` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +FLUSH TABLES WITH READ LOCK; +CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so'; +ERROR HY000: Can't execute the query because you have a conflicting read lock +SELECT * FROM t; +c +DROP TABLE t; diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_29352.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_29352.test new file mode 100644 index 00000000000..00d8ee73ebc --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_29352.test @@ -0,0 +1,11 @@ +CREATE TABLE t (c INT); +SHOW CREATE TABLE t; +FLUSH TABLES WITH READ LOCK; + +--error ER_CANT_UPDATE_WITH_READLOCK +CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so'; +SELECT * FROM t; + +--source include/restart_spider.inc + +DROP TABLE t; From 2d5cfdc570350d663aea52c8f4ca58d481ce8f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 22 Sep 2022 11:08:17 +0300 Subject: [PATCH 5/9] Cleanup: Remove redundant output from a test --- .../suite/innodb/r/innodb-table-online.result | 34 ------------------- .../suite/innodb/t/innodb-table-online.test | 34 ------------------- 2 files changed, 68 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result index 806c2bbc455..1f788f45dca 100644 --- a/mysql-test/suite/innodb/r/innodb-table-online.result +++ b/mysql-test/suite/innodb/r/innodb-table-online.result @@ -18,15 +18,12 @@ ddl_log_file_alter_table 0 SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'write_row_noreplace SIGNAL have_handle WAIT_FOR go_ahead'; INSERT INTO t1 VALUES(1,2,3); -# Establish session con1 (user=root) connect con1,localhost,root,,; -connection con1; SET DEBUG_SYNC = 'now WAIT_FOR have_handle'; SET lock_wait_timeout = 1; ALTER TABLE t1 ROW_FORMAT=REDUNDANT; ERROR HY000: Lock wait timeout exceeded; try restarting transaction SET DEBUG_SYNC = 'now SIGNAL go_ahead'; -# session default connection default; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; @@ -37,7 +34,6 @@ ddl_online_create_index 0 ddl_pending_alter_table 0 ddl_sort_file_alter_table 0 ddl_log_file_alter_table 0 -# session con1 connection con1; SET @saved_debug_dbug = @@SESSION.debug_dbug; SET DEBUG_DBUG = '+d,innodb_OOM_prepare_inplace_alter'; @@ -55,7 +51,6 @@ SET SESSION DEBUG = @saved_debug_dbug; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE; -# session default connection default; SHOW CREATE TABLE t1; Table Create Table @@ -67,22 +62,17 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=REDUNDANT BEGIN; INSERT INTO t1 VALUES(7,4,2); -# session con1 connection con1; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done'; ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2); ERROR HY000: Lock wait timeout exceeded; try restarting transaction -# session default connection default; COMMIT; -# session con1 connection con1; ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2); ERROR 23000: Duplicate entry '4' for key 'c2' -# session default connection default; DELETE FROM t1 WHERE c1 = 7; -# session con1 connection con1; ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ROW_FORMAT=COMPACT, LOCK = SHARED, ALGORITHM = INPLACE; @@ -100,7 +90,6 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `c2_2` (`c2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=COMPACT ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1); -# session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR scanned'; SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; @@ -114,13 +103,10 @@ ddl_log_file_alter_table 0 BEGIN; INSERT INTO t1 VALUES(4,7,2); SET DEBUG_SYNC = 'now SIGNAL insert_done'; -# session con1 connection con1; ERROR 23000: Duplicate entry '4' for key 'PRIMARY' -# session default connection default; ROLLBACK; -# session con1 connection con1; SHOW CREATE TABLE t1; Table Create Table @@ -142,7 +128,6 @@ ddl_online_create_index 0 ddl_pending_alter_table 0 ddl_sort_file_alter_table 0 ddl_log_file_alter_table 0 -# session default connection default; INSERT INTO t1 VALUES(6,3,1); ERROR 23000: Duplicate entry '3' for key 'c2_2' @@ -152,14 +137,12 @@ DROP INDEX c2_2 ON t1; BEGIN; INSERT INTO t1 VALUES(7,4,2); ROLLBACK; -# session con1 connection con1; KILL QUERY @id; ERROR 70100: Query execution was interrupted SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done'; SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done'; ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -# session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR rebuilt'; SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; @@ -176,7 +159,6 @@ ROLLBACK; SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied'; KILL QUERY @id; SET DEBUG_SYNC = 'now SIGNAL kill_done'; -# session con1 connection con1; ERROR 70100: Query execution was interrupted SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; @@ -187,7 +169,6 @@ ddl_online_create_index 0 ddl_pending_alter_table 0 ddl_sort_file_alter_table 0 ddl_log_file_alter_table 0 -# session default connection default; CHECK TABLE t1; Table Op Msg_type Msg_text @@ -211,7 +192,6 @@ WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted'); SET @rowlog_encrypt_0= (SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted'); -# session con1 connection con1; SHOW CREATE TABLE t1; Table Create Table @@ -226,7 +206,6 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done SET lock_wait_timeout = 10; ALTER TABLE t1 ROW_FORMAT=COMPACT PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE; -# session default connection default; INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1; @@ -289,7 +268,6 @@ SELECT sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0 0 0 0 0 SET DEBUG_SYNC = 'now SIGNAL dml2_done'; -# session con1 connection con1; ERROR HY000: Creating index 'PRIMARY' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; @@ -320,7 +298,6 @@ ERROR 23000: Duplicate entry '5' for key 'PRIMARY' ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)), CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f, ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE; -# session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3'; SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; @@ -348,7 +325,6 @@ ddl_pending_alter_table 1 ddl_sort_file_alter_table 2 ddl_log_file_alter_table 2 SET DEBUG_SYNC = 'now SIGNAL dml3_done'; -# session con1 connection con1; SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; name count @@ -404,20 +380,16 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_ ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f, DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)), ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST; -# session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created0'; BEGIN; INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','YLETV2'); INSERT INTO t1 VALUES(33101,347,NULL,''); SET DEBUG_SYNC = 'now SIGNAL ins_done0'; -# session con1 connection con1; ERROR 01000: Data truncated for column 'c3' at row 323 -# session default connection default; ROLLBACK; -# session con1 connection con1; ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done'; @@ -425,14 +397,12 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f, ADD COLUMN c6 VARCHAR(1000) DEFAULT 'I love tracking down hard-to-reproduce bugs.', ADD PRIMARY KEY c3p5(c3(5), c6(2)); -# session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created'; SET DEBUG_SYNC = 'ib_after_row_insert SIGNAL ins_done WAIT_FOR ddl_timed_out'; INSERT INTO t1 VALUES(347,33101,NULL,''); ERROR 23000: Column 'c3' cannot be null INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti',''); -# session con1 connection con1; ERROR HY000: Lock wait timeout exceeded; try restarting transaction SET DEBUG_SYNC = 'now SIGNAL ddl_timed_out'; @@ -444,7 +414,6 @@ ddl_online_create_index 0 ddl_pending_alter_table 0 ddl_sort_file_alter_table 6 ddl_log_file_alter_table 2 -# session default connection default; SELECT COUNT(*) FROM t1; COUNT(*) @@ -462,12 +431,9 @@ c22f c1 c3 c4 5 36 36foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online 5 41 41foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online 5 46 46foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online -# session con1 connection con1; ALTER TABLE t1 DISCARD TABLESPACE; -# Disconnect session con1 disconnect con1; -# session default connection default; SHOW CREATE TABLE t1; Table Create Table diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test index ce014b0aa00..c48ce6331f2 100644 --- a/mysql-test/suite/innodb/t/innodb-table-online.test +++ b/mysql-test/suite/innodb/t/innodb-table-online.test @@ -30,9 +30,7 @@ SET DEBUG_SYNC = 'write_row_noreplace SIGNAL have_handle WAIT_FOR go_ahead'; --send INSERT INTO t1 VALUES(1,2,3); ---echo # Establish session con1 (user=root) connect (con1,localhost,root,,); -connection con1; # This should block at the end because of the INSERT in connection default # is holding a metadata lock. @@ -42,13 +40,11 @@ SET lock_wait_timeout = 1; ALTER TABLE t1 ROW_FORMAT=REDUNDANT; SET DEBUG_SYNC = 'now SIGNAL go_ahead'; ---echo # session default connection default; --error ER_DUP_ENTRY reap; eval $innodb_metrics_select; ---echo # session con1 connection con1; SET @saved_debug_dbug = @@SESSION.debug_dbug; SET DEBUG_DBUG = '+d,innodb_OOM_prepare_inplace_alter'; @@ -61,14 +57,12 @@ ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE; SET SESSION DEBUG = @saved_debug_dbug; ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE; ---echo # session default connection default; SHOW CREATE TABLE t1; # Insert a duplicate entry (4) for the upcoming UNIQUE INDEX(c2). BEGIN; INSERT INTO t1 VALUES(7,4,2); ---echo # session con1 connection con1; # This DEBUG_SYNC should not kick in yet, because the duplicate key will be # detected before we get a chance to apply the online log. @@ -78,20 +72,16 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_don --error ER_LOCK_WAIT_TIMEOUT ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2); ---echo # session default connection default; COMMIT; ---echo # session con1 connection con1; --error ER_DUP_ENTRY ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2); ---echo # session default connection default; DELETE FROM t1 WHERE c1 = 7; ---echo # session con1 connection con1; ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ROW_FORMAT=COMPACT, LOCK = SHARED, ALGORITHM = INPLACE; @@ -106,7 +96,6 @@ SHOW CREATE TABLE t1; --send ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1); ---echo # session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR scanned'; eval $innodb_metrics_select; @@ -116,7 +105,6 @@ BEGIN; INSERT INTO t1 VALUES(4,7,2); SET DEBUG_SYNC = 'now SIGNAL insert_done'; ---echo # session con1 connection con1; # Because the modification log will be applied in order and we did # not roll back before the log apply, there will be a duplicate key @@ -124,11 +112,9 @@ connection con1; --error ER_DUP_ENTRY reap; ---echo # session default connection default; ROLLBACK; ---echo # session con1 connection con1; SHOW CREATE TABLE t1; # Now, rebuild the table without any concurrent DML, while no duplicate exists. @@ -137,7 +123,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ALGORITHM = INPLACE; ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1), ALGORITHM = INPLACE; eval $innodb_metrics_select; ---echo # session default connection default; --error ER_DUP_ENTRY INSERT INTO t1 VALUES(6,3,1); @@ -148,7 +133,6 @@ BEGIN; INSERT INTO t1 VALUES(7,4,2); ROLLBACK; ---echo # session con1 connection con1; let $ID= `SELECT @id := CONNECTION_ID()`; --error ER_QUERY_INTERRUPTED @@ -159,7 +143,6 @@ SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done' --send ALTER TABLE t1 ROW_FORMAT=REDUNDANT; ---echo # session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR rebuilt'; eval $innodb_metrics_select; @@ -171,13 +154,11 @@ let $ignore= `SELECT @id := $ID`; KILL QUERY @id; SET DEBUG_SYNC = 'now SIGNAL kill_done'; ---echo # session con1 connection con1; --error ER_QUERY_INTERRUPTED reap; eval $innodb_metrics_select; ---echo # session default connection default; CHECK TABLE t1; INSERT INTO t1 SELECT 5 + c1, c2, c3 FROM t1; @@ -199,7 +180,6 @@ SET @rowlog_encrypt_0= (SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted'); ---echo # session con1 connection con1; SHOW CREATE TABLE t1; ALTER TABLE t1 ROW_FORMAT=REDUNDANT; @@ -217,7 +197,6 @@ PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE; # Generate some log (delete-mark, delete-unmark, insert etc.) # while the index creation is blocked. Some of this may run # in parallel with the clustered index scan. ---echo # session default connection default; INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1; @@ -261,7 +240,6 @@ SELECT # Release con1. SET DEBUG_SYNC = 'now SIGNAL dml2_done'; ---echo # session con1 connection con1; # If the following fails with the wrong error, it probably means that # you should rerun with a larger mtr --debug-sync-timeout. @@ -295,7 +273,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)), CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f, ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE; ---echo # session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3'; # Generate some log (delete-mark, delete-unmark, insert etc.) @@ -312,7 +289,6 @@ eval $innodb_metrics_select; # Release con1. SET DEBUG_SYNC = 'now SIGNAL dml3_done'; ---echo # session con1 connection con1; reap; eval $innodb_metrics_select; @@ -365,7 +341,6 @@ ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f, DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)), ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST; ---echo # session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created0'; @@ -374,16 +349,13 @@ INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','YLETV2'); INSERT INTO t1 VALUES(33101,347,NULL,''); SET DEBUG_SYNC = 'now SIGNAL ins_done0'; ---echo # session con1 connection con1; --error WARN_DATA_TRUNCATED reap; ---echo # session default connection default; ROLLBACK; ---echo # session con1 connection con1; ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL; @@ -394,7 +366,6 @@ ADD COLUMN c6 VARCHAR(1000) DEFAULT 'I love tracking down hard-to-reproduce bugs.', ADD PRIMARY KEY c3p5(c3(5), c6(2)); ---echo # session default connection default; SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created'; SET DEBUG_SYNC = 'ib_after_row_insert SIGNAL ins_done WAIT_FOR ddl_timed_out'; @@ -403,27 +374,22 @@ INSERT INTO t1 VALUES(347,33101,NULL,''); --send INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti',''); ---echo # session con1 connection con1; --error ER_LOCK_WAIT_TIMEOUT reap; SET DEBUG_SYNC = 'now SIGNAL ddl_timed_out'; eval $innodb_metrics_select; ---echo # session default connection default; reap; SELECT COUNT(*) FROM t1; ALTER TABLE t1 ROW_FORMAT=REDUNDANT; SELECT * FROM t1 LIMIT 10; ---echo # session con1 connection con1; ALTER TABLE t1 DISCARD TABLESPACE; ---echo # Disconnect session con1 disconnect con1; ---echo # session default connection default; SHOW CREATE TABLE t1; SET DEBUG_SYNC = 'RESET'; From ce23802c0e4c85018f2141d2ebb0602dc0d3d6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 22 Sep 2022 11:18:00 +0300 Subject: [PATCH 6/9] MDEV-29600 Memory leak in row_log_table_apply_update() row_log_table_apply_update(): Free the pcur.old_rec_buf before returning. It may be allocated by btr_pcur_store_position() inside btr_blob_log_check_t::check() and btr_store_big_rec_extern_fields(). This memory leak was introduced in commit 2e814d4702d71a04388386a9f591d14a35980bfe (MariaDB Server 10.2.2) via mysql/mysql-server@ce0a1e85e24e48b8171f767b44330da635a6ea0a (MySQL 5.7.5). --- .../suite/innodb/r/innodb-table-online.result | 18 ++++++++++++- .../suite/innodb/t/innodb-table-online.test | 25 ++++++++++++++++++- storage/innobase/row/row0log.cc | 6 +++-- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result index 1f788f45dca..ea56ea41c87 100644 --- a/mysql-test/suite/innodb/r/innodb-table-online.result +++ b/mysql-test/suite/innodb/r/innodb-table-online.result @@ -433,7 +433,6 @@ c22f c1 c3 c4 5 46 46foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online connection con1; ALTER TABLE t1 DISCARD TABLESPACE; -disconnect con1; connection default; SHOW CREATE TABLE t1; Table Create Table @@ -447,6 +446,23 @@ t1 CREATE TABLE `t1` ( SET DEBUG_SYNC = 'RESET'; SET GLOBAL innodb_monitor_disable = module_ddl; DROP TABLE t1; +# +# MDEV-29600 Memory leak in row_log_table_apply_update() +# +CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB; +INSERT INTO t1 SET pk=1; +connection con1; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated'; +ALTER TABLE t1 FORCE; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR created'; +UPDATE t1 SET f = REPEAT('a', 20000); +SET DEBUG_SYNC = 'now SIGNAL updated'; +connection con1; +disconnect con1; +connection default; +DROP TABLE t1; +SET DEBUG_SYNC = 'RESET'; SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig; SET GLOBAL innodb_monitor_enable = default; SET GLOBAL innodb_monitor_disable = default; diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test index c48ce6331f2..997b0a5bf10 100644 --- a/mysql-test/suite/innodb/t/innodb-table-online.test +++ b/mysql-test/suite/innodb/t/innodb-table-online.test @@ -388,7 +388,6 @@ SELECT * FROM t1 LIMIT 10; connection con1; ALTER TABLE t1 DISCARD TABLESPACE; -disconnect con1; connection default; SHOW CREATE TABLE t1; @@ -396,6 +395,30 @@ SET DEBUG_SYNC = 'RESET'; SET GLOBAL innodb_monitor_disable = module_ddl; DROP TABLE t1; +--echo # +--echo # MDEV-29600 Memory leak in row_log_table_apply_update() +--echo # + +CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB; +INSERT INTO t1 SET pk=1; + +connection con1; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated'; +send ALTER TABLE t1 FORCE; + +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR created'; +UPDATE t1 SET f = REPEAT('a', 20000); +SET DEBUG_SYNC = 'now SIGNAL updated'; + +connection con1; +reap; +disconnect con1; + +connection default; +DROP TABLE t1; +SET DEBUG_SYNC = 'RESET'; + # Check that all connections opened by test cases in this file are really # gone so execution of other tests won't be affected by their presence. --source include/wait_until_count_sessions.inc diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index 6095d72bb86..8bf70f61d07 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2021, MariaDB Corporation. +Copyright (c) 2017, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2169,6 +2169,7 @@ func_exit: } func_exit_committed: ut_ad(mtr.has_committed()); + ut_free(pcur.old_rec_buf); if (error != DB_SUCCESS) { /* Report the erroneous row using the new @@ -2356,7 +2357,8 @@ func_exit_committed: entry = row_build_index_entry(old_row, old_ext, index, heap); if (!entry) { ut_ad(0); - return(DB_CORRUPTION); + error = DB_CORRUPTION; + goto func_exit_committed; } mtr_start(&mtr); From db7e04ed3ab5d591a323443cb20c3a45792916b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 22 Sep 2022 08:46:30 +0300 Subject: [PATCH 7/9] MDEV-28868 : wsrep_incoming_address status variable prints 0 as port number if the port is not mentioned in wsrep_node_incoming_address system variable Problem was that mysqld_port is not set on set_ports() because it will be executed later. Fix is naturally fall back to MYSQL_PORT. --- sql/wsrep_mysqld.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 3a5db89d02b..743837f4ee1 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -652,11 +652,14 @@ static std::string wsrep_server_incoming_address() /* In case port is not specified in wsrep_node_incoming_address, we use mysqld_port. + Note that we might get here before we execute set_ports(). */ - int port= (addr.get_port() > 0) ? addr.get_port() : (int) mysqld_port; + int local_port= (addr.get_port() > 0) ? addr.get_port() : (int) mysqld_port; + if (!local_port) + local_port= MYSQL_PORT; const char *fmt= (addr.is_ipv6()) ? "[%s]:%u" : "%s:%u"; - snprintf(inc_addr, inc_addr_max, fmt, addr.get_address(), port); + snprintf(inc_addr, inc_addr_max, fmt, addr.get_address(), local_port); } done: From a69cf6f07ee7286d4813ef5c602d5b79b39d3028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 23 Sep 2022 13:40:42 +0300 Subject: [PATCH 8/9] MDEV-29613 Improve WITH_DBUG_TRACE=OFF In commit 28325b08633372cc343dfcbc41fe252020cf6e6e a compile-time option was introduced to disable the macros DBUG_ENTER and DBUG_RETURN or DBUG_VOID_RETURN. The parameter name WITH_DBUG_TRACE would hint that it also covers DBUG_PRINT statements. Let us do that: WITH_DBUG_TRACE=OFF shall disable DBUG_PRINT() as well. A few InnoDB recovery tests used to check that some output from DBUG_PRINT("ib_log", ...) is present. We can live without those checks. Reviewed by: Vladislav Vaintroub --- CMakeLists.txt | 6 +++-- extra/mariabackup/xtrabackup.cc | 8 +++--- include/my_dbug.h | 7 ++++-- .../encryption/r/debug_key_management.result | 1 - .../encryption/t/debug_key_management.test | 1 - .../suite/innodb/r/log_alter_table.result | 5 +--- .../suite/innodb/r/log_file_name_debug.result | 3 +-- .../suite/innodb/t/log_alter_table.test | 15 ----------- .../suite/innodb/t/log_file_name_debug.test | 4 +-- mysys/mf_keycache.c | 6 ++--- sql/debug_sync.cc | 25 +++++++++++-------- sql/event_queue.cc | 2 +- sql/field.cc | 6 ++--- sql/gcalc_slicescan.cc | 4 +++ sql/log.h | 2 +- sql/log_event.cc | 4 +-- sql/mdl.cc | 4 +-- sql/rpl_injector.h | 4 +-- sql/rpl_record.cc | 6 +++-- sql/slave.cc | 4 +-- sql/sql_binlog.cc | 15 ++++++----- sql/sql_cache.cc | 5 +++- sql/sql_class.cc | 2 +- sql/table.cc | 2 +- storage/innobase/que/que0que.cc | 4 +-- storage/maria/ma_check.c | 2 +- storage/maria/ma_loghandler.c | 6 ++--- storage/maria/ma_pagecache.c | 17 +++++++------ storage/maria/unittest/ma_pagecache_single.c | 6 +---- storage/myisam/mi_check.c | 2 +- storage/myisam/mi_create.c | 10 ++++---- 31 files changed, 89 insertions(+), 99 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94b459c583b..78ff7c0fb9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -248,9 +248,11 @@ ENDIF() INCLUDE(wsrep) -OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_EXIT()" ON) +OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_RETURN()/DBUG_PRINT()" ON) IF(WITH_DBUG_TRACE) - ADD_DEFINITIONS(-DDBUG_TRACE) + FOREACH(LANG C CXX) + SET(CMAKE_${LANG}_FLAGS_DEBUG "${CMAKE_${LANG}_FLAGS_DEBUG} -DDBUG_TRACE") + ENDFOREACH() ENDIF() # Always enable debug sync for debug builds. diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index a270a3edd04..714a7947b9e 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -6158,18 +6158,18 @@ static bool xtrabackup_prepare_func(char** argv) { for (int i= 0; i < got; i++) { -#ifndef DBUG_OFF +#ifdef DBUG_TRACE int rc= -#endif // !DBUG_OFF +#endif innobase_rollback_by_xid(NULL, xid_list + i); -#ifndef DBUG_OFF +#ifdef DBUG_TRACE if (rc == 0) { char buf[XIDDATASIZE * 4 + 6]; // see xid_to_str DBUG_PRINT("info", ("rollback xid %s", xid_to_str(buf, xid_list[i]))); } -#endif // !DBUG_OFF +#endif } } ut_d(recv_no_log_write= true); diff --git a/include/my_dbug.h b/include/my_dbug.h index 9ae482005b9..e69ee4f8ed5 100644 --- a/include/my_dbug.h +++ b/include/my_dbug.h @@ -74,6 +74,9 @@ extern int (*dbug_sanity)(void); _db_stack_frame_.line= 0; \ } while(0) +#define DBUG_PRINT(keyword,arglist) \ + do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0) + #ifdef HAVE_ATTRIBUTE_CLEANUP #define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_ __attribute__((cleanup(_db_return_))); \ _db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_) @@ -91,6 +94,7 @@ extern int (*dbug_sanity)(void); #define DBUG_ENTER(a) #define DBUG_RETURN(a1) return(a1) #define DBUG_VOID_RETURN return +#define DBUG_PRINT(keyword,arglist) do{} while(0) #endif #define DBUG_EXECUTE(keyword,a1) \ @@ -101,8 +105,6 @@ extern int (*dbug_sanity)(void); (_db_keyword_(0,(keyword), 0) ? (a1) : (a2)) #define DBUG_EVALUATE_IF(keyword,a1,a2) \ (_db_keyword_(0,(keyword), 1) ? (a1) : (a2)) -#define DBUG_PRINT(keyword,arglist) \ - do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0) #define DBUG_PUSH(a1) _db_push_ (a1) #define DBUG_POP() _db_pop_ () #define DBUG_SET(a1) _db_set_ (a1) @@ -164,6 +166,7 @@ extern void _db_suicide_(void); #define DBUG_LEAVE #define DBUG_RETURN(a1) do { return(a1); } while(0) #define DBUG_VOID_RETURN do { return; } while(0) +#define DBUG_PRINT(keyword, arglist) do { } while(0) #define DBUG_EXECUTE(keyword,a1) do { } while(0) #define DBUG_EXECUTE_IF(keyword,a1) do { } while(0) #define DBUG_EVALUATE(keyword,a1,a2) (a2) diff --git a/mysql-test/suite/encryption/r/debug_key_management.result b/mysql-test/suite/encryption/r/debug_key_management.result index 911a369f0c6..7fe681d52ae 100644 --- a/mysql-test/suite/encryption/r/debug_key_management.result +++ b/mysql-test/suite/encryption/r/debug_key_management.result @@ -15,7 +15,6 @@ set global debug_key_management_version=10; select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10; count(*) 0 -SET GLOBAL debug_dbug = '+d,ib_log'; SET GLOBAL innodb_log_checkpoint_now = 1; SET GLOBAL innodb_flush_log_at_trx_commit = 1; INSERT INTO t1 VALUES(NULL); diff --git a/mysql-test/suite/encryption/t/debug_key_management.test b/mysql-test/suite/encryption/t/debug_key_management.test index c370ecf5bd8..15a560d4c42 100644 --- a/mysql-test/suite/encryption/t/debug_key_management.test +++ b/mysql-test/suite/encryption/t/debug_key_management.test @@ -25,7 +25,6 @@ let $wait_condition= select count(*) = $tables_count from information_schema.inn select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10; # Test redo log key rotation and crash recovery. -SET GLOBAL debug_dbug = '+d,ib_log'; SET GLOBAL innodb_log_checkpoint_now = 1; SET GLOBAL innodb_flush_log_at_trx_commit = 1; INSERT INTO t1 VALUES(NULL); diff --git a/mysql-test/suite/innodb/r/log_alter_table.result b/mysql-test/suite/innodb/r/log_alter_table.result index 9de89bebaa6..db20982cbaa 100644 --- a/mysql-test/suite/innodb/r/log_alter_table.result +++ b/mysql-test/suite/innodb/r/log_alter_table.result @@ -11,11 +11,8 @@ INSERT INTO t1 VALUES (1,2); ALTER TABLE t1 ADD PRIMARY KEY(a), LOCK=SHARED, ALGORITHM=INPLACE; ALTER TABLE t1 DROP INDEX b, ADD INDEX (b), LOCK=SHARED; # Kill the server -# restart: --debug=d,ib_log -FOUND 2 /scan \d+: multi-log rec MLOG_FILE_CREATE2 len \d+ page \d+:0/ in mysqld.1.err -FOUND 3 /scan \d+: log rec MLOG_INDEX_LOAD/ in mysqld.1.err +# restart CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK -# restart DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/log_file_name_debug.result b/mysql-test/suite/innodb/r/log_file_name_debug.result index 2b81caa26b7..2ec4761e945 100644 --- a/mysql-test/suite/innodb/r/log_file_name_debug.result +++ b/mysql-test/suite/innodb/r/log_file_name_debug.result @@ -9,10 +9,9 @@ CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' FOUND 1 /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_3,ib_log --innodb-log-files-in-group=1 --innodb-log-file-size=4M +# restart: --debug=d,innodb_log_abort_3 --innodb-log-files-in-group=1 --innodb-log-file-size=4M SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' -FOUND 1 /ib_log: MLOG_CHECKPOINT.* written/ in mysqld.1.err # restart # restart DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/log_alter_table.test b/mysql-test/suite/innodb/t/log_alter_table.test index c92953f16a1..0b396078284 100644 --- a/mysql-test/suite/innodb/t/log_alter_table.test +++ b/mysql-test/suite/innodb/t/log_alter_table.test @@ -26,22 +26,7 @@ ALTER TABLE t1 DROP INDEX b, ADD INDEX (b), LOCK=SHARED; --let CLEANUP_IF_CHECKPOINT=DROP TABLE t1; --source include/no_checkpoint_end.inc ---let $restart_parameters= --debug=d,ib_log --source include/start_mysqld.inc -let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; -let SEARCH_ABORT=NOT FOUND; -# ensure that we have exactly 2 records there. -let SEARCH_PATTERN=scan \d+: multi-log rec MLOG_FILE_CREATE2 len \d+ page \d+:0; ---source include/search_pattern_in_file.inc -# ensure that we have exactly 3 records there. -let SEARCH_PATTERN=scan \d+: log rec MLOG_INDEX_LOAD; ---source include/search_pattern_in_file.inc - CHECK TABLE t1; - -# Remove the --debug=d,ib_log setting. ---let $restart_parameters= ---source include/restart_mysqld.inc - DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/log_file_name_debug.test b/mysql-test/suite/innodb/t/log_file_name_debug.test index 584d3dc1d5d..f8ce342503a 100644 --- a/mysql-test/suite/innodb/t/log_file_name_debug.test +++ b/mysql-test/suite/innodb/t/log_file_name_debug.test @@ -35,12 +35,10 @@ SELECT * FROM t1; --let SEARCH_PATTERN = InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either --source include/search_pattern_in_file.inc ---let $restart_parameters= --debug=d,innodb_log_abort_3,ib_log $resize +--let $restart_parameters= --debug=d,innodb_log_abort_3 $resize --source include/restart_mysqld.inc --error ER_UNKNOWN_STORAGE_ENGINE SELECT * FROM t1; ---let SEARCH_PATTERN= ib_log: MLOG_CHECKPOINT.* written ---source include/search_pattern_in_file.inc --let $restart_parameters= --source include/restart_mysqld.inc diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index f09739ae8af..568064b2a7c 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2017, MariaDB Corporation. + Copyright (c) 2017, 2022, MariaDB Corporation. 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 @@ -376,7 +376,7 @@ static void keycache_debug_print(const char *fmt,...); #define KEYCACHE_DBUG_ASSERT(a) DBUG_ASSERT(a) #endif /* defined(KEYCACHE_DEBUG_LOG) && defined(KEYCACHE_DEBUG) */ -#if defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF) +#if defined(KEYCACHE_DEBUG) || defined(DBUG_TRACE) static long keycache_thread_id; #define KEYCACHE_THREAD_TRACE(l) \ KEYCACHE_DBUG_PRINT(l,("|thread %ld",keycache_thread_id)) @@ -392,7 +392,7 @@ static long keycache_thread_id; #define KEYCACHE_THREAD_TRACE_BEGIN(l) #define KEYCACHE_THREAD_TRACE_END(l) #define KEYCACHE_THREAD_TRACE(l) -#endif /* defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF) */ +#endif /* defined(KEYCACHE_DEBUG) || defined(DBUG_TRACE) */ #define BLOCK_NUMBER(b) \ ((uint) (((char*)(b)-(char *) keycache->block_root)/sizeof(BLOCK_LINK))) diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc index c037af40e33..16ff4abafe1 100644 --- a/sql/debug_sync.cc +++ b/sql/debug_sync.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2009, 2013, Oracle and/or its affiliates. - Copyright (c) 2013, 2020, MariaDB + Copyright (c) 2013, 2022, MariaDB 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 @@ -326,7 +326,7 @@ static char *debug_sync_bmove_len(char *to, char *to_end, } -#if !defined(DBUG_OFF) +#ifdef DBUG_TRACE /** Create a string that describes an action. @@ -416,8 +416,7 @@ static void debug_sync_print_actions(THD *thd) DBUG_VOID_RETURN; } - -#endif /* !defined(DBUG_OFF) */ +#endif /* defined(DBUG_TRACE) */ /** @@ -748,6 +747,7 @@ static bool debug_sync_set_action(THD *thd, st_debug_sync_action *action) else { const char *dsp_name= action->sync_point.c_ptr(); +#ifdef DBUG_TRACE DBUG_EXECUTE("debug_sync", { /* Functions as DBUG_PRINT args can change keyword and line nr. */ const char *sig_emit= action->signal.c_ptr(); @@ -758,6 +758,7 @@ static bool debug_sync_set_action(THD *thd, st_debug_sync_action *action) dsp_name, action->activation_count, action->hit_limit, action->execute, action->timeout, sig_emit, sig_wait));}); +#endif /* Check this before sorting the array. action may move. */ is_dsp_now= !my_strcasecmp(system_charset_info, dsp_name, "now"); @@ -770,7 +771,9 @@ static bool debug_sync_set_action(THD *thd, st_debug_sync_action *action) sizeof(st_debug_sync_action), debug_sync_qsort_cmp); } } +#ifdef DBUG_TRACE DBUG_EXECUTE("debug_sync_list", debug_sync_print_actions(thd);); +#endif /* Execute the special sync point 'now' if activated above. */ if (is_dsp_now) @@ -1334,7 +1337,7 @@ uchar *debug_sync_value_ptr(THD *thd) static void debug_sync_execute(THD *thd, st_debug_sync_action *action) { -#ifndef DBUG_OFF +#ifdef DBUG_TRACE const char *dsp_name= action->sync_point.c_ptr(); const char *sig_emit= action->signal.c_ptr(); const char *sig_wait= action->wait_for.c_ptr(); @@ -1425,12 +1428,12 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action) restore_current_mutex = false; set_timespec(abstime, action->timeout); - DBUG_EXECUTE("debug_sync_exec", { + DBUG_EXECUTE("debug_sync_exec", /* Functions as DBUG_PRINT args can change keyword and line nr. */ - const char *sig_glob= debug_sync_global.ds_signal.c_ptr(); DBUG_PRINT("debug_sync_exec", ("wait for '%s' at: '%s' curr: '%s'", - sig_wait, dsp_name, sig_glob));}); + sig_wait, dsp_name, + debug_sync_global.ds_signal.c_ptr()));); /* Wait until global signal string matches the wait_for string. @@ -1444,12 +1447,12 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action) error= mysql_cond_timedwait(&debug_sync_global.ds_cond, &debug_sync_global.ds_mutex, &abstime); - DBUG_EXECUTE("debug_sync", { + DBUG_EXECUTE("debug_sync", /* Functions as DBUG_PRINT args can change keyword and line nr. */ - const char *sig_glob= debug_sync_global.ds_signal.c_ptr(); DBUG_PRINT("debug_sync", ("awoke from %s global: %s error: %d", - sig_wait, sig_glob, error));}); + sig_wait, debug_sync_global.ds_signal.c_ptr(), + error));); if (unlikely(error == ETIMEDOUT || error == ETIME)) { // We should not make the statement fail, even if in strict mode. diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 96a5e93cfe6..516bdc9158f 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -538,7 +538,7 @@ Event_queue::empty_queue() void Event_queue::dbug_dump_queue(my_time_t when) { -#ifndef DBUG_OFF +#ifdef DBUG_TRACE my_time_t now= when; Event_queue_element *et; uint i; diff --git a/sql/field.cc b/sql/field.cc index 148eaa71c00..853b0c62f14 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -3269,7 +3269,7 @@ bool Field_new_decimal::store_value(const my_decimal *decimal_value, DBUG_ASSERT(marked_for_write_or_computed()); int error= 0; DBUG_ENTER("Field_new_decimal::store_value"); -#ifndef DBUG_OFF +#ifdef DBUG_TRACE { char dbug_buff[DECIMAL_MAX_STR_LENGTH+2]; DBUG_PRINT("enter", ("value: %s", dbug_decimal_as_string(dbug_buff, decimal_value))); @@ -3284,7 +3284,7 @@ bool Field_new_decimal::store_value(const my_decimal *decimal_value, error= 1; decimal_value= &decimal_zero; } -#ifndef DBUG_OFF +#ifdef DBUG_TRACE { char dbug_buff[DECIMAL_MAX_STR_LENGTH+2]; DBUG_PRINT("info", ("saving with precision %d scale: %d value %s", @@ -3376,7 +3376,7 @@ int Field_new_decimal::store(const char *from, size_t length, } } -#ifndef DBUG_OFF +#ifdef DBUG_TRACE char dbug_buff[DECIMAL_MAX_STR_LENGTH+2]; DBUG_PRINT("enter", ("value: %s", dbug_decimal_as_string(dbug_buff, &decimal_value))); diff --git a/sql/gcalc_slicescan.cc b/sql/gcalc_slicescan.cc index b3752420316..c0794688b76 100644 --- a/sql/gcalc_slicescan.cc +++ b/sql/gcalc_slicescan.cc @@ -116,16 +116,20 @@ static void GCALC_DBUG_PRINT_PI(const Gcalc_heap::Info *pi) int n_buf; if (pi->type == Gcalc_heap::nt_intersection) { +#ifdef DBUG_TRACE const Gcalc_scan_iterator::intersection_info *ic= i_data(pi); GCALC_DBUG_PRINT(("intersection point %d %d", ic->edge_a->thread, ic->edge_b->thread)); +#endif return; } if (pi->type == Gcalc_heap::nt_eq_node) { +#ifdef DBUG_TRACE const Gcalc_scan_iterator::point *e= eq_sp(pi); GCALC_DBUG_PRINT(("eq point %d", e->thread)); +#endif return; } n_buf= gcalc_pi_str(buf, pi, ""); diff --git a/sql/log.h b/sql/log.h index ed4bcd9479c..1707a8c8831 100644 --- a/sql/log.h +++ b/sql/log.h @@ -726,7 +726,7 @@ public: } void harvest_bytes_written(Atomic_counter *counter) { -#ifndef DBUG_OFF +#ifdef DBUG_TRACE char buf1[22],buf2[22]; #endif DBUG_ENTER("harvest_bytes_written"); diff --git a/sql/log_event.cc b/sql/log_event.cc index 1d32760c084..914a4595b62 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2019, Oracle and/or its affiliates. - Copyright (c) 2009, 2021, MariaDB + Copyright (c) 2009, 2022, MariaDB 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 @@ -4557,7 +4557,7 @@ static void copy_str_and_move(const char **src, } -#ifndef DBUG_OFF +#ifdef DBUG_TRACE static char const * code_name(int code) { diff --git a/sql/mdl.cc b/sql/mdl.cc index 0a0f877d0e0..1a4d4c24d31 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -2278,7 +2278,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout) MDL_ticket *ticket; MDL_wait::enum_wait_status wait_status; DBUG_ENTER("MDL_context::acquire_lock"); -#ifndef DBUG_OFF +#ifdef DBUG_TRACE const char *mdl_lock_name= get_mdl_lock_name( mdl_request->key.mdl_namespace(), mdl_request->type)->str; #endif @@ -2304,7 +2304,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout) DBUG_RETURN(FALSE); } -#ifndef DBUG_OFF +#ifdef DBUG_TRACE const char *ticket_msg= dbug_print_mdl(ticket); #endif diff --git a/sql/rpl_injector.h b/sql/rpl_injector.h index ecf16ba28cf..6fff3fc2415 100644 --- a/sql/rpl_injector.h +++ b/sql/rpl_injector.h @@ -263,14 +263,14 @@ public: */ int check_state(enum_state const target_state) { -#ifndef DBUG_OFF +#ifdef DBUG_TRACE static char const *state_name[] = { "START_STATE", "TABLE_STATE", "ROW_STATE", "STATE_COUNT" }; - DBUG_ASSERT(target_state <= STATE_COUNT); DBUG_PRINT("info", ("In state %s", state_name[m_state])); #endif + DBUG_ASSERT(target_state <= STATE_COUNT); if (m_state <= target_state && target_state <= m_state + 1 && m_state < STATE_COUNT) diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index 7da296b47d9..6266acf7805 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2007, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2019, MariaDB Corporation. + Copyright (c) 2008, 2022, MariaDB Corporation. 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 @@ -319,7 +319,9 @@ unpack_row(rpl_group_info *rgi, normal unpack operation. */ uint16 const metadata= tabledef->field_metadata(i); - IF_DBUG(uchar const *const old_pack_ptr= pack_ptr;,) +#ifdef DBUG_TRACE + uchar const *const old_pack_ptr= pack_ptr; +#endif pack_ptr= f->unpack(f->ptr, pack_ptr, row_end, metadata); DBUG_PRINT("debug", ("field: %s; metadata: 0x%x;" diff --git a/sql/slave.cc b/sql/slave.cc index f883b13e7b5..d906066204e 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3831,7 +3831,7 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi, } #endif -#ifndef DBUG_OFF +#ifdef DBUG_TRACE /* This only prints information to the debug trace. @@ -3857,7 +3857,7 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi, if (exec_res == 0) { int error= ev->update_pos(rgi); - #ifndef DBUG_OFF +#ifdef DBUG_TRACE DBUG_PRINT("info", ("update_pos error = %d", error)); if (!rli->belongs_to_client()) { diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index f1326d97a21..9961cf6e137 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -41,14 +41,13 @@ static int check_event_type(int type, Relay_log_info *rli) */ if (fd_event && fd_event->event_type_permutation) { - IF_DBUG({ - int new_type= fd_event->event_type_permutation[type]; - DBUG_PRINT("info", - ("converting event type %d to %d (%s)", - type, new_type, - Log_event::get_type_str((Log_event_type)new_type))); - }, - (void)0); +#ifdef DBUG_TRACE + int new_type= fd_event->event_type_permutation[type]; + DBUG_PRINT("info", + ("converting event type %d to %d (%s)", + type, new_type, + Log_event::get_type_str((Log_event_type)new_type))); +#endif type= fd_event->event_type_permutation[type]; } diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 92189c30bee..d6e77cc1259 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -4762,7 +4762,7 @@ void Query_cache::cache_dump() void Query_cache::queries_dump() { - +#ifdef DBUG_TRACE if (!initialized) { DBUG_PRINT("qcache", ("Query Cache not initialized")); @@ -4823,11 +4823,13 @@ void Query_cache::queries_dump() DBUG_PRINT("qcache", ("no queries in list")); } DBUG_PRINT("qcache", ("------------------")); +#endif } void Query_cache::tables_dump() { +#ifdef DBUG_TRACE if (!initialized || query_cache_size == 0) { DBUG_PRINT("qcache", ("Query Cache not initialized")); @@ -4850,6 +4852,7 @@ void Query_cache::tables_dump() else DBUG_PRINT("qcache", ("no tables in list")); DBUG_PRINT("qcache", ("--------------------")); +#endif } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 4826597bb95..df3a7e2b704 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -7054,7 +7054,7 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end, bool is_transactional) } -#if !defined(DBUG_OFF) && !defined(_lint) +#if defined(DBUG_TRACE) && !defined(_lint) static const char * show_query_type(THD::enum_binlog_query_type qtype) { diff --git a/sql/table.cc b/sql/table.cc index 37a23d5b93e..ffbc75e6d7c 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -8583,7 +8583,7 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode) { /* Compute the actual value of the virtual fields */ DBUG_FIX_WRITE_SET(vf); -# ifndef DBUG_OFF +# ifdef DBUG_TRACE int field_error= # endif vcol_info->expr->save_in_field(vf, 0); diff --git a/storage/innobase/que/que0que.cc b/storage/innobase/que/que0que.cc index e98d50ea0fc..25631d0eec8 100644 --- a/storage/innobase/que/que0que.cc +++ b/storage/innobase/que/que0que.cc @@ -892,7 +892,7 @@ que_node_get_containing_loop_node( return(node); } -#ifndef DBUG_OFF +#ifdef DBUG_TRACE /** Gets information of an SQL query graph node. @return type description */ static MY_ATTRIBUTE((warn_unused_result, nonnull)) @@ -949,7 +949,7 @@ que_node_type_string( return("UNKNOWN NODE TYPE"); } } -#endif /* !DBUG_OFF */ +#endif /* DBUG_TRACE */ /**********************************************************************//** Performs an execution step on a query thread. diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index 98f9c49b9fa..fec443dfc56 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -1040,7 +1040,7 @@ static int chk_index(HA_CHECK *param, MARIA_HA *info, MARIA_KEYDEF *keyinfo, share->state.state.data_file_length) || (share->data_file_type == NO_RECORD && record != 0)) { -#ifndef DBUG_OFF +#ifdef DBUG_TRACE char llbuff2[22], llbuff3[22]; #endif _ma_check_print_error(param, diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index e2d8114c712..78f211c824e 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -2661,7 +2661,7 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer) i < buffer->size; i+= TRANSLOG_PAGE_SIZE, pg++) { -#ifndef DBUG_OFF +#ifdef DBUG_TRACE TRANSLOG_ADDRESS addr= (buffer->offset + i); #endif DBUG_PRINT("info", ("send log form %lu till %lu address: " LSN_FMT " " @@ -2908,7 +2908,7 @@ static my_bool translog_page_validator(int res, PAGECACHE_IO_HOOK_ARGS *args) uint flags; uchar *page_pos; TRANSLOG_FILE *data= (TRANSLOG_FILE *) args->data; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE pgcache_page_no_t offset= page_no * TRANSLOG_PAGE_SIZE; #endif DBUG_ENTER("translog_page_validator"); @@ -3268,7 +3268,7 @@ static my_bool translog_get_last_page_addr(TRANSLOG_ADDRESS *addr, my_off_t file_size; uint32 file_no= LSN_FILE_NO(*addr); TRANSLOG_FILE *file; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE char buff[21]; #endif DBUG_ENTER("translog_get_last_page_addr"); diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c index e411cfbd54c..029176feee3 100644 --- a/storage/maria/ma_pagecache.c +++ b/storage/maria/ma_pagecache.c @@ -184,7 +184,7 @@ struct st_pagecache_hash_link enum PCBLOCK_TEMPERATURE { PCBLOCK_COLD /*free*/ , PCBLOCK_WARM , PCBLOCK_HOT }; /* debug info */ -#ifndef DBUG_OFF +#ifdef DBUG_TRACE static const char *page_cache_page_type_str[]= { /* used only for control page type changing during debugging */ @@ -219,8 +219,9 @@ static const char *page_cache_page_pin_str[]= "unpinned -> pinned", "pinned -> unpinned" }; +#endif /* DBUG_TRACE */ - +#ifndef DBUG_OFF typedef struct st_pagecache_pin_info { struct st_pagecache_pin_info *next, **prev; @@ -549,7 +550,7 @@ static void pagecache_debug_print _VARARGS((const char *fmt, ...)); #define KEYCACHE_DBUG_ASSERT(a) DBUG_ASSERT(a) #endif /* defined(PAGECACHE_DEBUG_LOG) && defined(PAGECACHE_DEBUG) */ -#if defined(PAGECACHE_DEBUG) || !defined(DBUG_OFF) +#if defined(PAGECACHE_DEBUG) || defined(DBUG_TRACE) static long pagecache_thread_id; #define KEYCACHE_THREAD_TRACE(l) \ KEYCACHE_DBUG_PRINT(l,("|thread %ld",pagecache_thread_id)) @@ -566,7 +567,7 @@ static long pagecache_thread_id; #define KEYCACHE_THREAD_TRACE_BEGIN(l) #define KEYCACHE_THREAD_TRACE_END(l) #define KEYCACHE_THREAD_TRACE(l) -#endif /* defined(PAGECACHE_DEBUG) || !defined(DBUG_OFF) */ +#endif /* defined(PAGECACHE_DEBUG) || defined(DBUG_TRACE) */ #define PCBLOCK_NUMBER(p, b) \ ((uint) (((char*)(b)-(char *) p->block_root)/sizeof(PAGECACHE_BLOCK_LINK))) @@ -3345,8 +3346,9 @@ uchar *pagecache_read(PAGECACHE *pagecache, unlock_pin= lock_to_pin[buff==0][lock].unlock_pin; PAGECACHE_BLOCK_LINK *fake_link; my_bool reg_request; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE char llbuf[22]; +#endif DBUG_ENTER("pagecache_read"); DBUG_PRINT("enter", ("fd: %u page: %s buffer: %p level: %u " "t:%s (%d)%s->%s %s->%s", @@ -3361,7 +3363,6 @@ uchar *pagecache_read(PAGECACHE *pagecache, DBUG_ASSERT(buff != 0 || (buff == 0 && (unlock_pin == PAGECACHE_PIN || unlock_pin == PAGECACHE_PIN_LEFT_PINNED))); DBUG_ASSERT(pageno < ((1ULL) << 40)); -#endif if (!page_link) page_link= &fake_link; @@ -3976,8 +3977,9 @@ my_bool pagecache_write_part(PAGECACHE *pagecache, my_bool error= 0; int need_lock_change= write_lock_change_table[lock].need_lock_change; my_bool reg_request; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE char llbuf[22]; +#endif DBUG_ENTER("pagecache_write_part"); DBUG_PRINT("enter", ("fd: %u page: %s level: %u type: %s lock: %s " "pin: %s mode: %s offset: %u size %u", @@ -3992,7 +3994,6 @@ my_bool pagecache_write_part(PAGECACHE *pagecache, DBUG_ASSERT(lock != PAGECACHE_LOCK_READ_UNLOCK); DBUG_ASSERT(offset + size <= pagecache->block_size); DBUG_ASSERT(pageno < ((1ULL) << 40)); -#endif if (!page_link) page_link= &fake_link; diff --git a/storage/maria/unittest/ma_pagecache_single.c b/storage/maria/unittest/ma_pagecache_single.c index 00e6efad0e6..3fcaf4e5c5c 100644 --- a/storage/maria/unittest/ma_pagecache_single.c +++ b/storage/maria/unittest/ma_pagecache_single.c @@ -661,14 +661,10 @@ err: static void *test_thread(void *arg) { -#ifndef DBUG_OFF - int param= *((int*) arg); -#endif - my_thread_init(); { DBUG_ENTER("test_thread"); - DBUG_PRINT("enter", ("param: %d", param)); + DBUG_PRINT("enter", ("param: %d", *(int*) arg)); if (!simple_read_write_test() || !simple_read_change_write_read_test() || diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index 3822a929fcf..baca24eb56f 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -858,7 +858,7 @@ static int chk_index(HA_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, } if (record >= info->state->data_file_length) { -#ifndef DBUG_OFF +#ifdef DBUG_TRACE char llbuff2[22], llbuff3[22]; #endif mi_check_print_error(param,"Found key at page %s that points to record outside datafile",llstr(page,llbuff)); diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c index ebe139bb342..54b33aac997 100644 --- a/storage/myisam/mi_create.c +++ b/storage/myisam/mi_create.c @@ -702,7 +702,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if (mi_state_info_write(file, &share.state, 2) || mi_base_info_write(file, &share.base)) goto err; -#ifndef DBUG_OFF +#ifdef DBUG_TRACE if ((uint) mysql_file_tell(file, MYF(0)) != base_pos + MI_BASE_INFO_SIZE) { uint pos=(uint) mysql_file_tell(file, MYF(0)); @@ -802,12 +802,12 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if (mi_recinfo_write(file, &recinfo[i])) goto err; -#ifndef DBUG_OFF - if ((uint) mysql_file_tell(file, MYF(0)) != info_length) +#ifdef DBUG_TRACE { uint pos= (uint) mysql_file_tell(file, MYF(0)); - DBUG_PRINT("warning",("info_length: %d != used_length: %d", - info_length, pos)); + if (pos != info_length) + DBUG_PRINT("warning",("info_length: %d != used_length: %d", + info_length, pos)); } #endif From 3c92050d1c907cc548e848d0ab2891a06681ad92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 23 Sep 2022 17:37:52 +0300 Subject: [PATCH 9/9] Fix build without either ENABLED_DEBUG_SYNC or DBUG_OFF There are separate flags DBUG_OFF for disabling the DBUG facility and ENABLED_DEBUG_SYNC for enabling the DEBUG_SYNC facility. Let us allow debug builds without DEBUG_SYNC. Note: For CMAKE_BUILD_TYPE=Debug, CMakeLists.txt will continue to define ENABLED_DEBUG_SYNC. --- mysql-test/main/alter_table-big.test | 1 + mysql-test/main/flush_read_lock_kill.test | 1 + mysql-test/main/partition_sync.test | 1 + mysql-test/main/show_explain.test | 1 + mysql-test/main/show_explain_non_select.test | 1 + mysql-test/main/view_debug.test | 1 + mysql-test/suite/gcol/t/virtual_index_drop.test | 1 + mysql-test/suite/innodb/t/alter_crash.test | 1 + mysql-test/suite/innodb/t/alter_mdl_timeout.test | 1 + mysql-test/suite/innodb/t/autoinc_debug.test | 1 + mysql-test/suite/innodb/t/blob-crash.test | 7 ++++--- .../suite/rpl/t/rpl_lost_events_on_rotate.test | 1 + .../suite/rpl/t/rpl_seconds_behind_master_spike.test | 1 + mysql-test/suite/sys_vars/t/sysvars_debug.test | 1 + sql/item_func.cc | 2 ++ sql/log.cc | 8 +++++++- sql/log_event.cc | 3 ++- sql/mdl.cc | 2 ++ sql/mysqld.cc | 2 ++ sql/net_serv.cc | 4 +++- sql/rpl_parallel.cc | 12 ++++++++++++ sql/service_wsrep.cc | 4 ++-- sql/slave.cc | 4 ++++ sql/sql_parse.cc | 2 ++ sql/sql_repl.cc | 6 +++++- sql/sql_table.cc | 4 +++- sql/sql_trigger.cc | 6 +++--- sql/wsrep_high_priority_service.cc | 8 ++++++++ sql/wsrep_server_service.cc | 2 ++ sql/wsrep_sst.cc | 2 ++ sql/wsrep_thd.cc | 2 ++ storage/innobase/handler/ha_innodb.cc | 2 ++ storage/innobase/row/row0purge.cc | 2 +- 33 files changed, 83 insertions(+), 14 deletions(-) diff --git a/mysql-test/main/alter_table-big.test b/mysql-test/main/alter_table-big.test index b010815955f..66f95938107 100644 --- a/mysql-test/main/alter_table-big.test +++ b/mysql-test/main/alter_table-big.test @@ -5,6 +5,7 @@ --source include/big_test.inc # We are using some debug-only features in this test --source include/have_debug.inc +--source include/have_debug_sync.inc # Also we are using SBR to check that statements are executed # in proper order. --source include/have_binlog_format_mixed_or_statement.inc diff --git a/mysql-test/main/flush_read_lock_kill.test b/mysql-test/main/flush_read_lock_kill.test index bd3efd7bdc4..8b76c065227 100644 --- a/mysql-test/main/flush_read_lock_kill.test +++ b/mysql-test/main/flush_read_lock_kill.test @@ -7,6 +7,7 @@ --source include/not_embedded.inc --source include/have_debug.inc +--source include/have_debug_sync.inc # This test needs transactional engine as otherwise COMMIT # won't block FLUSH TABLES WITH GLOBAL READ LOCK. diff --git a/mysql-test/main/partition_sync.test b/mysql-test/main/partition_sync.test index 22ca7df7e62..a07fb6e5c13 100644 --- a/mysql-test/main/partition_sync.test +++ b/mysql-test/main/partition_sync.test @@ -1,5 +1,6 @@ --source include/have_partition.inc --source include/have_debug.inc +--source include/have_debug_sync.inc # Save the initial number of concurrent sessions. --source include/count_sessions.inc diff --git a/mysql-test/main/show_explain.test b/mysql-test/main/show_explain.test index 515eb9efa47..271067ae03a 100644 --- a/mysql-test/main/show_explain.test +++ b/mysql-test/main/show_explain.test @@ -2,6 +2,7 @@ # Tests for SHOW EXPLAIN FOR functionality # --source include/have_debug.inc +--source include/have_debug_sync.inc --source include/have_innodb.inc diff --git a/mysql-test/main/show_explain_non_select.test b/mysql-test/main/show_explain_non_select.test index 505e9296222..92b3c9788c9 100644 --- a/mysql-test/main/show_explain_non_select.test +++ b/mysql-test/main/show_explain_non_select.test @@ -2,6 +2,7 @@ # SHOW EXPLAIN tests for non-select subqueries # --source include/have_debug.inc +--source include/have_debug_sync.inc --source include/have_innodb.inc --source include/not_embedded.inc diff --git a/mysql-test/main/view_debug.test b/mysql-test/main/view_debug.test index 0e448ae2721..bf8074ddeb1 100644 --- a/mysql-test/main/view_debug.test +++ b/mysql-test/main/view_debug.test @@ -1,5 +1,6 @@ --source include/have_debug.inc +--source include/have_debug_sync.inc --echo # --echo #MDEV-8087:Server crashed in Time_and_counter_tracker::incr_loops diff --git a/mysql-test/suite/gcol/t/virtual_index_drop.test b/mysql-test/suite/gcol/t/virtual_index_drop.test index e1ec43f75e5..0fe4986f2c1 100644 --- a/mysql-test/suite/gcol/t/virtual_index_drop.test +++ b/mysql-test/suite/gcol/t/virtual_index_drop.test @@ -1,5 +1,6 @@ --source include/have_innodb.inc --source include/have_debug.inc +--source include/have_debug_sync.inc --echo # --echo # MDEV-24971 InnoDB access freed virtual column diff --git a/mysql-test/suite/innodb/t/alter_crash.test b/mysql-test/suite/innodb/t/alter_crash.test index 72116b0ca9d..7a2f4452f4d 100644 --- a/mysql-test/suite/innodb/t/alter_crash.test +++ b/mysql-test/suite/innodb/t/alter_crash.test @@ -4,6 +4,7 @@ --source include/not_embedded.inc --source include/have_innodb.inc --source include/have_debug.inc +--source include/have_debug_sync.inc --source include/not_crashrep.inc --disable_query_log diff --git a/mysql-test/suite/innodb/t/alter_mdl_timeout.test b/mysql-test/suite/innodb/t/alter_mdl_timeout.test index 15e7f524fd0..0ce23646090 100644 --- a/mysql-test/suite/innodb/t/alter_mdl_timeout.test +++ b/mysql-test/suite/innodb/t/alter_mdl_timeout.test @@ -1,5 +1,6 @@ --source include/have_innodb.inc --source include/have_debug.inc +--source include/have_debug_sync.inc create table t1(f1 char(10), f2 char(10) not null, f3 int not null, f4 int not null, primary key(f3))engine=innodb; diff --git a/mysql-test/suite/innodb/t/autoinc_debug.test b/mysql-test/suite/innodb/t/autoinc_debug.test index 2e662565490..3700db63547 100644 --- a/mysql-test/suite/innodb/t/autoinc_debug.test +++ b/mysql-test/suite/innodb/t/autoinc_debug.test @@ -1,5 +1,6 @@ --source include/have_innodb.inc --source include/have_debug.inc +--source include/have_debug_sync.inc --source include/not_embedded.inc # Two parallel connection with autoinc column after restart. diff --git a/mysql-test/suite/innodb/t/blob-crash.test b/mysql-test/suite/innodb/t/blob-crash.test index beb500553ea..8af4a16d40c 100644 --- a/mysql-test/suite/innodb/t/blob-crash.test +++ b/mysql-test/suite/innodb/t/blob-crash.test @@ -1,6 +1,7 @@ ---source include/maybe_debug.inc --source include/innodb_page_size_small.inc +let $have_debug_sync=`select count(*) = 1 from information_schema.session_variables where variable_name = 'debug_sync' and variable_value like 'on %'`; + --echo # --echo # Bug #16963396 INNODB: USE OF LARGE EXTERNALLY-STORED FIELDS MAKES --echo # CRASH RECOVERY LOSE DATA @@ -94,7 +95,7 @@ select f1, right(f2, 20), right(f3, 20) from t2; update t2 set f3 = '&'; select f1, right(f2, 20), right(f3, 20) from t2; -if ($have_debug) { +if ($have_debug_sync) { --disable_query_log set DEBUG_SYNC='blob_rollback_middle SIGNAL stuck WAIT_FOR ever'; send ROLLBACK; @@ -102,7 +103,7 @@ send ROLLBACK; } connection default; -if ($have_debug) { +if ($have_debug_sync) { --disable_query_log SET DEBUG_SYNC = 'now WAIT_FOR stuck'; --enable_query_log diff --git a/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test b/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test index 3a4a24e1762..8c4baafe23d 100644 --- a/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test +++ b/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test @@ -13,6 +13,7 @@ # during this window while forcing a rotation in the binlog. # --source include/have_debug.inc +--source include/have_debug_sync.inc --source include/master-slave.inc --connection master diff --git a/mysql-test/suite/rpl/t/rpl_seconds_behind_master_spike.test b/mysql-test/suite/rpl/t/rpl_seconds_behind_master_spike.test index 31a9478f632..d1bfbf25bae 100644 --- a/mysql-test/suite/rpl/t/rpl_seconds_behind_master_spike.test +++ b/mysql-test/suite/rpl/t/rpl_seconds_behind_master_spike.test @@ -20,6 +20,7 @@ # MDEV-16091: Seconds_Behind_Master spikes to millions of seconds # --source include/have_debug.inc +--source include/have_debug_sync.inc --source include/have_innodb.inc --source include/master-slave.inc diff --git a/mysql-test/suite/sys_vars/t/sysvars_debug.test b/mysql-test/suite/sys_vars/t/sysvars_debug.test index fbdcbd683df..6e64d48c6cd 100644 --- a/mysql-test/suite/sys_vars/t/sysvars_debug.test +++ b/mysql-test/suite/sys_vars/t/sysvars_debug.test @@ -1,4 +1,5 @@ --source include/have_debug.inc +--source include/have_debug_sync.inc --source include/word_size.inc --vertical_results diff --git a/sql/item_func.cc b/sql/item_func.cc index dddb93271c0..f4596803c2d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4508,10 +4508,12 @@ longlong Item_func_sleep::val_int() mysql_cond_destroy(&cond); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sleep_inject_query_done_debug_sync", { debug_sync_set_action (thd, STRING_WITH_LEN("dispatch_command_end SIGNAL query_done")); };); +#endif return MY_TEST(!error); // Return 1 killed } diff --git a/sql/log.cc b/sql/log.cc index 1ddb3c412ff..873218e8e32 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2018, Oracle and/or its affiliates. - Copyright (c) 2009, 2020, MariaDB Corporation. + Copyright (c) 2009, 2022, MariaDB Corporation. 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 @@ -8012,10 +8012,12 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader) DBUG_ENTER("MYSQL_BIN_LOG::trx_group_commit_leader"); { +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("inject_binlog_commit_before_get_LOCK_log", DBUG_ASSERT(!debug_sync_set_action(leader->thd, STRING_WITH_LEN ("commit_before_get_LOCK_log SIGNAL waiting WAIT_FOR cont TIMEOUT 1"))); ); +#endif /* Lock the LOCK_log(), and once we get it, collect any additional writes that queued up while we were waiting. @@ -10142,6 +10144,7 @@ binlog_background_thread(void *arg __attribute__((unused))) mysql_mutex_unlock(&mysql_bin_log.LOCK_binlog_background_thread); /* Process any incoming commit_checkpoint_notify() calls. */ +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("inject_binlog_background_thread_before_mark_xid_done", DBUG_ASSERT(!debug_sync_set_action( thd, @@ -10150,6 +10153,7 @@ binlog_background_thread(void *arg __attribute__((unused))) "WAIT_FOR something_that_will_never_happen " "TIMEOUT 2"))); ); +#endif while (queue) { long count= queue->notify_count; @@ -10164,11 +10168,13 @@ binlog_background_thread(void *arg __attribute__((unused))) mysql_bin_log.mark_xid_done(queue->binlog_id, true); queue= next; +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("binlog_background_checkpoint_processed", DBUG_ASSERT(!debug_sync_set_action( thd, STRING_WITH_LEN("now SIGNAL binlog_background_checkpoint_processed"))); ); +#endif } if (stop) diff --git a/sql/log_event.cc b/sql/log_event.cc index 914a4595b62..0cb8667c8b0 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -11384,12 +11384,13 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi) /* A small test to verify that objects have consistent types */ DBUG_ASSERT(sizeof(thd->variables.option_bits) == sizeof(OPTION_RELAXED_UNIQUE_CHECKS)); - +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("rows_log_event_before_open_table", { const char action[] = "now SIGNAL before_open_table WAIT_FOR go_ahead_sql"; DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(action))); };); +#endif /* Trigger's procedures work with global table list. So we have to add diff --git a/sql/mdl.cc b/sql/mdl.cc index 1a4d4c24d31..3b553c5ce37 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -1168,6 +1168,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout, wait_result != ETIMEDOUT && wait_result != ETIME) { #ifdef WITH_WSREP +# ifdef ENABLED_DEBUG_SYNC // Allow tests to block the applier thread using the DBUG facilities DBUG_EXECUTE_IF("sync.wsrep_before_mdl_wait", { @@ -1177,6 +1178,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout, DBUG_ASSERT(!debug_sync_set_action((owner->get_thd()), STRING_WITH_LEN(act))); };); +# endif if (WSREP_ON && wsrep_thd_is_BF(owner->get_thd(), false)) { wait_result= mysql_cond_wait(&m_COND_wait_status, &m_LOCK_wait_status); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 4d22dde9f62..d86875ecaea 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1676,6 +1676,7 @@ void kill_mysql(THD *thd) DBUG_EXECUTE_IF("mysql_admin_shutdown_wait_for_slaves", thd->lex->is_shutdown_wait_for_slaves= true;); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("simulate_delay_at_shutdown", { DBUG_ASSERT(binlog_dump_thread_count == 3); @@ -1685,6 +1686,7 @@ void kill_mysql(THD *thd) DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act))); };); +#endif if (thd->lex->is_shutdown_wait_for_slaves) shutdown_wait_for_slaves= true; diff --git a/sql/net_serv.cc b/sql/net_serv.cc index b324f4a362f..c52083f8c2a 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2012, 2020, MariaDB Corporation. + Copyright (c) 2012, 2022, MariaDB Corporation. 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 @@ -490,6 +490,7 @@ net_write_command(NET *net,uchar command, DBUG_ENTER("net_write_command"); DBUG_PRINT("enter",("length: %lu", (ulong) len)); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("simulate_error_on_packet_write", { if (command == COM_BINLOG_DUMP) @@ -501,6 +502,7 @@ net_write_command(NET *net,uchar command, DBUG_RETURN(true); } };); +#endif MYSQL_NET_WRITE_START(length); buff[4]=command; /* For first packet */ diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 35901cb5263..2c431ccc12d 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -247,6 +247,7 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id, entry->stop_on_error_sub_id == (uint64)ULONGLONG_MAX) entry->stop_on_error_sub_id= sub_id; mysql_mutex_unlock(&entry->LOCK_parallel_entry); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("hold_worker_on_schedule", { if (entry->stop_on_error_sub_id < (uint64)ULONGLONG_MAX) { @@ -261,6 +262,7 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id, STRING_WITH_LEN("now WAIT_FOR proceed_by_1000")); } }); +#endif if (rgi->killed_for_retry == rpl_group_info::RETRY_KILL_PENDING) wait_for_pending_deadlock_kill(thd, rgi); @@ -772,6 +774,7 @@ do_retry: rgi->killed_for_retry= rpl_group_info::RETRY_KILL_KILLED; thd->set_killed(KILL_CONNECTION); }); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("rpl_parallel_simulate_wait_at_retry", { if (rgi->current_gtid.seq_no == 1001) { debug_sync_set_action(thd, @@ -779,6 +782,7 @@ do_retry: } DEBUG_SYNC(thd, "rpl_parallel_simulate_wait_at_retry"); }); +#endif rgi->cleanup_context(thd, 1); wait_for_pending_deadlock_kill(thd, rgi); @@ -1189,6 +1193,7 @@ handle_rpl_parallel_thread(void *arg) bool did_enter_cond= false; PSI_stage_info old_stage; +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("hold_worker_on_schedule", { if (rgi->current_gtid.domain_id == 0 && rgi->current_gtid.seq_no == 100) { @@ -1203,6 +1208,7 @@ handle_rpl_parallel_thread(void *arg) STRING_WITH_LEN("now SIGNAL scheduled_gtid_0_x_100")); } }); +#endif if(unlikely(thd->wait_for_commit_ptr) && group_rgi != NULL) { @@ -2171,11 +2177,13 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond, unlock_or_exit_cond(rli->sql_driver_thd, &thr->LOCK_rpl_thread, did_enter_cond, old_stage); my_error(ER_CONNECTION_KILLED, MYF(0)); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max", { debug_sync_set_action(rli->sql_driver_thd, STRING_WITH_LEN("now SIGNAL wait_queue_killed")); };); +#endif slave_output_error_info(rgi, rli->sql_driver_thd); return NULL; } @@ -2193,11 +2201,13 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond, Because debug_sync changes the thd->mysys_var->current_mutex, and this can cause THD::awake to use the wrong mutex. */ +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max", { debug_sync_set_action(rli->sql_driver_thd, STRING_WITH_LEN("now SIGNAL wait_queue_ready")); };); +#endif rli->sql_driver_thd->ENTER_COND(&thr->COND_rpl_thread_queue, &thr->LOCK_rpl_thread, &stage_waiting_for_room_in_worker_thread, @@ -2352,11 +2362,13 @@ rpl_parallel::wait_for_done(THD *thd, Relay_log_info *rli) } } } +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("rpl_parallel_wait_for_done_trigger", { debug_sync_set_action(thd, STRING_WITH_LEN("now SIGNAL wait_for_done_waiting")); };); +#endif for (i= 0; i < domain_hash.records; ++i) { diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc index fd2a5c301f2..291d8dfbef8 100644 --- a/sql/service_wsrep.cc +++ b/sql/service_wsrep.cc @@ -227,7 +227,7 @@ extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd, { mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill); mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data); - +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sync.before_wsrep_thd_abort", { const char act[]= @@ -237,7 +237,7 @@ extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd, DBUG_ASSERT(!debug_sync_set_action(bf_thd, STRING_WITH_LEN(act))); };); - +#endif my_bool ret= wsrep_bf_abort(bf_thd, victim_thd); /* Send awake signal if victim was BF aborted or does not diff --git a/sql/slave.cc b/sql/slave.cc index d906066204e..c9d5c9ca3be 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3797,12 +3797,14 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi, Relay_log_info* rli= rgi->rli; DBUG_ENTER("apply_event_and_update_pos_apply"); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("inject_slave_sql_before_apply_event", { DBUG_ASSERT(!debug_sync_set_action (thd, STRING_WITH_LEN("now WAIT_FOR continue"))); DBUG_SET_INITIAL("-d,inject_slave_sql_before_apply_event"); };); +#endif if (reason == Log_event::EVENT_SKIP_NOT) exec_res= ev->apply_event(rgi); @@ -4388,6 +4390,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, #ifdef WITH_WSREP wsrep_after_statement(thd); #endif /* WITH_WSREP */ +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF( "pause_sql_thread_on_fde", if (ev && typ == FORMAT_DESCRIPTION_EVENT) { @@ -4396,6 +4399,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, STRING_WITH_LEN( "now SIGNAL paused_on_fde WAIT_FOR sql_thread_continue"))); }); +#endif DBUG_RETURN(exec_res); } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3f654777605..a039090da34 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -7837,6 +7837,7 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, thd->lex->sql_command != SQLCOM_SELECT && thd->wsrep_retry_counter < thd->variables.wsrep_retry_autocommit) { +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sync.wsrep_retry_autocommit", { const char act[]= @@ -7845,6 +7846,7 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, "WAIT_FOR wsrep_retry_autocommit_continue"; DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act))); }); +#endif WSREP_DEBUG("wsrep retrying AC query: %lu %s", thd->wsrep_retry_counter, wsrep_thd_query(thd)); wsrep_prepare_for_autocommit_retry(thd, rawbuf, length, parser_state); diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 94cbc6be614..d59bfbdb839 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2018, Oracle and/or its affiliates. - Copyright (c) 2008, 2020, MariaDB Corporation + Copyright (c) 2008, 2022, MariaDB Corporation. 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 @@ -2865,6 +2865,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, info->error= ER_UNKNOWN_ERROR; goto err; } +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("simulate_delay_at_shutdown", { const char act[]= @@ -2873,6 +2874,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act))); };); +#endif /* heartbeat_period from @master_heartbeat_period user variable @@ -2962,12 +2964,14 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, if (should_stop(info)) break; +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("wait_after_binlog_EOF", { const char act[]= "now wait_for signal.rotate_finished"; DBUG_ASSERT(!debug_sync_set_action(current_thd, STRING_WITH_LEN(act))); };); +#endif THD_STAGE_INFO(thd, stage_finished_reading_one_binlog_switching_to_next_binlog); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index a5fa36ffde6..f29fecd2744 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2115,10 +2115,12 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, bool if_exists, } } +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("ib_purge_virtual_mdev_16222_1", DBUG_ASSERT(!debug_sync_set_action( thd, STRING_WITH_LEN("now SIGNAL drop_started")));); +#endif /* mark for close and remove all cached entries */ thd->push_internal_handler(&err_handler); @@ -9654,7 +9656,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db, DEBUG_SYNC(thd, "alter_opened_table"); -#ifdef WITH_WSREP +#if defined WITH_WSREP && defined ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sync.alter_opened_table", { const char act[]= diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index fe10adb0417..77c7b60c233 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2004, 2012, Oracle and/or its affiliates. - Copyright (c) 2010, 2018, MariaDB + Copyright (c) 2010, 2022, MariaDB 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 @@ -596,7 +596,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) goto end; } -#ifdef WITH_WSREP +#if defined WITH_WSREP && defined ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sync.mdev_20225", { const char act[]= @@ -605,7 +605,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act))); };); -#endif /* WITH_WSREP */ +#endif /* WITH_WSREP && ENABLED_DEBUG_SYNC */ result= (create ? table->triggers->create_trigger(thd, tables, &stmt_query): diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc index e45bcf3e5ce..700ac599cee 100644 --- a/sql/wsrep_high_priority_service.cc +++ b/sql/wsrep_high_priority_service.cc @@ -381,6 +381,7 @@ int Wsrep_high_priority_service::apply_toi(const wsrep::ws_meta& ws_meta, WSREP_DEBUG("Wsrep_high_priority_service::apply_toi: %lld", client_state.toi_meta().seqno().get()); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sync.wsrep_apply_toi", { const char act[]= @@ -390,6 +391,7 @@ int Wsrep_high_priority_service::apply_toi(const wsrep::ws_meta& ws_meta, DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act))); };); +#endif int ret= wsrep_apply_events(thd, m_rli, data.data(), data.size()); if (ret != 0 || thd->wsrep_has_ignored_error) @@ -439,6 +441,7 @@ int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_ DBUG_PRINT("info", ("Wsrep_high_priority_service::log_dummy_write_set: seqno=%lld", ws_meta.seqno().get())); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sync.wsrep_log_dummy_write_set", { const char act[]= @@ -447,6 +450,7 @@ int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_ DBUG_ASSERT(!debug_sync_set_action(m_thd, STRING_WITH_LEN(act))); };); +#endif if (ws_meta.ordered()) { @@ -536,6 +540,7 @@ int Wsrep_applier_service::apply_write_set(const wsrep::ws_meta& ws_meta, /* moved dbug sync point here, after possible THD switch for SR transactions has ben done */ +#ifdef ENABLED_DEBUG_SYNC /* Allow tests to block the applier thread using the DBUG facilities */ DBUG_EXECUTE_IF("sync.wsrep_apply_cb", { @@ -546,6 +551,7 @@ int Wsrep_applier_service::apply_write_set(const wsrep::ws_meta& ws_meta, DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act))); };); +#endif wsrep_setup_uk_and_fk_checks(thd); @@ -694,6 +700,7 @@ int Wsrep_replayer_service::apply_write_set(const wsrep::ws_meta& ws_meta, DBUG_ASSERT(thd->wsrep_trx().active()); DBUG_ASSERT(thd->wsrep_trx().state() == wsrep::transaction::s_replaying); +#ifdef ENABLED_DEBUG_SYNC /* Allow tests to block the replayer thread using the DBUG facilities */ DBUG_EXECUTE_IF("sync.wsrep_replay_cb", { @@ -704,6 +711,7 @@ int Wsrep_replayer_service::apply_write_set(const wsrep::ws_meta& ws_meta, DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act))); };); +#endif wsrep_setup_uk_and_fk_checks(thd); diff --git a/sql/wsrep_server_service.cc b/sql/wsrep_server_service.cc index 41778ef9420..cf6f76cf02e 100644 --- a/sql/wsrep_server_service.cc +++ b/sql/wsrep_server_service.cc @@ -386,6 +386,7 @@ int Wsrep_server_service::wait_committing_transactions(int timeout) void Wsrep_server_service::debug_sync(const char* sync_point) { +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF(sync_point, { std::stringstream dbug_action; dbug_action << "now " @@ -396,4 +397,5 @@ void Wsrep_server_service::debug_sync(const char* sync_point) action.c_str(), action.length())); };); +#endif } diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index a8642189bff..ddd5b5945b4 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -1736,6 +1736,7 @@ wait_signal: WSREP_INFO("Donor state reached"); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sync.wsrep_donor_state", { const char act[]= @@ -1745,6 +1746,7 @@ wait_signal: assert(!debug_sync_set_action(thd.ptr, STRING_WITH_LEN(act))); };); +#endif goto wait_signal; } diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index 3a9384c7428..8853ea6a499 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -348,6 +348,7 @@ bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd) mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data); mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill); +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sync.wsrep_bf_abort", { const char act[]= @@ -357,6 +358,7 @@ bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd) DBUG_ASSERT(!debug_sync_set_action(bf_thd, STRING_WITH_LEN(act))); };); +#endif if (WSREP(victim_thd) && !victim_thd->wsrep_trx().active()) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index b8a80d02350..beab6ff5239 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -20579,6 +20579,7 @@ fail: for purge thread */ static TABLE* innodb_find_table_for_vc(THD* thd, dict_table_t* table) { +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF( "ib_purge_virtual_mdev_16222_1", DBUG_ASSERT(!debug_sync_set_action( @@ -20592,6 +20593,7 @@ static TABLE* innodb_find_table_for_vc(THD* thd, dict_table_t* table) thd, STRING_WITH_LEN("ib_purge_virtual_got_no_such_table " "SIGNAL got_no_such_table")));); +#endif if (THDVAR(thd, background_thread)) { /* Purge thread acquires dict_sys.latch while diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index d61dc2c2280..8ee7639f095 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -1314,7 +1314,7 @@ row_purge_step( node->start(); -#ifdef UNIV_DEBUG +#ifdef ENABLED_DEBUG_SYNC srv_slot_t *slot = thr->thread_slot; ut_ad(slot);