#
# Bug #72457 "Replication with no tmpdir space can break replication"
# (https://bugs.mysql.com/bug.php?id=72457)
# Bug #86991 "binlog corruption when tmpdir gets full"
# (https://bugs.mysql.com/bug.php?id=86991)
# Bug #88223 "Replication with no tmpdir space and InnoDB as tmp_storage_engine can break"
# (https://bugs.mysql.com/bug.php?id=88223)
#
# Testing with --internal-tmp-disk-storage-engine=MyISAM and --default-tmp-storage-engine=MyISAM
#
include/assert.inc ['internal_tmp_disk_storage_engine' must be set to MyISAM]
include/assert.inc ['default_tmp_storage_engine' must be set to MyISAM]
include/master-slave.inc
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
call mtr.add_suppression("Slave SQL for channel '': The incident LOST_EVENTS occured on the master\\. Message: The content of the statement cache is corrupted while writing a rollback record of the transaction to the binary log\\. Error_code:");
call mtr.add_suppression("The content of the statement cache is corrupted while writing a rollback record of the transaction to the binary log\\. An incident event has been written to the binary log which will stop the slaves\\.");
SET @saved_binlog_error_action = @@global.binlog_error_action;
SET GLOBAL binlog_error_action = IGNORE_ERROR;
CREATE TABLE t1(f1 TEXT) ENGINE=MyISAM;
INSERT INTO t1 VALUES(MD5(1));
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
include/sync_slave_sql_with_master.inc
[connection master]
SET SESSION debug = "+d,simulate_tmpdir_partition_full";
INSERT INTO t1 SELECT * FROM t1;
ERROR HY000: Error writing file <tmp_file_name> (Errcode: ##)
SET SESSION debug = "-d,simulate_tmpdir_partition_full";
[connection slave]
include/wait_for_slave_sql_error.inc [errno=1590]
Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: The content of the statement cache is corrupted while writing a rollback record of the transaction to the binary log.'
include/stop_slave_io.inc
RESET SLAVE;
DROP TABLE t1;
[connection master]
DROP TABLE t1;
SET GLOBAL binlog_error_action = @saved_binlog_error_action;
include/rpl_end.inc
