mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
f1a5003548
MySQL 4.1 and Bug#16920 rpl_deadlock_innodb fails in show slave status (reported for MySQL 5.1) - backport of several fixes done in MySQL 5.0 to 4.1 - fix for new discovered instability (see comment on Bug#12429 + Bug#16920) - reenabling of testcases mysql-test/r/rpl_deadlock.result: Updated results mysql-test/r/rpl_relayrotate.result: Updated results mysql-test/t/disabled.def: Reenabling of tests mysql-test/t/rpl_deadlock.test: - replace sleep with real_sleep (backport fix for Bug#15624 MySQL 5.0) - egalized value for Slave_IO_Running - line 105 (backport fix for Bug#12429 MySQL 5.0) - line 85 (see comment in Bug#12429 + Bug#16920 rpl_deadlock_innodb fails in show slave status) - improve readability of show slave status output (--vertical_results) mysql-test/t/rpl_relayrotate.test: - Replace select ... with select max(a) - add sync_with_master (backport fix done by Kristian in MySQL 5.0 because of timing problems similar to Bug#15624) mysql-test/t/rpl_until.test: Add wait_for_slave_to_stop like in the current MySQL 5.0 version of this test. I assume this makes the test results more predictable.
180 lines
3.5 KiB
Text
180 lines
3.5 KiB
Text
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
create table t1 (a int not null, key(a)) engine=innodb;
|
|
create table t2 (a int not null, key(a)) engine=innodb;
|
|
create table t3 (a int) engine=innodb;
|
|
create table t4 (a int) engine=innodb;
|
|
show variables like 'slave_transaction_retries';
|
|
Variable_name Value
|
|
slave_transaction_retries 0
|
|
show create table t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`a` int(11) NOT NULL default '0',
|
|
KEY `a` (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
show create table t2;
|
|
Table Create Table
|
|
t2 CREATE TABLE `t2` (
|
|
`a` int(11) NOT NULL default '0',
|
|
KEY `a` (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
show variables like 'slave_transaction_retries';
|
|
Variable_name Value
|
|
slave_transaction_retries 2
|
|
stop slave;
|
|
begin;
|
|
insert into t3 select * from t2 for update;
|
|
insert into t1 values(1);
|
|
commit;
|
|
begin;
|
|
select * from t1 for update;
|
|
a
|
|
start slave;
|
|
insert into t2 values(22);
|
|
commit;
|
|
select * from t1;
|
|
a
|
|
1
|
|
select * from t2;
|
|
a
|
|
22
|
|
show slave status;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_MYPORT
|
|
Connect_Retry 1
|
|
Master_Log_File master-bin.000001
|
|
Read_Master_Log_Pos 13110
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File master-bin.000001
|
|
Slave_IO_Running Yes
|
|
Slave_SQL_Running Yes
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 13110
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
stop slave;
|
|
change master to master_log_pos=401;
|
|
begin;
|
|
select * from t2 for update;
|
|
a
|
|
22
|
|
start slave;
|
|
commit;
|
|
select * from t1;
|
|
a
|
|
1
|
|
1
|
|
select * from t2;
|
|
a
|
|
22
|
|
show slave status;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_MYPORT
|
|
Connect_Retry 1
|
|
Master_Log_File master-bin.000001
|
|
Read_Master_Log_Pos 13110
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File master-bin.000001
|
|
Slave_IO_Running #
|
|
Slave_SQL_Running Yes
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 13110
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
set global max_relay_log_size=0;
|
|
stop slave;
|
|
change master to master_log_pos=401;
|
|
begin;
|
|
select * from t2 for update;
|
|
a
|
|
22
|
|
start slave;
|
|
commit;
|
|
select * from t1;
|
|
a
|
|
1
|
|
1
|
|
1
|
|
select * from t2;
|
|
a
|
|
22
|
|
show slave status;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_MYPORT
|
|
Connect_Retry 1
|
|
Master_Log_File master-bin.000001
|
|
Read_Master_Log_Pos 13110
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File master-bin.000001
|
|
Slave_IO_Running #
|
|
Slave_SQL_Running Yes
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 13110
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
drop table t1,t2,t3,t4;
|