| 1 |
--echo # |
| 2 |
--echo # MDEV-29322 ASAN use-after-free options_written_to_bin_log |
| 3 |
--echo # |
| 4 |
|
| 5 |
# The tests verify that at query execution slave parallel workers successfully |
| 6 |
# find a correct options_written_to_bin_log value associated with the query. |
| 7 |
# There are three test branches, A and B take care of different server version |
| 8 |
# binlogs. The homogeneous binlog case of C. branch is also for how-to-reproduce |
| 9 |
# the bug, may need few --repeat :s though. |
| 10 |
|
| 11 |
--source include/have_binlog_format_mixed.inc |
| 12 |
--source include/master-slave.inc |
| 13 |
|
| 14 |
--echo # A. set the master and slave explicit_defaults_for_timestamp values crisscross to (1,0) |
| 15 |
--let $same_version_binlogs=0 |
| 16 |
|
| 17 |
--connection master |
| 18 |
# Configure master and slave with different values of the following variable: |
| 19 |
set @sav.explicit_defaults_for_timestamp = @@session.explicit_defaults_for_timestamp; |
| 20 |
set @@session.explicit_defaults_for_timestamp = 1; |
| 21 |
--connection slave |
| 22 |
# slave must produce the master version of the table definition and its data |
| 23 |
set @sav.explicit_defaults_for_timestamp = @@global.explicit_defaults_for_timestamp; |
| 24 |
set global explicit_defaults_for_timestamp = 0; |
| 25 |
# the global var gets changed in the included file |
| 26 |
set @sav.slave_parallel_workers = @@global.slave_parallel_workers; |
| 27 |
--source include/stop_slave.inc |
| 28 |
set @@global.slave_parallel_workers = 1; |
| 29 |
--source include/start_slave.inc |
| 30 |
|
| 31 |
--source suite/rpl/include/rpl_parallel_29322.inc |
| 32 |
|
| 33 |
--echo # B. alternate the master and slave vars' values to (0,1) |
| 34 |
|
| 35 |
--connection master |
| 36 |
# Configure master and slave with different values of the following variable: |
| 37 |
set @@session.explicit_defaults_for_timestamp = 0; |
| 38 |
--connection slave |
| 39 |
# slave must produce the master version of the table definition and its data |
| 40 |
set @@global.explicit_defaults_for_timestamp = 1; |
| 41 |
|
| 42 |
--source suite/rpl/include/rpl_parallel_29322.inc |
| 43 |
|
| 44 |
|
| 45 |
--echo # C. the bug case on the same version binlogs also to demo on the patch's base |
| 46 |
--let $same_version_binlogs=1 |
| 47 |
# with more workers the bug shows more likeky on the patch's base slave. |
| 48 |
--source include/stop_slave.inc |
| 49 |
set @@global.slave_parallel_workers = 4; |
| 50 |
--source include/start_slave.inc |
| 51 |
|
| 52 |
--source suite/rpl/include/rpl_parallel_29322.inc |
| 53 |
|
| 54 |
# cleanup |
| 55 |
--connection master |
| 56 |
set @@session.explicit_defaults_for_timestamp = @sav.explicit_defaults_for_timestamp; |
| 57 |
--connection slave |
| 58 |
set @@global.explicit_defaults_for_timestamp = @sav.explicit_defaults_for_timestamp; |
| 59 |
--source include/stop_slave.inc |
| 60 |
set @@global.slave_parallel_workers = @sav.slave_parallel_workers; |
| 61 |
--source include/start_slave.inc |
| 62 |
|
| 63 |
|
| 64 |
--source include/rpl_end.inc |