Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
80ef96a3
Commit
80ef96a3
authored
Mar 07, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/bkroot/mysql-5.1-new
into mysql.com:/home/bk/b16228-mysql-5.1-new
parents
47653b48
6df23f2b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
8 deletions
+53
-8
mysql-test/r/rpl_ndb_basic.result
mysql-test/r/rpl_ndb_basic.result
+37
-3
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+1
-1
mysql-test/t/rpl_ndb_basic.test
mysql-test/t/rpl_ndb_basic.test
+4
-2
sql/slave.cc
sql/slave.cc
+11
-2
No files found.
mysql-test/r/rpl_ndb_basic.result
View file @
80ef96a3
...
@@ -71,13 +71,47 @@ CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0',
...
@@ -71,13 +71,47 @@ CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0',
PRIMARY KEY USING HASH (`nid`))
PRIMARY KEY USING HASH (`nid`))
ENGINE=ndbcluster DEFAULT CHARSET=latin1;
ENGINE=ndbcluster DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES(1,"XYZ1","ABC1");
INSERT INTO t1 VALUES(1,"XYZ1","ABC1");
**** On Slave ****
BEGIN;
BEGIN;
UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1;
UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1;
set GLOBAL slave_transaction_retries=1;
set GLOBAL slave_transaction_retries=1;
**** On Master ****
UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
SHOW SLAVE STATUS;
**** On Slave ****
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
SHOW SLAVE STATUS;;
<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>
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;
set GLOBAL slave_transaction_retries=10;
START SLAVE;
START SLAVE;
select * from t1 order by nid;
select * from t1 order by nid;
...
...
mysql-test/t/disabled.def
View file @
80ef96a3
...
@@ -25,7 +25,7 @@ rpl_ddl : Bug#15963 SBR does not show "Definer" correctly
...
@@ -25,7 +25,7 @@ rpl_ddl : Bug#15963 SBR does not show "Definer" correctly
rpl_ndb_2innodb : Bugs#17400: delete & update of rows in table without pk fails
rpl_ndb_2innodb : Bugs#17400: delete & update of rows in table without pk fails
rpl_ndb_2myisam : Bugs#17400: delete & update of rows in table without pk fails
rpl_ndb_2myisam : Bugs#17400: delete & update of rows in table without pk fails
rpl_ndb_auto_inc : Bug#17086
rpl_ndb_auto_inc : Bug#17086
rpl_ndb_basic : Bug#16228 [IN REVIEW]
#
rpl_ndb_basic : Bug#16228 [IN REVIEW]
rpl_ndb_ddl : Bug#17400: delete & update of rows in table without pk fails
rpl_ndb_ddl : Bug#17400: delete & update of rows in table without pk fails
rpl_ndb_delete_nowhere : Bug#17400: delete & update of rows in table without pk fails
rpl_ndb_delete_nowhere : Bug#17400: delete & update of rows in table without pk fails
rpl_ndb_innodb2ndb : Bugs#17400: delete & update of rows in table without pk fails
rpl_ndb_innodb2ndb : Bugs#17400: delete & update of rows in table without pk fails
...
...
mysql-test/t/rpl_ndb_basic.test
View file @
80ef96a3
...
@@ -98,6 +98,7 @@ INSERT INTO t1 VALUES(1,"XYZ1","ABC1");
...
@@ -98,6 +98,7 @@ INSERT INTO t1 VALUES(1,"XYZ1","ABC1");
# cause a lock on that row on the slave
# cause a lock on that row on the slave
--
sync_slave_with_master
--
sync_slave_with_master
--
connection
slave
--
connection
slave
--
echo
****
On
Slave
****
BEGIN
;
BEGIN
;
UPDATE
t1
SET
`nom`
=
"LOCK"
WHERE
`nid`
=
1
;
UPDATE
t1
SET
`nom`
=
"LOCK"
WHERE
`nid`
=
1
;
...
@@ -107,6 +108,7 @@ set GLOBAL slave_transaction_retries=1;
...
@@ -107,6 +108,7 @@ set GLOBAL slave_transaction_retries=1;
# now do a change to this row on the master
# now do a change to this row on the master
# will deadlock on the slave because of lock above
# will deadlock on the slave because of lock above
--
connection
master
--
connection
master
--
echo
****
On
Master
****
UPDATE
t1
SET
`nom`
=
"DEAD"
WHERE
`nid`
=
1
;
UPDATE
t1
SET
`nom`
=
"DEAD"
WHERE
`nid`
=
1
;
# wait for deadlock to be detected
# wait for deadlock to be detected
...
@@ -119,14 +121,14 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
...
@@ -119,14 +121,14 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
# replication should have stopped, since max retries where not enough
# replication should have stopped, since max retries where not enough
# verify with show slave status
# verify with show slave status
--
connection
slave
--
connection
slave
--
echo
****
On
Slave
****
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
<
Slave_IO_State
>
7
<
Read_Master_Log_Pos
>
8
<
Relay_Log_File
>
9
<
Relay_Log_Pos
>
16
<
Replicate_Ignore_Table
>
22
<
Exec_Master_Log_Pos
>
23
<
Relay_Log_Space
>
33
<
Seconds_Behind_Master
>
--
replace_column
1
<
Slave_IO_State
>
7
<
Read_Master_Log_Pos
>
8
<
Relay_Log_File
>
9
<
Relay_Log_Pos
>
16
<
Replicate_Ignore_Table
>
22
<
Exec_Master_Log_Pos
>
23
<
Relay_Log_Space
>
33
<
Seconds_Behind_Master
>
SHOW
SLAVE
STATUS
;
--
query_vertical
SHOW
SLAVE
STATUS
;
# now set max retries high enough to succeed, and start slave again
# now set max retries high enough to succeed, and start slave again
set
GLOBAL
slave_transaction_retries
=
10
;
set
GLOBAL
slave_transaction_retries
=
10
;
START
SLAVE
;
START
SLAVE
;
# wait for deadlock to be detected and retried
# wait for deadlock to be detected and retried
# should be the same sleep as above for test to be valid
# should be the same sleep as above for test to be valid
--
sleep
5
--
sleep
5
...
...
sql/slave.cc
View file @
80ef96a3
...
@@ -3093,6 +3093,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
...
@@ -3093,6 +3093,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
else
else
{
{
exec_res
=
0
;
exec_res
=
0
;
end_trans
(
thd
,
ROLLBACK
);
/* chance for concurrent connection to get more locks */
/* chance for concurrent connection to get more locks */
safe_sleep
(
thd
,
min
(
rli
->
trans_retries
,
MAX_SLAVE_RETRY_PAUSE
),
safe_sleep
(
thd
,
min
(
rli
->
trans_retries
,
MAX_SLAVE_RETRY_PAUSE
),
(
CHECK_KILLED_FUNC
)
sql_slave_killed
,
(
void
*
)
rli
);
(
CHECK_KILLED_FUNC
)
sql_slave_killed
,
(
void
*
)
rli
);
...
@@ -3110,8 +3111,16 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
...
@@ -3110,8 +3111,16 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
"the slave_transaction_retries variable."
,
"the slave_transaction_retries variable."
,
slave_trans_retries
);
slave_trans_retries
);
}
}
if
(
!
((
thd
->
options
&
OPTION_BEGIN
)
&&
opt_using_transactions
))
else
if
(
!
((
thd
->
options
&
OPTION_BEGIN
)
&&
opt_using_transactions
))
rli
->
trans_retries
=
0
;
// restart from fresh
{
/*
Only reset the retry counter if the event succeeded or
failed with a non-transient error. On a successful event,
the execution will proceed as usual; in the case of a
non-transient error, the slave will stop with an error.
*/
rli
->
trans_retries
=
0
;
// restart from fresh
}
}
}
return
exec_res
;
return
exec_res
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment