diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-05-11 13:48:57 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-05-11 14:02:13 +0300 |
commit | 580a8061a752946cfd9d6e57f88d46ce099d11c8 (patch) | |
tree | 12a8348cdf459a7ffe38e13d144ead230919c78d | |
parent | 3cbfe8cc47d48ff2c528149b4866480b50d8a116 (diff) | |
download | mariadb-git-580a8061a752946cfd9d6e57f88d46ce099d11c8.tar.gz |
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().
-rw-r--r-- | storage/innobase/row/row0import.cc | 10 | ||||
-rw-r--r-- | storage/xtradb/row/row0import.cc | 6 |
2 files changed, 2 insertions, 14 deletions
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index df696f3188d..f93d004d8f9 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -1820,10 +1820,6 @@ PageConverter::update_records( m_rec_iter.open(block); - if (!page_is_leaf(block->frame)) { - return DB_SUCCESS; - } - while (!m_rec_iter.end()) { rec_t* rec = m_rec_iter.current(); @@ -1928,11 +1924,7 @@ PageConverter::update_index_page( return(DB_SUCCESS); } - if (!page_is_leaf(block->frame)) { - return (DB_SUCCESS); - } - - return(update_records(block)); + return page_is_leaf(block->frame) ? update_records(block) : DB_SUCCESS; } /** diff --git a/storage/xtradb/row/row0import.cc b/storage/xtradb/row/row0import.cc index 26ed99a483c..39e450bd7c5 100644 --- a/storage/xtradb/row/row0import.cc +++ b/storage/xtradb/row/row0import.cc @@ -1820,10 +1820,6 @@ PageConverter::update_records( m_rec_iter.open(block); - if (!page_is_leaf(block->frame)) { - return DB_SUCCESS; - } - while (!m_rec_iter.end()) { rec_t* rec = m_rec_iter.current(); ibool deleted = rec_get_deleted_flag(rec, comp); @@ -1927,7 +1923,7 @@ PageConverter::update_index_page( return(DB_SUCCESS); } - return(update_records(block)); + return page_is_leaf(block->frame) ? update_records(block) : DB_SUCCESS; } /** |