diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-04-24 12:03:11 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-04-24 12:03:11 +0300 |
commit | bfb0726fc24acb896e54bc7ef7536ad1aab9d574 (patch) | |
tree | a48e5d91d8427fefe2121128a4b3416d8d76e8a3 /storage/innobase/include | |
parent | 9dcfd6be94bd83d14fd48d69ce487eb0ea3fe37f (diff) | |
parent | d5da8ae04d57556f517c0f03afeafe73c6cc75d1 (diff) | |
download | mariadb-git-bfb0726fc24acb896e54bc7ef7536ad1aab9d574.tar.gz |
Merge 5.5 into 10.1
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/trx0trx.h | 5 | ||||
-rw-r--r-- | storage/innobase/include/trx0trx.ic | 3 | ||||
-rw-r--r-- | storage/innobase/include/trx0types.h | 7 |
3 files changed, 11 insertions, 4 deletions
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index fe16b8272b8..165ebe82df8 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2018, MariaDB Corporation. +Copyright (c) 2015, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -526,7 +526,7 @@ non-locking select */ ut_ad(!trx_is_autocommit_non_locking((t))); \ switch ((t)->state) { \ case TRX_STATE_PREPARED: \ - /* fall through */ \ + case TRX_STATE_PREPARED_RECOVERED: \ case TRX_STATE_ACTIVE: \ case TRX_STATE_COMMITTED_IN_MEMORY: \ continue; \ @@ -719,6 +719,7 @@ struct trx_t{ TRX_STATE_NOT_STARTED TRX_STATE_ACTIVE TRX_STATE_PREPARED + TRX_STATE_PREPARED_RECOVERED (special case of TRX_STATE_PREPARED) TRX_STATE_COMMITTED_IN_MEMORY (alias below COMMITTED) Valid state transitions are: diff --git a/storage/innobase/include/trx0trx.ic b/storage/innobase/include/trx0trx.ic index fa30e6229a3..0011f2ca74b 100644 --- a/storage/innobase/include/trx0trx.ic +++ b/storage/innobase/include/trx0trx.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2016, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -49,6 +49,7 @@ trx_state_eq( #ifdef UNIV_DEBUG switch (trx->state) { case TRX_STATE_PREPARED: + case TRX_STATE_PREPARED_RECOVERED: ut_ad(!trx_is_autocommit_non_locking(trx)); return(trx->state == state); diff --git a/storage/innobase/include/trx0types.h b/storage/innobase/include/trx0types.h index 7ca95131328..a0b398fffa1 100644 --- a/storage/innobase/include/trx0types.h +++ b/storage/innobase/include/trx0types.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -48,7 +49,11 @@ enum trx_que_t { enum trx_state_t { TRX_STATE_NOT_STARTED, TRX_STATE_ACTIVE, - TRX_STATE_PREPARED, /* Support for 2PC/XA */ + /** XA PREPARE has been executed; only XA COMMIT or XA ROLLBACK + are possible */ + TRX_STATE_PREPARED, + /** XA PREPARE transaction that was returned to ha_recover() */ + TRX_STATE_PREPARED_RECOVERED, TRX_STATE_COMMITTED_IN_MEMORY }; |