[Commits] d3ce7190aac: Fix problem when wsrep_on is not visible.
revision-id: d3ce7190aac3d6018e0b926a2d89eb9fcd1d2961 (mariadb-10.3.6-261-gd3ce7190aac) parent(s): 7145d7b61b5e8915e08dec85c8eddd0a65d4a7ee author: Jan Lindström committer: Jan Lindström timestamp: 2018-12-19 11:55:58 +0200 message: Fix problem when wsrep_on is not visible. --- mysql-test/include/check-testcase.test | 77 +++++++++++++++++----------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test index ac4a40e8b05..994b71f1ff6 100644 --- a/mysql-test/include/check-testcase.test +++ b/mysql-test/include/check-testcase.test @@ -107,45 +107,46 @@ list_files $datadir/mysql #sql*; # Check that SHOW ENGINE INNODB STATUS does not show any active transactions # We do this only if wsrep provider is loaded, to avoid disturbing any non-Galera MTR tests # - -if (`SELECT @@wsrep_on`) { - if (`SELECT COUNT(*) FROM information_schema.innodb_trx WHERE trx_mysql_thread_id != 0`) { - if ($before) { - --echo Before test start. - } - if (!$before) { - --echo After test end. - } - --echo There is one or more active InnoDB transaction(s) when there should be none. Dumping some diagnostics. - - --enable_query_log - - SET GLOBAL innodb_status_output_locks=ON; - SHOW ENGINE INNODB STATUS; - SET GLOBAL innodb_status_output_locks=default; - - --vertical_results - if ($before) { - --replace_regex /$/ / - } - SELECT * FROM information_schema.processlist; - - if ($before) { - --replace_regex /$/ / - } - SELECT * FROM information_schema.innodb_trx; - - if ($before) { - --replace_regex /$/ / - } - SELECT * FROM information_schema.innodb_locks; - - if ($before) { - --replace_regex /$/ / +if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`) { + if (`SELECT @@wsrep_on`) { + if (`SELECT COUNT(*) FROM information_schema.innodb_trx WHERE trx_mysql_thread_id != 0`) { + if ($before) { + --echo Before test start. + } + if (!$before) { + --echo After test end. + } + --echo There is one or more active InnoDB transaction(s) when there should be none. Dumping some diagnostics. + + --enable_query_log + + SET GLOBAL innodb_status_output_locks=ON; + SHOW ENGINE INNODB STATUS; + SET GLOBAL innodb_status_output_locks=default; + + --vertical_results + if ($before) { + --replace_regex /$/ / + } + SELECT * FROM information_schema.processlist; + + if ($before) { + --replace_regex /$/ / + } + SELECT * FROM information_schema.innodb_trx; + + if ($before) { + --replace_regex /$/ / + } + SELECT * FROM information_schema.innodb_locks; + + if ($before) { + --replace_regex /$/ / + } + SELECT * FROM information_schema.innodb_lock_waits; + --horizontal_results + --disable_query_log } - SELECT * FROM information_schema.innodb_lock_waits; - --horizontal_results - --disable_query_log } }
participants (1)
-
jan