diff options
Diffstat (limited to 'storage/innobase/btr/btr0bulk.cc')
-rw-r--r-- | storage/innobase/btr/btr0bulk.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/storage/innobase/btr/btr0bulk.cc b/storage/innobase/btr/btr0bulk.cc index 013cd131..5bf68c58 100644 --- a/storage/innobase/btr/btr0bulk.cc +++ b/storage/innobase/btr/btr0bulk.cc @@ -52,6 +52,7 @@ PageBulk::init() if (m_page_no == FIL_NULL) { mtr_t alloc_mtr; + dberr_t err= DB_SUCCESS; /* We commit redo log for allocation by a separate mtr, because we don't guarantee pages are committed following @@ -60,28 +61,15 @@ PageBulk::init() alloc_mtr.start(); m_index->set_modified(alloc_mtr); - uint32_t n_reserved; - dberr_t err = fsp_reserve_free_extents( - &n_reserved, m_index->table->space, 1, FSP_NORMAL, - &alloc_mtr); - if (UNIV_UNLIKELY(err != DB_SUCCESS)) { -oom: - alloc_mtr.commit(); - m_mtr.commit(); - return err; - } - /* Allocate a new page. */ new_block = btr_page_alloc(m_index, 0, FSP_UP, m_level, &alloc_mtr, &m_mtr, &err); + alloc_mtr.commit(); if (!new_block) { - goto oom; + m_mtr.commit(); + return err; } - m_index->table->space->release_free_extents(n_reserved); - - alloc_mtr.commit(); - new_page = buf_block_get_frame(new_block); m_page_no = new_block->page.id().page_no(); @@ -969,10 +957,10 @@ BtrBulk::pageCommit( /** Log free check */ inline void BtrBulk::logFreeCheck() { - if (log_sys.check_flush_or_checkpoint()) { + if (log_sys.check_for_checkpoint()) { release(); - log_check_margins(); + log_free_check(); latch(); } |