Commit 997119da authored by Philip Stoev's avatar Philip Stoev Committed by Nirbhay Choubey

Galera MTR Tests: Various test stability fixes.

parent 182b237d
......@@ -5,6 +5,7 @@ INSERT INTO t1 VALUES (2);
SET SESSION wsrep_sync_wait = 0;
UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=ON;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
......
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
FLUSH TABLES WITH READ LOCK;
INSERT INTO t1 VALUES (2);
......
......@@ -12,23 +12,10 @@ SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000
1
UPDATE t1 SET f2 = 1;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT5M';
SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
COUNT(*) = 200000
1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
ROLLBACK;
SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000
1
SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000
1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
UPDATE t1 SET f2 = 2;
ROLLBACK;
START TRANSACTION;
SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000
......
......@@ -26,6 +26,7 @@ UNLOCK TABLES;
--source include/wait_condition.inc
COMMIT;
SET AUTOCOMMIT=ON;
SELECT COUNT(*) = 1 FROM t1;
--let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
......
......@@ -9,6 +9,8 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
......
......@@ -22,23 +22,10 @@ SELECT COUNT(*) = 200000 FROM t1;
UPDATE t1 SET f2 = 1;
--connection node_2
--let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT5M';
SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
# Rollback
--connection node_1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
ROLLBACK;
SELECT COUNT(*) = 200000 FROM t1;
--connection node_2
SELECT COUNT(*) = 200000 FROM t1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
UPDATE t1 SET f2 = 2;
ROLLBACK;
--connection node_1
START TRANSACTION;
SELECT COUNT(*) = 200000 FROM t1;
......@@ -55,5 +42,9 @@ COMMIT;
--error ER_LOCK_DEADLOCK
COMMIT;
--disable_query_log
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node2';
--enable_query_log
DROP TABLE t1;
DROP TABLE ten;
......@@ -34,6 +34,8 @@ SELECT COUNT(*) = 1 FROM t1;
--echo Killing garbd ...
--exec pkill --oldest --full garbd.*$NODE_GALERAPORT_3
--sleep 5
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
......
......@@ -12,6 +12,7 @@ INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
--connection node_2
SELECT COUNT(*) = 10 FROM t1;
--exec rm -rf $MYSQL_TMP_DIR/innobackupex_backup
--exec innobackupex $MYSQL_TMP_DIR/innobackupex_backup --galera-info --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-backup.log
--exec innobackupex $MYSQL_TMP_DIR/innobackupex_backup --apply-log --galera-info --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-apply.log
......@@ -47,6 +48,7 @@ INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
EOF
--source include/start_mysqld.inc
--sleep 5
--source include/wait_until_connected_again.inc
SELECT COUNT(*) = 20 FROM t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment