mirror of
https://github.com/MariaDB/server.git
synced 2025-07-04 01:23:45 +03:00
DURING INNODB RECOVERY Problem: ======= The connection 'master' is dropped by mysqltest after rpl_end.inc. At this point, dropping temporary tables at the connection 'master' are not synced at slave. So, the temporary tables replicated from master remain on slave leading to an inconsistent close of the test. The following test thus complains about the presence of temporary table(s) left over from the previous test. Fix: === - Put explicit drop commands in replication tests so that the temporary tables are dropped at slave as well. - Added the check for Slave_open_temp_tables in mtr_check.sql to warn about the remaining temporary table, if any, at the close of a test.
98 lines
3.9 KiB
Plaintext
98 lines
3.9 KiB
Plaintext
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; more error messages can be found in the MySQL 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; more error messages can be found in the MySQL error log
|
|
reset slave;
|
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
|
|
reset master;
|
|
start slave;
|
|
include/wait_for_slave_to_start.inc
|
|
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');
|
|
Master_Log_File = 'master-bin.000001'
|
|
Relay_Master_Log_File = 'master-bin.000001'
|
|
include/check_slave_is_running.inc
|
|
include/assert.inc [Table t1 should contain the first inserted line]
|
|
include/assert.inc [Table t1 should contain the second inserted line]
|
|
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;
|
|
include/assert.inc [Data in t3 should be equal to temp_table]
|
|
drop table temp_table, t3;
|
|
insert into t2 values(1234);
|
|
set insert_id=1234;
|
|
insert into t2 values(NULL);
|
|
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* Error_code: 1062");
|
|
include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
|
|
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);
|
|
Master_Log_File = 'master-bin.000003'
|
|
Relay_Master_Log_File = 'master-bin.000003'
|
|
include/check_slave_is_running.inc
|
|
include/assert.inc [Table t2 should still contain the first inserted line after creation]
|
|
include/assert.inc [Table t2 should contain the line inserted after the purge]
|
|
include/assert.inc [Table t2 should still contain the second insert line after creation]
|
|
include/assert.inc [Table t2 should still contain the third inserted line after creation]
|
|
include/assert.inc [Table t2 should still contain the line from the duplicated key test]
|
|
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);
|
|
include/assert.inc [Table t3 should contain 100 lines on the master]
|
|
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 #
|
|
show master status;
|
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
master-bin.000008 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
|
include/assert.inc [Data in t4 should be equal to temp_table]
|
|
Master_Log_File = 'master-bin.000008'
|
|
Relay_Master_Log_File = 'master-bin.000008'
|
|
include/check_slave_is_running.inc
|
|
lock tables t3 read;
|
|
include/assert.inc [Table t3 should contain 100 lines on the slave]
|
|
unlock tables;
|
|
drop table if exists t1,t2,t3,t4;
|
|
drop temporary table temp_table;
|
|
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
|
|
include/stop_slave.inc
|