diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-11 17:49:36 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-11 17:49:36 +0200 |
commit | 814205f306cad8a4b3e55785616ea69a027fef9d (patch) | |
tree | f70402682975e8c6a99ea34a7b1ff3dd9ba73b32 /storage/innobase/trx/trx0purge.cc | |
parent | 89b463ee99c22e69fe4adf686e0d61cd20973c49 (diff) | |
parent | 28e713dc12881e7f50207d0c642523ca3e630114 (diff) | |
download | mariadb-git-814205f306cad8a4b3e55785616ea69a027fef9d.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'storage/innobase/trx/trx0purge.cc')
-rw-r--r-- | storage/innobase/trx/trx0purge.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index a4fa12708ac..980e518daf6 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2018, MariaDB Corporation. +Copyright (c) 2017, 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 @@ -148,7 +148,8 @@ purge_graph_build() for (ulint i = 0; i < srv_n_purge_threads; ++i) { que_thr_t* thr = que_thr_create(fork, heap, NULL); - thr->child = row_purge_node_create(thr, heap); + thr->child = new(mem_heap_zalloc(heap, sizeof(purge_node_t))) + purge_node_t(thr); } return(fork); @@ -1404,7 +1405,7 @@ ulint trx_purge_attach_undo_recs(ulint n_purge_threads) { que_thr_t* thr; - ulint i = 0; + ulint i; ulint n_pages_handled = 0; ulint n_thrs = UT_LIST_GET_LEN(purge_sys.query->thrs); @@ -1412,6 +1413,8 @@ trx_purge_attach_undo_recs(ulint n_purge_threads) purge_sys.head = purge_sys.tail; +#ifdef UNIV_DEBUG + i = 0; /* Debug code to validate some pre-requisites and reset done flag. */ for (thr = UT_LIST_GET_FIRST(purge_sys.query->thrs); thr != NULL && i < n_purge_threads; @@ -1422,16 +1425,16 @@ trx_purge_attach_undo_recs(ulint n_purge_threads) /* Get the purge node. */ node = (purge_node_t*) thr->child; - ut_a(que_node_get_type(node) == QUE_NODE_PURGE); - ut_a(node->undo_recs == NULL); - ut_a(node->done); - - node->done = FALSE; + ut_ad(que_node_get_type(node) == QUE_NODE_PURGE); + ut_ad(node->undo_recs == NULL); + ut_ad(!node->in_progress); + ut_d(node->in_progress = true); } /* There should never be fewer nodes than threads, the inverse however is allowed because we only use purge threads as needed. */ - ut_a(i == n_purge_threads); + ut_ad(i == n_purge_threads); +#endif /* Fetch and parse the UNDO records. The UNDO records are added to a per purge node vector. */ |