-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-9044 : Binlog corruption in Galera
While refreshing the IO_CACHE, do not update its parameters (read_pos, read_end & pos_in_file) if there is nothing left to read.
- Loading branch information
Nirbhay Choubey
committed
Dec 18, 2015
1 parent
428e09a
commit 58b54b7
Showing
4 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# MDEV-9044 : Getting binlog corruption on my Galera cluster (10.1.8) | ||
# making it impossible to async slave. | ||
# | ||
START SLAVE; | ||
SELECT @@GLOBAL.BINLOG_CACHE_SIZE; | ||
@@GLOBAL.BINLOG_CACHE_SIZE | ||
8192 | ||
CREATE TABLE t1 (c1 INTEGER PRIMARY KEY, c2 VARCHAR(12000)) ENGINE=INNODB; | ||
CREATE TABLE t2 (c1 INTEGER PRIMARY KEY) ENGINE=INNODB; | ||
START TRANSACTION; | ||
INSERT INTO t1 VALUES(1, REPEAT('-', 10000)); | ||
COMMIT; | ||
INSERT INTO t2 VALUES(1); | ||
SELECT c1, LENGTH(c2) FROM t1; | ||
c1 LENGTH(c2) | ||
1 10000 | ||
SELECT * FROM t2; | ||
c1 | ||
1 | ||
SELECT c1, LENGTH(c2) FROM t1; | ||
c1 LENGTH(c2) | ||
1 10000 | ||
SELECT * FROM t2; | ||
c1 | ||
1 | ||
# Cleanup | ||
DROP TABLE t1, t2; | ||
STOP SLAVE; | ||
RESET SLAVE ALL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
!include ../galera_2nodes_as_master.cnf | ||
|
||
[mysqld.1] | ||
binlog-cache-size=8192 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--echo # | ||
--echo # MDEV-9044 : Getting binlog corruption on my Galera cluster (10.1.8) | ||
--echo # making it impossible to async slave. | ||
--echo # | ||
|
||
--source include/have_innodb.inc | ||
--source include/galera_cluster.inc | ||
|
||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 | ||
--disable_query_log | ||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1; | ||
--enable_query_log | ||
START SLAVE; | ||
|
||
--connection node_1 | ||
|
||
SELECT @@GLOBAL.BINLOG_CACHE_SIZE; | ||
CREATE TABLE t1 (c1 INTEGER PRIMARY KEY, c2 VARCHAR(12000)) ENGINE=INNODB; | ||
CREATE TABLE t2 (c1 INTEGER PRIMARY KEY) ENGINE=INNODB; | ||
|
||
START TRANSACTION; | ||
INSERT INTO t1 VALUES(1, REPEAT('-', 10000)); | ||
COMMIT; | ||
INSERT INTO t2 VALUES(1); | ||
save_master_pos; | ||
|
||
--connection node_2 | ||
SELECT c1, LENGTH(c2) FROM t1; | ||
SELECT * FROM t2; | ||
|
||
--connection node_3 | ||
sync_with_master; | ||
|
||
SELECT c1, LENGTH(c2) FROM t1; | ||
SELECT * FROM t2; | ||
|
||
--echo # Cleanup | ||
--connection node_1 | ||
DROP TABLE t1, t2; | ||
save_master_pos; | ||
|
||
--connection node_3 | ||
sync_with_master; | ||
|
||
STOP SLAVE; | ||
RESET SLAVE ALL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters