diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-09-03 17:42:53 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-09-03 17:56:19 +0530 |
commit | 635eb7aecbd442f0baf97c259333ed20d566565d (patch) | |
tree | 67e2e3a5ff687df999f4c74ae8e417e4d867b88e | |
parent | 4f3cfddad0506e36c779b50278a5ea8fe073ec1c (diff) | |
download | mariadb-git-10.5-MDEV-19514.tar.gz |
- Fixes main.tc_heuristic_recover test case hang.10.5-MDEV-19514
-rw-r--r-- | mysql-test/main/tc_heuristic_recover.test | 4 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mysql-test/main/tc_heuristic_recover.test b/mysql-test/main/tc_heuristic_recover.test index 8cbf7d61143..10eaf39f370 100644 --- a/mysql-test/main/tc_heuristic_recover.test +++ b/mysql-test/main/tc_heuristic_recover.test @@ -49,7 +49,7 @@ SELECT * FROM t1; # TODO: MDEV-12700 Allow innodb_read_only startup without prior slow shutdown. --source include/kill_mysqld.inc --error 1 ---exec $MYSQLD_LAST_CMD --log-bin=master-bin --binlog-format=mixed --core-file --loose-debug-sync-timeout=300 --innodb-force-recovery=4 +--exec $MYSQLD_LAST_CMD --log-bin=master-bin --binlog-format=mixed --core-file --loose-debug-sync-timeout=300 --debug_dbug="+d,innobase_xa_fail"; --let SEARCH_PATTERN= was in the XA prepared state --source include/search_pattern_in_file.inc @@ -59,7 +59,7 @@ SELECT * FROM t1; --source include/search_pattern_in_file.inc --error 1 ---exec $MYSQLD_LAST_CMD --log-bin=master-bin --binlog-format=mixed --core-file --loose-debug-sync-timeout=300 --innodb-force-recovery=4 --tc-heuristic-recover=COMMIT +--exec $MYSQLD_LAST_CMD --log-bin=master-bin --binlog-format=mixed --core-file --loose-debug-sync-timeout=300 --debug_dbug="+d,innobase_xa_fail" --tc-heuristic-recover=COMMIT --let SEARCH_PATTERN= was in the XA prepared state --source include/search_pattern_in_file.inc --let SEARCH_PATTERN= Found 1 prepared transactions! diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 2e500147ba3..96e079f51d2 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -16702,6 +16702,9 @@ innobase_commit_by_xid( { DBUG_ASSERT(hton == innodb_hton_ptr); + DBUG_EXECUTE_IF("innobase_xa_fail", + return XAER_RMFAIL;); + if (high_level_read_only) { return(XAER_RMFAIL); } @@ -16734,6 +16737,9 @@ innobase_rollback_by_xid( { DBUG_ASSERT(hton == innodb_hton_ptr); + DBUG_EXECUTE_IF("innobase_xa_fail", + return XAER_RMFAIL;); + if (high_level_read_only) { return(XAER_RMFAIL); } |