mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
MDEV-19051 Avoid unnecessary writing MLOG_INDEX_LOAD
1) Avoid writing of MLOG_INDEX_LOAD redo log record during inplace alter table when the table is empty and also for spatial index. 2) Avoid creation of temporary merge file for spatial index during index creation process.
This commit is contained in:
parent
38cad6875f
commit
0623cc7c16
5 changed files with 84 additions and 79 deletions
|
|
@ -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
|
||||
|
|
@ -64,17 +64,6 @@ typedef std::set<
|
|||
std::less<table_id_t>,
|
||||
ut_allocator<table_id_t> > table_id_set;
|
||||
|
||||
/** Set flush observer for the transaction
|
||||
@param[in/out] trx transaction struct
|
||||
@param[in] observer flush observer */
|
||||
void
|
||||
trx_set_flush_observer(
|
||||
trx_t* trx,
|
||||
FlushObserver* observer)
|
||||
{
|
||||
trx->flush_observer = observer;
|
||||
}
|
||||
|
||||
/*************************************************************//**
|
||||
Set detailed error message for the transaction. */
|
||||
void
|
||||
|
|
@ -165,7 +154,7 @@ trx_init(
|
|||
|
||||
trx->lock.table_cached = 0;
|
||||
|
||||
trx->flush_observer = NULL;
|
||||
ut_ad(trx->get_flush_observer() == NULL);
|
||||
}
|
||||
|
||||
/** For managing the life-cycle of the trx_t instance that we get
|
||||
|
|
@ -1088,6 +1077,21 @@ static trx_rseg_t* trx_assign_rseg_low()
|
|||
return(rseg);
|
||||
}
|
||||
|
||||
/** Set the innodb_log_optimize_ddl page flush observer
|
||||
@param[in] space_id tablespace id
|
||||
@param[in,out] stage performance_schema accounting */
|
||||
void trx_t::set_flush_observer(ulint space_id, ut_stage_alter_t* stage)
|
||||
{
|
||||
flush_observer = UT_NEW_NOKEY(FlushObserver(space_id, this, stage));
|
||||
}
|
||||
|
||||
/** Remove the flush observer */
|
||||
void trx_t::remove_flush_observer()
|
||||
{
|
||||
UT_DELETE(flush_observer);
|
||||
flush_observer = NULL;
|
||||
}
|
||||
|
||||
/** Assign a rollback segment for modifying temporary tables.
|
||||
@return the assigned rollback segment */
|
||||
trx_rseg_t*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue