mirror of
https://github.com/MariaDB/server.git
synced 2025-11-27 05:41:41 +03:00
Fix rpl_skip_error test. We cant reset Slave_skipped_errors(even with FLUSH STATUS), So instead of absolute slave_skipped_errors we look for delta of slave_skipped_errors Fix rpl.rpl_binlog_errors and binlog_encryption.rpl_binlog_errors We create the $load_file and $load_file2 but we never remove them. Fix rpl_000011.test Instead of real value use delta value , Since flush status wont flush LONGLONG variable. Fix rpl_row_find_row_debug Instead of searching whole log_error_ file we will use search_pattern_in_file which runs pattern search only on latest test run , instead of full file. Fix rpl_ip_mix rpl_ip_mix2 We should call reset slave all because we also want to reset master_host otherwise show slave status wont be empty and making repeat N a failure. Fix rpl_rotate_logs First we have to remove master.info file (cleanup) and second we have to call reset slave all because if we do not call reset slave all then we wont read master.info file beacuse we already have master config in memory. And this makes start slave to pass , which shoud fail becuase its permision is 000 Fix circular_serverid0 test The reason is that ++dbug_rows_event_count == 2 in queue_event does not take --repeat into account. So I have reseted the dbug_rows_event_count in if body.
134 lines
3.9 KiB
Plaintext
134 lines
3.9 KiB
Plaintext
connect master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
|
|
connect slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK;
|
|
connection slave;
|
|
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
|
|
start slave;
|
|
Got one of the listed errors
|
|
start slave;
|
|
ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
|
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
|
|
ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
|
|
reset slave;
|
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
|
|
connection master;
|
|
reset master;
|
|
connection slave;
|
|
start slave;
|
|
include/wait_for_slave_to_start.inc
|
|
connection master;
|
|
create temporary table temp_table (a char(80) not null);
|
|
insert into temp_table values ("testing temporary tables");
|
|
create table t1 (s text);
|
|
insert into t1 values('Could not break slave'),('Tried hard');
|
|
connection slave;
|
|
Master_Log_File = 'master-bin.000001'
|
|
Relay_Master_Log_File = 'master-bin.000001'
|
|
include/check_slave_is_running.inc
|
|
select * from t1;
|
|
s
|
|
Could not break slave
|
|
Tried hard
|
|
connection master;
|
|
flush logs;
|
|
create table t2(m int not null auto_increment primary key);
|
|
insert into t2 values (34),(67),(123);
|
|
flush logs;
|
|
show binary logs;
|
|
Log_name File_size
|
|
master-bin.000001 #
|
|
master-bin.000002 #
|
|
master-bin.000003 #
|
|
create table t3 select * from temp_table;
|
|
connection slave;
|
|
select * from t3;
|
|
a
|
|
testing temporary tables
|
|
connection master;
|
|
drop table temp_table, t3;
|
|
connection slave;
|
|
insert into t2 values(1234);
|
|
connection master;
|
|
set insert_id=1234;
|
|
insert into t2 values(NULL);
|
|
connection slave;
|
|
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* error.* 1062");
|
|
include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
|
|
connection master;
|
|
connection slave;
|
|
connection master;
|
|
purge master logs to 'master-bin.000002';
|
|
show master logs;
|
|
Log_name master-bin.000002
|
|
File_size #
|
|
Log_name master-bin.000003
|
|
File_size #
|
|
purge binary logs to 'master-bin.000002';
|
|
show binary logs;
|
|
Log_name File_size
|
|
master-bin.000002 #
|
|
master-bin.000003 #
|
|
SELECT @time_for_purge:=DATE_ADD('tmpval', INTERVAL 1 SECOND);
|
|
purge master logs before (@time_for_purge);
|
|
show binary logs;
|
|
Log_name File_size
|
|
master-bin.000003 #
|
|
insert into t2 values (65);
|
|
connection slave;
|
|
Master_Log_File = 'master-bin.000003'
|
|
Relay_Master_Log_File = 'master-bin.000003'
|
|
include/check_slave_is_running.inc
|
|
select * from t2;
|
|
m
|
|
34
|
|
65
|
|
67
|
|
123
|
|
1234
|
|
connection master;
|
|
create temporary table temp_table (a char(80) not null);
|
|
insert into temp_table values ("testing temporary tables part 2");
|
|
create table t3 (n int);
|
|
select count(*) from t3 where n >= 4;
|
|
count(*)
|
|
103
|
|
create table t4 select * from temp_table;
|
|
show binary logs;
|
|
Log_name File_size
|
|
master-bin.000003 #
|
|
master-bin.000004 #
|
|
master-bin.000005 #
|
|
master-bin.000006 #
|
|
master-bin.000007 #
|
|
master-bin.000008 #
|
|
master-bin.000009 #
|
|
show master status;
|
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
master-bin.000009 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
|
connection slave;
|
|
select * from t4;
|
|
a
|
|
testing temporary tables part 2
|
|
Master_Log_File = 'master-bin.000009'
|
|
Relay_Master_Log_File = 'master-bin.000009'
|
|
include/check_slave_is_running.inc
|
|
lock tables t3 read;
|
|
select count(*) from t3 where n >= 4;
|
|
count(*)
|
|
103
|
|
unlock tables;
|
|
connection master;
|
|
drop table if exists t1,t2,t3,t4;
|
|
drop temporary table temp_table;
|
|
connection slave;
|
|
End of 4.1 tests
|
|
show binlog events in 'non existing_binlog_file';
|
|
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
|
purge master logs before now();
|
|
show binlog events in '';
|
|
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
|
purge master logs before now();
|
|
End of 5.0 tests
|
|
#cleanup
|
|
include/stop_slave.inc
|
|
reset slave all;
|