mirror of
https://github.com/MariaDB/server.git
synced 2025-05-10 02:01:19 +03:00
- Changed output to be error "error-text" instead of error - error-text extra/perror.c: Move my_handler_errors.h into include include/my_handler_errors.h: Move my_handler_errors.h into include mysql-test/r/errors.result: Updated result mysql-test/r/innodb_mysql_sync.result: Updated result mysql-test/r/myisam-system.result: Updated result mysql-test/r/myisampack.result: Updated result mysql-test/r/partition_innodb_plugin.result: Updated result mysql-test/r/ps_1general.result: Updated result mysql-test/r/trigger.result: Updated result mysql-test/r/type_bit.result: Updated result mysql-test/r/type_bit_innodb.result: Updated result mysql-test/r/type_blob.result: Updated result mysql-test/suite/archive/archive.result: Updated result mysql-test/suite/binlog/r/binlog_index.result: Updated result mysql-test/suite/binlog/r/binlog_ioerr.result: Updated result mysql-test/suite/csv/csv.result: Updated result mysql-test/suite/engines/iuds/r/type_bit_iuds.result: Updated result mysql-test/suite/federated/federated_bug_35333.result: Updated result mysql-test/suite/innodb/r/innodb-create-options.result: Updated result mysql-test/suite/innodb/r/innodb-index.result: Updated result mysql-test/suite/innodb/r/innodb-zip.result: Updated result mysql-test/suite/innodb/r/innodb.result: Updated result mysql-test/suite/innodb/r/innodb_bug13635833.result: Updated result mysql-test/suite/innodb/r/innodb_bug21704.result: Updated result mysql-test/suite/innodb/r/innodb_bug46000.result: Updated result mysql-test/suite/parts/r/partition_bit_innodb.result: Updated result mysql-test/suite/parts/r/partition_bit_myisam.result: Updated result mysql-test/suite/percona/percona_innodb_fake_changes.result: Updated result mysql-test/suite/perfschema/r/misc.result: Updated result mysql-test/suite/perfschema/r/privilege.result: Updated result mysql-test/suite/rpl/r/rpl_EE_err.result: Updated result mysql-test/suite/rpl/r/rpl_binlog_errors.result: Updated result mysql-test/suite/rpl/r/rpl_drop_db.result: Updated result sql/share/errmsg-utf8.txt: Removed 'column' from error text that was used in different context strings/my_vsnprintf.c: Move my_handler_errors.h into include Minor cleanups Changed output of %M to be error "error-text" instead of error - error-text unittest/mysys/my_vsnprintf-t.c: Updated error text
278 lines
9.1 KiB
Plaintext
278 lines
9.1 KiB
Plaintext
include/master-slave.inc
|
|
[connection master]
|
|
#######################################################################
|
|
####################### PART 1: MASTER TESTS ##########################
|
|
#######################################################################
|
|
include/stop_slave.inc
|
|
call mtr.add_suppression("Can't generate a unique log-filename");
|
|
call mtr.add_suppression("Writing one row to the row-based binary log failed.*");
|
|
call mtr.add_suppression("Error writing file .*");
|
|
SET @old_debug= @@global.debug;
|
|
SELECT repeat('x',8192) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data';
|
|
SELECT repeat('x',10) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data';
|
|
RESET MASTER;
|
|
###################### TEST #1
|
|
FLUSH LOGS;
|
|
# assert: must show two binlogs
|
|
show binary logs;
|
|
Log_name File_size
|
|
master-bin.000001 #
|
|
master-bin.000002 #
|
|
###################### TEST #2
|
|
RESET MASTER;
|
|
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
|
|
FLUSH LOGS;
|
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
|
|
|
# assert: must show one binlog
|
|
show binary logs;
|
|
Log_name File_size
|
|
master-bin.000001 #
|
|
SET GLOBAL debug_dbug="";
|
|
RESET MASTER;
|
|
###################### TEST #3
|
|
CREATE TABLE t1 (a INT);
|
|
CREATE TABLE t2 (a VARCHAR(16384)) Engine=InnoDB;
|
|
CREATE TABLE t4 (a VARCHAR(16384));
|
|
INSERT INTO t1 VALUES (1);
|
|
RESET MASTER;
|
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
|
|
# assert: must show two binlog
|
|
show binary logs;
|
|
Log_name File_size
|
|
master-bin.000001 #
|
|
master-bin.000002 #
|
|
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
|
|
DELETE FROM t2;
|
|
RESET MASTER;
|
|
###################### TEST #4
|
|
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
|
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
|
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
|
|
|
# assert: must show one entry
|
|
SELECT count(*) FROM t2;
|
|
count(*)
|
|
1
|
|
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
|
|
DELETE FROM t2;
|
|
RESET MASTER;
|
|
###################### TEST #5
|
|
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
|
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data' INTO TABLE t2;
|
|
# assert: must show one entry
|
|
SELECT count(*) FROM t2;
|
|
count(*)
|
|
1
|
|
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
|
|
DELETE FROM t2;
|
|
RESET MASTER;
|
|
###################### TEST #6
|
|
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
|
|
SET AUTOCOMMIT=0;
|
|
INSERT INTO t2 VALUES ('muse');
|
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
|
|
INSERT INTO t2 VALUES ('muse');
|
|
COMMIT;
|
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
|
|
|
# assert: must show three entries
|
|
SELECT count(*) FROM t2;
|
|
count(*)
|
|
3
|
|
SET AUTOCOMMIT= 1;
|
|
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
|
|
DELETE FROM t2;
|
|
RESET MASTER;
|
|
###################### TEST #7
|
|
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
|
|
SELECT count(*) FROM t4;
|
|
count(*)
|
|
0
|
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
|
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
|
|
|
# assert: must show 1 entry
|
|
SELECT count(*) FROM t4;
|
|
count(*)
|
|
1
|
|
### check that the incident event is written to the current log
|
|
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
|
|
show binlog events from <binlog_start> limit 4,1;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Incident # # #1 (LOST_EVENTS)
|
|
DELETE FROM t4;
|
|
RESET MASTER;
|
|
###################### TEST #8
|
|
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
|
|
# must show 0 entries
|
|
SELECT count(*) FROM t4;
|
|
count(*)
|
|
0
|
|
SELECT count(*) FROM t2;
|
|
count(*)
|
|
0
|
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
|
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
|
|
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
|
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
|
|
|
INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc');
|
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
|
|
|
# INFO: Count(*) Before Offending DELETEs
|
|
# assert: must show 1 entry
|
|
SELECT count(*) FROM t4;
|
|
count(*)
|
|
1
|
|
# assert: must show 4 entries
|
|
SELECT count(*) FROM t2;
|
|
count(*)
|
|
4
|
|
DELETE FROM t4;
|
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
|
|
|
DELETE FROM t2;
|
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
|
|
|
# INFO: Count(*) After Offending DELETEs
|
|
# assert: must show zero entries
|
|
SELECT count(*) FROM t4;
|
|
count(*)
|
|
0
|
|
SELECT count(*) FROM t2;
|
|
count(*)
|
|
0
|
|
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
|
|
###################### TEST #9
|
|
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
|
|
SET SQL_LOG_BIN=0;
|
|
INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc'), ('ddd');
|
|
INSERT INTO t4 VALUES ('eee'), ('fff'), ('ggg'), ('hhh');
|
|
# assert: must show four entries
|
|
SELECT count(*) FROM t2;
|
|
count(*)
|
|
4
|
|
SELECT count(*) FROM t4;
|
|
count(*)
|
|
4
|
|
DELETE FROM t2;
|
|
DELETE FROM t4;
|
|
# assert: must show zero entries
|
|
SELECT count(*) FROM t2;
|
|
count(*)
|
|
0
|
|
SELECT count(*) FROM t4;
|
|
count(*)
|
|
0
|
|
SET SQL_LOG_BIN=1;
|
|
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
|
|
###################### TEST #10
|
|
call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
|
|
call mtr.add_suppression("Could not open .*");
|
|
RESET MASTER;
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
SET GLOBAL debug_dbug="+d,fault_injection_registering_index";
|
|
FLUSH LOGS;
|
|
ERROR HY000: Can't open file: 'master-bin.000002' (errno: 1 "Operation not permitted")
|
|
SET GLOBAL debug_dbug="-d,fault_injection_registering_index";
|
|
SHOW BINARY LOGS;
|
|
ERROR HY000: You are not using binary logging
|
|
CREATE TABLE t5 (a INT);
|
|
INSERT INTO t4 VALUES ('bbbbb');
|
|
INSERT INTO t2 VALUES ('aaaaa');
|
|
DELETE FROM t4;
|
|
DELETE FROM t2;
|
|
DROP TABLE t5;
|
|
###################### TEST #11
|
|
include/rpl_restart_server.inc [server_number=1]
|
|
SET GLOBAL debug_dbug="+d,fault_injection_openning_index";
|
|
FLUSH LOGS;
|
|
ERROR HY000: Can't open file: 'master-bin.index' (errno: 1 "Operation not permitted")
|
|
SET GLOBAL debug_dbug="-d,fault_injection_openning_index";
|
|
RESET MASTER;
|
|
ERROR HY000: Binlog closed, cannot RESET MASTER
|
|
CREATE TABLE t5 (a INT);
|
|
INSERT INTO t4 VALUES ('bbbbb');
|
|
INSERT INTO t2 VALUES ('aaaaa');
|
|
DELETE FROM t4;
|
|
DELETE FROM t2;
|
|
DROP TABLE t5;
|
|
include/rpl_restart_server.inc [server_number=1]
|
|
###################### TEST #12
|
|
SET GLOBAL debug_dbug="+d,fault_injection_new_file_rotate_event";
|
|
FLUSH LOGS;
|
|
ERROR HY000: Can't open file: 'master-bin' (errno: 2 "No such file or directory")
|
|
SET GLOBAL debug_dbug="-d,fault_injection_new_file_rotate_event";
|
|
RESET MASTER;
|
|
ERROR HY000: Binlog closed, cannot RESET MASTER
|
|
CREATE TABLE t5 (a INT);
|
|
INSERT INTO t4 VALUES ('bbbbb');
|
|
INSERT INTO t2 VALUES ('aaaaa');
|
|
DELETE FROM t4;
|
|
DELETE FROM t2;
|
|
DROP TABLE t5;
|
|
include/rpl_restart_server.inc [server_number=1]
|
|
SET GLOBAL debug_dbug= @old_debug;
|
|
DROP TABLE t1, t2, t4;
|
|
RESET MASTER;
|
|
include/start_slave.inc
|
|
#######################################################################
|
|
####################### PART 2: SLAVE TESTS ###########################
|
|
#######################################################################
|
|
include/rpl_reset.inc
|
|
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
|
|
call mtr.add_suppression("Error writing file .*");
|
|
call mtr.add_suppression("Could not open .*");
|
|
call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
|
|
call mtr.add_suppression("Can't generate a unique log-filename .*");
|
|
###################### TEST #13
|
|
SET @old_debug=@@global.debug;
|
|
include/stop_slave.inc
|
|
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
|
|
START SLAVE io_thread;
|
|
include/wait_for_slave_io_error.inc [errno=1595]
|
|
Last_IO_Error = 'Relay log write failure: could not queue event from master'
|
|
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
|
|
SET GLOBAL debug_dbug=@old_debug;
|
|
include/rpl_restart_server.inc [server_number=2]
|
|
###################### TEST #14
|
|
SET @old_debug=@@global.debug;
|
|
include/stop_slave.inc
|
|
SET GLOBAL debug_dbug="+d,fault_injection_new_file_rotate_event";
|
|
START SLAVE io_thread;
|
|
include/wait_for_slave_io_error.inc [errno=1595]
|
|
Last_IO_Error = 'Relay log write failure: could not queue event from master'
|
|
SET GLOBAL debug_dbug="-d,fault_injection_new_file_rotate_event";
|
|
SET GLOBAL debug_dbug=@old_debug;
|
|
include/rpl_restart_server.inc [server_number=2]
|
|
###################### TEST #15
|
|
SET @old_debug=@@global.debug;
|
|
include/stop_slave.inc
|
|
SET GLOBAL debug_dbug="+d,fault_injection_registering_index";
|
|
START SLAVE io_thread;
|
|
include/wait_for_slave_io_error.inc [errno=1595]
|
|
Last_IO_Error = 'Relay log write failure: could not queue event from master'
|
|
SET GLOBAL debug_dbug="-d,fault_injection_registering_index";
|
|
SET GLOBAL debug_dbug=@old_debug;
|
|
include/rpl_restart_server.inc [server_number=2]
|
|
###################### TEST #16
|
|
SET @old_debug=@@global.debug;
|
|
include/stop_slave.inc
|
|
SET GLOBAL debug_dbug="+d,fault_injection_openning_index";
|
|
START SLAVE io_thread;
|
|
include/wait_for_slave_io_error.inc [errno=1595]
|
|
Last_IO_Error = 'Relay log write failure: could not queue event from master'
|
|
SET GLOBAL debug_dbug="-d,fault_injection_openning_index";
|
|
SET GLOBAL debug_dbug=@old_debug;
|
|
include/rpl_restart_server.inc [server_number=2]
|
|
include/stop_slave_sql.inc
|
|
Warnings:
|
|
Note 1255 Slave already has been stopped
|
|
SET GLOBAL debug_dbug=@old_debug;
|
|
RESET SLAVE;
|
|
RESET MASTER;
|
|
include/rpl_end.inc
|