Skip to content
Permalink
Browse files
Galera MTR Tests: Test for MW-309 - Fix wsrep_max_ws_rows so that it …
…does not affect SELECT queries
  • Loading branch information
philip-galera authored and SachinSetiya committed Mar 14, 2017
1 parent 5d9c747 commit 0a06347
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
@@ -0,0 +1,22 @@
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
SET GLOBAL wsrep_max_ws_rows = 2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
SELECT * FROM t1 GROUP BY f1;
f1
1
SELECT * FROM t1 GROUP BY f1;
f1
1
SELECT * FROM t1 GROUP BY f1;
f1
1
SHOW STATUS LIKE '%wsrep%';
SET GLOBAL wsrep_max_ws_rows = 0;
DROP TABLE t1;
@@ -0,0 +1,31 @@
#
# MW-309 Regression: wsrep_max_ws_rows limit also applies to certain SELECT queries
#

--source include/galera_cluster.inc

CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;

SET GLOBAL wsrep_max_ws_rows = 2;

SET AUTOCOMMIT=OFF;
START TRANSACTION;
SELECT * FROM t1 GROUP BY f1;
SELECT * FROM t1 GROUP BY f1;

--error 0
SELECT * FROM t1 GROUP BY f1;

--disable_result_log
--error 0
SHOW STATUS LIKE '%wsrep%';
--enable_result_log

SET GLOBAL wsrep_max_ws_rows = 0;
DROP TABLE t1;

0 comments on commit 0a06347

Please sign in to comment.