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
bd2064e8
Commit
bd2064e8
authored
Apr 05, 2017
by
Sachin Setiya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MW-313 Enforce wsrep_max_ws_rows also when binlog is enabled
Signed-off-by:
Sachin Setiya
<
sachinsetia1001@gmail.com
>
parent
63395952
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
mysql-test/suite/wsrep/r/wsrep_rpl.result
mysql-test/suite/wsrep/r/wsrep_rpl.result
+2
-2
mysql-test/suite/wsrep/t/wsrep_rpl.test
mysql-test/suite/wsrep/t/wsrep_rpl.test
+2
-8
sql/log_event.cc
sql/log_event.cc
+4
-0
No files found.
mysql-test/suite/wsrep/r/wsrep_rpl.result
View file @
bd2064e8
...
@@ -5,12 +5,12 @@ include/master-slave.inc
...
@@ -5,12 +5,12 @@ include/master-slave.inc
# wsrep_max_ws_rows exceeded. Error_Code 1180
# wsrep_max_ws_rows exceeded. Error_Code 1180
#
#
CREATE TABLE t1(i INT) ENGINE = INNODB;
CREATE TABLE t1(i INT) ENGINE = INNODB;
SET @@GLOBAL.wsrep_max_ws_rows =
1
;
SET @@GLOBAL.wsrep_max_ws_rows =
2
;
INSERT INTO t1 VALUES(1), (2);
INSERT INTO t1 VALUES(1), (2);
SELECT COUNT(*) = 2 FROM t1;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
COUNT(*) = 2
1
1
SET @@GLOBAL.wsrep_max_ws_rows =
1
;
SET @@GLOBAL.wsrep_max_ws_rows =
2
;
DELETE FROM t1;
DELETE FROM t1;
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
COUNT(*) = 0
...
...
mysql-test/suite/wsrep/t/wsrep_rpl.test
View file @
bd2064e8
...
@@ -15,18 +15,13 @@ let $wsrep_max_ws_rows_slave = `SELECT @@GLOBAL.wsrep_max_ws_rows`;
...
@@ -15,18 +15,13 @@ let $wsrep_max_ws_rows_slave = `SELECT @@GLOBAL.wsrep_max_ws_rows`;
connection
master
;
connection
master
;
CREATE
TABLE
t1
(
i
INT
)
ENGINE
=
INNODB
;
CREATE
TABLE
t1
(
i
INT
)
ENGINE
=
INNODB
;
# Setting wsrep_max_ws_rows should have no impact on replication master
SET
@@
GLOBAL
.
wsrep_max_ws_rows
=
2
;
# unless its a cluster node.
SET
@@
GLOBAL
.
wsrep_max_ws_rows
=
1
;
INSERT
INTO
t1
VALUES
(
1
),
(
2
);
INSERT
INTO
t1
VALUES
(
1
),
(
2
);
sync_slave_with_master
;
sync_slave_with_master
;
SELECT
COUNT
(
*
)
=
2
FROM
t1
;
SELECT
COUNT
(
*
)
=
2
FROM
t1
;
connection
slave
;
connection
slave
;
# Setting wsrep_max_ws_rows should have no impact on replication slave
SET
@@
GLOBAL
.
wsrep_max_ws_rows
=
2
;
# unless its a cluster node.
SET
@@
GLOBAL
.
wsrep_max_ws_rows
=
1
;
connection
master
;
connection
master
;
DELETE
FROM
t1
;
DELETE
FROM
t1
;
...
@@ -38,7 +33,6 @@ connection master;
...
@@ -38,7 +33,6 @@ connection master;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
sync_slave_with_master
;
sync_slave_with_master
;
# Restore wsrep_max_ws_rows on master and slave
# Restore wsrep_max_ws_rows on master and slave
connection
master
;
connection
master
;
eval
SET
@@
GLOBAL
.
wsrep_max_ws_rows
=
$wsrep_max_ws_rows_master
;
eval
SET
@@
GLOBAL
.
wsrep_max_ws_rows
=
$wsrep_max_ws_rows_master
;
...
...
sql/log_event.cc
View file @
bd2064e8
...
@@ -7586,6 +7586,10 @@ int Xid_log_event::do_apply_event(rpl_group_info *rgi)
...
@@ -7586,6 +7586,10 @@ int Xid_log_event::do_apply_event(rpl_group_info *rgi)
Record any GTID in the same transaction, so slave state is transactionally
Record any GTID in the same transaction, so slave state is transactionally
consistent.
consistent.
*/
*/
/*Set wsrep_affected_rows = 0 */
thd
->
wsrep_affected_rows
=
0
;
if
(
rgi
->
gtid_pending
)
if
(
rgi
->
gtid_pending
)
{
{
sub_id
=
rgi
->
gtid_sub_id
;
sub_id
=
rgi
->
gtid_sub_id
;
...
...
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