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
ae5951d3
Commit
ae5951d3
authored
Feb 17, 2013
by
Shivji Kumar Jha
Browse files
Options
Browse Files
Download
Plain Diff
BUG#15965353- RPL.RPL_ROW_UNTIL FAILS ON PB2,
PLATFORM= MACOSX10.6 X86_64 MAX bzr merge 5.1=>5.5
parents
91e043c3
5fcf40a2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
41 deletions
+87
-41
mysql-test/include/rpl_init.inc
mysql-test/include/rpl_init.inc
+0
-3
mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
+12
-0
mysql-test/suite/rpl/r/rpl_row_until.result
mysql-test/suite/rpl/r/rpl_row_until.result
+12
-12
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
+12
-0
mysql-test/suite/rpl/t/rpl_row_until.test
mysql-test/suite/rpl/t/rpl_row_until.test
+51
-26
No files found.
mysql-test/include/rpl_init.inc
View file @
ae5951d3
...
...
@@ -7,7 +7,6 @@
# well as extra connections server_1_1, server_2_1, ...,
# server_N_1. server_I and server_I_1 are connections to the same
# server.
# - Sets up @@auto_increment_increment and @@auto_increment_increment.
# - Verifies that @@server_id of all servers are different.
# - Calls RESET MASTER, RESET SLAVE, USE test, CHANGE MASTER, START SLAVE.
# - Sets the connection to server_1 before exiting.
...
...
@@ -179,8 +178,6 @@ while ($_rpl_server)
RESET
MASTER
;
RESET
SLAVE
;
}
eval
SET
auto_increment_increment
=
$rpl_server_count
;
eval
SET
auto_increment_offset
=
$_rpl_server
;
--
dec
$_rpl_server
}
...
...
mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
View file @
ae5951d3
*** Set up circular replication on four servers ***
include/rpl_init.inc [topology=1->2->3->4->1]
[connection server_4]
SET auto_increment_increment= 4;
SET auto_increment_offset= 4;
[connection server_3]
SET auto_increment_increment= 4;
SET auto_increment_offset= 3;
[connection server_2]
SET auto_increment_increment= 4;
SET auto_increment_offset= 2;
[connection server_1]
SET auto_increment_increment= 4;
SET auto_increment_offset= 1;
*** Preparing data ***
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM;
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
...
...
mysql-test/suite/rpl/r/rpl_row_until.result
View file @
ae5951d3
...
...
@@ -27,13 +27,6 @@ n
3
4
include/check_slave_param.inc [Exec_Master_Log_Pos]
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2
include/wait_for_slave_sql_to_stop.inc
SELECT * FROM t2;
n
1
2
include/check_slave_param.inc [Exec_Master_Log_Pos]
START SLAVE;
include/wait_for_slave_to_start.inc
include/stop_slave.inc
...
...
@@ -51,10 +44,17 @@ START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000009';
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=MASTER_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
START SLAVE;
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
Warnings:
Note 1254 Slave is already running
include/stop_slave.inc
RESET SLAVE;
include/start_slave.inc
include/rpl_reset.inc
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1);
include/stop_slave_sql.inc
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
include/sync_slave_io_with_master.inc
include/wait_for_slave_sql_to_stop.inc
include/assert.inc [table t1 should have two rows.]
include/start_slave.inc
DROP TABLE t1;
include/rpl_end.inc
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
View file @
ae5951d3
...
...
@@ -23,6 +23,18 @@ let $keep_connection= 1;
--
source
include
/
rpl_init
.
inc
--
echo
#set auto inc variables at each server
--
let
$_rpl_server
=
$rpl_server_count
while
(
$_rpl_server
)
{
--
let
$rpl_connection_name
=
server_
$_rpl_server
--
source
include
/
rpl_connection
.
inc
eval
SET
auto_increment_increment
=
$rpl_server_count
;
eval
SET
auto_increment_offset
=
$_rpl_server
;
--
dec
$_rpl_server
}
# Preparing data.
--
echo
***
Preparing
data
***
--
connection
server_1
...
...
mysql-test/suite/rpl/t/rpl_row_until.test
View file @
ae5951d3
...
...
@@ -2,7 +2,13 @@
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
master
-
slave
.
inc
# Note: The test is dependent on binlog positions
##############################################################################
# The test is dependent on binlog positions. The test is divided into two
# sections. The first section checks START SLAVE UNTIL MASTER_LOG_FILE =
# 'log_name', MASTER_LOG_POS = log_pos followed by a couple of failure
# scenarios. The second section checks START SLAVE UNTIL RELAY_LOG_FILE =
# 'log_name', RELAY_LOG_POS = log_pos.
##############################################################################
# Create some events on master
connection
master
;
...
...
@@ -24,13 +30,6 @@ CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT
INTO
t2
VALUES
(
1
),(
2
);
# Save master log position for query INSERT INTO t2 VALUES (1),(2);
let
$master_pos_insert1_t2
=
query_get_value
(
SHOW
MASTER
STATUS
,
Position
,
1
);
sync_slave_with_master
;
#show binlog events;
# Save relay log position for query INSERT INTO t2 VALUES (1),(2);
let
$relay_pos_insert1_t2
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Relay_Log_Pos
,
1
);
connection
master
;
INSERT
INTO
t2
VALUES
(
3
),(
4
);
DROP
TABLE
t2
;
# Save master log position for query DROP TABLE t2;
...
...
@@ -71,18 +70,6 @@ SELECT * FROM t1;
--
let
$slave_param_value
=
$master_pos_drop_t1
--
source
include
/
check_slave_param
.
inc
# Try replicate all up to and not including the second insert to t2;
echo
START
SLAVE
UNTIL
RELAY_LOG_FILE
=
'slave-relay-bin.000002'
,
RELAY_LOG_POS
=
relay_pos_insert1_t2
;
--
disable_query_log
eval
START
SLAVE
UNTIL
RELAY_LOG_FILE
=
'slave-relay-bin.000002'
,
RELAY_LOG_POS
=
$relay_pos_insert1_t2
;
--
enable_query_log
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
SELECT
*
FROM
t2
;
--
let
$slave_param
=
Exec_Master_Log_Pos
--
let
$slave_param_value
=
$master_pos_insert1_t2
--
source
include
/
check_slave_param
.
inc
# clean up
START
SLAVE
;
--
source
include
/
wait_for_slave_to_start
.
inc
...
...
@@ -118,14 +105,52 @@ START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000009';
--
replace_result
561
MASTER_LOG_POS
--
error
1277
START
SLAVE
UNTIL
RELAY_LOG_FILE
=
'slave-relay-bin.000002'
,
MASTER_LOG_POS
=
561
;
# Warning should be given for second command
START
SLAVE
;
--
replace_result
740
MASTER_LOG_POS
START
SLAVE
UNTIL
MASTER_LOG_FILE
=
'master-bin.000001'
,
MASTER_LOG_POS
=
740
;
--
source
include
/
stop_slave
.
inc
# Clear slave IO error.
RESET
SLAVE
;
--
source
include
/
start_slave
.
inc
##############################################################################
# The second section - checks START SLAVE UNTIL RELAY_LOG_FILE =# 'log_name',
# RELAY_LOG_POS = log_pos. This section of the test does the following:
# 1) At master, create a table and inserts a value. Let slave replicate this.
# 2) Stop slave sql thread.
# 3) Insert some more values at master. Note that io thread copies this insert
# 4) Use start slave until to start the sql thread and check if it
# stops at the correct position.
##############################################################################
--
source
include
/
rpl_reset
.
inc
--
connection
master
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
);
--
sync_slave_with_master
--
source
include
/
stop_slave_sql
.
inc
--
connection
master
INSERT
INTO
t1
VALUES
(
2
);
--
let
$master_log_pos
=
query_get_value
(
SHOW
MASTER
STATUS
,
Position
,
1
)
INSERT
INTO
t1
VALUES
(
3
);
--
source
include
/
sync_slave_io_with_master
.
inc
--
let
$rpl_only_running_threads
=
1
--
let
$relay_log_file
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Relay_Log_File
,
1
)
--
source
include
/
get_relay_log_pos
.
inc
--
disable_query_log
--
eval
start
slave
until
relay_log_file
=
'$relay_log_file'
,
relay_log_pos
=
$relay_log_pos
--
enable_query_log
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
let
$assert_cond
=
COUNT
(
*
)
=
2
FROM
t1
--
let
$assert_text
=
table
t1
should
have
two
rows
.
--
source
include
/
assert
.
inc
#cleanup
--
source
include
/
start_slave
.
inc
--
connection
master
DROP
TABLE
t1
;
--
sync_slave_with_master
--
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