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
3a18f1e2
Commit
3a18f1e2
authored
Apr 18, 2006
by
mleich@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/matthias/Arbeit/mysql-4.1/src
into mysql.com:/home/matthias/Arbeit/mysql-4.1/src-1
parents
40ec77d0
3ca1ec8f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
119 additions
and
24 deletions
+119
-24
mysql-test/r/rpl_deadlock.result
mysql-test/r/rpl_deadlock.result
+99
-6
mysql-test/r/rpl_relayrotate.result
mysql-test/r/rpl_relayrotate.result
+2
-5
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+0
-3
mysql-test/t/rpl_deadlock.test
mysql-test/t/rpl_deadlock.test
+11
-5
mysql-test/t/rpl_relayrotate.test
mysql-test/t/rpl_relayrotate.test
+3
-5
mysql-test/t/rpl_until.test
mysql-test/t/rpl_until.test
+4
-0
No files found.
mysql-test/r/rpl_deadlock.result
View file @
3a18f1e2
...
@@ -44,8 +44,39 @@ select * from t2;
...
@@ -44,8 +44,39 @@ select * from t2;
a
a
22
22
show slave status;
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_MYPORT 1 master-bin.000001 13110 # # master-bin.000001 Yes Yes 0 0 13110 # None 0 No #
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;
stop slave;
change master to master_log_pos=401;
change master to master_log_pos=401;
begin;
begin;
...
@@ -62,8 +93,39 @@ select * from t2;
...
@@ -62,8 +93,39 @@ select * from t2;
a
a
22
22
show slave status;
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_MYPORT 1 master-bin.000001 13110 # # master-bin.000001 Yes Yes 0 0 13110 # None 0 No #
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;
set global max_relay_log_size=0;
stop slave;
stop slave;
change master to master_log_pos=401;
change master to master_log_pos=401;
...
@@ -82,6 +144,37 @@ select * from t2;
...
@@ -82,6 +144,37 @@ select * from t2;
a
a
22
22
show slave status;
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_MYPORT 1 master-bin.000001 13110 # # master-bin.000001 Yes Yes 0 0 13110 # None 0 No #
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;
drop table t1,t2,t3,t4;
mysql-test/r/rpl_relayrotate.result
View file @
3a18f1e2
...
@@ -10,10 +10,7 @@ reset slave;
...
@@ -10,10 +10,7 @@ reset slave;
start slave;
start slave;
stop slave;
stop slave;
start slave;
start slave;
select master_pos_wait('master-bin.001',3000)>=0;
select max(a) from t1;
master_pos_wait('master-bin.001',3000)>=0
max(a)
1
select * from t1 where a=8000;
a
8000
8000
drop table t1;
drop table t1;
mysql-test/t/disabled.def
View file @
3a18f1e2
...
@@ -10,6 +10,3 @@
...
@@ -10,6 +10,3 @@
#
#
##############################################################################
##############################################################################
rpl_relayrotate : Unstable test case, bug#12429
rpl_until : Unstable test case, bug#12429
rpl_deadlock : Unstable test case, bug#12429
mysql-test/t/rpl_deadlock.test
View file @
3a18f1e2
...
@@ -58,7 +58,7 @@ while ($1)
...
@@ -58,7 +58,7 @@ while ($1)
enable_query_log
;
enable_query_log
;
select
*
from
t1
for
update
;
select
*
from
t1
for
update
;
start
slave
;
start
slave
;
--
sleep
3
# hope that slave is blocked now
--
real_
sleep
3
# hope that slave is blocked now
insert
into
t2
values
(
22
);
# provoke deadlock, slave should be victim
insert
into
t2
values
(
22
);
# provoke deadlock, slave should be victim
commit
;
commit
;
sync_with_master
;
sync_with_master
;
...
@@ -67,7 +67,9 @@ select * from t2;
...
@@ -67,7 +67,9 @@ select * from t2;
# check that no error is reported
# check that no error is reported
--
replace_column
1
# 8 # 9 # 23 # 33 #
--
replace_column
1
# 8 # 9 # 23 # 33 #
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
vertical_results
show
slave
status
;
show
slave
status
;
--
horizontal_results
# 2) Test lock wait timeout
# 2) Test lock wait timeout
...
@@ -76,15 +78,17 @@ change master to master_log_pos=401; # the BEGIN log event
...
@@ -76,15 +78,17 @@ change master to master_log_pos=401; # the BEGIN log event
begin
;
begin
;
select
*
from
t2
for
update
;
# hold lock
select
*
from
t2
for
update
;
# hold lock
start
slave
;
start
slave
;
--
sleep
10
# slave should have blocked, and be retrying
--
real_
sleep
10
# slave should have blocked, and be retrying
commit
;
commit
;
sync_with_master
;
sync_with_master
;
select
*
from
t1
;
# check that slave succeeded finally
select
*
from
t1
;
# check that slave succeeded finally
select
*
from
t2
;
select
*
from
t2
;
# check that no error is reported
# check that no error is reported
--
replace_column
1
# 8 # 9 # 23 # 33 #
--
replace_column
1
# 8 # 9 #
11 #
23 # 33 #
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
vertical_results
show
slave
status
;
show
slave
status
;
--
horizontal_results
# Now we repeat 2), but with BEGIN in the same relay log as
# Now we repeat 2), but with BEGIN in the same relay log as
# COMMIT (to see if seeking into hot log is ok).
# COMMIT (to see if seeking into hot log is ok).
...
@@ -97,14 +101,16 @@ change master to master_log_pos=401;
...
@@ -97,14 +101,16 @@ change master to master_log_pos=401;
begin
;
begin
;
select
*
from
t2
for
update
;
select
*
from
t2
for
update
;
start
slave
;
start
slave
;
--
sleep
10
--
real_
sleep
10
commit
;
commit
;
sync_with_master
;
sync_with_master
;
select
*
from
t1
;
select
*
from
t1
;
select
*
from
t2
;
select
*
from
t2
;
--
replace_column
1
# 8 # 9 # 23 # 33 #
--
replace_column
1
# 8 # 9 #
11 #
23 # 33 #
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
vertical_results
show
slave
status
;
show
slave
status
;
--
horizontal_results
connection
master
;
connection
master
;
drop
table
t1
,
t2
,
t3
,
t4
;
drop
table
t1
,
t2
,
t3
,
t4
;
...
...
mysql-test/t/rpl_relayrotate.test
View file @
3a18f1e2
...
@@ -52,11 +52,9 @@ start slave;
...
@@ -52,11 +52,9 @@ start slave;
# which proves that the transaction restarted at
# which proves that the transaction restarted at
# the right place.
# the right place.
# We must wait for the transaction to commit before
# We must wait for the transaction to commit before
# reading, MASTER_POS_WAIT() will do it for sure
# reading:
# (the only statement with position>=3000 is COMMIT).
sync_with_master
;
select
master_pos_wait
(
'master-bin.001'
,
3000
)
>=
0
;
select
max
(
a
)
from
t1
;
select
*
from
t1
where
a
=
8000
;
connection
master
;
connection
master
;
# The following DROP is a very important cleaning task:
# The following DROP is a very important cleaning task:
...
...
mysql-test/t/rpl_until.test
View file @
3a18f1e2
...
@@ -26,6 +26,7 @@ show binlog events;
...
@@ -26,6 +26,7 @@ show binlog events;
connection
slave
;
connection
slave
;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
244
;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
244
;
sleep
2
;
sleep
2
;
wait_for_slave_to_stop
;
# here table should be still not deleted
# here table should be still not deleted
select
*
from
t1
;
select
*
from
t1
;
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
...
@@ -37,6 +38,7 @@ start slave until master_log_file='master-no-such-bin.000001', master_log_pos=29
...
@@ -37,6 +38,7 @@ start slave until master_log_file='master-no-such-bin.000001', master_log_pos=29
# again this table should be still not deleted
# again this table should be still not deleted
select
*
from
t1
;
select
*
from
t1
;
sleep
2
;
sleep
2
;
wait_for_slave_to_stop
;
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_column
1
# 9 # 11 # 23 # 33 #
--
replace_column
1
# 9 # 11 # 23 # 33 #
show
slave
status
;
show
slave
status
;
...
@@ -44,6 +46,7 @@ show slave status;
...
@@ -44,6 +46,7 @@ show slave status;
# try replicate all until second insert to t2;
# try replicate all until second insert to t2;
start
slave
until
relay_log_file
=
'slave-relay-bin.000002'
,
relay_log_pos
=
537
;
start
slave
until
relay_log_file
=
'slave-relay-bin.000002'
,
relay_log_pos
=
537
;
sleep
4
;
sleep
4
;
wait_for_slave_to_stop
;
select
*
from
t2
;
select
*
from
t2
;
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_column
1
# 9 # 11 # 23 # 33 #
--
replace_column
1
# 9 # 11 # 23 # 33 #
...
@@ -61,6 +64,7 @@ stop slave;
...
@@ -61,6 +64,7 @@ stop slave;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
561
;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
561
;
# 2 is not enough when running with valgrind
# 2 is not enough when running with valgrind
--
real_sleep
4
--
real_sleep
4
wait_for_slave_to_stop
;
# here the sql slave thread should be stopped
# here the sql slave thread should be stopped
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
bin
.
000005
bin
.
000004
bin
.
000006
bin
.
000004
bin
.
000007
bin
.
000004
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
bin
.
000005
bin
.
000004
bin
.
000006
bin
.
000004
bin
.
000007
bin
.
000004
--
replace_column
1
# 9 # 23 # 33 #
--
replace_column
1
# 9 # 23 # 33 #
...
...
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