Skip to content

Commit 172199b

Browse files
committed
PageBulk: Remove dead code
Native ALTER TABLE is never invoked on temporary tables.
1 parent 7f54894 commit 172199b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

storage/innobase/btr/btr0bulk.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ PageBulk::init()
122122
btr_page_set_level(new_page, NULL, m_level, mtr);
123123
}
124124

125-
if (dict_index_is_sec_or_ibuf(m_index)
126-
&& !dict_table_is_temporary(m_index->table)
127-
&& page_is_leaf(new_page)) {
125+
if (!m_level && dict_index_is_sec_or_ibuf(m_index)) {
128126
page_update_max_trx_id(new_block, NULL, m_trx_id, mtr);
129127
}
130128

@@ -310,9 +308,7 @@ PageBulk::commit(
310308
ut_ad(page_validate(m_page, m_index));
311309

312310
/* Set no free space left and no buffered changes in ibuf. */
313-
if (!dict_index_is_clust(m_index)
314-
&& !dict_table_is_temporary(m_index->table)
315-
&& page_is_leaf(m_page)) {
311+
if (!dict_index_is_clust(m_index) && page_is_leaf(m_page)) {
316312
ibuf_set_bitmap_for_bulk_load(
317313
m_block, innobase_fill_factor == 100);
318314
}

storage/innobase/include/btr0bulk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class PageBulk
8484
m_err(DB_SUCCESS)
8585
{
8686
ut_ad(!dict_index_is_spatial(m_index));
87+
ut_ad(!dict_table_is_temporary(m_index->table));
8788
}
8889

8990
/** Deconstructor */

0 commit comments

Comments
 (0)