1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
|
call mtr.add_suppression("MYSQL_BIN_LOG::add_log_to_index failed to copy index file to crash safe index file.");
call mtr.add_suppression("Disk is full writing *");
call mtr.add_suppression("Retry in 60 secs. *");
call mtr.add_suppression("Error writing file*");
call mtr.add_suppression("Could not open .*");
call mtr.add_suppression("Could not use .*");
call mtr.add_suppression("The server was unable to create a new log file *");
call mtr.add_suppression("An error occurred during flush stage of the commit");
call mtr.add_suppression("An error occurred during sync stage of the commit");
call mtr.add_suppression("Either disk is full or file system is read only");
call mtr.add_suppression("Can't open file:*");
call mtr.add_suppression("Can't generate a unique log-filename*");
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
RESET MASTER;
Test case1
SET GLOBAL binlog_error_action= ABORT_SERVER;
flush logs;
ERROR HY000: Binary logging not possible. Message: Can't open file: 'binlog.index' (errno: 1 - Operation not permitted), while rotating the binlog. Aborting the server
Test case2
SET SESSION debug="+d,fault_injection_updating_index";
SET GLOBAL binlog_error_action= ABORT_SERVER;
flush logs;
ERROR HY000: Binary logging not possible. Message: Either disk is full, file system is read only or there was an encryption error while opening the binlog. Aborting the server.
Test case3
SET SESSION debug="+d,simulate_disk_full_on_open_binlog";
SET GLOBAL binlog_error_action= ABORT_SERVER;
flush logs;
ERROR HY000: Binary logging not possible. Message: Either disk is full, file system is read only or there was an encryption error while opening the binlog. Aborting the server.
Test case4
SET SESSION debug="+d,fault_injection_init_name";
SET GLOBAL binlog_error_action= ABORT_SERVER;
flush logs;
ERROR HY000: Binary logging not possible. Message: Either disk is full, file system is read only or there was an encryption error while opening the binlog. Aborting the server.
Test case5
SET GLOBAL binlog_error_action= IGNORE_ERROR;
flush logs;
ERROR HY000: File 'binlog.index' not found (OS errno 13 - Permission denied)
CREATE TABLE t1 ( f int );
SHOW TABLES;
Tables_in_test
t1
DROP TABLE t1;
# restart
Test case6
SET SESSION debug="+d,fault_injection_updating_index";
SET GLOBAL binlog_error_action= IGNORE_ERROR;
flush logs;
ERROR HY000: Can't open file: 'binlog.000007' (errno: 1 - Operation not permitted)
CREATE TABLE t2 (f int );
SHOW TABLES;
Tables_in_test
t2
DROP TABLE t2;
SET SESSION debug="-d,fault_injection_updating_index";
# restart
Test case7
SET GLOBAL binlog_error_action= IGNORE_ERROR;
SET SESSION debug="+d,simulate_disk_full_on_open_binlog";
flush logs;
ERROR HY000: Error writing file 'binlog.index_crash_safe' (OS errno 28 - No space left on device)
SET SESSION debug="-d,simulate_disk_full_on_open_binlog";
# restart
Test case8
SET GLOBAL binlog_error_action= IGNORE_ERROR;
SET SESSION debug="+d,fault_injection_init_name";
flush logs;
ERROR HY000: Can't open file: 'binlog.000009' (errno: 1 - Operation not permitted)
CREATE TABLE t2 (f int );
SHOW TABLES;
Tables_in_test
t2
DROP TABLE t2;
SET SESSION debug="-d,fault_injection_init_name";
# restart
Test case09
SET GLOBAL binlog_error_action= IGNORE_ERROR;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
SET SESSION debug='+d,error_unique_log_filename';
FLUSH LOGS;
ERROR HY000: Can't generate a unique log-filename binlog.(1-999)
DROP TABLE t1;
SET SESSION debug="";
SHOW BINARY LOGS;
ERROR HY000: You are not using binary logging
# restart
Test case10
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
SET GLOBAL binlog_error_action=ABORT_SERVER;
SET SESSION debug='+d,error_unique_log_filename';
FLUSH LOGS;
ERROR HY000: Binary logging not possible. Message: Can't generate a unique log-filename binlog.(1-999), while rotating the binlog. Aborting the server
DROP TABLE t1;
Test case11
# restart
RESET MASTER;
CREATE TABLE t1(i INT);
SET SESSION debug = "+d,simulate_error_during_flush_cache_to_file";
SET GLOBAL binlog_error_action = ABORT_SERVER;
INSERT INTO t1 VALUES (1);
ERROR HY000: Binary logging not possible. Message: An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'ABORT_SERVER'. Server is being stopped.
Pattern "An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'ABORT_SERVER'." found
include/assert.inc [Count of elements in t1 should be 0.]
include/assert.inc [Query is not binlogged as expected.]
RESET MASTER;
SET SESSION debug ="+d,simulate_error_during_flush_cache_to_file";
SET GLOBAL binlog_error_action= IGNORE_ERROR;
INSERT INTO t1 VALUES (2);
include/assert.inc [Count of elements in t1 should be 1.]
# restart
include/assert.inc [Query is not binlogged as expected.]
Pattern "An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'IGNORE_ERROR'." found
DROP TABLE t1;
RESET MASTER;
Test case12
SET GLOBAL sync_binlog = 1;
CREATE TABLE t1(i INT);
SET SESSION debug = "+d,simulate_error_during_sync_binlog_file";
SET GLOBAL binlog_error_action = ABORT_SERVER;
INSERT INTO t1 VALUES (1);
ERROR HY000: Binary logging not possible. Message: An error occurred during sync stage of the commit. 'binlog_error_action' is set to 'ABORT_SERVER'. Server is being stopped.
DELETE FROM t1;
RESET MASTER;
SET SESSION debug = "+d,simulate_error_during_sync_binlog_file";
SET GLOBAL binlog_error_action = IGNORE_ERROR;
INSERT INTO t1 VALUES (2);
include/assert.inc [Count of elements in t1 should be 1.]
DROP table t1;
SET SESSION debug = "-d,simulate_error_during_sync_binlog_file";
# restart
RESET MASTER;
Test case13
CREATE TABLE t1(i INT);
SET SESSION debug = "+d,simulate_do_write_cache_failure";
SET GLOBAL binlog_error_action = ABORT_SERVER;
INSERT INTO t1 VALUES (1);
ERROR HY000: Binary logging not possible. Message: An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'ABORT_SERVER'. Server is being stopped.
include/assert.inc [Count of elements in t1 should be 0.]
include/assert.inc [Query is not binlogged as expected.]
RESET MASTER;
SET SESSION debug = "+d,simulate_do_write_cache_failure";
SET GLOBAL binlog_error_action = IGNORE_ERROR;
INSERT INTO t1 VALUES (2);
include/assert.inc [Count of elements in t1 should be 1.]
DROP table t1;
# restart
RESET MASTER;
Test case14
SET GLOBAL binlog_error_action = IGNORE_ERROR;
SET GLOBAL sync_binlog = 1;
CREATE TABLE t1(i INT);
CREATE TABLE t2(i INT);
SET DEBUG_SYNC = "bgc_before_flush_stage SIGNAL about_to_enter_flush_stage WAIT_FOR binlog_closed";
INSERT INTO t1 values (1);;
SET DEBUG_SYNC = "now wait_for about_to_enter_flush_stage";
SET DEBUG_SYNC = "after_binlog_closed_due_to_error SIGNAL binlog_closed";
SET SESSION debug = "+d,simulate_error_during_sync_binlog_file";
INSERT INTO t2 values (2);;
DROP table t1, t2;
# restart
Test case15
SET GLOBAL binlog_error_action = IGNORE_ERROR;
SET GLOBAL sync_binlog = 1;
CREATE TABLE t1(i INT);
CREATE TABLE t2(i INT);
SET DEBUG_SYNC = "before_binlog_closed_due_to_error SIGNAL binlog_about_to_be_closed WAIT_FOR in_the_middle_of_flush_stage";
SET SESSION debug = "+d,simulate_error_during_sync_binlog_file";
INSERT INTO t1 values (1);;
SET DEBUG_SYNC = "now wait_for binlog_about_to_be_closed";
SET DEBUG_SYNC = "waiting_in_the_middle_of_flush_stage SIGNAL in_the_middle_of_flush_stage";
INSERT INTO t2 values (2);;
DROP table t1, t2;
# restart
Test case16
SET GLOBAL binlog_error_action = IGNORE_ERROR;
SET GLOBAL sync_binlog = 1;
CREATE TABLE t1(i INT);
CREATE TABLE t2(i INT);
SET DEBUG_SYNC = "before_binlog_closed_due_to_error SIGNAL binlog_about_to_be_closed WAIT_FOR another_group_encountered_flush_error";
SET SESSION debug = "+d,simulate_error_during_sync_binlog_file";
INSERT INTO t1 values (1);;
SET DEBUG_SYNC = "now wait_for binlog_about_to_be_closed";
SET DEBUG_SYNC = "before_binlog_closed_due_to_error SIGNAL another_group_encountered_flush_error";
SET SESSION debug ="+d,simulate_error_during_flush_cache_to_file";
INSERT INTO t2 values (2);;
Matching lines are:
--TIME-- [ERROR] [MY-010861] [Server] An error occurred during flush_or_sync stage stage of the commit. 'binlog_error_action' is set to 'IGNORE_ERROR'. Hence turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
Occurrences of 'An error occurred during' in the input file: 1
DROP table t1, t2;
# restart
Test case17
# restart: KEYRING_PLUGIN_OPT KEYRING_PLUGIN_LOAD --keyring_file_data=keyring_data --binlog_encryption=ON
# Adding debug point 'fail_to_serialize_encryption_header' to @@GLOBAL.debug
FLUSH LOGS;
ERROR HY000: Binary logging not possible. Message: Either disk is full, file system is read only or there was an encryption error while opening the binlog. Aborting the server.
SET @@GLOBAL.binlog_encryption=OFF;
RESET MASTER;
UNINSTALL PLUGIN keyring_file;
# restart
Test case18
# restart: KEYRING_PLUGIN_OPT KEYRING_PLUGIN_LOAD --keyring_file_data=keyring_data --binlog_encryption=ON
# Adding debug point 'fail_to_generate_new_file_password' to @@GLOBAL.debug
FLUSH LOGS;
ERROR HY000: Binary logging not possible. Message: Either disk is full, file system is read only or there was an encryption error while opening the binlog. Aborting the server.
SET @@GLOBAL.binlog_encryption=OFF;
RESET MASTER;
UNINSTALL PLUGIN keyring_file;
# restart
|