mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#16228 (RBR: Slave SQL thread retries infinitely):
Transaction aborted on slave should be retries. The OPTION_BEGIN bit was cleared prematurely. Removed dependence of code on value of OPTION_BEGIN bit when executing retries.
This commit is contained in:
@ -71,13 +71,47 @@ CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY USING HASH (`nid`))
|
||||
ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES(1,"XYZ1","ABC1");
|
||||
**** On Slave ****
|
||||
BEGIN;
|
||||
UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1;
|
||||
set GLOBAL slave_transaction_retries=1;
|
||||
**** On Master ****
|
||||
UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes No <Replicate_Ignore_Table> 146 Error in Write_rows event: error during transaction execution on table test.t1 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master>
|
||||
**** On Slave ****
|
||||
SHOW SLAVE STATUS;;
|
||||
Slave_IO_State <Slave_IO_State>
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos <Read_Master_Log_Pos>
|
||||
Relay_Log_File <Relay_Log_File>
|
||||
Relay_Log_Pos <Relay_Log_Pos>
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table <Replicate_Ignore_Table>
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 146
|
||||
Last_Error Error in Write_rows event: error during transaction execution on table test.t1
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos <Exec_Master_Log_Pos>
|
||||
Relay_Log_Space <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 <Seconds_Behind_Master>
|
||||
set GLOBAL slave_transaction_retries=10;
|
||||
START SLAVE;
|
||||
select * from t1 order by nid;
|
||||
|
Reference in New Issue
Block a user