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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
af8a8ca6
Commit
af8a8ca6
authored
Oct 14, 2013
by
Nuno Carvalho
Browse files
Options
Browse Files
Download
Plain Diff
WL#7266: Dump-thread additional concurrency tests
Merge from mysql-5.1 into mysql-5.5.
parents
5e550e9d
3f587452
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result
mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result
+14
-0
mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test
mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test
+51
-0
No files found.
mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result
0 → 100644
View file @
af8a8ca6
include/master-slave.inc
[connection master]
SET @debug_saved= @@GLOBAL.DEBUG;
CREATE TABLE t (i INT);
SET GLOBAL DEBUG= "d,wait_after_binlog_EOF";
INSERT INTO t VALUES (1);
INSERT INTO t VALUES (2);
FLUSH LOGS;
SET DEBUG_SYNC= 'now SIGNAL signal.rotate_finished';
include/diff_tables.inc [master:t,slave:t]
SET @@GLOBAL.DEBUG= @debug_saved;
SET DEBUG_SYNC= 'RESET';
DROP TABLE t;
include/rpl_end.inc
mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test
0 → 100644
View file @
af8a8ca6
#
# Whenever the mysql_binlog_send method (dump thread) reaches the
# end of file when reading events from the binlog, before checking
# if it should wait for more events, there was a test to check if
# the file being read was still active, i.e, it was the last known
# binlog. However, it was possible that something was written to
# the binary log and then a rotation would happen, after EOF was
# detected and before the check for active was performed. In this
# case, the end of the binary log would not be read by the dump
# thread, and this would cause the slave to lose updates.
#
# This test verifies that the problem has been fixed. It waits
# during this window while forcing a rotation in the binlog.
#
--
source
include
/
have_debug
.
inc
--
source
include
/
master
-
slave
.
inc
--
connection
master
SET
@
debug_saved
=
@@
GLOBAL
.
DEBUG
;
CREATE
TABLE
t
(
i
INT
);
# When reaching the EOF the dump thread will wait before deciding if
# it should move to a new binlong file.
SET
GLOBAL
DEBUG
=
"d,wait_after_binlog_EOF"
;
INSERT
INTO
t
VALUES
(
1
);
--
sleep
1
# A insert and a rotate happens before the decision
INSERT
INTO
t
VALUES
(
2
);
FLUSH
LOGS
;
SET
DEBUG_SYNC
=
'now SIGNAL signal.rotate_finished'
;
--
sync_slave_with_master
# All the rows should be sent to the slave.
--
let
$diff_tables
=
master
:
t
,
slave
:
t
--
source
include
/
diff_tables
.
inc
##Clean up
--
connection
master
SET
@@
GLOBAL
.
DEBUG
=
@
debug_saved
;
SET
DEBUG_SYNC
=
'RESET'
;
DROP
TABLE
t
;
--
source
include
/
rpl_end
.
inc
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