mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-26740 Inplace alter rebuild increases file size
PageBulk::init(): Unnecessary reserves the extent before allocating a page for bulk insert. btr_page_alloc() capable of handing the extending of tablespace.
This commit is contained in:
@@ -173,7 +173,6 @@ Filename::tab#.ibd
|
|||||||
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
||||||
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
||||||
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
||||||
#::# | Freshly allocated page | -
|
|
||||||
# Variables used by page type dump for ibdata1
|
# Variables used by page type dump for ibdata1
|
||||||
|
|
||||||
Variables (--variable-name=value)
|
Variables (--variable-name=value)
|
||||||
@@ -208,7 +207,6 @@ Filename::tab#.ibd
|
|||||||
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
||||||
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
||||||
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
|
||||||
#::# | Freshly allocated page | -
|
|
||||||
[6]: check the valid lower bound values for option
|
[6]: check the valid lower bound values for option
|
||||||
# allow-mismatches,page,start-page,end-page
|
# allow-mismatches,page,start-page,end-page
|
||||||
[9]: check the both short and long options "page" and "start-page" when
|
[9]: check the both short and long options "page" and "start-page" when
|
||||||
|
@@ -70,24 +70,15 @@ PageBulk::init()
|
|||||||
alloc_mtr.start();
|
alloc_mtr.start();
|
||||||
m_index->set_modified(alloc_mtr);
|
m_index->set_modified(alloc_mtr);
|
||||||
|
|
||||||
ulint n_reserved;
|
|
||||||
bool success;
|
|
||||||
success = fsp_reserve_free_extents(&n_reserved,
|
|
||||||
m_index->table->space,
|
|
||||||
1, FSP_NORMAL, &alloc_mtr);
|
|
||||||
if (!success) {
|
|
||||||
alloc_mtr.commit();
|
|
||||||
m_mtr.commit();
|
|
||||||
return(DB_OUT_OF_FILE_SPACE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Allocate a new page. */
|
/* Allocate a new page. */
|
||||||
new_block = btr_page_alloc(m_index, 0, FSP_UP, m_level,
|
new_block = btr_page_alloc(m_index, 0, FSP_UP, m_level,
|
||||||
&alloc_mtr, &m_mtr);
|
&alloc_mtr, &m_mtr);
|
||||||
|
|
||||||
m_index->table->space->release_free_extents(n_reserved);
|
|
||||||
|
|
||||||
alloc_mtr.commit();
|
alloc_mtr.commit();
|
||||||
|
if (!new_block) {
|
||||||
|
m_mtr.commit();
|
||||||
|
return DB_OUT_OF_FILE_SPACE;
|
||||||
|
}
|
||||||
|
|
||||||
new_page = buf_block_get_frame(new_block);
|
new_page = buf_block_get_frame(new_block);
|
||||||
new_page_zip = buf_block_get_page_zip(new_block);
|
new_page_zip = buf_block_get_page_zip(new_block);
|
||||||
|
Reference in New Issue
Block a user