diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 4d5fc98fcd6..3ec6523c6dd 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -5262,6 +5262,7 @@ xb_process_datadir( path, NULL, fileinfo.name, NULL)) { + os_file_closedir(dbdir); return(FALSE); } } @@ -5323,6 +5324,7 @@ next_file_item_1: dbinfo.name, fileinfo.name, NULL)) { + os_file_closedir(dbdir); return(FALSE); } } diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index b7997627fff..e4c27fcb5c2 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -20,9 +20,6 @@ galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB GAL-419 : MDEV-13549 Galera test failures galera_var_notify_cmd : MDEV-13549 Galera test failures galera_as_slave_replication_bundle : MDEV-13549 Galera test failures -galera_gcache_recover : MDEV-13549 Galera test failures -galera_gcache_recover_full_gcache : MDEV-13549 Galera test failures -galera_gcache_recover_manytrx : MDEV-13549 Galera test failures galera_ssl_upgrade : MDEV-13549 Galera test failures galera.MW-329 : wsrep_local_replays not stable MW-416 : MDEV-13549 Galera test failures diff --git a/mysql-test/suite/galera/r/galera_gcache_recover.result b/mysql-test/suite/galera/r/galera_gcache_recover.result index 127bcba39d8..d3ba06c1333 100644 --- a/mysql-test/suite/galera/r/galera_gcache_recover.result +++ b/mysql-test/suite/galera/r/galera_gcache_recover.result @@ -1,18 +1,25 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); SET SESSION wsrep_sync_wait = 0; +connection node_2; SET SESSION wsrep_sync_wait = 0; Killing server ... +connection node_1; INSERT INTO t1 VALUES (2); Killing server ... +connection node_1; Performing --wsrep-recover ... Using --wsrep-start-position when starting mysqld ... INSERT INTO t1 VALUES (3); +connection node_2; Performing --wsrep-recover ... Using --wsrep-start-position when starting mysqld ... +connection node_1; include/diff_servers.inc [servers=1 2] +connection node_1; CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); include/assert_grep.inc [async IST sender starting to serve] +connection node_2; CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); include/assert_grep.inc [Recovering GCache ring buffer: found gapless sequence] DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result b/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result index 30ee5772411..588af5668bb 100644 --- a/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result +++ b/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result @@ -1,19 +1,26 @@ SET SESSION wsrep_sync_wait = 0; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB; +connection node_2; SET SESSION wsrep_sync_wait = 0; Killing server ... +connection node_1; INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10)); INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10)); INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10)); INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10)); INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10)); Killing server ... +connection node_1; Performing --wsrep-recover ... Using --wsrep-start-position when starting mysqld ... +connection node_2; Performing --wsrep-recover ... Using --wsrep-start-position when starting mysqld ... +connection node_1; include/diff_servers.inc [servers=1 2] +connection node_1; DROP TABLE t1; CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); include/assert_grep.inc [IST first seqno 2 not found from cache, falling back to SST] +connection node_2; CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index 93fc1bb0ed2..704c52ff9af 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -2738,6 +2738,12 @@ trx_get_trx_by_xid_low( && trx_state_eq(trx, TRX_STATE_PREPARED) && xid->eq((XID*)trx->xid)) { +#ifdef WITH_WSREP + /* The commit of a prepared recovered Galera + transaction needs a valid trx->xid for + invoking trx_sys_update_wsrep_checkpoint(). */ + if (wsrep_is_wsrep_xid(trx->xid)) break; +#endif /* Invalidate the XID, so that subsequent calls will not find it. */ trx->xid->null(); diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc index 6a033fbeb09..17cba81daf3 100644 --- a/storage/xtradb/trx/trx0trx.cc +++ b/storage/xtradb/trx/trx0trx.cc @@ -2578,6 +2578,12 @@ trx_get_trx_by_xid_low( && memcmp(xid->data, trx->xid.data, xid->gtrid_length + xid->bqual_length) == 0) { +#ifdef WITH_WSREP + /* The commit of a prepared recovered Galera + transaction needs a valid trx->xid for + invoking trx_sys_update_wsrep_checkpoint(). */ + if (wsrep_is_wsrep_xid(&trx->xid)) break; +#endif /* Invalidate the XID, so that subsequent calls will not find it. */ trx->xid.null();