diff options
author | apostle <vladkakurin007@gmail.com> | 2022-05-27 15:12:11 +0000 |
---|---|---|
committer | apostle <vladkakurin007@gmail.com> | 2022-05-27 15:12:11 +0000 |
commit | 9dc03d0254a58568296abaa3f4df009eb8d71da2 (patch) | |
tree | 1ba23c522dc4e130a9c6a77fff0ae569a9dfab06 | |
parent | bd20462525bdac089356d18152f4e6e1753bde79 (diff) | |
download | mariadb-git-9dc03d0254a58568296abaa3f4df009eb8d71da2.tar.gz |
change A/R flag to explicit, semantic fixs
-rw-r--r-- | storage/innobase/btr/btr0cur.cc | 6 | ||||
-rw-r--r-- | storage/innobase/dict/dict0stats.cc | 2 | ||||
-rw-r--r-- | storage/innobase/ibuf/ibuf0ibuf.cc | 2 | ||||
-rw-r--r-- | storage/innobase/include/btr0cur.h | 10 | ||||
-rw-r--r-- | storage/innobase/include/btr0pcur.h | 10 | ||||
-rw-r--r-- | storage/innobase/include/btr0pcur.inl | 4 |
6 files changed, 17 insertions, 17 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index 07d70688976..dd954c57f54 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -2860,7 +2860,7 @@ btr_cur_open_at_rnd_pos( ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ btr_cur_t* cursor, /*!< in/out: B-tree cursor */ mtr_t* mtr, /*!< in: mtr */ - bool simulate_uniform) /*!< in: flag for uniform simulation */ + bool sim_uniform_dist) /*!< in: uniform distribution simulation */ { page_cur_t* page_cursor; ulint node_ptr_max_size = srv_page_size / 2; @@ -3044,7 +3044,7 @@ btr_cur_open_at_rnd_pos( } } - if(simulate_uniform) { + if(sim_uniform_dist) { if(!start_move_down) { ulint n_recs = page_get_n_recs(block->page.frame); double max_fanout = (double)srv_page_size / @@ -3151,7 +3151,7 @@ btr_cur_open_at_rnd_pos( } double rand_uniform = (double)(rand() / (double(RAND_MAX))); - if(simulate_uniform&& rand_uniform < p) + if(sim_uniform_dist && rand_uniform < p) page_cursor->rec = NULL; return err == DB_SUCCESS; diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index fd744e6e2f5..6869ad42332 100644 --- a/storage/innobase/dict/dict0stats.cc +++ b/storage/innobase/dict/dict0stats.cc @@ -1227,7 +1227,7 @@ btr_estimate_number_of_different_key_vals(dict_index_t* index, bool available; available = btr_cur_open_at_rnd_pos(index, BTR_SEARCH_LEAF, - &cursor, &mtr); + &cursor, &mtr, false); if (!available || index->table->bulk_trx_id != bulk_trx_id) { mtr.commit(); diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc index 2540d180fb0..aa35c0866f2 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -2389,7 +2389,7 @@ ibuf_merge_pages( bool available; available = btr_pcur_open_at_rnd_pos(ibuf.index, BTR_SEARCH_LEAF, - &pcur, &mtr); + &pcur, &mtr, false); /* No one should make this index unavailable when server is running */ ut_a(available); diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index 25bc8a40752..93a6756971f 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -213,11 +213,11 @@ simulate_uniform=true,which means that no record is chosen in the generated tree path. The caller should retry a call, that will try a new tree path */ bool btr_cur_open_at_rnd_pos( - dict_index_t* index, /*!< in: index */ - ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ - btr_cur_t* cursor, /*!< in/out: B-tree cursor */ - mtr_t* mtr, /*!< in: mtr */ - bool simulate_uniform= false); /*!< in: flag for uniform simulation */ + dict_index_t* index, /*!< in: index */ + ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ + btr_cur_t* cursor, /*!< in/out: B-tree cursor */ + mtr_t* mtr, /*!< in: mtr */ + bool sim_uniform_dist); /*!< in: uniform distribution simulation */ /*************************************************************//** Tries to perform an insert to a page in an index tree, next to cursor. It is assumed that mtr holds an x-latch on the page. The operation does diff --git a/storage/innobase/include/btr0pcur.h b/storage/innobase/include/btr0pcur.h index bd45f57225e..3da840fe1a2 100644 --- a/storage/innobase/include/btr0pcur.h +++ b/storage/innobase/include/btr0pcur.h @@ -208,11 +208,11 @@ try a new tree path */ UNIV_INLINE bool btr_pcur_open_at_rnd_pos( - dict_index_t* index, /*!< in: index */ - ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ - btr_pcur_t* cursor, /*!< in/out: B-tree pcur */ - mtr_t* mtr, /*!< in: mtr */ - bool simulate_uniform= false); /*!< in: flag for uniform simulation */ + dict_index_t* index, /*!< in: index */ + ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ + btr_pcur_t* cursor, /*!< in/out: B-tree pcur */ + mtr_t* mtr, /*!< in: mtr */ + bool sim_uniform_dist); /*!< in: uniform distribution simulation */ /**************************************************************//** Frees the possible memory heap of a persistent cursor and sets the latch mode of the persistent cursor to BTR_NO_LATCHES. diff --git a/storage/innobase/include/btr0pcur.inl b/storage/innobase/include/btr0pcur.inl index 84fb1b4fa13..be77c7c87f0 100644 --- a/storage/innobase/include/btr0pcur.inl +++ b/storage/innobase/include/btr0pcur.inl @@ -491,7 +491,7 @@ btr_pcur_open_at_rnd_pos( ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ btr_pcur_t* cursor, /*!< in/out: B-tree pcur */ mtr_t* mtr, /*!< in: mtr */ - bool simulate_uniform) /*!< in: flag for uniform simulation */ + bool sim_uniform_dist) /*!< in: uniform distribution simulation */ { /* Initialize the cursor */ @@ -504,7 +504,7 @@ btr_pcur_open_at_rnd_pos( available = btr_cur_open_at_rnd_pos(index, latch_mode, btr_pcur_get_btr_cur(cursor), - mtr, simulate_uniform); + mtr, sim_uniform_dist); cursor->pos_state = BTR_PCUR_IS_POSITIONED; cursor->old_stored = false; |