summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-12-03 14:20:27 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-12-03 15:28:53 +0200
commit9702be2c73c493b28a5607c7755a8447a42536f8 (patch)
tree812bba37b480432990ac1d3b8a2f047147436021 /storage
parentac028ec5d853a4f797e5c48c348959618c773d62 (diff)
downloadmariadb-git-9702be2c73c493b28a5607c7755a8447a42536f8.tar.gz
MDEV-24142: Remove __FILE__,__LINE__ related to buf_block_t::lock
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/btr/btr0btr.cc23
-rw-r--r--storage/innobase/btr/btr0bulk.cc4
-rw-r--r--storage/innobase/btr/btr0cur.cc42
-rw-r--r--storage/innobase/btr/btr0pcur.cc21
-rw-r--r--storage/innobase/btr/btr0sea.cc3
-rw-r--r--storage/innobase/buf/buf0buf.cc23
-rw-r--r--storage/innobase/dict/dict0dict.cc6
-rw-r--r--storage/innobase/dict/dict0stats.cc2
-rw-r--r--storage/innobase/fil/fil0crypt.cc26
-rw-r--r--storage/innobase/fsp/fsp0fsp.cc2
-rw-r--r--storage/innobase/gis/gis0sea.cc25
-rw-r--r--storage/innobase/ibuf/ibuf0ibuf.cc32
-rw-r--r--storage/innobase/include/btr0btr.h27
-rw-r--r--storage/innobase/include/btr0cur.h29
-rw-r--r--storage/innobase/include/btr0pcur.h31
-rw-r--r--storage/innobase/include/btr0pcur.ic21
-rw-r--r--storage/innobase/include/buf0buf.h33
-rw-r--r--storage/innobase/include/gis0rtree.h8
-rw-r--r--storage/innobase/include/ibuf0ibuf.h8
-rw-r--r--storage/innobase/lock/lock0lock.cc2
-rw-r--r--storage/innobase/log/log0recv.cc3
-rw-r--r--storage/innobase/row/row0import.cc3
-rw-r--r--storage/innobase/row/row0ins.cc10
-rw-r--r--storage/innobase/row/row0log.cc9
-rw-r--r--storage/innobase/row/row0merge.cc9
-rw-r--r--storage/innobase/row/row0sel.cc6
-rw-r--r--storage/innobase/trx/trx0undo.cc7
27 files changed, 103 insertions, 312 deletions
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index 0be3817ad2b..b072d9f1943 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -359,7 +359,6 @@ btr_root_adjust_on_import(
buf_block_t* block = buf_page_get_gen(
page_id_t(table->space->id, index->page),
table->space->zip_size(), RW_X_LATCH, NULL, BUF_GET,
- __FILE__, __LINE__,
&mtr, &err);
if (!block) {
ut_ad(err != DB_SUCCESS);
@@ -784,8 +783,6 @@ btr_page_get_father_node_ptr_func(
its page x-latched */
ulint latch_mode,/*!< in: BTR_CONT_MODIFY_TREE
or BTR_CONT_SEARCH_TREE */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
{
dtuple_t* tuple;
@@ -818,15 +815,12 @@ btr_page_get_father_node_ptr_func(
err = btr_cur_search_to_nth_level(
index, level + 1, tuple,
- PAGE_CUR_LE, latch_mode, cursor, 0,
- file, line, mtr);
+ PAGE_CUR_LE, latch_mode, cursor, 0, mtr);
if (err != DB_SUCCESS) {
ib::warn() << " Error code: " << err
<< " btr_page_get_father_node_ptr_func "
<< " level: " << level + 1
- << " called from file: "
- << file << " line: " << line
<< " table: " << index->table->name
<< " index: " << index->name();
}
@@ -869,11 +863,11 @@ btr_page_get_father_node_ptr_func(
#define btr_page_get_father_node_ptr(of,heap,cur,mtr) \
btr_page_get_father_node_ptr_func( \
- of,heap,cur,BTR_CONT_MODIFY_TREE,__FILE__,__LINE__,mtr)
+ of,heap,cur,BTR_CONT_MODIFY_TREE,mtr)
#define btr_page_get_father_node_ptr_for_validate(of,heap,cur,mtr) \
btr_page_get_father_node_ptr_func( \
- of,heap,cur,BTR_CONT_SEARCH_TREE,__FILE__,__LINE__,mtr)
+ of,heap,cur,BTR_CONT_SEARCH_TREE,mtr)
/************************************************************//**
Returns the upper level node pointer to a page. It is assumed that mtr holds
@@ -2320,14 +2314,11 @@ btr_page_insert_fits(
Inserts a data tuple to a tree on a non-leaf level. It is assumed
that mtr holds an x-latch on the tree. */
void
-btr_insert_on_non_leaf_level_func(
-/*==============================*/
+btr_insert_on_non_leaf_level(
ulint flags, /*!< in: undo logging and locking flags */
dict_index_t* index, /*!< in: index */
ulint level, /*!< in: level, must be > 0 */
dtuple_t* tuple, /*!< in: the record to be inserted */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
{
big_rec_t* dummy_big_rec;
@@ -2346,14 +2337,12 @@ btr_insert_on_non_leaf_level_func(
dberr_t err = btr_cur_search_to_nth_level(
index, level, tuple, PAGE_CUR_LE,
BTR_CONT_MODIFY_TREE,
- &cursor, 0, file, line, mtr);
+ &cursor, 0, mtr);
if (err != DB_SUCCESS) {
ib::warn() << " Error code: " << err
<< " btr_page_get_father_node_ptr_func "
<< " level: " << level
- << " called from file: "
- << file << " line: " << line
<< " table: " << index->table->name
<< " index: " << index->name;
}
@@ -2367,7 +2356,7 @@ btr_insert_on_non_leaf_level_func(
btr_cur_search_to_nth_level(index, level, tuple,
PAGE_CUR_RTREE_INSERT,
BTR_CONT_MODIFY_TREE,
- &cursor, 0, file, line, mtr);
+ &cursor, 0, mtr);
}
ut_ad(cursor.flag == BTR_CUR_BINARY);
diff --git a/storage/innobase/btr/btr0bulk.cc b/storage/innobase/btr/btr0bulk.cc
index 93dbb4a9bfc..e763acd777a 100644
--- a/storage/innobase/btr/btr0bulk.cc
+++ b/storage/innobase/btr/btr0bulk.cc
@@ -853,12 +853,12 @@ PageBulk::latch()
/* In case the block is S-latched by page_cleaner. */
if (!buf_page_optimistic_get(RW_X_LATCH, m_block, m_modify_clock,
- __FILE__, __LINE__, &m_mtr)) {
+ &m_mtr)) {
m_block = buf_page_get_gen(page_id_t(m_index->table->space_id,
m_page_no),
0, RW_X_LATCH,
m_block, BUF_GET_IF_IN_POOL,
- __FILE__, __LINE__, &m_mtr, &m_err);
+ &m_mtr, &m_err);
if (m_err != DB_SUCCESS) {
return (m_err);
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index c95491a3e8c..b470f70b1a8 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -755,8 +755,6 @@ bool btr_cur_instant_root_init(dict_index_t* index, const page_t* page)
@param[in] modify_clock modify clock value
@param[in,out] latch_mode BTR_SEARCH_LEAF, ...
@param[in,out] cursor cursor
-@param[in] file file name
-@param[in] line line where called
@param[in] mtr mini-transaction
@return true if success */
bool
@@ -765,8 +763,6 @@ btr_cur_optimistic_latch_leaves(
ib_uint64_t modify_clock,
ulint* latch_mode,
btr_cur_t* cursor,
- const char* file,
- unsigned line,
mtr_t* mtr)
{
ut_ad(block->page.buf_fix_count());
@@ -779,7 +775,7 @@ btr_cur_optimistic_latch_leaves(
case BTR_SEARCH_LEAF:
case BTR_MODIFY_LEAF:
return(buf_page_optimistic_get(*latch_mode, block,
- modify_clock, file, line, mtr));
+ modify_clock, mtr));
case BTR_SEARCH_PREV:
case BTR_MODIFY_PREV:
block->lock.s_lock();
@@ -801,7 +797,7 @@ btr_cur_optimistic_latch_leaves(
left_page_no),
cursor->index->table->space->zip_size(),
mode, nullptr, BUF_GET_POSSIBLY_FREED,
- __FILE__, __LINE__, mtr, &err);
+ mtr, &err);
if (err == DB_DECRYPTION_FAILED) {
cursor->index->table->file_unreadable = true;
@@ -818,8 +814,7 @@ btr_cur_optimistic_latch_leaves(
cursor->left_block = NULL;
}
- if (buf_page_optimistic_get(mode, block, modify_clock,
- file, line, mtr)) {
+ if (buf_page_optimistic_get(mode, block, modify_clock, mtr)) {
if (btr_page_get_prev(block->frame) == left_page_no) {
/* block was already buffer-fixed while
entering the function and
@@ -1247,8 +1242,6 @@ btr_cur_search_to_nth_level_func(
srw_lock* ahi_latch,
/*!< in: currently held AHI rdlock, or NULL */
#endif /* BTR_CUR_HASH_ADAPT */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr, /*!< in: mtr */
ib_uint64_t autoinc)/*!< in: PAGE_ROOT_AUTO_INC to be written
(0 if none) */
@@ -1609,7 +1602,7 @@ retry_page_get:
ut_ad(n_blocks < BTR_MAX_LEVELS);
tree_savepoints[n_blocks] = mtr_set_savepoint(mtr);
block = buf_page_get_gen(page_id, zip_size, rw_latch, guess,
- buf_mode, file, line, mtr, &err,
+ buf_mode, mtr, &err,
height == 0 && !index->is_clust());
tree_blocks[n_blocks] = block;
@@ -1725,7 +1718,7 @@ retry_page_get:
get_block = buf_page_get_gen(
page_id_t(page_id.space(), left_page_no),
zip_size, rw_latch, NULL, buf_mode,
- file, line, mtr, &err);
+ mtr, &err);
prev_tree_blocks[prev_n_blocks] = get_block;
prev_n_blocks++;
@@ -1755,8 +1748,7 @@ retry_page_get:
tree_savepoints[n_blocks] = mtr_set_savepoint(mtr);
block = buf_page_get_gen(page_id, zip_size,
- rw_latch, NULL, buf_mode,
- file, line, mtr, &err);
+ rw_latch, NULL, buf_mode, mtr, &err);
tree_blocks[n_blocks] = block;
if (err != DB_SUCCESS) {
@@ -2510,8 +2502,7 @@ func_exit:
/*****************************************************************//**
Opens a cursor at either end of an index. */
dberr_t
-btr_cur_open_at_index_side_func(
-/*============================*/
+btr_cur_open_at_index_side(
bool from_left, /*!< in: true if open to the low end,
false if to the high end */
dict_index_t* index, /*!< in: index */
@@ -2519,8 +2510,6 @@ btr_cur_open_at_index_side_func(
btr_cur_t* cursor, /*!< in/out: cursor */
ulint level, /*!< in: level to search for
(0=leaf). */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in/out: mini-transaction */
{
page_cur_t* page_cursor;
@@ -2630,7 +2619,7 @@ btr_cur_open_at_index_side_func(
? upper_rw_latch : RW_NO_LATCH;
buf_block_t* block = buf_page_get_gen(page_id, zip_size,
rw_latch, NULL, BUF_GET,
- file, line, mtr, &err,
+ mtr, &err,
height == 0
&& !index->is_clust());
ut_ad((block != NULL) == (err == DB_SUCCESS));
@@ -2866,13 +2855,10 @@ Positions a cursor at a randomly chosen position within a B-tree.
@return true if the index is available and we have put the cursor, false
if the index is unavailable */
bool
-btr_cur_open_at_rnd_pos_func(
-/*=========================*/
+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 */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
{
page_cur_t* page_cursor;
@@ -2971,7 +2957,7 @@ btr_cur_open_at_rnd_pos_func(
? upper_rw_latch : RW_NO_LATCH;
buf_block_t* block = buf_page_get_gen(page_id, zip_size,
rw_latch, NULL, BUF_GET,
- file, line, mtr, &err,
+ mtr, &err,
height == 0
&& !index->is_clust());
tree_blocks[n_blocks] = block;
@@ -6031,7 +6017,7 @@ btr_estimate_n_rows_in_range_on_level(
silence a debug assertion about this. */
block = buf_page_get_gen(page_id, zip_size, RW_S_LATCH,
NULL, BUF_GET_POSSIBLY_FREED,
- __FILE__, __LINE__, &mtr, &err);
+ &mtr, &err);
ut_ad((block != NULL) == (err == DB_SUCCESS));
@@ -6187,8 +6173,7 @@ btr_estimate_n_rows_in_range_low(
btr_cur_search_to_nth_level(index, 0, tuple1->tuple,
tuple1->mode,
BTR_SEARCH_LEAF | BTR_ESTIMATE,
- &cursor, 0,
- __FILE__, __LINE__, &mtr);
+ &cursor, 0, &mtr);
ut_ad(!page_rec_is_infimum(btr_cur_get_rec(&cursor)));
@@ -6244,8 +6229,7 @@ btr_estimate_n_rows_in_range_low(
btr_cur_search_to_nth_level(index, 0, tuple2->tuple,
mode2,
BTR_SEARCH_LEAF | BTR_ESTIMATE,
- &cursor, 0,
- __FILE__, __LINE__, &mtr);
+ &cursor, 0, &mtr);
const rec_t* rec = btr_cur_get_rec(&cursor);
diff --git a/storage/innobase/btr/btr0pcur.cc b/storage/innobase/btr/btr0pcur.cc
index caf48e58cd8..70c94615014 100644
--- a/storage/innobase/btr/btr0pcur.cc
+++ b/storage/innobase/btr/btr0pcur.cc
@@ -251,7 +251,7 @@ struct optimistic_latch_leaves
{
return hint && btr_cur_optimistic_latch_leaves(
hint, cursor->modify_clock, latch_mode,
- btr_pcur_get_btr_cur(cursor), __FILE__, __LINE__, mtr);
+ btr_pcur_get_btr_cur(cursor), mtr);
}
};
@@ -271,12 +271,9 @@ restores to before first or after the last in the tree.
record and it can be restored on a user record whose ordering fields
are identical to the ones of the original user record */
ibool
-btr_pcur_restore_position_func(
-/*===========================*/
+btr_pcur_restore_position(
ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */
btr_pcur_t* cursor, /*!< in: detached persistent cursor */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
{
dict_index_t* index;
@@ -307,9 +304,7 @@ btr_pcur_restore_position_func(
if (err != DB_SUCCESS) {
ib::warn() << " Error code: " << err
- << " btr_pcur_restore_position_func "
- << " called from file: "
- << file << " line: " << line
+ << " btr_pcur_restore_position "
<< " table: " << index->table->name
<< " index: " << index->name;
}
@@ -406,7 +401,7 @@ btr_pcur_restore_position_func(
#ifdef BTR_CUR_HASH_ADAPT
NULL,
#endif /* BTR_CUR_HASH_ADAPT */
- file, line, mtr);
+ mtr);
/* Restore the old search mode */
cursor->search_mode = old_mode;
@@ -627,8 +622,7 @@ in the first case sets the cursor after last in tree, and in the latter case
before first in tree. The latching mode must be BTR_SEARCH_LEAF or
BTR_MODIFY_LEAF. */
void
-btr_pcur_open_on_user_rec_func(
-/*===========================*/
+btr_pcur_open_on_user_rec(
dict_index_t* index, /*!< in: index */
const dtuple_t* tuple, /*!< in: tuple on which search done */
page_cur_mode_t mode, /*!< in: PAGE_CUR_L, ... */
@@ -636,12 +630,9 @@ btr_pcur_open_on_user_rec_func(
BTR_MODIFY_LEAF */
btr_pcur_t* cursor, /*!< in: memory buffer for persistent
cursor */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
{
- btr_pcur_open_low(index, 0, tuple, mode, latch_mode, cursor,
- file, line, 0, mtr);
+ btr_pcur_open_low(index, 0, tuple, mode, latch_mode, cursor, 0, mtr);
if ((mode == PAGE_CUR_GE) || (mode == PAGE_CUR_G)) {
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc
index 990646f1585..87f896ee8b8 100644
--- a/storage/innobase/btr/btr0sea.cc
+++ b/storage/innobase/btr/btr0sea.cc
@@ -1399,8 +1399,7 @@ void btr_search_drop_page_hash_when_freed(const page_id_t page_id)
(recursively) x-latch it, even though we are only reading. */
block = buf_page_get_gen(page_id, 0, RW_X_LATCH, NULL,
- BUF_PEEK_IF_IN_POOL, __FILE__, __LINE__,
- &mtr);
+ BUF_PEEK_IF_IN_POOL, &mtr);
if (block) {
/* If AHI is still valid, page can't be in free state.
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 2e099b9ca4d..b5608cacf31 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -2757,8 +2757,6 @@ buf_wait_for_read(
@param[in] guess guessed block or NULL
@param[in] mode BUF_GET, BUF_GET_IF_IN_POOL,
BUF_PEEK_IF_IN_POOL, BUF_GET_NO_LATCH, or BUF_GET_IF_IN_POOL_OR_WATCH
-@param[in] file file name
-@param[in] line line where called
@param[in] mtr mini-transaction
@param[out] err DB_SUCCESS or error code
@param[in] allow_ibuf_merge Allow change buffer merge to happen
@@ -2773,8 +2771,6 @@ buf_page_get_low(
ulint rw_latch,
buf_block_t* guess,
ulint mode,
- const char* file,
- unsigned line,
mtr_t* mtr,
dberr_t* err,
bool allow_ibuf_merge)
@@ -2829,7 +2825,7 @@ buf_page_get_low(
#endif /* UNIV_DEBUG */
ut_ad(!mtr || !ibuf_inside(mtr)
- || ibuf_page_low(page_id, zip_size, FALSE, file, line, NULL));
+ || ibuf_page_low(page_id, zip_size, FALSE, NULL));
buf_pool.stat.n_page_gets++;
loop:
@@ -3293,8 +3289,6 @@ get_latch:
@param[in] guess guessed block or NULL
@param[in] mode BUF_GET, BUF_GET_IF_IN_POOL,
BUF_PEEK_IF_IN_POOL, BUF_GET_NO_LATCH, or BUF_GET_IF_IN_POOL_OR_WATCH
-@param[in] file file name
-@param[in] line line where called
@param[in] mtr mini-transaction
@param[out] err DB_SUCCESS or error code
@param[in] allow_ibuf_merge Allow change buffer merge while
@@ -3307,8 +3301,6 @@ buf_page_get_gen(
ulint rw_latch,
buf_block_t* guess,
ulint mode,
- const char* file,
- unsigned line,
mtr_t* mtr,
dberr_t* err,
bool allow_ibuf_merge)
@@ -3341,7 +3333,7 @@ buf_page_get_gen(
}
return buf_page_get_low(page_id, zip_size, rw_latch,
- guess, mode, file, line, mtr, err, allow_ibuf_merge);
+ guess, mode, mtr, err, allow_ibuf_merge);
}
/********************************************************************//**
@@ -3354,8 +3346,6 @@ buf_page_optimistic_get(
ulint rw_latch,/*!< in: RW_S_LATCH, RW_X_LATCH */
buf_block_t* block, /*!< in: guessed buffer block */
ib_uint64_t modify_clock,/*!< in: modify clock value */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mini-transaction */
{
ibool success;
@@ -3443,16 +3433,9 @@ func_exit:
page is not in the buffer pool it is not loaded and NULL is returned.
Suitable for using when holding the lock_sys_t::mutex.
@param[in] page_id page id
-@param[in] file file name
-@param[in] line line where called
@param[in] mtr mini-transaction
@return pointer to a page or NULL */
-buf_block_t*
-buf_page_try_get_func(
- const page_id_t page_id,
- const char* file,
- unsigned line,
- mtr_t* mtr)
+buf_block_t* buf_page_try_get(const page_id_t page_id, mtr_t *mtr)
{
ut_ad(mtr);
ut_ad(mtr->is_active());
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index afc6f123e55..0edaafc8503 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -4279,8 +4279,7 @@ dict_set_corrupted(
dict_index_copy_types(tuple, sys_index, 2);
btr_cur_search_to_nth_level(sys_index, 0, tuple, PAGE_CUR_LE,
- BTR_MODIFY_LEAF,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ BTR_MODIFY_LEAF, &cursor, 0, &mtr);
if (cursor.low_match == dtuple_get_n_fields(tuple)) {
/* UPDATE SYS_INDEXES SET TYPE=index->type
@@ -4381,8 +4380,7 @@ dict_index_set_merge_threshold(
dict_index_copy_types(tuple, sys_index, 2);
btr_cur_search_to_nth_level(sys_index, 0, tuple, PAGE_CUR_GE,
- BTR_MODIFY_LEAF,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ BTR_MODIFY_LEAF, &cursor, 0, &mtr);
if (cursor.up_match == dtuple_get_n_fields(tuple)
&& rec_get_n_fields_old(btr_cur_get_rec(&cursor))
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index d6fbb9b7937..f0b3a568955 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -1518,7 +1518,7 @@ dict_stats_analyze_index_below_cur(
block = buf_page_get_gen(page_id, zip_size,
RW_S_LATCH, NULL, BUF_GET,
- __FILE__, __LINE__, &mtr, &err,
+ &mtr, &err,
!index->is_clust()
&& 1 == btr_page_get_level(page));
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index 2e7e258a04b..660af73256c 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -1051,7 +1051,7 @@ static bool fil_crypt_start_encrypting_space(fil_space_t* space)
if (buf_block_t* block = buf_page_get_gen(
page_id_t(space->id, 0), space->zip_size(),
RW_X_LATCH, NULL, BUF_GET_POSSIBLY_FREED,
- __FILE__, __LINE__, &mtr, &err)) {
+ &mtr, &err)) {
crypt_data->type = CRYPT_SCHEME_1;
crypt_data->min_key_version = 0; // all pages are unencrypted
@@ -1691,28 +1691,20 @@ fil_crypt_find_page_to_rotate(
return found;
}
-#define fil_crypt_get_page_throttle(state,offset,mtr,sleeptime_ms) \
- fil_crypt_get_page_throttle_func(state, offset, mtr, \
- sleeptime_ms, __FILE__, __LINE__)
-
/***********************************************************************
Get a page and compute sleep time
@param[in,out] state Rotation state
@param[in] offset Page offset
@param[in,out] mtr Minitransaction
@param[out] sleeptime_ms Sleep time
-@param[in] file File where called
-@param[in] line Line where called
@return page or NULL*/
static
buf_block_t*
-fil_crypt_get_page_throttle_func(
+fil_crypt_get_page_throttle(
rotate_thread_t* state,
uint32_t offset,
mtr_t* mtr,
- ulint* sleeptime_ms,
- const char* file,
- unsigned line)
+ ulint* sleeptime_ms)
{
fil_space_t* space = state->space;
const ulint zip_size = space->zip_size();
@@ -1725,11 +1717,9 @@ fil_crypt_get_page_throttle_func(
return NULL;
}
- dberr_t err = DB_SUCCESS;
buf_block_t* block = buf_page_get_gen(page_id, zip_size, RW_X_LATCH,
NULL,
- BUF_PEEK_IF_IN_POOL, file, line,
- mtr, &err);
+ BUF_PEEK_IF_IN_POOL, mtr);
if (block != NULL) {
/* page was in buffer pool */
state->crypt_stat.pages_read_from_cache++;
@@ -1745,8 +1735,7 @@ fil_crypt_get_page_throttle_func(
const ulonglong start = my_interval_timer();
block = buf_page_get_gen(page_id, zip_size,
RW_X_LATCH,
- NULL, BUF_GET_POSSIBLY_FREED,
- file, line, mtr, &err);
+ NULL, BUF_GET_POSSIBLY_FREED, mtr);
const ulonglong end = my_interval_timer();
state->cnt_waited++;
@@ -1989,12 +1978,9 @@ fil_crypt_flush_space(
mtr_t mtr;
mtr.start();
- dberr_t err;
-
if (buf_block_t* block = buf_page_get_gen(
page_id_t(space->id, 0), space->zip_size(),
- RW_X_LATCH, NULL, BUF_GET_POSSIBLY_FREED,
- __FILE__, __LINE__, &mtr, &err)) {
+ RW_X_LATCH, NULL, BUF_GET_POSSIBLY_FREED, &mtr)) {
mtr.set_named_space(space);
crypt_data->write_page0(block, &mtr);
}
diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc
index 818b83feded..7dc482553d7 100644
--- a/storage/innobase/fsp/fsp0fsp.cc
+++ b/storage/innobase/fsp/fsp0fsp.cc
@@ -895,7 +895,7 @@ fsp_fill_free_list(
}
}
- buf_block_t* xdes;
+ buf_block_t* xdes = nullptr;
xdes_t* descr = xdes_get_descriptor_with_space_hdr(
header, space, i, &xdes, mtr, init_space);
if (xdes != header && !space->full_crc32()) {
diff --git a/storage/innobase/gis/gis0sea.cc b/storage/innobase/gis/gis0sea.cc
index 59ad44dac1e..cd9abef8418 100644
--- a/storage/innobase/gis/gis0sea.cc
+++ b/storage/innobase/gis/gis0sea.cc
@@ -264,7 +264,7 @@ rtr_pcur_getnext_from_path(
block = buf_page_get_gen(
page_id_t(index->table->space_id,
next_rec.page_no), zip_size,
- rw_latch, NULL, BUF_GET, __FILE__, __LINE__, mtr);
+ rw_latch, NULL, BUF_GET, mtr);
if (block == NULL) {
continue;
@@ -529,15 +529,12 @@ rtr_compare_cursor_rec(
Initializes and opens a persistent cursor to an index tree. It should be
closed with btr_pcur_close. Mainly called by row_search_index_entry() */
void
-rtr_pcur_open_low(
-/*==============*/
+rtr_pcur_open(
dict_index_t* index, /*!< in: index */
const dtuple_t* tuple, /*!< in: tuple on which search done */
page_cur_mode_t mode, /*!< in: PAGE_CUR_RTREE_LOCATE, ... */
ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ... */
btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
{
btr_cur_t* btr_cursor;
@@ -569,12 +566,12 @@ rtr_pcur_open_low(
}
if ((latch_mode & BTR_MODIFY_TREE) && index->lock.have_u_not_x()) {
- index->lock.u_x_upgrade(SRW_LOCK_ARGS(file, line));
+ index->lock.u_x_upgrade(SRW_LOCK_CALL);
mtr->lock_upgrade(index->lock);
}
btr_cur_search_to_nth_level(index, 0, tuple, mode, latch_mode,
- btr_cursor, 0, file, line, mtr);
+ btr_cursor, 0, mtr);
cursor->pos_state = BTR_PCUR_IS_POSITIONED;
cursor->trx_if_known = NULL;
@@ -726,8 +723,7 @@ static void rtr_get_father_node(
/* root split, and search the new root */
btr_cur_search_to_nth_level(
index, level, tuple, PAGE_CUR_RTREE_LOCATE,
- BTR_CONT_MODIFY_TREE, btr_cur, 0,
- __FILE__, __LINE__, mtr);
+ BTR_CONT_MODIFY_TREE, btr_cur, 0, mtr);
} else {
/* btr_validate */
@@ -736,8 +732,7 @@ static void rtr_get_father_node(
btr_cur_search_to_nth_level(
index, level, tuple, PAGE_CUR_RTREE_LOCATE,
- BTR_CONT_MODIFY_TREE, btr_cur, 0,
- __FILE__, __LINE__, mtr);
+ BTR_CONT_MODIFY_TREE, btr_cur, 0, mtr);
rec = btr_cur_get_rec(btr_cur);
n_fields = dtuple_get_n_fields_cmp(tuple);
@@ -1222,8 +1217,7 @@ struct optimistic_get
bool operator()(buf_block_t *hint) const
{
return hint && buf_page_optimistic_get(
- RW_X_LATCH, hint, r_cursor->modify_clock, __FILE__,
- __LINE__, mtr);
+ RW_X_LATCH, hint, r_cursor->modify_clock, mtr);
}
};
@@ -1322,12 +1316,9 @@ rtr_cur_restore_position(
ut_ad(r_cursor == node->cursor);
search_again:
- dberr_t err = DB_SUCCESS;
-
block = buf_page_get_gen(
page_id_t(index->table->space_id, page_no),
- zip_size, RW_X_LATCH, NULL,
- BUF_GET, __FILE__, __LINE__, mtr, &err);
+ zip_size, RW_X_LATCH, NULL, BUF_GET, mtr);
ut_ad(block);
diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc
index 6adf8d5c262..38dd8695f2e 100644
--- a/storage/innobase/ibuf/ibuf0ibuf.cc
+++ b/storage/innobase/ibuf/ibuf0ibuf.cc
@@ -660,38 +660,22 @@ inline page_id_t ibuf_bitmap_page_no_calc(const page_id_t page_id, ulint size)
stored.
@param[in] page_id page id of the file page
@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
-@param[in] file file name
-@param[in] line line where called
@param[in,out] mtr mini-transaction
@return bitmap page where the file page is mapped, that is, the bitmap
page containing the descriptor bits for the file page; the bitmap page
is x-latched */
static
buf_block_t*
-ibuf_bitmap_get_map_page_func(
+ibuf_bitmap_get_map_page(
const page_id_t page_id,
ulint zip_size,
- const char* file,
- unsigned line,
mtr_t* mtr)
{
return buf_page_get_gen(
ibuf_bitmap_page_no_calc(page_id, zip_size),
- zip_size, RW_X_LATCH, NULL, BUF_GET, file, line, mtr);
+ zip_size, RW_X_LATCH, NULL, BUF_GET, mtr);
}
-/** Gets the ibuf bitmap page where the bits describing a given file page are
-stored.
-@param[in] page_id page id of the file page
-@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
-@param[in,out] mtr mini-transaction
-@return bitmap page where the file page is mapped, that is, the bitmap
-page containing the descriptor bits for the file page; the bitmap page
-is x-latched */
-#define ibuf_bitmap_get_map_page(page_id, zip_size, mtr) \
- ibuf_bitmap_get_map_page_func(page_id, zip_size, \
- __FILE__, __LINE__, mtr)
-
/************************************************************************//**
Sets the free bits of the page in the ibuf bitmap. This is done in a separate
mini-transaction, hence this operation does not restrict further work to only
@@ -921,8 +905,6 @@ Must not be called when recv_no_ibuf_operations==true.
@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] x_latch FALSE if relaxed check (avoid latching the
bitmap page)
-@param[in] file file name
-@param[in] line line where called
@param[in,out] mtr mtr which will contain an x-latch to the
bitmap page if the page is not one of the fixed address ibuf pages, or NULL,
in which case a new transaction is created.
@@ -934,8 +916,6 @@ ibuf_page_low(
#ifdef UNIV_DEBUG
bool x_latch,
#endif /* UNIV_DEBUG */
- const char* file,
- unsigned line,
mtr_t* mtr)
{
ibool ret;
@@ -972,7 +952,7 @@ ibuf_page_low(
buf_block_t* block = buf_page_get_gen(
ibuf_bitmap_page_no_calc(page_id, zip_size),
zip_size, RW_NO_LATCH, NULL, BUF_GET_NO_LATCH,
- file, line, &local_mtr, &err);
+ &local_mtr, &err);
ret = ibuf_bitmap_page_get_bits_low(
block->frame, page_id, zip_size,
@@ -988,8 +968,8 @@ ibuf_page_low(
mtr_start(mtr);
}
- ret = ibuf_bitmap_page_get_bits(ibuf_bitmap_get_map_page_func(
- page_id, zip_size, file, line,
+ ret = ibuf_bitmap_page_get_bits(ibuf_bitmap_get_map_page(
+ page_id, zip_size,
mtr)->frame,
page_id, zip_size,
IBUF_BITMAP_IBUF, mtr);
@@ -2296,7 +2276,7 @@ tablespace_deleted:
buf_page_get_gen(page_id_t(space_id, page_nos[i]),
zip_size, RW_X_LATCH, nullptr,
BUF_GET_POSSIBLY_FREED,
- __FILE__, __LINE__, &mtr, &err, true);
+ &mtr, &err, true);
mtr.commit();
if (err == DB_TABLESPACE_DELETED) {
goto tablespace_deleted;
diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h
index a2059da5136..3d5fd015398 100644
--- a/storage/innobase/include/btr0btr.h
+++ b/storage/innobase/include/btr0btr.h
@@ -223,21 +223,18 @@ btr_height_get(
@param[in] page page number
@param[in] mode latch mode
@param[in] merge whether change buffer merge should be attempted
-@param[in] file file name
-@param[in] line line where called
@param[in,out] mtr mini-transaction
@return block */
-inline buf_block_t* btr_block_get_func(const dict_index_t& index,
- uint32_t page, ulint mode, bool merge,
- const char* file, unsigned line,
- mtr_t* mtr)
+inline buf_block_t *btr_block_get(const dict_index_t &index,
+ uint32_t page, ulint mode, bool merge,
+ mtr_t *mtr)
{
dberr_t err;
if (buf_block_t* block = buf_page_get_gen(
page_id_t(index.table->space->id, page),
index.table->space->zip_size(), mode, NULL, BUF_GET,
- file, line, mtr, &err, merge && !index.is_clust())) {
+ mtr, &err, merge && !index.is_clust())) {
ut_ad(err == DB_SUCCESS);
return block;
} else {
@@ -253,15 +250,6 @@ inline buf_block_t* btr_block_get_func(const dict_index_t& index,
}
}
-/** Gets a buffer page and declares its latching order level.
-@param index index tree
-@param page page number
-@param mode latch mode
-@param merge whether change buffer merge should be attempted
-@param mtr mini-transaction handle
-@return the block descriptor */
-# define btr_block_get(index, page, mode, merge, mtr) \
- btr_block_get_func(index, page, mode, merge, __FILE__, __LINE__, mtr)
/**************************************************************//**
Gets the index id field of a page.
@return index id */
@@ -482,17 +470,12 @@ btr_page_split_and_insert(
Inserts a data tuple to a tree on a non-leaf level. It is assumed
that mtr holds an x-latch on the tree. */
void
-btr_insert_on_non_leaf_level_func(
-/*==============================*/
+btr_insert_on_non_leaf_level(
ulint flags, /*!< in: undo logging and locking flags */
dict_index_t* index, /*!< in: index */
ulint level, /*!< in: level, must be > 0 */
dtuple_t* tuple, /*!< in: the record to be inserted */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr); /*!< in: mtr */
-#define btr_insert_on_non_leaf_level(f,i,l,t,m) \
- btr_insert_on_non_leaf_level_func(f,i,l,t,__FILE__,__LINE__,m)
/** Set a child page pointer record as the predefined minimum record.
@tparam has_prev whether the page is supposed to have a left sibling
diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h
index 46a5bf397d2..f64c2771204 100644
--- a/storage/innobase/include/btr0cur.h
+++ b/storage/innobase/include/btr0cur.h
@@ -158,8 +158,6 @@ btr_cur_instant_root_init(dict_index_t* index, const page_t* page)
@param[in] modify_clock modify clock value
@param[in,out] latch_mode BTR_SEARCH_LEAF, ...
@param[in,out] cursor cursor
-@param[in] file file name
-@param[in] line line where called
@param[in] mtr mini-transaction
@return true if success */
bool
@@ -168,8 +166,6 @@ btr_cur_optimistic_latch_leaves(
ib_uint64_t modify_clock,
ulint* latch_mode,
btr_cur_t* cursor,
- const char* file,
- unsigned line,
mtr_t* mtr);
/********************************************************************//**
@@ -208,26 +204,23 @@ btr_cur_search_to_nth_level_func(
srw_lock* ahi_latch,
/*!< in: currently held AHI rdlock, or NULL */
#endif /* BTR_CUR_HASH_ADAPT */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr, /*!< in/out: mini-transaction */
ib_uint64_t autoinc = 0);
/*!< in: PAGE_ROOT_AUTO_INC to be written
(0 if none) */
#ifdef BTR_CUR_HASH_ADAPT
-# define btr_cur_search_to_nth_level(i,l,t,m,lm,c,a,fi,li,mtr) \
- btr_cur_search_to_nth_level_func(i,l,t,m,lm,c,a,fi,li,mtr)
+# define btr_cur_search_to_nth_level(i,l,t,m,lm,c,a,mtr) \
+ btr_cur_search_to_nth_level_func(i,l,t,m,lm,c,a,mtr)
#else /* BTR_CUR_HASH_ADAPT */
-# define btr_cur_search_to_nth_level(i,l,t,m,lm,c,a,fi,li,mtr) \
- btr_cur_search_to_nth_level_func(i,l,t,m,lm,c,fi,li,mtr)
+# define btr_cur_search_to_nth_level(i,l,t,m,lm,c,a,mtr) \
+ btr_cur_search_to_nth_level_func(i,l,t,m,lm,c,mtr)
#endif /* BTR_CUR_HASH_ADAPT */
/*****************************************************************//**
Opens a cursor at either end of an index.
@return DB_SUCCESS or error code */
dberr_t
-btr_cur_open_at_index_side_func(
-/*============================*/
+btr_cur_open_at_index_side(
bool from_left, /*!< in: true if open to the low end,
false if to the high end */
dict_index_t* index, /*!< in: index */
@@ -235,29 +228,19 @@ btr_cur_open_at_index_side_func(
btr_cur_t* cursor, /*!< in/out: cursor */
ulint level, /*!< in: level to search for
(0=leaf) */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in/out: mini-transaction */
MY_ATTRIBUTE((nonnull));
-#define btr_cur_open_at_index_side(f,i,l,c,lv,m) \
- btr_cur_open_at_index_side_func(f,i,l,c,lv,__FILE__,__LINE__,m)
-
/**********************************************************************//**
Positions a cursor at a randomly chosen position within a B-tree.
@return true if the index is available and we have put the cursor, false
if the index is unavailable */
bool
-btr_cur_open_at_rnd_pos_func(
-/*=========================*/
+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 */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr); /*!< in: mtr */
-#define btr_cur_open_at_rnd_pos(i,l,c,m) \
- btr_cur_open_at_rnd_pos_func(i,l,c,__FILE__,__LINE__,m)
/*************************************************************//**
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 a1f6034345d..745a2c969fc 100644
--- a/storage/innobase/include/btr0pcur.h
+++ b/storage/innobase/include/btr0pcur.h
@@ -109,13 +109,11 @@ btr_pcur_open_low(
record! */
ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ... */
btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
ib_uint64_t autoinc,/*!< in: PAGE_ROOT_AUTO_INC to be written
(0 if none) */
mtr_t* mtr); /*!< in: mtr */
#define btr_pcur_open(i,t,md,l,c,m) \
- btr_pcur_open_low(i,0,t,md,l,c,__FILE__,__LINE__,0,m)
+ btr_pcur_open_low(i,0,t,md,l,c,0,m)
/**************************************************************//**
Opens an persistent cursor to an index tree without initializing the
cursor. */
@@ -140,15 +138,13 @@ btr_pcur_open_with_no_init_func(
srw_lock* ahi_latch,
/*!< in: currently held AHI rdlock, or NULL */
#endif /* BTR_CUR_HASH_ADAPT */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr); /*!< in: mtr */
#ifdef BTR_CUR_HASH_ADAPT
# define btr_pcur_open_with_no_init(ix,t,md,l,cur,ahi,m) \
- btr_pcur_open_with_no_init_func(ix,t,md,l,cur,ahi,__FILE__,__LINE__,m)
+ btr_pcur_open_with_no_init_func(ix,t,md,l,cur,ahi,m)
#else /* BTR_CUR_HASH_ADAPT */
# define btr_pcur_open_with_no_init(ix,t,md,l,cur,ahi,m) \
- btr_pcur_open_with_no_init_func(ix,t,md,l,cur,__FILE__,__LINE__,m)
+ btr_pcur_open_with_no_init_func(ix,t,md,l,cur,m)
#endif /* BTR_CUR_HASH_ADAPT */
/*****************************************************************//**
@@ -193,8 +189,7 @@ in the first case sets the cursor after last in tree, and in the latter case
before first in tree. The latching mode must be BTR_SEARCH_LEAF or
BTR_MODIFY_LEAF. */
void
-btr_pcur_open_on_user_rec_func(
-/*===========================*/
+btr_pcur_open_on_user_rec(
dict_index_t* index, /*!< in: index */
const dtuple_t* tuple, /*!< in: tuple on which search done */
page_cur_mode_t mode, /*!< in: PAGE_CUR_L, ... */
@@ -202,27 +197,18 @@ btr_pcur_open_on_user_rec_func(
BTR_MODIFY_LEAF */
btr_pcur_t* cursor, /*!< in: memory buffer for persistent
cursor */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr); /*!< in: mtr */
-#define btr_pcur_open_on_user_rec(i,t,md,l,c,m) \
- btr_pcur_open_on_user_rec_func(i,t,md,l,c,__FILE__,__LINE__,m)
/**********************************************************************//**
Positions a cursor at a randomly chosen position within a B-tree.
@return true if the index is available and we have put the cursor, false
if the index is unavailable */
UNIV_INLINE
bool
-btr_pcur_open_at_rnd_pos_func(
-/*==========================*/
+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 */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr); /*!< in: mtr */
-#define btr_pcur_open_at_rnd_pos(i,l,c,m) \
- btr_pcur_open_at_rnd_pos_func(i,l,c,__FILE__,__LINE__,m)
/**************************************************************//**
Frees the possible memory heap of a persistent cursor and sets the latch
mode of the persistent cursor to BTR_NO_LATCHES.
@@ -268,15 +254,10 @@ restores to before first or after the last in the tree.
record and it can be restored on a user record whose ordering fields
are identical to the ones of the original user record */
ibool
-btr_pcur_restore_position_func(
-/*===========================*/
+btr_pcur_restore_position(
ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */
btr_pcur_t* cursor, /*!< in: detached persistent cursor */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr); /*!< in: mtr */
-#define btr_pcur_restore_position(l,cur,mtr) \
- btr_pcur_restore_position_func(l,cur,__FILE__,__LINE__,mtr)
/*********************************************************//**
Gets the rel_pos field for a cursor whose position has been stored.
@return BTR_PCUR_ON, ... */
diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.ic
index c436a110757..5840c34eecb 100644
--- a/storage/innobase/include/btr0pcur.ic
+++ b/storage/innobase/include/btr0pcur.ic
@@ -416,8 +416,6 @@ btr_pcur_open_low(
record! */
ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ... */
btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
ib_uint64_t autoinc,/*!< in: PAGE_ROOT_AUTO_INC to be written
(0 if none) */
mtr_t* mtr) /*!< in: mtr */
@@ -443,13 +441,11 @@ btr_pcur_open_low(
#ifdef BTR_CUR_HASH_ADAPT
NULL,
#endif /* BTR_CUR_HASH_ADAPT */
- file, line, mtr, autoinc);
+ mtr, autoinc);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
ib::warn() << "btr_pcur_open_low"
<< " level: " << level
- << " called from file: "
- << file << " line: " << line
<< " table: " << index->table->name
<< " index: " << index->name
<< " error: " << err;
@@ -486,8 +482,6 @@ btr_pcur_open_with_no_init_func(
srw_lock* ahi_latch,
/*!< in: currently held AHI rdlock, or NULL */
#endif /* BTR_CUR_HASH_ADAPT */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
{
btr_cur_t* btr_cursor;
@@ -505,7 +499,7 @@ btr_pcur_open_with_no_init_func(
#ifdef BTR_CUR_HASH_ADAPT
ahi_latch,
#endif /* BTR_CUR_HASH_ADAPT */
- file, line, mtr);
+ mtr);
cursor->pos_state = BTR_PCUR_IS_POSITIONED;
@@ -559,13 +553,10 @@ Positions a cursor at a randomly chosen position within a B-tree.
if the index is unavailable */
UNIV_INLINE
bool
-btr_pcur_open_at_rnd_pos_func(
-/*==========================*/
+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 */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
{
/* Initialize the cursor */
@@ -577,9 +568,9 @@ btr_pcur_open_at_rnd_pos_func(
bool available;
- available = btr_cur_open_at_rnd_pos_func(index, latch_mode,
- btr_pcur_get_btr_cur(cursor),
- file, line, mtr);
+ available = btr_cur_open_at_rnd_pos(index, latch_mode,
+ btr_pcur_get_btr_cur(cursor),
+ mtr);
cursor->pos_state = BTR_PCUR_IS_POSITIONED;
cursor->old_stored = false;
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index cc04e6d649e..6228abe572d 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -210,7 +210,7 @@ NOTE! The following macros should be used instead of buf_page_get_gen,
to improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed
in LA! */
#define buf_page_get(ID, SIZE, LA, MTR) \
- buf_page_get_gen(ID, SIZE, LA, NULL, BUF_GET, __FILE__, __LINE__, MTR)
+ buf_page_get_gen(ID, SIZE, LA, NULL, BUF_GET, MTR)
/**************************************************************//**
Use these macros to bufferfix a page with no latching. Remember not to
@@ -219,8 +219,7 @@ the contents of the page! We have separated this case, because it is
error-prone programming not to set a latch, and it should be used
with care. */
#define buf_page_get_with_no_latch(ID, SIZE, MTR) \
- buf_page_get_gen(ID, SIZE, RW_NO_LATCH, NULL, BUF_GET_NO_LATCH, \
- __FILE__, __LINE__, MTR)
+ buf_page_get_gen(ID, SIZE, RW_NO_LATCH, NULL, BUF_GET_NO_LATCH, MTR)
/********************************************************************//**
This is the general function used to get optimistic access to a database
page.
@@ -231,33 +230,15 @@ buf_page_optimistic_get(
ulint rw_latch,/*!< in: RW_S_LATCH, RW_X_LATCH */
buf_block_t* block, /*!< in: guessed block */
ib_uint64_t modify_clock,/*!< in: modify clock value */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr); /*!< in: mini-transaction */
/** Given a tablespace id and page number tries to get that page. If the
page is not in the buffer pool it is not loaded and NULL is returned.
Suitable for using when holding the lock_sys_t::mutex.
@param[in] page_id page id
-@param[in] file file name
-@param[in] line line where called
@param[in] mtr mini-transaction
@return pointer to a page or NULL */
-buf_block_t*
-buf_page_try_get_func(
- const page_id_t page_id,
- const char* file,
- unsigned line,
- mtr_t* mtr);
-
-/** Tries to get a page.
-If the page is not in the buffer pool it is not loaded. Suitable for using
-when holding the lock_sys_t::mutex.
-@param[in] page_id page identifier
-@param[in] mtr mini-transaction
-@return the page if in buffer pool, NULL if not */
-#define buf_page_try_get(page_id, mtr) \
- buf_page_try_get_func((page_id), __FILE__, __LINE__, mtr);
+buf_block_t* buf_page_try_get(const page_id_t page_id, mtr_t *mtr);
/** Get read access to a compressed page (usually of type
FIL_PAGE_TYPE_ZBLOB or FIL_PAGE_TYPE_ZBLOB2).
@@ -278,8 +259,6 @@ buf_page_t* buf_page_get_zip(const page_id_t page_id, ulint zip_size);
@param[in] guess guessed block or NULL
@param[in] mode BUF_GET, BUF_GET_IF_IN_POOL,
BUF_PEEK_IF_IN_POOL, BUF_GET_NO_LATCH, or BUF_GET_IF_IN_POOL_OR_WATCH
-@param[in] file file name
-@param[in] line line where called
@param[in] mtr mini-transaction
@param[out] err DB_SUCCESS or error code
@param[in] allow_ibuf_merge Allow change buffer merge while
@@ -292,8 +271,6 @@ buf_page_get_gen(
ulint rw_latch,
buf_block_t* guess,
ulint mode,
- const char* file,
- unsigned line,
mtr_t* mtr,
dberr_t* err = NULL,
bool allow_ibuf_merge = false);
@@ -305,8 +282,6 @@ buf_page_get_gen(
@param[in] guess guessed block or NULL
@param[in] mode BUF_GET, BUF_GET_IF_IN_POOL,
BUF_PEEK_IF_IN_POOL, BUF_GET_NO_LATCH, or BUF_GET_IF_IN_POOL_OR_WATCH
-@param[in] file file name
-@param[in] line line where called
@param[in] mtr mini-transaction
@param[out] err DB_SUCCESS or error code
@param[in] allow_ibuf_merge Allow change buffer merge to happen
@@ -321,8 +296,6 @@ buf_page_get_low(
ulint rw_latch,
buf_block_t* guess,
ulint mode,
- const char* file,
- unsigned line,
mtr_t* mtr,
dberr_t* err,
bool allow_ibuf_merge);
diff --git a/storage/innobase/include/gis0rtree.h b/storage/innobase/include/gis0rtree.h
index 75918956c88..9f42e39bae8 100644
--- a/storage/innobase/include/gis0rtree.h
+++ b/storage/innobase/include/gis0rtree.h
@@ -303,8 +303,7 @@ rtr_store_parent_path(
Initializes and opens a persistent cursor to an index tree. It should be
closed with btr_pcur_close. */
void
-rtr_pcur_open_low(
-/*==============*/
+rtr_pcur_open(
dict_index_t* index, /*!< in: index */
const dtuple_t* tuple, /*!< in: tuple on which search done */
page_cur_mode_t mode, /*!< in: PAGE_CUR_L, ...;
@@ -315,13 +314,8 @@ rtr_pcur_open_low(
record! */
ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ... */
btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */
- const char* file, /*!< in: file name */
- unsigned line, /*!< in: line where called */
mtr_t* mtr); /*!< in: mtr */
-#define rtr_pcur_open(i,t,md,l,c,m) \
- rtr_pcur_open_low(i,t,md,l,c,__FILE__,__LINE__,m)
-
struct btr_cur_t;
/*********************************************************//**
diff --git a/storage/innobase/include/ibuf0ibuf.h b/storage/innobase/include/ibuf0ibuf.h
index cb418e57532..c5849a43d3e 100644
--- a/storage/innobase/include/ibuf0ibuf.h
+++ b/storage/innobase/include/ibuf0ibuf.h
@@ -249,8 +249,6 @@ Must not be called when recv_no_ibuf_operations==true.
@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] x_latch FALSE if relaxed check (avoid latching the
bitmap page)
-@param[in] file file name
-@param[in] line line where called
@param[in,out] mtr mtr which will contain an x-latch to the
bitmap page if the page is not one of the fixed address ibuf pages, or NULL,
in which case a new transaction is created.
@@ -262,8 +260,6 @@ ibuf_page_low(
#ifdef UNIV_DEBUG
bool x_latch,
#endif /* UNIV_DEBUG */
- const char* file,
- unsigned line,
mtr_t* mtr)
MY_ATTRIBUTE((warn_unused_result));
@@ -276,7 +272,7 @@ Must not be called when recv_no_ibuf_operations==true.
@param[in,out] mtr mini-transaction or NULL
@return TRUE if level 2 or level 3 page */
# define ibuf_page(page_id, zip_size, mtr) \
- ibuf_page_low(page_id, zip_size, true, __FILE__, __LINE__, mtr)
+ ibuf_page_low(page_id, zip_size, true, mtr)
#else /* UVIV_DEBUG */
@@ -287,7 +283,7 @@ Must not be called when recv_no_ibuf_operations==true.
@param[in,out] mtr mini-transaction or NULL
@return TRUE if level 2 or level 3 page */
# define ibuf_page(page_id, zip_size, mtr) \
- ibuf_page_low(page_id, zip_size, __FILE__, __LINE__, mtr)
+ ibuf_page_low(page_id, zip_size, mtr)
#endif /* UVIV_DEBUG */
/***********************************************************************//**
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 59d9a86c44d..221313e2119 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -4668,7 +4668,7 @@ static void lock_rec_block_validate(const page_id_t page_id)
space->zip_size(),
RW_X_LATCH, NULL,
BUF_GET_POSSIBLY_FREED,
- __FILE__, __LINE__, &mtr, &err);
+ &mtr, &err);
if (err != DB_SUCCESS) {
ib::error() << "Lock rec block validate failed for tablespace "
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index 38acba580f7..0aedc9c0bd4 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -686,7 +686,7 @@ public:
}
if (buf_block_t* block = buf_page_get_low(
i.first, 0, RW_X_LATCH, nullptr,
- BUF_GET_IF_IN_POOL, __FILE__, __LINE__,
+ BUF_GET_IF_IN_POOL,
&mtr, nullptr, false)) {
if (UNIV_LIKELY_NULL(block->page.zip.data)) {
switch (fil_page_get_type(
@@ -2672,7 +2672,6 @@ next_page:
mtr.set_log_mode(MTR_LOG_NO_REDO);
if (buf_block_t *block= buf_page_get_low(page_id, 0, RW_X_LATCH,
nullptr, BUF_GET_IF_IN_POOL,
- __FILE__, __LINE__,
&mtr, nullptr, false))
{
recv_recover_page(block, mtr, p);
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc
index 4accc5dd990..b5886b797f1 100644
--- a/storage/innobase/row/row0import.cc
+++ b/storage/innobase/row/row0import.cc
@@ -2126,8 +2126,7 @@ dberr_t PageConverter::operator()(buf_block_t* block) UNIV_NOTHROW
in the buffer pool, evict it now, because
we no longer evict the pages on DISCARD TABLESPACE. */
buf_page_get_gen(block->page.id(), get_zip_size(),
- RW_NO_LATCH, NULL, BUF_EVICT_IF_IN_POOL,
- __FILE__, __LINE__, NULL, NULL);
+ RW_NO_LATCH, NULL, BUF_EVICT_IF_IN_POOL, NULL);
uint16_t page_type;
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 4729431ce4e..c1506f3b389 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -2610,7 +2610,7 @@ row_ins_clust_index_entry_low(
the function will return in both low_match and up_match of the
cursor sensible values */
err = btr_pcur_open_low(index, 0, entry, PAGE_CUR_LE, mode, &pcur,
- __FILE__, __LINE__, auto_inc, &mtr);
+ auto_inc, &mtr);
if (err != DB_SUCCESS) {
index->table->file_unreadable = true;
mtr.commit();
@@ -2924,7 +2924,7 @@ row_ins_sec_index_entry_low(
err = btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_RTREE_INSERT,
search_mode,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, 0, &mtr);
if (mode == BTR_MODIFY_LEAF && rtr_info.mbr_adj) {
mtr_commit(&mtr);
@@ -2939,7 +2939,7 @@ row_ins_sec_index_entry_low(
err = btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_RTREE_INSERT,
search_mode,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, 0, &mtr);
mode = BTR_MODIFY_TREE;
}
@@ -2951,7 +2951,7 @@ row_ins_sec_index_entry_low(
err = btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_LE,
search_mode,
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, 0, &mtr);
}
if (err != DB_SUCCESS) {
@@ -3045,7 +3045,7 @@ row_ins_sec_index_entry_low(
index, 0, entry, PAGE_CUR_LE,
(search_mode
& ~(BTR_INSERT | BTR_IGNORE_SEC_UNIQUE)),
- &cursor, 0, __FILE__, __LINE__, &mtr);
+ &cursor, 0, &mtr);
}
if (row_ins_must_modify_rec(&cursor)) {
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index 0269a664e97..62678ac8f00 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -3337,8 +3337,7 @@ row_log_apply_op_low(
has_index_lock
? BTR_MODIFY_TREE
: BTR_MODIFY_LEAF,
- &cursor, 0, __FILE__, __LINE__,
- &mtr);
+ &cursor, 0, &mtr);
ut_ad(dict_index_get_n_unique(index) > 0);
/* This test is somewhat similar to row_ins_must_modify_rec(),
@@ -3386,8 +3385,7 @@ row_log_apply_op_low(
index->set_modified(mtr);
btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_LE,
- BTR_MODIFY_TREE, &cursor, 0,
- __FILE__, __LINE__, &mtr);
+ BTR_MODIFY_TREE, &cursor, 0, &mtr);
/* No other thread than the current one
is allowed to modify the index tree.
@@ -3489,8 +3487,7 @@ insert_the_rec:
index->set_modified(mtr);
btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_LE,
- BTR_MODIFY_TREE, &cursor, 0,
- __FILE__, __LINE__, &mtr);
+ BTR_MODIFY_TREE, &cursor, 0, &mtr);
}
/* We already determined that the
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 63f38d70bc7..0b37d3822cc 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -158,8 +158,7 @@ public:
btr_cur_search_to_nth_level(m_index, 0, dtuple,
PAGE_CUR_RTREE_INSERT,
BTR_MODIFY_LEAF, &ins_cur,
- 0, __FILE__, __LINE__,
- &mtr);
+ 0, &mtr);
/* It need to update MBR in parent entry,
so change search mode to BTR_MODIFY_TREE */
@@ -174,8 +173,7 @@ public:
btr_cur_search_to_nth_level(
m_index, 0, dtuple,
PAGE_CUR_RTREE_INSERT,
- BTR_MODIFY_TREE, &ins_cur, 0,
- __FILE__, __LINE__, &mtr);
+ BTR_MODIFY_TREE, &ins_cur, 0, &mtr);
}
error = btr_cur_optimistic_insert(
@@ -197,8 +195,7 @@ public:
m_index, 0, dtuple,
PAGE_CUR_RTREE_INSERT,
BTR_MODIFY_TREE,
- &ins_cur, 0,
- __FILE__, __LINE__, &mtr);
+ &ins_cur, 0, &mtr);
error = btr_cur_pessimistic_insert(
flag, &ins_cur, &ins_offsets,
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc
index e610f41a246..89085a17bca 100644
--- a/storage/innobase/row/row0sel.cc
+++ b/storage/innobase/row/row0sel.cc
@@ -1114,8 +1114,7 @@ re_scan:
cur_block = buf_page_get_gen(
page_id_t(index->table->space_id, page_no),
index->table->space->zip_size(),
- RW_X_LATCH, NULL, BUF_GET,
- __FILE__, __LINE__, mtr, &err);
+ RW_X_LATCH, NULL, BUF_GET, mtr, &err);
} else {
mtr->start();
goto func_end;
@@ -3327,8 +3326,7 @@ Row_sel_get_clust_rec_for_mysql::operator()(
buf_block_t* block = buf_page_get_gen(
btr_pcur_get_block(prebuilt->pcur)->page.id(),
btr_pcur_get_block(prebuilt->pcur)->zip_size(),
- RW_NO_LATCH, NULL, BUF_GET,
- __FILE__, __LINE__, mtr, &err);
+ RW_NO_LATCH, NULL, BUF_GET, mtr, &err);
mem_heap_t* heap = mem_heap_create(256);
dtuple_t* tuple = dict_index_build_data_tuple(
rec, sec_index, true,
diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc
index c7d37163af7..cd27cd251ae 100644
--- a/storage/innobase/trx/trx0undo.cc
+++ b/storage/innobase/trx/trx0undo.cc
@@ -1148,7 +1148,7 @@ trx_undo_assign(trx_t* trx, dberr_t* err, mtr_t* mtr)
return buf_page_get_gen(
page_id_t(undo->rseg->space->id, undo->last_page_no),
0, RW_X_LATCH, undo->guess_block,
- BUF_GET, __FILE__, __LINE__, mtr, err);
+ BUF_GET, mtr, err);
}
trx_rseg_t* rseg = trx->rsegs.m_redo.rseg;
@@ -1188,8 +1188,7 @@ buf_block_t*
trx_undo_assign_low(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** undo,
dberr_t* err, mtr_t* mtr)
{
- const bool is_temp __attribute__((unused)) = rseg == trx->rsegs.m_noredo.rseg;
-
+ ut_d(const bool is_temp = rseg == trx->rsegs.m_noredo.rseg);
ut_ad(rseg == trx->rsegs.m_redo.rseg
|| rseg == trx->rsegs.m_noredo.rseg);
ut_ad(undo == (is_temp
@@ -1202,7 +1201,7 @@ trx_undo_assign_low(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** undo,
return buf_page_get_gen(
page_id_t(rseg->space->id, (*undo)->last_page_no),
0, RW_X_LATCH, (*undo)->guess_block,
- BUF_GET, __FILE__, __LINE__, mtr, err);
+ BUF_GET, mtr, err);
}
DBUG_EXECUTE_IF(