Debian Codegraph @

mysql-test/suite/rpl/t/rpl_binlog_cache_disk_full_loaddata.test

raw
1 --source include/have_binlog_format_statement.inc
2 --source include/have_debug.inc
3 --source include/master-slave.inc
4
5 --connection master
6 # Set minimal cache size so smaller transaction can trigger spill to disk.
7 SET @save_binlog_stmt_cache_size= @@GLOBAL.binlog_stmt_cache_size;
8 SET GLOBAL binlog_stmt_cache_size= 4096;
9
10 CALL mtr.add_suppression('"No space left on device".*An incident event is written to binary log');
11 CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=MyISAM;
12
13 FLUSH GLOBAL STATUS;
14 SHOW STATUS LIKE "binlog_stmt_cache%";
15 SET @old_dbug= @@SESSION.debug_dbug;
16 SET SESSION debug_dbug="+d,load_data_binlog_cache_error";
17 --replace_regex /Error writing file '[^']+'/Error writing file '<FILENAME>'/
18 --error 3
19 LOAD DATA CONCURRENT LOCAL INFILE 'std_data/bug30435_5k.txt'
20 REPLACE INTO TABLE t1 (a);
21 SET SESSION debug_dbug= @old_dbug;
22 SHOW STATUS LIKE "binlog_stmt_cache%";
23 # The actual number of rows left after the disk full error may change as
24 # binlog event sizes are modified. So here we just test that we get partial
25 # update from the last INSERT..SELECT that gets disk full error.
26 SELECT IF(COUNT(*) > 0 AND COUNT(*) < 5000,
27 "ok",
28 CONCAT("ERROR! Row count ", COUNT(*), " not as expected for partially executed query"))
29 AS check_result
30 FROM t1;
31
32 --save_master_pos
33
34 --connection slave
35 --let $slave_sql_errno= 1590
36 --source include/wait_for_slave_sql_error_and_skip.inc
37
38 --sync_with_master
39 SELECT COUNT(*) FROM t1;
40
41 # Cleanup
42
43 --connection master
44 SET GLOBAL binlog_stmt_cache_size= @save_binlog_stmt_cache_size;
45 DROP TABLE t1;
46
47 --source include/rpl_end.inc