summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-08-10 14:48:44 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2016-08-10 14:48:44 -0400
commitabfbe80840e4b8ad63b31ea65b59f52ef7d151a2 (patch)
tree23cba0ae0d603b135689c1dc53c9c3ab8d2b5fa6
parentdfadb3680d0ffc211ce4f36fed28e59e3fec0842 (diff)
downloadmariadb-git-abfbe80840e4b8ad63b31ea65b59f52ef7d151a2.tar.gz
MW-292: Fix test case
Also backported missing test include files.
-rw-r--r--mysql-test/include/galera_clear_sync_point.inc1
-rw-r--r--mysql-test/include/galera_set_sync_point.inc1
-rw-r--r--mysql-test/include/galera_signal_sync_point.inc1
-rw-r--r--mysql-test/include/galera_wait_sync_point.inc6
-rw-r--r--mysql-test/suite/galera/include/galera_have_debug_sync.inc9
-rw-r--r--mysql-test/suite/galera/t/MW-292.test6
6 files changed, 21 insertions, 3 deletions
diff --git a/mysql-test/include/galera_clear_sync_point.inc b/mysql-test/include/galera_clear_sync_point.inc
new file mode 100644
index 00000000000..589522a55b0
--- /dev/null
+++ b/mysql-test/include/galera_clear_sync_point.inc
@@ -0,0 +1 @@
+SET GLOBAL wsrep_provider_options = 'dbug=';
diff --git a/mysql-test/include/galera_set_sync_point.inc b/mysql-test/include/galera_set_sync_point.inc
new file mode 100644
index 00000000000..5fe4e8c38c0
--- /dev/null
+++ b/mysql-test/include/galera_set_sync_point.inc
@@ -0,0 +1 @@
+--eval SET GLOBAL wsrep_provider_options = 'dbug=d,$galera_sync_point'
diff --git a/mysql-test/include/galera_signal_sync_point.inc b/mysql-test/include/galera_signal_sync_point.inc
new file mode 100644
index 00000000000..eaa5cdd43f5
--- /dev/null
+++ b/mysql-test/include/galera_signal_sync_point.inc
@@ -0,0 +1 @@
+--eval SET GLOBAL wsrep_provider_options = 'signal=$galera_sync_point'
diff --git a/mysql-test/include/galera_wait_sync_point.inc b/mysql-test/include/galera_wait_sync_point.inc
new file mode 100644
index 00000000000..cf3a4980186
--- /dev/null
+++ b/mysql-test/include/galera_wait_sync_point.inc
@@ -0,0 +1,6 @@
+--let $wait_timeout = 10
+--let $wsrep_on_orig = `SELECT @@wsrep_on`
+SET SESSION wsrep_on = 0;
+--let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters' AND VARIABLE_VALUE = '$galera_sync_point'
+--source include/wait_condition.inc
+--eval SET SESSION wsrep_on = $wsrep_on_orig
diff --git a/mysql-test/suite/galera/include/galera_have_debug_sync.inc b/mysql-test/suite/galera/include/galera_have_debug_sync.inc
new file mode 100644
index 00000000000..7c0156052d8
--- /dev/null
+++ b/mysql-test/suite/galera/include/galera_have_debug_sync.inc
@@ -0,0 +1,9 @@
+--disable_query_log
+
+--let $galera_have_debug_sync = `SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters'`
+
+--if (!$galera_have_debug_sync) {
+ --skip "Test requires Galera debug library with debug_sync functionality"
+}
+
+--enable_query_log
diff --git a/mysql-test/suite/galera/t/MW-292.test b/mysql-test/suite/galera/t/MW-292.test
index 945d9f42458..7e4cf9050ae 100644
--- a/mysql-test/suite/galera/t/MW-292.test
+++ b/mysql-test/suite/galera/t/MW-292.test
@@ -44,11 +44,11 @@ UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
# Wait for both transactions to be blocked
--connection node_1a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'System lock';
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%';
--source include/wait_condition.inc
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
---source include/wait_condition.inc
+#--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
+#--source include/wait_condition.inc
# Unblock the commit
--connection node_1a