Commit 580a8061 authored by Marko Mäkelä's avatar Marko Mäkelä

Remove a redundant condition added by the 5.6.40 merge

When Oracle fixed MDEV-13899 in their own way, they moved the
condition to the only caller of PageConverter::update_records().
Thus, the merge of 5.6.40 into MariaDB added a redundant condition.

PageConverter::update_records(): Move the page_is_leaf() condition
to the only caller, PageConverter::update_index_page().
parent 3cbfe8cc
...@@ -1820,10 +1820,6 @@ PageConverter::update_records( ...@@ -1820,10 +1820,6 @@ PageConverter::update_records(
m_rec_iter.open(block); m_rec_iter.open(block);
if (!page_is_leaf(block->frame)) {
return DB_SUCCESS;
}
while (!m_rec_iter.end()) { while (!m_rec_iter.end()) {
rec_t* rec = m_rec_iter.current(); rec_t* rec = m_rec_iter.current();
...@@ -1928,11 +1924,7 @@ PageConverter::update_index_page( ...@@ -1928,11 +1924,7 @@ PageConverter::update_index_page(
return(DB_SUCCESS); return(DB_SUCCESS);
} }
if (!page_is_leaf(block->frame)) { return page_is_leaf(block->frame) ? update_records(block) : DB_SUCCESS;
return (DB_SUCCESS);
}
return(update_records(block));
} }
/** /**
......
...@@ -1820,10 +1820,6 @@ PageConverter::update_records( ...@@ -1820,10 +1820,6 @@ PageConverter::update_records(
m_rec_iter.open(block); m_rec_iter.open(block);
if (!page_is_leaf(block->frame)) {
return DB_SUCCESS;
}
while (!m_rec_iter.end()) { while (!m_rec_iter.end()) {
rec_t* rec = m_rec_iter.current(); rec_t* rec = m_rec_iter.current();
ibool deleted = rec_get_deleted_flag(rec, comp); ibool deleted = rec_get_deleted_flag(rec, comp);
...@@ -1927,7 +1923,7 @@ PageConverter::update_index_page( ...@@ -1927,7 +1923,7 @@ PageConverter::update_index_page(
return(DB_SUCCESS); return(DB_SUCCESS);
} }
return(update_records(block)); return page_is_leaf(block->frame) ? update_records(block) : DB_SUCCESS;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment