Fix many -Wunused-parameter

Remove unused InnoDB function parameters and functions.

i_s_sys_virtual_fill_table(): Do not allocate heap memory.

mtr_is_block_fix(): Replace with mtr_memo_contains().

mtr_is_page_fix(): Replace with mtr_memo_contains_page().
This commit is contained in:
Marko Mäkelä 2018-05-01 01:10:37 +03:00
parent 87b0434e0f
commit 2b27ac8282
78 changed files with 422 additions and 1076 deletions

View File

@ -456,7 +456,7 @@ public:
static void *operator new(size_t size, MEM_ROOT *mem_root) throw ()
{ return alloc_root(mem_root, size); }
static void operator delete(void *ptr, MEM_ROOT *mem_root) {}
static void operator delete(void *, MEM_ROOT *) {}
void init(MDL_key::enum_mdl_namespace namespace_arg,
const char *db_arg, const char *name_arg,
@ -497,7 +497,7 @@ public:
is mandatory. Can only be used before the request has been
granted.
*/
MDL_request& operator=(const MDL_request &rhs)
MDL_request& operator=(const MDL_request &)
{
ticket= NULL;
/* Do nothing, in particular, don't try to copy the key. */

View File

@ -39,7 +39,7 @@ public:
{ return alloc_root(mem_root, size); }
static void operator delete(void *ptr, size_t size) { TRASH_FREE(ptr, size); }
static void operator delete(void *, MEM_ROOT *){}
static void operator delete[](void *ptr, MEM_ROOT *mem_root)
static void operator delete[](void *, MEM_ROOT *)
{ /* never called */ }
static void operator delete[](void *ptr, size_t size) { TRASH_FREE(ptr, size); }
#ifdef HAVE_valgrind

View File

@ -164,7 +164,7 @@ public:
*/
bool copy(const base_list *rhs, MEM_ROOT *mem_root);
base_list(const base_list &rhs, MEM_ROOT *mem_root) { copy(&rhs, mem_root); }
inline base_list(bool error) { }
inline base_list(bool) {}
inline bool push_back(void *info)
{
if (((*last)=new list_node(info, &end_of_list)))
@ -533,10 +533,10 @@ public:
template <class T> class List_iterator_fast :public base_list_iterator
{
protected:
inline T *replace(T *a) { return (T*) 0; }
inline T *replace(List<T> &a) { return (T*) 0; }
inline void remove(void) { }
inline void after(T *a) { }
inline T *replace(T *) { return (T*) 0; }
inline T *replace(List<T> &) { return (T*) 0; }
inline void remove(void) {}
inline void after(T *) {}
inline T** ref(void) { return (T**) 0; }
public:
@ -605,7 +605,7 @@ struct ilink
{
return (void*)my_malloc((uint)size, MYF(MY_WME | MY_FAE | ME_FATALERROR));
}
static void operator delete(void* ptr_arg, size_t size)
static void operator delete(void* ptr_arg, size_t)
{
my_free(ptr_arg);
}

View File

@ -230,7 +230,7 @@ protected:
void reset() {}
void inc() {}
void dec() {}
void swap(I_P_List_null_counter &rhs) {}
void swap(I_P_List_null_counter &) {}
};
@ -262,14 +262,14 @@ public:
template <typename T> class I_P_List_no_push_back
{
protected:
I_P_List_no_push_back(T **a) {};
void set_last(T **a) {}
I_P_List_no_push_back(T **) {}
void set_last(T **) {}
/*
T** get_last() const method is intentionally left unimplemented
in order to prohibit usage of push_back() method in lists which
use this policy.
*/
void swap(I_P_List_no_push_back<T> &rhs) {}
void swap(I_P_List_no_push_back<T> &) {}
};

View File

@ -190,7 +190,7 @@ public:
{ /* never called */ }
static void operator delete[](void *ptr, size_t size)
{ TRASH_FREE(ptr, size); }
static void operator delete[](void *ptr, MEM_ROOT *mem_root)
static void operator delete[](void *, MEM_ROOT *)
{ /* never called */ }
~String() { free(); }

View File

@ -435,7 +435,7 @@ btr_page_create(
{
page_t* page = buf_block_get_frame(block);
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
if (page_zip) {
page_create_zip(block, index, level, 0, NULL, mtr);
@ -712,7 +712,7 @@ btr_page_free_for_ibuf(
{
page_t* root;
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
root = btr_root_get(index, mtr);
flst_add_first(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
@ -738,7 +738,7 @@ btr_page_free_low(
fseg_header_t* seg_header;
page_t* root;
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
/* The page gets invalid for optimistic searches: increment the frame
modify clock */
@ -853,7 +853,7 @@ btr_page_free_low(
/* The page was marked free in the allocation bitmap, but it
should remain buffer-fixed until mtr_commit(mtr) or until it
is explicitly freed from the mini-transaction. */
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
/* TODO: Discard any operations on the page from the redo log
and remove the block from the flush list and the buffer pool.
This would free up buffer pool earlier and reduce writes to
@ -1599,7 +1599,7 @@ btr_page_reorganize_low(
bool log_compressed;
bool is_spatial;
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
btr_assert_not_corrupted(block, index);
#ifdef UNIV_ZIP_DEBUG
ut_a(!page_zip || page_zip_validate(page_zip, page, index));
@ -1905,7 +1905,7 @@ btr_page_empty(
{
page_t* page = buf_block_get_frame(block);
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
ut_ad(page_zip == buf_block_get_page_zip(block));
#ifdef UNIV_ZIP_DEBUG
ut_a(!page_zip || page_zip_validate(page_zip, page, index));
@ -1995,8 +1995,7 @@ btr_root_raise_and_insert(
ut_ad(mtr_memo_contains_flagged(mtr, dict_index_get_lock(index),
MTR_MEMO_X_LOCK
| MTR_MEMO_SX_LOCK));
ut_ad(mtr_is_block_fix(
mtr, root_block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, root_block, MTR_MEMO_PAGE_X_FIX));
/* Allocate a new page to the tree. Root splitting is done by first
moving the root records to the new page, emptying the root, putting
@ -2103,7 +2102,7 @@ btr_root_raise_and_insert(
rtr_page_cal_mbr(index, new_block, &new_mbr, *heap);
node_ptr = rtr_index_build_node_ptr(
index, &new_mbr, rec, new_page_no, *heap, level);
index, &new_mbr, rec, new_page_no, *heap);
} else {
node_ptr = dict_index_build_node_ptr(
index, rec, new_page_no, *heap, level);
@ -2608,9 +2607,8 @@ btr_attach_half_pages(
buf_block_t* prev_block = NULL;
buf_block_t* next_block = NULL;
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_is_block_fix(
mtr, new_block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
ut_ad(mtr_memo_contains(mtr, new_block, MTR_MEMO_PAGE_X_FIX));
/* Create a memory heap where the data tuple is stored */
heap = mem_heap_create(1024);
@ -2794,8 +2792,7 @@ btr_insert_into_right_sibling(
ut_ad(mtr_memo_contains_flagged(
mtr, dict_index_get_lock(cursor->index),
MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK));
ut_ad(mtr_is_block_fix(
mtr, block, MTR_MEMO_PAGE_X_FIX, cursor->index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
ut_ad(heap);
if (next_page_no == FIL_NULL || !page_rec_is_supremum(
@ -2977,8 +2974,7 @@ func_start:
page = buf_block_get_frame(block);
page_zip = buf_block_get_page_zip(block);
ut_ad(mtr_is_block_fix(
mtr, block, MTR_MEMO_PAGE_X_FIX, cursor->index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
ut_ad(!page_is_empty(page));
/* try to insert to the next page if possible before split */
@ -3350,7 +3346,7 @@ btr_level_list_remove_func(
{
ut_ad(page != NULL);
ut_ad(mtr != NULL);
ut_ad(mtr_is_page_fix(mtr, page, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX));
ut_ad(space == page_get_space_id(page));
/* Get the previous and next page numbers of page */
@ -3484,7 +3480,7 @@ btr_node_ptr_delete(
ibool compressed;
dberr_t err;
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
/* Delete node pointer on father page */
btr_page_get_father(index, block, mtr, &cursor);
@ -3526,7 +3522,7 @@ btr_lift_page_up(
buf_block_t* block_orig = block;
ut_ad(!page_has_siblings(page));
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
page_level = btr_page_get_level(page);
root_page_no = dict_index_get_page(index);
@ -3594,8 +3590,8 @@ btr_lift_page_up(
page_level = btr_page_get_level(page);
ut_ad(!page_has_siblings(page));
ut_ad(mtr_is_block_fix(
mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(
mtr, block, MTR_MEMO_PAGE_X_FIX));
father_block = blocks[0];
father_page_zip = buf_block_get_page_zip(father_block);
@ -3754,7 +3750,7 @@ btr_compress(
}
#endif /* UNIV_DEBUG */
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
const page_size_t page_size(index->table->space->flags);
@ -3899,8 +3895,7 @@ retry:
/* Check if parent entry needs to be updated */
mbr_changed = rtr_merge_mbr_changed(
&cursor2, &father_cursor,
offsets2, offsets, &new_mbr,
merge_block, block, index);
offsets2, offsets, &new_mbr);
}
rec_t* orig_pred = page_copy_rec_list_start(
@ -3945,8 +3940,7 @@ retry:
merge_page, &new_mbr, NULL, mtr);
#endif
} else {
rtr_node_ptr_delete(
index, &father_cursor, block, mtr);
rtr_node_ptr_delete(&father_cursor, mtr);
}
/* No GAP lock needs to be worrying about */
@ -4092,9 +4086,7 @@ retry:
rtr_merge_and_update_mbr(&father_cursor,
&cursor2,
offsets, offsets2,
merge_page,
merge_block,
block, index, mtr);
merge_page, mtr);
} else {
/* Otherwise, we will keep the node ptr of
merge page and delete the father node ptr.
@ -4103,9 +4095,7 @@ retry:
rtr_merge_and_update_mbr(&cursor2,
&father_cursor,
offsets2, offsets,
merge_page,
merge_block,
block, index, mtr);
merge_page, mtr);
}
lock_mutex_enter();
lock_prdt_page_free_from_discard(
@ -4258,8 +4248,7 @@ btr_discard_only_page_on_level(
ut_a(page_level == btr_page_get_level(page));
ut_a(!page_has_siblings(page));
ut_ad(mtr_is_block_fix(
mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
btr_search_drop_page_hash_index(block);
if (dict_index_is_spatial(index)) {
@ -4350,7 +4339,7 @@ btr_discard_page(
ut_ad(mtr_memo_contains_flagged(mtr, dict_index_get_lock(index),
MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK));
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
MONITOR_INC(MONITOR_INDEX_DISCARD);
@ -4430,7 +4419,7 @@ btr_discard_page(
node ptr, so, we need to get father node ptr first and then
delete it. */
rtr_page_get_father(index, block, mtr, cursor, &father_cursor);
rtr_node_ptr_delete(index, &father_cursor, block, mtr);
rtr_node_ptr_delete(&father_cursor, mtr);
} else {
btr_node_ptr_delete(index, block, mtr);
}
@ -4532,7 +4521,7 @@ btr_print_recursive(
ulint i = 0;
mtr_t mtr2;
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_SX_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_SX_FIX));
ib::info() << "NODE ON LEVEL " << btr_page_get_level(page)
<< " page " << block->page.id;
@ -4626,7 +4615,7 @@ btr_check_node_ptr(
btr_cur_t cursor;
page_t* page = buf_block_get_frame(block);
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
if (dict_index_get_page(index) == block->page.id.page_no()) {

View File

@ -1718,7 +1718,7 @@ retry_page_get:
}
lock_prdt_lock(block, &prdt, index, LOCK_S,
LOCK_PREDICATE, cursor->thr, mtr);
LOCK_PREDICATE, cursor->thr);
if (rw_latch == RW_NO_LATCH && height != 0) {
rw_lock_s_unlock(&(block->lock));
@ -2919,9 +2919,8 @@ btr_cur_insert_if_possible(
ut_ad(dtuple_check_typed(tuple));
ut_ad(mtr_is_block_fix(
mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX, cursor->index->table));
ut_ad(mtr_memo_contains(mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX));
page_cursor = btr_cur_get_page_cur(cursor);
/* Now, try the insert */
@ -3111,7 +3110,7 @@ btr_cur_optimistic_insert(
page = buf_block_get_frame(block);
index = cursor->index;
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
ut_ad(!dict_index_is_online_ddl(index)
|| dict_index_is_clust(index)
|| (flags & BTR_CREATE_FLAG));
@ -3403,9 +3402,8 @@ btr_cur_pessimistic_insert(
ut_ad(mtr_memo_contains_flagged(
mtr, dict_index_get_lock(btr_cur_get_index(cursor)),
MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK));
ut_ad(mtr_is_block_fix(
mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX, cursor->index->table));
ut_ad(mtr_memo_contains(mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX));
ut_ad(!dict_index_is_online_ddl(index)
|| dict_index_is_clust(index)
|| (flags & BTR_CREATE_FLAG));
@ -4099,7 +4097,7 @@ btr_cur_optimistic_update(
index = cursor->index;
ut_ad(trx_id > 0 || (flags & BTR_KEEP_SYS_FLAG));
ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table));
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
/* This is intended only for leaf page updates */
ut_ad(page_is_leaf(page));
/* The insert buffer tree should never be updated in place. */
@ -4450,7 +4448,7 @@ btr_cur_pessimistic_update(
ut_ad(mtr_memo_contains_flagged(mtr, dict_index_get_lock(index),
MTR_MEMO_X_LOCK |
MTR_MEMO_SX_LOCK));
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
#ifdef UNIV_ZIP_DEBUG
ut_a(!page_zip || page_zip_validate(page_zip, page, index));
#endif /* UNIV_ZIP_DEBUG */
@ -5234,9 +5232,8 @@ btr_cur_compress_if_useful(
ut_ad(mtr_memo_contains_flagged(
mtr, dict_index_get_lock(btr_cur_get_index(cursor)),
MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK));
ut_ad(mtr_is_block_fix(
mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX, cursor->index->table));
ut_ad(mtr_memo_contains(mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX));
if (dict_index_is_spatial(cursor->index)) {
const page_t* page = btr_cur_get_page(cursor);
@ -5288,8 +5285,8 @@ btr_cur_optimistic_delete_func(
ut_ad(flags == 0 || flags == BTR_CREATE_FLAG);
ut_ad(mtr_memo_contains(mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX));
ut_ad(mtr_is_block_fix(mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX, cursor->index->table));
ut_ad(mtr_memo_contains(mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX));
ut_ad(mtr->is_named_space(cursor->index->table->space));
/* This is intended only for leaf page deletions */
@ -5480,7 +5477,7 @@ btr_cur_pessimistic_delete(
ut_ad(mtr_memo_contains_flagged(mtr, dict_index_get_lock(index),
MTR_MEMO_X_LOCK
| MTR_MEMO_SX_LOCK));
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
ut_ad(mtr->is_named_space(index->table->space));
if (!has_reserved_extents) {
@ -6922,7 +6919,6 @@ static
void
btr_blob_free(
/*==========*/
dict_index_t* index, /*!< in: index */
buf_block_t* block, /*!< in: buffer block */
ibool all, /*!< in: TRUE=remove also the compressed page
if there is one */
@ -6932,7 +6928,7 @@ btr_blob_free(
ulint space = block->page.id.space();
ulint page_no = block->page.id.page_no();
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
mtr_commit(mtr);
@ -7121,8 +7117,7 @@ btr_store_big_rec_extern_fields(
ut_ad(rec_offs_any_extern(offsets));
ut_ad(mtr_memo_contains_flagged(btr_mtr, dict_index_get_lock(index),
MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK));
ut_ad(mtr_is_block_fix(
btr_mtr, rec_block, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains(btr_mtr, rec_block, MTR_MEMO_PAGE_X_FIX));
ut_ad(buf_block_get_frame(rec_block) == page_align(rec));
ut_a(dict_index_is_clust(index));
@ -7436,7 +7431,7 @@ next_zip_page:
/* Commit mtr and release the
uncompressed page frame to save memory. */
btr_blob_free(index, block, FALSE, &mtr);
btr_blob_free(block, FALSE, &mtr);
if (err == Z_STREAM_END) {
break;
@ -7618,11 +7613,11 @@ btr_free_externally_stored_field(
ulint next_page_no;
mtr_t mtr;
ut_ad(dict_index_is_clust(index));
ut_ad(index->is_primary());
ut_ad(mtr_memo_contains_flagged(local_mtr, dict_index_get_lock(index),
MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK));
ut_ad(mtr_is_page_fix(
local_mtr, field_ref, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains_page(local_mtr, field_ref,
MTR_MEMO_PAGE_X_FIX));
ut_ad(!rec || rec_offs_validate(rec, index, offsets));
ut_ad(!rec || field_ref == btr_rec_get_field_ref(rec, offsets, i));
ut_ad(local_mtr->is_named_space(
@ -7764,7 +7759,7 @@ btr_free_externally_stored_field(
}
/* Commit mtr and release the BLOB block to save memory. */
btr_blob_free(index, ext_block, TRUE, &mtr);
btr_blob_free(ext_block, TRUE, &mtr);
}
}
@ -7789,8 +7784,8 @@ btr_rec_free_externally_stored_fields(
ulint i;
ut_ad(rec_offs_validate(rec, index, offsets));
ut_ad(mtr_is_page_fix(mtr, rec, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(dict_index_is_clust(index));
ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX));
ut_ad(index->is_primary());
ut_ad(page_rec_is_leaf(rec));
/* Free possible externally stored fields in the record */
@ -7828,7 +7823,7 @@ btr_rec_free_updated_extern_fields(
ulint i;
ut_ad(rec_offs_validate(rec, index, offsets));
ut_ad(mtr_is_page_fix(mtr, rec, MTR_MEMO_PAGE_X_FIX, index->table));
ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX));
/* Free possible externally stored fields in the record */

View File

@ -490,7 +490,7 @@ btr_pcur_move_backward_from_page(
ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
ut_ad(btr_pcur_is_before_first_on_page(cursor));
ut_ad(!btr_pcur_is_before_first_in_tree(cursor, mtr));
ut_ad(!btr_pcur_is_before_first_in_tree(cursor));
latch_mode = cursor->latch_mode;
@ -562,7 +562,7 @@ btr_pcur_move_to_prev(
if (btr_pcur_is_before_first_on_page(cursor)) {
if (btr_pcur_is_before_first_in_tree(cursor, mtr)) {
if (btr_pcur_is_before_first_in_tree(cursor)) {
return(FALSE);
}

View File

@ -565,14 +565,10 @@ block->n_hash_helps, n_fields, n_bytes, left_side are NOT protected by any
semaphore, to save CPU time! Do not assume the fields are consistent.
@return TRUE if building a (new) hash index on the block is recommended
@param[in,out] info search info
@param[in,out] block buffer block
@param[in] cursor cursor */
@param[in,out] block buffer block */
static
bool
btr_search_update_block_hash_info(
btr_search_t* info,
buf_block_t* block,
const btr_cur_t* cursor)
btr_search_update_block_hash_info(btr_search_t* info, buf_block_t* block)
{
ut_ad(!btr_search_own_any(RW_LOCK_S));
ut_ad(!btr_search_own_any(RW_LOCK_X));
@ -1548,8 +1544,7 @@ btr_search_info_update_slow(btr_search_t* info, btr_cur_t* cursor)
btr_search_info_update_hash(info, cursor);
bool build_index = btr_search_update_block_hash_info(
info, block, cursor);
bool build_index = btr_search_update_block_hash_info(info, block);
if (build_index || (cursor->flag == BTR_CUR_HASH_FAIL)) {

View File

@ -2983,17 +2983,10 @@ buf_flush_page_cleaner_disabled_loop(void)
}
/** Disables page cleaner threads (coordinator and workers).
It's used by: SET GLOBAL innodb_page_cleaner_disabled_debug = 1 (0).
@param[in] thd thread handle
@param[in] var pointer to system variable
@param[out] var_ptr where the formal string goes
@param[in] save immediate result from check function */
void
buf_flush_page_cleaner_disabled_debug_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save)
void buf_flush_page_cleaner_disabled_debug_update(THD*,
st_mysql_sys_var*, void*,
const void* save)
{
if (!page_cleaner.is_running) {
return;

View File

@ -144,7 +144,6 @@ dict_load_column_low(
/** Load a virtual column "mapping" (to base columns) information
from a SYS_VIRTUAL record
@param[in,out] table table
@param[in,out] heap memory heap
@param[in,out] column mapped base column's dict_column_t
@param[in,out] table_id table id
@param[in,out] pos virtual column position
@ -156,7 +155,6 @@ static
const char*
dict_load_virtual_low(
dict_table_t* table,
mem_heap_t* heap,
dict_col_t** column,
table_id_t* table_id,
ulint* pos,
@ -467,7 +465,6 @@ dict_process_sys_columns_rec(
/** This function parses a SYS_VIRTUAL record and extracts virtual column
information
@param[in,out] heap heap memory
@param[in] rec current SYS_COLUMNS rec
@param[in,out] table_id table id
@param[in,out] pos virtual column position
@ -475,7 +472,6 @@ information
@return error message, or NULL on success */
const char*
dict_process_sys_virtual_rec(
mem_heap_t* heap,
const rec_t* rec,
table_id_t* table_id,
ulint* pos,
@ -484,7 +480,7 @@ dict_process_sys_virtual_rec(
const char* err_msg;
/* Parse the record, and get "dict_col_t" struct filled */
err_msg = dict_load_virtual_low(NULL, heap, NULL, table_id,
err_msg = dict_load_virtual_low(NULL, NULL, table_id,
pos, base_pos, rec);
return(err_msg);
@ -1693,7 +1689,6 @@ static const char* dict_load_virtual_del = "delete-marked record in SYS_VIRTUAL"
/** Load a virtual column "mapping" (to base columns) information
from a SYS_VIRTUAL record
@param[in,out] table table
@param[in,out] heap memory heap
@param[in,out] column mapped base column's dict_column_t
@param[in,out] table_id table id
@param[in,out] pos virtual column position
@ -1705,7 +1700,6 @@ static
const char*
dict_load_virtual_low(
dict_table_t* table,
mem_heap_t* heap,
dict_col_t** column,
table_id_t* table_id,
ulint* pos,
@ -1965,7 +1959,7 @@ dict_load_virtual_one_col(
ut_a(btr_pcur_is_on_user_rec(&pcur));
err_msg = dict_load_virtual_low(table, heap,
err_msg = dict_load_virtual_low(table,
&v_col->base_col[i - skipped],
NULL,
&pos, NULL, rec);

View File

@ -399,16 +399,9 @@ dict_stats_process_entry_from_recalc_pool()
#ifdef UNIV_DEBUG
/** Disables dict stats thread. It's used by:
SET GLOBAL innodb_dict_stats_disabled_debug = 1 (0).
@param[in] thd thread handle
@param[in] var pointer to system variable
@param[out] var_ptr where the formal string goes
@param[in] save immediate result from check function */
void
dict_stats_disabled_debug_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save)
void dict_stats_disabled_debug_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
/* This method is protected by mutex, as every SET GLOBAL .. */
ut_ad(dict_stats_disabled_event != NULL);

View File

@ -469,7 +469,6 @@ byte*
fil_parse_write_crypt_data(
byte* ptr,
const byte* end_ptr,
const buf_block_t* block,
dberr_t* err)
{
/* check that redo log entry is complete */
@ -2051,13 +2050,8 @@ fil_crypt_flush_space(
/***********************************************************************
Complete rotating a space
@param[in,out] key_state Key state
@param[in,out] state Rotation state */
static
void
fil_crypt_complete_rotate_space(
const key_state_t* key_state,
rotate_thread_t* state)
static void fil_crypt_complete_rotate_space(rotate_thread_t* state)
{
fil_space_crypt_t *crypt_data = state->space->crypt_data;
@ -2220,8 +2214,7 @@ DECLARE_THREAD(fil_crypt_thread)(
/* If space is marked as stopping, release
space and stop rotation. */
if (thr.space->is_stopping()) {
fil_crypt_complete_rotate_space(
&new_state, &thr);
fil_crypt_complete_rotate_space(&thr);
thr.space->release();
thr.space = NULL;
break;
@ -2233,7 +2226,7 @@ DECLARE_THREAD(fil_crypt_thread)(
/* complete rotation */
if (thr.space) {
fil_crypt_complete_rotate_space(&new_state, &thr);
fil_crypt_complete_rotate_space(&thr);
}
/* force key state refresh */

View File

@ -831,7 +831,10 @@ open that file, and read the contents into m_filepath.
dberr_t
RemoteDatafile::open_link_file()
{
set_link_filepath(NULL);
if (m_link_filepath == NULL) {
m_link_filepath = fil_make_filepath(NULL, name(), ISL, false);
}
m_filepath = read_link_file(m_link_filepath);
return(m_filepath == NULL ? DB_CANNOT_OPEN_FILE : DB_SUCCESS);
@ -897,18 +900,6 @@ RemoteDatafile::shutdown()
}
}
/** Set the link filepath. Use default datadir, the base name of
the path provided without its suffix, plus DOT_ISL.
@param[in] path filepath which contains a basename to use.
If NULL, use m_name as the basename. */
void
RemoteDatafile::set_link_filepath(const char* path)
{
if (m_link_filepath == NULL) {
m_link_filepath = fil_make_filepath(NULL, name(), ISL, false);
}
}
/** Creates a new InnoDB Symbolic Link (ISL) file. It is always created
under the 'datadir' of MySQL. The datadir is the directory of a
running mysqld program. We can refer to it by simply using the path ".".

View File

@ -502,7 +502,6 @@ fts_load_user_stopword(
stopword_info);
graph = fts_parse_sql_no_dict_lock(
NULL,
info,
"DECLARE FUNCTION my_func;\n"
"DECLARE CURSOR c IS"
@ -1932,7 +1931,7 @@ fts_create_common_tables(
pars_info_bind_id(info, true, "config_table", fts_name);
graph = fts_parse_sql_no_dict_lock(
&fts_table, info, fts_config_table_insert_values_sql);
info, fts_config_table_insert_values_sql);
error = fts_eval_sql(trx, graph);
@ -2311,7 +2310,7 @@ fts_trx_create(
savep != NULL;
savep = UT_LIST_GET_NEXT(trx_savepoints, savep)) {
fts_savepoint_take(trx, ftt, savep->name);
fts_savepoint_take(ftt, savep->name);
}
return(ftt);
@ -3561,7 +3560,7 @@ fts_add_doc_by_id(
dict_index_copy_types(clust_ref, clust_index, n_fields);
row_build_row_ref_in_tuple(
clust_ref, rec, fts_id_index, NULL, NULL);
clust_ref, rec, fts_id_index, NULL);
btr_pcur_open_with_no_init(
clust_index, clust_ref, PAGE_CUR_LE,
@ -4725,7 +4724,7 @@ fts_tokenize_add_word_for_parser(
MYSQL_FTPARSER_PARAM* param, /* in: parser paramter */
const char* word, /* in: token word */
int word_len, /* in: word len */
MYSQL_FTPARSER_BOOLEAN_INFO* boolean_info) /* in: word boolean info */
MYSQL_FTPARSER_BOOLEAN_INFO*)
{
fts_string_t str;
fts_tokenize_param_t* fts_param;
@ -5634,7 +5633,6 @@ Take a FTS savepoint. */
void
fts_savepoint_take(
/*===============*/
trx_t* trx, /*!< in: transaction */
fts_trx_t* fts_trx, /*!< in: fts transaction */
const char* name) /*!< in: savepoint name */
{
@ -5912,7 +5910,7 @@ fts_savepoint_rollback(
ut_a(ib_vector_size(savepoints) > 0);
/* Restore the savepoint. */
fts_savepoint_take(trx, trx->fts_trx, name);
fts_savepoint_take(trx->fts_trx, name);
}
}
@ -7175,7 +7173,6 @@ fts_drop_orphaned_tables(void)
pars_info_bind_function(info, "my_func", fts_read_tables, tables);
graph = fts_parse_sql_no_dict_lock(
NULL,
info,
"DECLARE FUNCTION my_func;\n"
"DECLARE CURSOR c IS"

View File

@ -32,26 +32,12 @@ Created 2013/06/04 Shaohua Wang
/******************************************************************//**
FTS default parser init
@return 0 */
static
int
fts_default_parser_init(
/*====================*/
MYSQL_FTPARSER_PARAM *param) /*!< in: plugin parser param */
{
return(0);
}
static int fts_default_parser_init(MYSQL_FTPARSER_PARAM*) { return 0; }
/******************************************************************//**
FTS default parser deinit
@return 0 */
static
int
fts_default_parser_deinit(
/*======================*/
MYSQL_FTPARSER_PARAM *param) /*!< in: plugin parser param */
{
return(0);
}
static int fts_default_parser_deinit(MYSQL_FTPARSER_PARAM*) { return 0; }
/******************************************************************//**
FTS default parser parse from ft_static.c in MYISAM.

View File

@ -1750,7 +1750,7 @@ fts_query_match_phrase_add_word_for_parser(
MYSQL_FTPARSER_PARAM* param, /*!< in: parser param */
const char* word, /*!< in: token */
int word_len, /*!< in: token length */
MYSQL_FTPARSER_BOOLEAN_INFO* info) /*!< in: token info */
MYSQL_FTPARSER_BOOLEAN_INFO*)
{
fts_phrase_param_t* phrase_param;
fts_phrase_t* phrase;
@ -3920,7 +3920,6 @@ fts_query_can_optimize(
}
/** FTS Query entry point.
@param[in] trx transaction
@param[in] index fts index to search
@param[in] flags FTS search mode
@param[in] query_str FTS query
@ -3929,7 +3928,6 @@ fts_query_can_optimize(
@return DB_SUCCESS if successful otherwise error code */
dberr_t
fts_query(
trx_t* trx,
dict_index_t* index,
uint flags,
const byte* query_str,

View File

@ -199,16 +199,13 @@ Parse an SQL string.
que_t*
fts_parse_sql_no_dict_lock(
/*=======================*/
fts_table_t* fts_table, /*!< in: FTS aux table info */
pars_info_t* info, /*!< in: info struct, or NULL */
const char* sql) /*!< in: SQL string to evaluate */
{
char* str;
que_t* graph;
#ifdef UNIV_DEBUG
ut_ad(mutex_own(&dict_sys->mutex));
#endif
str = ut_str3cat(fts_sql_begin, sql, fts_sql_end);

View File

@ -72,7 +72,6 @@ rtree_add_point_to_mbr(
where point is stored */
uchar* end, /*!< in: end of wkb. */
uint n_dims, /*!< in: dimensions. */
uchar byte_order, /*!< in: byte order. */
double* mbr) /*!< in/out: mbr, which
must be of length n_dims * 2. */
{
@ -112,11 +111,10 @@ rtree_get_point_mbr(
where point is stored. */
uchar* end, /*!< in: end of wkb. */
uint n_dims, /*!< in: dimensions. */
uchar byte_order, /*!< in: byte order. */
double* mbr) /*!< in/out: mbr,
must be of length n_dims * 2. */
{
return rtree_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr);
return rtree_add_point_to_mbr(wkb, end, n_dims, mbr);
}
@ -131,7 +129,6 @@ rtree_get_linestring_mbr(
where point is stored. */
uchar* end, /*!< in: end of wkb. */
uint n_dims, /*!< in: dimensions. */
uchar byte_order, /*!< in: byte order. */
double* mbr) /*!< in/out: mbr,
must be of length n_dims * 2. */
{
@ -142,8 +139,7 @@ rtree_get_linestring_mbr(
for (; n_points > 0; --n_points) {
/* Add next point to mbr */
if (rtree_add_point_to_mbr(wkb, end, n_dims,
byte_order, mbr)) {
if (rtree_add_point_to_mbr(wkb, end, n_dims, mbr)) {
return(-1);
}
}
@ -162,7 +158,6 @@ rtree_get_polygon_mbr(
where point is stored. */
uchar* end, /*!< in: end of wkb. */
uint n_dims, /*!< in: dimensions. */
uchar byte_order, /*!< in: byte order. */
double* mbr) /*!< in/out: mbr,
must be of length n_dims * 2. */
{
@ -178,8 +173,7 @@ rtree_get_polygon_mbr(
for (; n_points > 0; --n_points) {
/* Add next point to mbr */
if (rtree_add_point_to_mbr(wkb, end, n_dims,
byte_order, mbr)) {
if (rtree_add_point_to_mbr(wkb, end, n_dims, mbr)) {
return(-1);
}
}
@ -205,11 +199,10 @@ rtree_get_geometry_mbr(
by itself. */
{
int res;
uchar byte_order = 2;
uint wkb_type = 0;
uint n_items;
byte_order = *(*wkb);
/* byte_order = *(*wkb); */
++(*wkb);
wkb_type = uint4korr((*wkb));
@ -217,24 +210,22 @@ rtree_get_geometry_mbr(
switch ((enum wkbType) wkb_type) {
case wkbPoint:
res = rtree_get_point_mbr(wkb, end, n_dims, byte_order, mbr);
res = rtree_get_point_mbr(wkb, end, n_dims, mbr);
break;
case wkbLineString:
res = rtree_get_linestring_mbr(wkb, end, n_dims,
byte_order, mbr);
res = rtree_get_linestring_mbr(wkb, end, n_dims, mbr);
break;
case wkbPolygon:
res = rtree_get_polygon_mbr(wkb, end, n_dims, byte_order, mbr);
res = rtree_get_polygon_mbr(wkb, end, n_dims, mbr);
break;
case wkbMultiPoint:
n_items = uint4korr((*wkb));
(*wkb) += 4;
for (; n_items > 0; --n_items) {
byte_order = *(*wkb);
/* byte_order = *(*wkb); */
++(*wkb);
(*wkb) += 4;
if (rtree_get_point_mbr(wkb, end, n_dims,
byte_order, mbr)) {
if (rtree_get_point_mbr(wkb, end, n_dims, mbr)) {
return(-1);
}
}
@ -244,11 +235,10 @@ rtree_get_geometry_mbr(
n_items = uint4korr((*wkb));
(*wkb) += 4;
for (; n_items > 0; --n_items) {
byte_order = *(*wkb);
/* byte_order = *(*wkb); */
++(*wkb);
(*wkb) += 4;
if (rtree_get_linestring_mbr(wkb, end, n_dims,
byte_order, mbr)) {
if (rtree_get_linestring_mbr(wkb, end, n_dims, mbr)) {
return(-1);
}
}
@ -258,11 +248,10 @@ rtree_get_geometry_mbr(
n_items = uint4korr((*wkb));
(*wkb) += 4;
for (; n_items > 0; --n_items) {
byte_order = *(*wkb);
/* byte_order = *(*wkb); */
++(*wkb);
(*wkb) += 4;
if (rtree_get_polygon_mbr(wkb, end, n_dims,
byte_order, mbr)) {
if (rtree_get_polygon_mbr(wkb, end, n_dims, mbr)) {
return(-1);
}
}
@ -402,7 +391,7 @@ copy_coords(
/*========*/
double* dst, /*!< in/out: destination. */
const double* src, /*!< in: source. */
int n_dim) /*!< in: dimensions. */
int)
{
memcpy(dst, src, DATA_MBR_LEN);
}
@ -624,7 +613,7 @@ rtree_key_cmp(
/*==========*/
page_cur_mode_t mode, /*!< in: compare method. */
const uchar* b, /*!< in: first key. */
int b_len, /*!< in: first key len. */
int,
const uchar* a, /*!< in: second key. */
int a_len) /*!< in: second key len. */
{

View File

@ -133,10 +133,8 @@ rtr_index_build_node_ptr(
pointer */
ulint page_no,/*!< in: page number to put in node
pointer */
mem_heap_t* heap, /*!< in: memory heap where pointer
mem_heap_t* heap) /*!< in: memory heap where pointer
created */
ulint level) /*!< in: level of rec in tree:
0 means leaf level */
{
dtuple_t* tuple;
dfield_t* field;
@ -291,7 +289,6 @@ rtr_update_mbr_field(
ulint up_match = 0;
ulint low_match = 0;
ulint child;
ulint level;
ulint rec_info;
page_zip_des_t* page_zip;
bool ins_suc = true;
@ -310,7 +307,7 @@ rtr_update_mbr_field(
page_zip = buf_block_get_page_zip(block);
child = btr_node_ptr_get_child_page_no(rec, offsets);
level = btr_page_get_level(buf_block_get_frame(block));
const bool is_leaf = page_is_leaf(block->frame);
if (new_rec) {
child_rec = new_rec;
@ -319,7 +316,7 @@ rtr_update_mbr_field(
}
dtuple_t* node_ptr = rtr_index_build_node_ptr(
index, mbr, child_rec, child, heap, level);
index, mbr, child_rec, child, heap);
/* We need to remember the child page no of cursor2, since page could be
reorganized or insert a new rec before it. */
@ -429,7 +426,7 @@ rtr_update_mbr_field(
ut_ad(old_rec != insert_rec);
page_cur_position(old_rec, block, &page_cur);
offsets2 = rec_get_offsets(old_rec, index, NULL, !level,
offsets2 = rec_get_offsets(old_rec, index, NULL, is_leaf,
ULINT_UNDEFINED, &heap);
page_cur_delete_rec(&page_cur, index, offsets2, mtr);
@ -459,7 +456,7 @@ update_mbr:
cur2_rec = cursor2->page_cur.rec;
offsets2 = rec_get_offsets(cur2_rec, index, NULL,
!level,
is_leaf,
ULINT_UNDEFINED, &heap);
cur2_rec_info = rec_get_info_bits(cur2_rec,
@ -519,7 +516,7 @@ update_mbr:
if (ins_suc) {
btr_cur_position(index, insert_rec, block, cursor);
offsets = rec_get_offsets(insert_rec,
index, offsets, !level,
index, offsets, is_leaf,
ULINT_UNDEFINED, &heap);
}
@ -534,7 +531,7 @@ update_mbr:
cur2_rec = btr_cur_get_rec(cursor2);
offsets2 = rec_get_offsets(cur2_rec, index, NULL,
!level,
is_leaf,
ULINT_UNDEFINED, &heap);
/* If the cursor2 position is on a wrong rec, we
@ -548,7 +545,7 @@ update_mbr:
while (!page_rec_is_supremum(cur2_rec)) {
offsets2 = rec_get_offsets(cur2_rec, index,
NULL,
!level,
is_leaf,
ULINT_UNDEFINED,
&heap);
cur2_pno = btr_node_ptr_get_child_page_no(
@ -634,7 +631,6 @@ rtr_adjust_upper_level(
buf_block_t* new_block, /*!< in/out: the new half page */
rtr_mbr_t* mbr, /*!< in: MBR on the old page */
rtr_mbr_t* new_mbr, /*!< in: MBR on the new page */
ulint direction, /*!< in: FSP_UP or FSP_DOWN */
mtr_t* mtr) /*!< in: mtr */
{
page_t* page;
@ -653,10 +649,8 @@ rtr_adjust_upper_level(
ulint next_page_no;
ulint space;
page_cur_t* page_cursor;
rtr_mbr_t parent_mbr;
lock_prdt_t prdt;
lock_prdt_t new_prdt;
lock_prdt_t parent_prdt;
dberr_t err;
big_rec_t* dummy_big_rec;
rec_t* rec;
@ -686,8 +680,6 @@ rtr_adjust_upper_level(
page_cursor = btr_cur_get_page_cur(&cursor);
rtr_get_mbr_from_rec(page_cursor->rec, offsets, &parent_mbr);
rtr_update_mbr_field(&cursor, offsets, NULL, page, mbr, NULL, mtr);
/* Already updated parent MBR, reset in our path */
@ -703,7 +695,7 @@ rtr_adjust_upper_level(
node_ptr_upper = rtr_index_build_node_ptr(
index, new_mbr,
page_rec_get_next(page_get_infimum_rec(new_page)),
new_page_no, heap, level);
new_page_no, heap);
ulint up_match = 0;
ulint low_match = 0;
@ -742,11 +734,9 @@ rtr_adjust_upper_level(
prdt.op = 0;
new_prdt.data = static_cast<void*>(new_mbr);
new_prdt.op = 0;
parent_prdt.data = static_cast<void*>(&parent_mbr);
parent_prdt.op = 0;
lock_prdt_update_parent(block, new_block, &prdt, &new_prdt,
&parent_prdt, index->table->space->id,
index->table->space->id,
page_cursor->block->page.id.page_no());
mem_heap_free(heap);
@ -1001,7 +991,6 @@ rtr_page_split_and_insert(
page_t* page;
page_t* new_page;
ulint page_no;
byte direction;
ulint hint_page_no;
buf_block_t* new_block;
page_zip_des_t* page_zip;
@ -1091,9 +1080,8 @@ func_start:
static_cast<uchar*>(first_rec));
/* Allocate a new page to the index */
direction = FSP_UP;
hint_page_no = page_no + 1;
new_block = btr_page_alloc(cursor->index, hint_page_no, direction,
new_block = btr_page_alloc(cursor->index, hint_page_no, FSP_UP,
page_level, mtr, mtr);
new_page_zip = buf_block_get_page_zip(new_block);
btr_page_create(new_block, new_page_zip, cursor->index,
@ -1268,12 +1256,12 @@ after_insert:
/* Check any predicate locks need to be moved/copied to the
new page */
lock_prdt_update_split(block, new_block, &prdt, &new_prdt,
lock_prdt_update_split(new_block, &prdt, &new_prdt,
cursor->index->table->space->id, page_no);
/* Adjust the upper level. */
rtr_adjust_upper_level(cursor, flags, block, new_block,
&mbr, &new_mbr, direction, mtr);
&mbr, &new_mbr, mtr);
/* Save the new ssn to the root page, since we need to reinit
the first ssn value from it after restart server. */
@ -1334,7 +1322,6 @@ dberr_t
rtr_ins_enlarge_mbr(
/*================*/
btr_cur_t* btr_cur, /*!< in: btr cursor */
que_thr_t* thr, /*!< in: query thread */
mtr_t* mtr) /*!< in: mtr */
{
dberr_t err = DB_SUCCESS;
@ -1668,10 +1655,7 @@ rtr_merge_mbr_changed(
btr_cur_t* cursor2, /*!< in: the other cursor */
ulint* offsets, /*!< in: rec offsets */
ulint* offsets2, /*!< in: rec offsets */
rtr_mbr_t* new_mbr, /*!< out: MBR to update */
buf_block_t* merge_block, /*!< in: page to merge */
buf_block_t* block, /*!< in: page be merged */
dict_index_t* index) /*!< in: index */
rtr_mbr_t* new_mbr) /*!< out: MBR to update */
{
double* mbr;
double mbr1[SPDIMS * 2];
@ -1716,9 +1700,6 @@ rtr_merge_and_update_mbr(
ulint* offsets, /*!< in: rec offsets */
ulint* offsets2, /*!< in: rec offsets */
page_t* child_page, /*!< in: the page. */
buf_block_t* merge_block, /*!< in: page to merge */
buf_block_t* block, /*!< in: page be merged */
dict_index_t* index, /*!< in: index */
mtr_t* mtr) /*!< in: mtr */
{
dberr_t err = DB_SUCCESS;
@ -1728,8 +1709,7 @@ rtr_merge_and_update_mbr(
ut_ad(dict_index_is_spatial(cursor->index));
changed = rtr_merge_mbr_changed(cursor, cursor2, offsets, offsets2,
&new_mbr, merge_block,
block, index);
&new_mbr);
/* Update the mbr field of the rec. And will delete the record
pointed by cursor2 */
@ -1739,7 +1719,7 @@ rtr_merge_and_update_mbr(
err = DB_ERROR;
}
} else {
rtr_node_ptr_delete(cursor2->index, cursor2, block, mtr);
rtr_node_ptr_delete(cursor2, mtr);
}
return(err);
@ -1750,10 +1730,8 @@ Deletes on the upper level the node pointer to a page. */
void
rtr_node_ptr_delete(
/*================*/
dict_index_t* index, /*!< in: index tree */
btr_cur_t* cursor, /*!< in: search cursor, contains information
about parent nodes in search */
buf_block_t* block, /*!< in: page whose node pointer is deleted */
mtr_t* mtr) /*!< in: mtr */
{
ibool compressed;

View File

@ -407,8 +407,7 @@ rtr_pcur_getnext_from_path(
}
lock_prdt_lock(block, &prdt, index, LOCK_S,
LOCK_PREDICATE, btr_cur->rtr_info->thr,
mtr);
LOCK_PREDICATE, btr_cur->rtr_info->thr);
if (rw_latch == RW_NO_LATCH) {
rw_lock_s_unlock(&(block->lock));
@ -729,7 +728,7 @@ rtr_page_get_father_node_ptr(
rtr_get_mbr_from_rec(user_rec, offsets, &mbr);
tuple = rtr_index_build_node_ptr(
index, &mbr, user_rec, page_no, heap, level);
index, &mbr, user_rec, page_no, heap);
if (sea_cur && !sea_cur->rtr_info) {
sea_cur = NULL;

View File

@ -779,7 +779,7 @@ static
int
innodb_tmpdir_validate(
THD* thd,
struct st_mysql_sys_var* var,
struct st_mysql_sys_var*,
void* save,
struct st_mysql_value* value)
{
@ -1531,9 +1531,7 @@ static
int
innobase_commit_concurrency_validate(
/*=================================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to system
variable */
THD*, st_mysql_sys_var*,
void* save, /*!< out: immediate result
for update function */
struct st_mysql_value* value) /*!< in: incoming string */
@ -1695,10 +1693,7 @@ extern "C" time_t thd_start_time(const THD* thd);
/******************************************************************//**
Get the thread start time.
@return the thread start time in seconds since the epoch. */
ulint
thd_start_time_in_secs(
/*===================*/
THD* thd) /*!< in: thread handle, or NULL */
ulint thd_start_time_in_secs(THD*)
{
// FIXME: This function should be added to the server code.
//return(thd_start_time(thd));
@ -3133,7 +3128,7 @@ innobase_query_caching_of_table_permitted(
const char* full_name, /*!< in: normalized path to the table */
uint full_name_len, /*!< in: length of the normalized path
to the table */
ulonglong *unused) /*!< unused for this engine */
ulonglong *)
{
char norm_name[1000];
trx_t* trx = check_trx_exists(thd);
@ -3187,13 +3182,11 @@ innobase_invalidate_query_cache(
/*============================*/
trx_t* trx, /*!< in: transaction which
modifies the table */
const char* full_name, /*!< in: concatenation of
const char* full_name) /*!< in: concatenation of
database name, path separator,
table name, null char NUL;
NOTE that in Windows this is
always in LOWER CASE! */
ulint full_name_len) /*!< in: full name length where
also the null chars count */
{
/* Note that the sync0mutex.h rank of the query cache mutex is just
above the InnoDB trx_sys_t->lock. The caller of this function must
@ -4793,7 +4786,6 @@ UNIV_INTERN
void
innobase_mysql_log_notify(
/*======================*/
ib_uint64_t write_lsn, /*!< in: LSN written to log file */
ib_uint64_t flush_lsn) /*!< in: LSN flushed to disk */
{
struct pending_checkpoint * pending;
@ -4996,7 +4988,7 @@ innobase_savepoint(
dberr_t error = trx_savepoint_for_mysql(trx, name, 0);
if (error == DB_SUCCESS && trx->fts_trx != NULL) {
fts_savepoint_take(trx, trx->fts_trx, name);
fts_savepoint_take(trx->fts_trx, name);
}
DBUG_RETURN(convert_error_code_to_mysql(error, 0, NULL));
@ -6432,7 +6424,11 @@ platforms.
@return dictionary table object or NULL if not found */
dict_table_t*
ha_innobase::open_dict_table(
const char* table_name,
const char*
#ifdef _WIN32
table_name
#endif
,
const char* norm_name,
bool is_partition,
dict_err_ignore_t ignore_err)
@ -8727,8 +8723,7 @@ wsrep_calc_row_hash(
const uchar* row, /*!< in: row in MySQL format */
TABLE* table, /*!< in: table in MySQL data
dictionary */
row_prebuilt_t* prebuilt, /*!< in: InnoDB prebuilt struct */
THD* thd) /*!< in: user thread */
row_prebuilt_t* prebuilt) /*!< in: InnoDB prebuilt struct */
{
Field* field;
enum_field_types field_mysql_type;
@ -9116,8 +9111,7 @@ int
ha_innobase::index_init(
/*====================*/
uint keynr, /*!< in: key (index) number */
bool sorted) /*!< in: 1 if result MUST be sorted
according to index */
bool)
{
DBUG_ENTER("index_init");
@ -9303,8 +9297,7 @@ ha_innobase::index_read(
m_prebuilt->srch_key_val_len,
index,
(byte*) key_ptr,
(ulint) key_len,
m_prebuilt->trx);
(ulint) key_len);
DBUG_ASSERT(m_prebuilt->search_tuple->n_fields > 0);
} else {
@ -9723,8 +9716,7 @@ int
ha_innobase::index_next_same(
/*=========================*/
uchar* buf, /*!< in/out: buffer for the row */
const uchar* key, /*!< in: key value */
uint keylen) /*!< in: key value length */
const uchar*, uint)
{
return(general_fetch(buf, ROW_SEL_NEXT, m_last_match_mode));
}
@ -10016,7 +10008,8 @@ ha_innobase::ft_init_ext(
const_cast<char*>(query));
// FIXME: support ft_init_ext_with_hints(), pass LIMIT
dberr_t error = fts_query(trx, index, flags, q, query_len, &result);
// FIXME: use trx
dberr_t error = fts_query(index, flags, q, query_len, &result);
if (error != DB_SUCCESS) {
my_error(convert_error_code_to_mysql(error, 0, NULL), MYF(0));
@ -10038,25 +10031,6 @@ ha_innobase::ft_init_ext(
return(reinterpret_cast<FT_INFO*>(fts_hdl));
}
/**********************************************************************//**
Initialize FT index scan
@return FT_INFO structure if successful or NULL */
FT_INFO*
ha_innobase::ft_init_ext_with_hints(
/*================================*/
uint keynr, /* in: key num */
String* key, /* in: key */
void* hints) /* in: hints */
{
/* TODO Implement function properly working with FT hint. */
#ifdef MYSQL_FT_INIT_EXT
return(ft_init_ext(hints->get_flags(), keynr, key));
#else
return NULL;
#endif
}
/*****************************************************************//**
Set up search tuple for a query through FTS_DOC_ID_INDEX on
supplied Doc ID. This is used by MySQL to retrieve the documents
@ -10460,7 +10434,6 @@ wsrep_append_key(
THD *thd,
trx_t *trx,
TABLE_SHARE *table_share,
TABLE *table,
const char* key,
uint16_t key_len,
bool shared
@ -10573,7 +10546,7 @@ ha_innobase::wsrep_append_keys(
if (!is_null) {
rcode = wsrep_append_key(
thd, trx, table_share, table, keyval,
thd, trx, table_share, keyval,
len, shared);
if (rcode) {
@ -10627,7 +10600,7 @@ ha_innobase::wsrep_append_keys(
record0, &is_null);
if (!is_null) {
rcode = wsrep_append_key(
thd, trx, table_share, table,
thd, trx, table_share,
keyval0, len+1, shared);
if (rcode) {
@ -10650,7 +10623,6 @@ ha_innobase::wsrep_append_keys(
if (!is_null && memcmp(key0, key1, len)) {
rcode = wsrep_append_key(
thd, trx, table_share,
table,
keyval1, len+1, shared);
if (rcode) DBUG_RETURN(rcode);
}
@ -10664,9 +10636,9 @@ ha_innobase::wsrep_append_keys(
uchar digest[16];
int rcode;
wsrep_calc_row_hash(digest, record0, table, m_prebuilt, thd);
wsrep_calc_row_hash(digest, record0, table, m_prebuilt);
if ((rcode = wsrep_append_key(thd, trx, table_share, table,
if ((rcode = wsrep_append_key(thd, trx, table_share,
(const char*) digest, 16,
shared))) {
DBUG_RETURN(rcode);
@ -10674,9 +10646,8 @@ ha_innobase::wsrep_append_keys(
if (record1) {
wsrep_calc_row_hash(
digest, record1, table, m_prebuilt, thd);
digest, record1, table, m_prebuilt);
if ((rcode = wsrep_append_key(thd, trx, table_share,
table,
(const char*) digest,
16, shared))) {
DBUG_RETURN(rcode);
@ -11817,7 +11788,11 @@ innobase_fts_load_stopword(
@return 0 if successful, otherwise, error number */
int
create_table_info_t::parse_table_name(
const char* name)
const char*
#ifdef _WIN32
name
#endif
)
{
DBUG_ENTER("parse_table_name");
@ -12096,8 +12071,7 @@ index_bad:
m_use_data_dir,
options->page_compressed,
options->page_compression_level == 0 ?
default_compression_level : static_cast<ulint>(options->page_compression_level),
0);
default_compression_level : ulint(options->page_compression_level));
if (m_form->s->table_type == TABLE_TYPE_SEQUENCE) {
m_flags |= DICT_TF_MASK_NO_ROLLBACK;
@ -13430,8 +13404,7 @@ ha_innobase::records_in_range(
m_prebuilt->srch_key_val_len,
index,
(byte*) (min_key ? min_key->key : (const uchar*) 0),
(ulint) (min_key ? min_key->length : 0),
m_prebuilt->trx);
(ulint) (min_key ? min_key->length : 0));
DBUG_ASSERT(min_key
? range_start->n_fields > 0
@ -13443,8 +13416,7 @@ ha_innobase::records_in_range(
m_prebuilt->srch_key_val_len,
index,
(byte*) (max_key ? max_key->key : (const uchar*) 0),
(ulint) (max_key ? max_key->length : 0),
m_prebuilt->trx);
(ulint) (max_key ? max_key->length : 0));
DBUG_ASSERT(max_key
? range_end->n_fields > 0
@ -14203,10 +14175,7 @@ each index tree. This does NOT calculate exact statistics on the table.
@return HA_ADMIN_* error code or HA_ADMIN_OK */
int
ha_innobase::analyze(
/*=================*/
THD* thd, /*!< in: connection thread handle */
HA_CHECK_OPT* check_opt) /*!< in: currently ignored */
ha_innobase::analyze(THD*, HA_CHECK_OPT*)
{
/* Simply call info_low() with all the flags
and request recalculation of the statistics */
@ -14343,7 +14312,7 @@ int
ha_innobase::optimize(
/*==================*/
THD* thd, /*!< in: connection thread handle */
HA_CHECK_OPT* check_opt) /*!< in: currently ignored */
HA_CHECK_OPT*)
{
/* FTS-FIXME: Since MySQL doesn't support engine-specific commands,
@ -15926,12 +15895,10 @@ struct ShowStatus {
spins=N,waits=N,calls=N"
The user has to parse the dataunfortunately
@param[in,out] hton the innodb handlerton
@param[in,out] thd the MySQL query thread of the caller
@param[in,out] stat_print function for printing statistics
@return true on success. */
bool to_string(
handlerton* hton,
THD* thd,
stat_print_fn* stat_print)
UNIV_NOTHROW;
@ -15947,13 +15914,11 @@ We store the metrics in the "Status" column as:
spins=N,waits=N,calls=N"
The user has to parse the dataunfortunately
@param[in,out] hton the innodb handlerton
@param[in,out] thd the MySQL query thread of the caller
@param[in,out] stat_print function for printing statistics
@return true on success. */
bool
ShowStatus::to_string(
handlerton* hton,
THD* thd,
stat_print_fn* stat_print)
UNIV_NOTHROW
@ -16002,7 +15967,11 @@ ShowStatus::to_string(
static
int
innodb_show_mutex_status(
handlerton* hton,
handlerton*
#ifndef DBUG_OFF
hton
#endif
,
THD* thd,
stat_print_fn* stat_print)
{
@ -16014,7 +15983,7 @@ innodb_show_mutex_status(
mutex_monitor.iterate(collector);
if (!collector.to_string(hton, thd, stat_print)) {
if (!collector.to_string(thd, stat_print)) {
DBUG_RETURN(1);
}
@ -16029,7 +15998,11 @@ innodb_show_mutex_status(
static
int
innodb_show_rwlock_status(
handlerton* hton,
handlerton*
#ifndef DBUG_OFF
hton
#endif
,
THD* thd,
stat_print_fn* stat_print)
{
@ -17225,10 +17198,7 @@ void
innodb_io_capacity_max_update(
/*===========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
st_mysql_sys_var*, void*,
const void* save) /*!< in: immediate result
from check function */
{
@ -17260,10 +17230,7 @@ void
innodb_io_capacity_update(
/*======================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
st_mysql_sys_var*, void*,
const void* save) /*!< in: immediate result
from check function */
{
@ -17295,10 +17262,7 @@ void
innodb_max_dirty_pages_pct_update(
/*==============================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
st_mysql_sys_var*, void*,
const void* save) /*!< in: immediate result
from check function */
{
@ -17329,10 +17293,7 @@ void
innodb_max_dirty_pages_pct_lwm_update(
/*==================================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
st_mysql_sys_var*, void*,
const void* save) /*!< in: immediate result
from check function */
{
@ -17394,8 +17355,7 @@ int
innodb_stopword_table_validate(
/*===========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to system
variable */
st_mysql_sys_var*,
void* save, /*!< out: immediate result
for update function */
struct st_mysql_value* value) /*!< in: incoming string */
@ -17430,17 +17390,10 @@ innodb_stopword_table_validate(
/** Update the system variable innodb_buffer_pool_size using the "saved"
value. This function is registered as a callback with MySQL.
@param[in] thd thread handle
@param[in] var pointer to system variable
@param[out] var_ptr where the formal string goes
@param[in] save immediate result from check function */
static
void
innodb_buffer_pool_size_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save)
innodb_buffer_pool_size_update(THD*,st_mysql_sys_var*,void*, const void* save)
{
longlong in_val = *static_cast<const longlong*>(save);
@ -17462,9 +17415,7 @@ static
int
innodb_internal_table_validate(
/*===========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to system
variable */
THD*, st_mysql_sys_var*,
void* save, /*!< out: immediate result
for update function */
struct st_mysql_value* value) /*!< in: incoming string */
@ -17514,9 +17465,7 @@ static
void
innodb_internal_table_update(
/*=========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
THD*, st_mysql_sys_var*,
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
@ -17547,15 +17496,8 @@ Update the system variable innodb_adaptive_hash_index using the "saved"
value. This function is registered as a callback with MySQL. */
static
void
innodb_adaptive_hash_index_update(
/*==============================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_adaptive_hash_index_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
if (*(my_bool*) save) {
btr_search_enable();
@ -17570,15 +17512,7 @@ Update the system variable innodb_cmp_per_index using the "saved"
value. This function is registered as a callback with MySQL. */
static
void
innodb_cmp_per_index_update(
/*========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_cmp_per_index_update(THD*, st_mysql_sys_var*, void*, const void* save)
{
/* Reset the stats whenever we enable the table
INFORMATION_SCHEMA.innodb_cmp_per_index. */
@ -17594,15 +17528,7 @@ Update the system variable innodb_old_blocks_pct using the "saved"
value. This function is registered as a callback with MySQL. */
static
void
innodb_old_blocks_pct_update(
/*=========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_old_blocks_pct_update(THD*, st_mysql_sys_var*, void*, const void* save)
{
innobase_old_blocks_pct = static_cast<uint>(
buf_LRU_old_ratio_update(
@ -17614,15 +17540,8 @@ Update the system variable innodb_old_blocks_pct using the "saved"
value. This function is registered as a callback with MySQL. */
static
void
innodb_change_buffer_max_size_update(
/*=================================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_change_buffer_max_size_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
srv_change_buffer_max_size =
(*static_cast<const uint*>(save));
@ -17637,15 +17556,7 @@ static ulong srv_saved_page_number_debug = 0;
Save an InnoDB page number. */
static
void
innodb_save_page_no(
/*================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_save_page_no(THD*, st_mysql_sys_var*, void*, const void* save)
{
srv_saved_page_number_debug = *static_cast<const ulong*>(save);
@ -17657,15 +17568,7 @@ innodb_save_page_no(
Make the first page of given user tablespace dirty. */
static
void
innodb_make_page_dirty(
/*===================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_make_page_dirty(THD*, st_mysql_sys_var*, void*, const void* save)
{
mtr_t mtr;
ulong space_id = *static_cast<const ulong*>(save);
@ -17709,10 +17612,7 @@ void
innodb_stats_sample_pages_update(
/*=============================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
st_mysql_sys_var*, void*,
const void* save) /*!< in: immediate result
from check function */
{
@ -17988,9 +17888,7 @@ static
int
innodb_monitor_validate(
/*====================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to system
variable */
THD*, st_mysql_sys_var*,
void* save, /*!< out: immediate result
for update function */
struct st_mysql_value* value) /*!< in: incoming string */
@ -18234,13 +18132,8 @@ SET GLOBAL innodb_buffer_pool_evict='uncompressed'
evicts all uncompressed page frames of compressed tablespaces. */
static
void
innodb_buffer_pool_evict_update(
/*============================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var*var, /*!< in: pointer to system variable */
void* var_ptr,/*!< out: ignored */
const void* save) /*!< in: immediate result
from check function */
innodb_buffer_pool_evict_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
if (const char* op = *static_cast<const char*const*>(save)) {
if (!strcmp(op, "uncompressed")) {
@ -18268,8 +18161,7 @@ void
innodb_enable_monitor_update(
/*=========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
st_mysql_sys_var*,
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
@ -18286,8 +18178,7 @@ void
innodb_disable_monitor_update(
/*==========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
st_mysql_sys_var*,
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
@ -18305,8 +18196,7 @@ void
innodb_reset_monitor_update(
/*========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
st_mysql_sys_var*,
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
@ -18324,8 +18214,7 @@ void
innodb_reset_all_monitor_update(
/*============================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
st_mysql_sys_var*,
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
@ -18337,15 +18226,8 @@ innodb_reset_all_monitor_update(
static
void
innodb_defragment_frequency_update(
/*===============================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_defragment_frequency_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
srv_defragment_frequency = (*static_cast<const uint*>(save));
srv_defragment_interval = ut_microseconds_to_timer(
@ -18399,13 +18281,7 @@ innodb_enable_monitor_at_startup(
/****************************************************************//**
Callback function for accessing the InnoDB variables from MySQL:
SHOW VARIABLES. */
static
int
show_innodb_vars(
/*=============*/
THD* thd,
SHOW_VAR* var,
char* buff)
static int show_innodb_vars(THD*, SHOW_VAR* var, char*)
{
innodb_export_status();
var->type = SHOW_ARRAY;
@ -18524,17 +18400,7 @@ static uint innodb_merge_threshold_set_all_debug
/** Wait for the background drop list to become empty. */
static
void
wait_background_drop_list_empty(
THD* thd /*!< in: thread handle */
MY_ATTRIBUTE((unused)),
struct st_mysql_sys_var* var /*!< in: pointer to system
variable */
MY_ATTRIBUTE((unused)),
void* var_ptr /*!< out: where the formal
string goes */
MY_ATTRIBUTE((unused)),
const void* save) /*!< in: immediate result from
check function */
wait_background_drop_list_empty(THD*, st_mysql_sys_var*, void*, const void*)
{
row_wait_for_background_drop_list_empty();
}
@ -18543,18 +18409,7 @@ wait_background_drop_list_empty(
Force innodb to checkpoint. */
static
void
checkpoint_now_set(
/*===============*/
THD* thd /*!< in: thread handle */
MY_ATTRIBUTE((unused)),
struct st_mysql_sys_var* var /*!< in: pointer to system
variable */
MY_ATTRIBUTE((unused)),
void* var_ptr /*!< out: where the formal
string goes */
MY_ATTRIBUTE((unused)),
const void* save) /*!< in: immediate result from
check function */
checkpoint_now_set(THD*, st_mysql_sys_var*, void*, const void* save)
{
if (*(my_bool*) save) {
while (log_sys.last_checkpoint_lsn
@ -18578,18 +18433,7 @@ checkpoint_now_set(
Force a dirty pages flush now. */
static
void
buf_flush_list_now_set(
/*===================*/
THD* thd /*!< in: thread handle */
MY_ATTRIBUTE((unused)),
struct st_mysql_sys_var* var /*!< in: pointer to system
variable */
MY_ATTRIBUTE((unused)),
void* var_ptr /*!< out: where the formal
string goes */
MY_ATTRIBUTE((unused)),
const void* save) /*!< in: immediate result from
check function */
buf_flush_list_now_set(THD*, st_mysql_sys_var*, void*, const void* save)
{
if (*(my_bool*) save) {
buf_flush_sync_all_buf_pools();
@ -18598,17 +18442,11 @@ buf_flush_list_now_set(
/** Override current MERGE_THRESHOLD setting for all indexes at dictionary
now.
@param[in] thd thread handle
@param[in] var pointer to system variable
@param[out] var_ptr where the formal string goes
@param[in] save immediate result from check function */
static
void
innodb_merge_threshold_set_all_debug_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save)
innodb_merge_threshold_set_all_debug_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
innodb_merge_threshold_set_all_debug
= (*static_cast<const uint*>(save));
@ -18735,10 +18573,7 @@ void
innodb_log_write_ahead_size_update(
/*===============================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
st_mysql_sys_var*, void*,
const void* save) /*!< in: immediate result
from check function */
{
@ -18781,12 +18616,8 @@ which control InnoDB "status monitor" output to the error log.
@param[in] save to-be-assigned value */
static
void
innodb_status_output_update(
/*========================*/
THD* thd __attribute__((unused)),
struct st_mysql_sys_var* var __attribute__((unused)),
void* var_ptr __attribute__((unused)),
const void* save __attribute__((unused)))
innodb_status_output_update(THD*, st_mysql_sys_var*, void* var_ptr,
const void* save)
{
*static_cast<my_bool*>(var_ptr) = *static_cast<const my_bool*>(save);
/* Wakeup server monitor thread. */
@ -18797,15 +18628,8 @@ innodb_status_output_update(
Update the system variable innodb_encryption_threads */
static
void
innodb_encryption_threads_update(
/*=============================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_encryption_threads_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
fil_crypt_set_thread_cnt(*static_cast<const uint*>(save));
}
@ -18814,15 +18638,8 @@ innodb_encryption_threads_update(
Update the system variable innodb_encryption_rotate_key_age */
static
void
innodb_encryption_rotate_key_age_update(
/*====================================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_encryption_rotate_key_age_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
fil_crypt_set_rotate_key_age(*static_cast<const uint*>(save));
}
@ -18831,15 +18648,8 @@ innodb_encryption_rotate_key_age_update(
Update the system variable innodb_encryption_rotation_iops */
static
void
innodb_encryption_rotation_iops_update(
/*===================================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_encryption_rotation_iops_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
fil_crypt_set_rotation_iops(*static_cast<const uint*>(save));
}
@ -18848,31 +18658,19 @@ innodb_encryption_rotation_iops_update(
Update the system variable innodb_encrypt_tables*/
static
void
innodb_encrypt_tables_update(
/*=========================*/
THD* thd, /*!< in: thread handle */
struct st_mysql_sys_var* var, /*!< in: pointer to
system variable */
void* var_ptr,/*!< out: where the
formal string goes */
const void* save) /*!< in: immediate result
from check function */
innodb_encrypt_tables_update(THD*, st_mysql_sys_var*, void*, const void* save)
{
fil_crypt_set_encrypt_tables(*static_cast<const ulong*>(save));
}
/** Update the innodb_log_checksums parameter.
@param[in] thd thread handle
@param[in] var system variable
@param[in,out] thd client connection
@param[out] var_ptr current value
@param[in] save immediate result from check function */
static
void
innodb_log_checksums_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save)
innodb_log_checksums_update(THD* thd, st_mysql_sys_var*, void* var_ptr,
const void* save)
{
*static_cast<my_bool*>(var_ptr) = innodb_log_checksums_func_update(
thd, *static_cast<const my_bool*>(save));
@ -19127,7 +18925,7 @@ static
int
wsrep_abort_transaction(
/*====================*/
handlerton* hton,
handlerton*,
THD *bf_thd,
THD *victim_thd,
my_bool signal)
@ -19191,12 +18989,7 @@ innobase_wsrep_get_checkpoint(
return 0;
}
static
void
wsrep_fake_trx_id(
/*==============*/
handlerton *hton,
THD *thd) /*!< in: user thread handle */
static void wsrep_fake_trx_id(handlerton *, THD *thd)
{
trx_id_t trx_id = trx_sys.get_new_trx_id();
WSREP_DEBUG("innodb fake trx id: " TRX_ID_FMT " thd: %s",
@ -20074,14 +19867,8 @@ static my_bool innobase_disallow_writes = FALSE;
An "update" method for innobase_disallow_writes variable. */
static
void
innobase_disallow_writes_update(
/*============================*/
THD* thd, /* in: thread handle */
st_mysql_sys_var* var, /* in: pointer to system
variable */
void* var_ptr, /* out: pointer to dynamic
variable */
const void* save) /* in: temporary storage */
innobase_disallow_writes_update(THD*, st_mysql_sys_var*,
void* var_ptr, const void* save)
{
*(my_bool*)var_ptr = *(my_bool*)save;
ut_a(srv_allow_writes_event);
@ -21371,7 +21158,6 @@ ib_warn_row_too_big(const dict_table_t* table)
/** Validate the requested buffer pool size. Also, reserve the necessary
memory needed for buffer pool resize.
@param[in] thd thread handle
@param[in] var pointer to system variable
@param[out] save immediate result for update function
@param[in] value incoming string
@return 0 on success, 1 on failure.
@ -21380,7 +21166,7 @@ static
int
innodb_buffer_pool_size_validate(
THD* thd,
struct st_mysql_sys_var* var,
st_mysql_sys_var*,
void* save,
struct st_mysql_value* value)
{

View File

@ -186,12 +186,6 @@ public:
FT_INFO* ft_init_ext(uint flags, uint inx, String* key);
FT_INFO* ft_init_ext_with_hints(
uint inx,
String* key,
void* hints);
//Ft_hints* hints);
int ft_read(uchar* buf);
void position(const uchar *record);

View File

@ -223,7 +223,6 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
ulint add_autoinc_arg,
ulonglong autoinc_col_min_value_arg,
ulonglong autoinc_col_max_value_arg,
ulint num_to_drop_vcol_arg,
bool ignore_flag) :
inplace_alter_handler_ctx(),
prebuilt (prebuilt_arg),
@ -1522,12 +1521,10 @@ no_match:
Find an index whose first fields are the columns in the array
in the same order and is not marked for deletion
@return matching index, NULL if not found */
static MY_ATTRIBUTE((nonnull(1,2,6), warn_unused_result))
static MY_ATTRIBUTE((nonnull(1,5), warn_unused_result))
dict_index_t*
innobase_find_fk_index(
/*===================*/
Alter_inplace_info* ha_alter_info,
/*!< in: alter table info */
dict_table_t* table, /*!< in: table */
const char** col_names,
/*!< in: column names, or NULL
@ -1708,7 +1705,6 @@ innobase_get_foreign_key_info(
}
index = innobase_find_fk_index(
ha_alter_info,
table, col_names,
drop_index, n_drop_index,
column_names, i);
@ -3138,12 +3134,11 @@ column that is being dropped or modified to NOT NULL.
@retval true Not allowed (will call my_error())
@retval false Allowed
*/
MY_ATTRIBUTE((pure, nonnull(1,2,3,4), warn_unused_result))
MY_ATTRIBUTE((pure, nonnull(1,2,3), warn_unused_result))
static
bool
innobase_check_foreigns(
Alter_inplace_info* ha_alter_info,
const TABLE* altered_table,
const TABLE* old_table,
const dict_table_t* user_table,
dict_foreign_t** drop_fk,
@ -3899,7 +3894,6 @@ prepare_inplace_add_virtual(
/** Collect virtual column info for its addition
@param[in] ha_alter_info Data used during in-place alter
@param[in] altered_table MySQL table that is being altered to
@param[in] table MySQL table as it is before the ALTER operation
@retval true Failure
@retval false Success */
@ -3907,7 +3901,6 @@ static
bool
prepare_inplace_drop_virtual(
Alter_inplace_info* ha_alter_info,
const TABLE* altered_table,
const TABLE* table)
{
ha_innobase_inplace_ctx* ctx;
@ -4134,8 +4127,6 @@ innodb_update_n_cols(const dict_table_t* table, ulint n_cols, trx_t* trx)
/** Update system table for adding virtual column(s)
@param[in] ha_alter_info Data used during in-place alter
@param[in] altered_table MySQL table that is being altered
@param[in] table MySQL table as it is before the ALTER operation
@param[in] user_table InnoDB table
@param[in] trx transaction
@retval true Failure
@ -4144,8 +4135,6 @@ static
bool
innobase_add_virtual_try(
Alter_inplace_info* ha_alter_info,
const TABLE* altered_table,
const TABLE* table,
const dict_table_t* user_table,
trx_t* trx)
{
@ -4180,7 +4169,6 @@ innobase_add_virtual_try(
/** Insert into SYS_COLUMNS and insert/update the 'default row'
for instant ADD COLUMN.
@param[in,out] ha_alter_info Data used during in-place alter
@param[in,out] ctx ALTER TABLE context for the current partition
@param[in] altered_table MySQL table that is being altered
@param[in] table MySQL table as it is before the ALTER operation
@ -4190,7 +4178,6 @@ for instant ADD COLUMN.
static
bool
innobase_add_instant_try(
Alter_inplace_info* ha_alter_info,
ha_innobase_inplace_ctx*ctx,
const TABLE* altered_table,
const TABLE* table,
@ -4592,8 +4579,6 @@ innobase_drop_one_virtual_sys_virtual(
/** Update system table for dropping virtual column(s)
@param[in] ha_alter_info Data used during in-place alter
@param[in] altered_table MySQL table that is being altered
@param[in] table MySQL table as it is before the ALTER operation
@param[in] user_table InnoDB table
@param[in] trx transaction
@retval true Failure
@ -4602,8 +4587,6 @@ static
bool
innobase_drop_virtual_try(
Alter_inplace_info* ha_alter_info,
const TABLE* altered_table,
const TABLE* table,
const dict_table_t* user_table,
trx_t* trx)
{
@ -4827,8 +4810,7 @@ prepare_inplace_alter_table_dict(
if (ha_alter_info->handler_flags
& ALTER_DROP_VIRTUAL_COLUMN) {
if (prepare_inplace_drop_virtual(
ha_alter_info, altered_table, old_table)) {
if (prepare_inplace_drop_virtual(ha_alter_info, old_table)) {
DBUG_RETURN(true);
}
}
@ -4942,7 +4924,7 @@ prepare_inplace_alter_table_dict(
if (new_clustered) {
if (innobase_check_foreigns(
ha_alter_info, altered_table, old_table,
ha_alter_info, old_table,
user_table, ctx->drop_fk, ctx->num_to_drop_fk)) {
new_clustered_failed:
DBUG_ASSERT(ctx->trx != ctx->prebuilt->trx);
@ -6770,7 +6752,7 @@ err_exit:
add_fk, n_add_fk,
ha_alter_info->online,
heap, indexed_table,
col_names, ULINT_UNDEFINED, 0, 0, 0,
col_names, ULINT_UNDEFINED, 0, 0,
ha_alter_info->ignore);
}
@ -6784,8 +6766,7 @@ err_exit:
if ((ha_alter_info->handler_flags
& ALTER_DROP_VIRTUAL_COLUMN)
&& prepare_inplace_drop_virtual(
ha_alter_info, altered_table, table)) {
&& prepare_inplace_drop_virtual(ha_alter_info, table)) {
DBUG_RETURN(true);
}
@ -6906,7 +6887,7 @@ found_col:
heap, m_prebuilt->table, col_names,
add_autoinc_col_no,
ha_alter_info->create_info->auto_increment_value,
autoinc_col_max_value, 0, ha_alter_info->ignore);
autoinc_col_max_value, ha_alter_info->ignore);
DBUG_RETURN(prepare_inplace_alter_table_dict(
ha_alter_info, altered_table, table,
@ -7568,8 +7549,7 @@ innobase_rename_column_try(
ulint nth_col,
const char* from,
const char* to,
bool new_clustered,
bool is_virtual)
bool new_clustered)
{
pars_info_t* info;
dberr_t error;
@ -7805,8 +7785,7 @@ innobase_rename_columns_try(
col_n,
cf->field->field_name.str,
cf->field_name.str,
ctx->need_rebuild(),
is_virtual)) {
ctx->need_rebuild())) {
return(true);
}
goto processed_field;
@ -8741,22 +8720,17 @@ commit_try_norebuild(
if ((ha_alter_info->handler_flags
& ALTER_DROP_VIRTUAL_COLUMN)
&& innobase_drop_virtual_try(
ha_alter_info, altered_table, old_table,
ctx->old_table, trx)) {
&& innobase_drop_virtual_try(ha_alter_info, ctx->old_table, trx)) {
DBUG_RETURN(true);
}
if ((ha_alter_info->handler_flags
& ALTER_ADD_VIRTUAL_COLUMN)
&& innobase_add_virtual_try(
ha_alter_info, altered_table, old_table,
ctx->old_table, trx)) {
&& innobase_add_virtual_try(ha_alter_info, ctx->old_table, trx)) {
DBUG_RETURN(true);
}
if (innobase_add_instant_try(ha_alter_info, ctx, altered_table,
old_table, trx)) {
if (innobase_add_instant_try(ctx, altered_table, old_table, trx)) {
DBUG_RETURN(true);
}
@ -8891,8 +8865,6 @@ Remove statistics for dropped indexes, add statistics for created indexes
and rename statistics for renamed indexes.
@param ha_alter_info Data used during in-place alter
@param ctx In-place ALTER TABLE context
@param altered_table MySQL table that is being altered
@param table_name Table name in MySQL
@param thd MySQL connection
*/
static
@ -8901,8 +8873,6 @@ alter_stats_norebuild(
/*==================*/
Alter_inplace_info* ha_alter_info,
ha_innobase_inplace_ctx* ctx,
TABLE* altered_table,
const char* table_name,
THD* thd)
{
ulint i;
@ -9775,9 +9745,7 @@ foreign_fail:
(*pctx);
DBUG_ASSERT(!ctx->need_rebuild());
alter_stats_norebuild(
ha_alter_info, ctx, altered_table,
table->s->table_name.str, m_user_thd);
alter_stats_norebuild(ha_alter_info, ctx, m_user_thd);
DBUG_INJECT_CRASH("ib_commit_inplace_crash",
crash_inject_count++);
}

View File

@ -5910,12 +5910,8 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_buffer_page_lru =
/*******************************************************************//**
Unbind a dynamic INFORMATION_SCHEMA table.
@return 0 on success */
static
int
i_s_common_deinit(
/*==============*/
void* p) /*!< in/out: table schema object */
@return 0 */
static int i_s_common_deinit(void*)
{
DBUG_ENTER("i_s_common_deinit");
@ -7113,7 +7109,6 @@ i_s_sys_virtual_fill_table(
const rec_t* rec;
ulint pos;
ulint base_pos;
mem_heap_t* heap;
mtr_t mtr;
DBUG_ENTER("i_s_sys_virtual_fill_table");
@ -7124,7 +7119,6 @@ i_s_sys_virtual_fill_table(
DBUG_RETURN(0);
}
heap = mem_heap_create(1000);
mutex_enter(&dict_sys->mutex);
mtr_start(&mtr);
@ -7136,7 +7130,7 @@ i_s_sys_virtual_fill_table(
/* populate a dict_col_t structure with information from
a SYS_VIRTUAL row */
err_msg = dict_process_sys_virtual_rec(heap, rec,
err_msg = dict_process_sys_virtual_rec(rec,
&table_id, &pos,
&base_pos);
@ -7152,8 +7146,6 @@ i_s_sys_virtual_fill_table(
err_msg);
}
mem_heap_empty(heap);
/* Get the next record */
mutex_enter(&dict_sys->mutex);
mtr_start(&mtr);
@ -7162,7 +7154,6 @@ i_s_sys_virtual_fill_table(
mtr_commit(&mtr);
mutex_exit(&dict_sys->mutex);
mem_heap_free(heap);
DBUG_RETURN(0);
}

View File

@ -4582,8 +4582,7 @@ loop:
}
if (!btr_pcur_is_on_user_rec(&pcur)) {
ut_ad(btr_pcur_is_after_last_in_tree(&pcur, &mtr));
ut_ad(btr_pcur_is_after_last_in_tree(&pcur));
goto reset_bit;
}
@ -4820,8 +4819,7 @@ loop:
&pcur, &mtr);
if (!btr_pcur_is_on_user_rec(&pcur)) {
ut_ad(btr_pcur_is_after_last_in_tree(&pcur, &mtr));
ut_ad(btr_pcur_is_after_last_in_tree(&pcur));
goto leave_loop;
}

View File

@ -129,9 +129,8 @@ btr_cur_compress_recommendation(
{
const page_t* page;
ut_ad(mtr_is_block_fix(
mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX, cursor->index->table));
ut_ad(mtr_memo_contains(mtr, btr_cur_get_block(cursor),
MTR_MEMO_PAGE_X_FIX));
page = btr_cur_get_page(cursor);

View File

@ -426,21 +426,11 @@ btr_pcur_is_before_first_on_page(
/*********************************************************//**
Checks if the persistent cursor is before the first user record in
the index tree. */
UNIV_INLINE
ibool
btr_pcur_is_before_first_in_tree(
/*=============================*/
btr_pcur_t* cursor, /*!< in: persistent cursor */
mtr_t* mtr); /*!< in: mtr */
static inline bool btr_pcur_is_before_first_in_tree(btr_pcur_t* cursor);
/*********************************************************//**
Checks if the persistent cursor is after the last user record in
the index tree. */
UNIV_INLINE
ibool
btr_pcur_is_after_last_in_tree(
/*===========================*/
btr_pcur_t* cursor, /*!< in: persistent cursor */
mtr_t* mtr); /*!< in: mtr */
static inline bool btr_pcur_is_after_last_in_tree(btr_pcur_t* cursor);
/*********************************************************//**
Moves the persistent cursor to the next record on the same page. */
UNIV_INLINE

View File

@ -209,12 +209,7 @@ btr_pcur_is_on_user_rec(
/*********************************************************//**
Checks if the persistent cursor is before the first user record in
the index tree. */
UNIV_INLINE
ibool
btr_pcur_is_before_first_in_tree(
/*=============================*/
btr_pcur_t* cursor, /*!< in: persistent cursor */
mtr_t* mtr) /*!< in: mtr */
static inline bool btr_pcur_is_before_first_in_tree(btr_pcur_t* cursor)
{
ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
@ -226,12 +221,7 @@ btr_pcur_is_before_first_in_tree(
/*********************************************************//**
Checks if the persistent cursor is after the last user record in
the index tree. */
UNIV_INLINE
ibool
btr_pcur_is_after_last_in_tree(
/*===========================*/
btr_pcur_t* cursor, /*!< in: persistent cursor */
mtr_t* mtr) /*!< in: mtr */
static inline bool btr_pcur_is_after_last_in_tree(btr_pcur_t* cursor)
{
ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
@ -307,9 +297,7 @@ btr_pcur_move_to_next_user_rec(
cursor->old_stored = false;
loop:
if (btr_pcur_is_after_last_on_page(cursor)) {
if (btr_pcur_is_after_last_in_tree(cursor, mtr)) {
if (btr_pcur_is_after_last_in_tree(cursor)) {
return(FALSE);
}
@ -344,19 +332,15 @@ btr_pcur_move_to_next(
cursor->old_stored = false;
if (btr_pcur_is_after_last_on_page(cursor)) {
if (btr_pcur_is_after_last_in_tree(cursor, mtr)) {
if (btr_pcur_is_after_last_in_tree(cursor)) {
return(FALSE);
}
btr_pcur_move_to_next_page(cursor, mtr);
return(TRUE);
}
btr_pcur_move_to_next_on_page(cursor);
return(TRUE);
}

View File

@ -217,16 +217,10 @@ buf_flush_ready_for_replace(
#ifdef UNIV_DEBUG
/** Disables page cleaner threads (coordinator and workers).
It's used by: SET GLOBAL innodb_page_cleaner_disabled_debug = 1 (0).
@param[in] thd thread handle
@param[in] var pointer to system variable
@param[out] var_ptr where the formal string goes
@param[in] save immediate result from check function */
void
buf_flush_page_cleaner_disabled_debug_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save);
void buf_flush_page_cleaner_disabled_debug_update(THD*,
st_mysql_sys_var*, void*,
const void* save);
#endif /* UNIV_DEBUG */
/******************************************************************//**

View File

@ -939,8 +939,7 @@ dict_table_has_atomic_blobs(const dict_table_t* table)
@param[in] zip_ssize Zip Shift Size
@param[in] use_data_dir Table uses DATA DIRECTORY
@param[in] page_compressed Table uses page compression
@param[in] page_compression_level Page compression level
@param[in] not_used For future */
@param[in] page_compression_level Page compression level */
UNIV_INLINE
void
dict_tf_set(
@ -949,8 +948,7 @@ dict_tf_set(
ulint zip_ssize,
bool use_data_dir,
bool page_compressed,
ulint page_compression_level,
ulint not_used);
ulint page_compression_level);
/** Convert a 32 bit integer table flags to the 32 bit FSP Flags.
Fsp Flags are written into the tablespace header at the offset

View File

@ -693,8 +693,7 @@ dict_tf_get_rec_format(
@param[in] zip_ssize Zip Shift Size
@param[in] use_data_dir Table uses DATA DIRECTORY
@param[in] page_compressed Table uses page compression
@param[in] page_compression_level Page compression level
@param[in] not_used For future */
@param[in] page_compression_level Page compression level */
UNIV_INLINE
void
dict_tf_set(
@ -704,8 +703,7 @@ dict_tf_set(
ulint zip_ssize,
bool use_data_dir,
bool page_compressed,
ulint page_compression_level,
ulint not_used)
ulint page_compression_level)
{
switch (format) {
case REC_FORMAT_REDUNDANT:

View File

@ -233,7 +233,6 @@ information
@return error message, or NULL on success */
const char*
dict_process_sys_virtual_rec(
mem_heap_t* heap,
const rec_t* rec,
table_id_t* table_id,
ulint* pos,

View File

@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2012, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -116,16 +116,9 @@ dict_stats_thread_deinit();
#ifdef UNIV_DEBUG
/** Disables dict stats thread. It's used by:
SET GLOBAL innodb_dict_stats_disabled_debug = 1 (0).
@param[in] thd thread handle
@param[in] var pointer to system variable
@param[out] var_ptr where the formal string goes
@param[in] save immediate result from check function */
void
dict_stats_disabled_debug_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save);
void dict_stats_disabled_debug_update(THD*, st_mysql_sys_var*, void*,
const void* save);
#endif /* UNIV_DEBUG */
/*****************************************************************//**

View File

@ -296,7 +296,6 @@ fil_space_destroy_crypt_data(
Parse a MLOG_FILE_WRITE_CRYPT_DATA log entry
@param[in] ptr Log entry start
@param[in] end_ptr Log entry end
@param[in] block buffer block
@param[out] err DB_SUCCESS or DB_DECRYPTION_FAILED
@return position on log buffer */
UNIV_INTERN
@ -304,7 +303,6 @@ byte*
fil_parse_write_crypt_data(
byte* ptr,
const byte* end_ptr,
const buf_block_t* block,
dberr_t* err)
MY_ATTRIBUTE((warn_unused_result));

View File

@ -481,7 +481,7 @@ public:
/* No op - base constructor is called. */
}
RemoteDatafile(const char* name, ulint size, ulint order)
RemoteDatafile(const char*, ulint, ulint)
:
m_link_filepath()
{
@ -503,12 +503,6 @@ public:
return(m_link_filepath);
}
/** Set the link filepath. Use default datadir, the base name of
the path provided without its suffix, plus DOT_ISL.
@param[in] path filepath which contains a basename to use.
If NULL, use m_name as the basename. */
void set_link_filepath(const char* path);
/** Create a link filename based on the contents of m_name,
open that file, and read the contents into m_filepath.
@retval DB_SUCCESS if remote linked tablespace file is opened and read.

View File

@ -561,7 +561,6 @@ fts_commit(
MY_ATTRIBUTE((warn_unused_result));
/** FTS Query entry point.
@param[in] trx transaction
@param[in] index fts index to search
@param[in] flags FTS search mode
@param[in] query_str FTS query
@ -570,7 +569,6 @@ fts_commit(
@return DB_SUCCESS if successful otherwise error code */
dberr_t
fts_query(
trx_t* trx,
dict_index_t* index,
uint flags,
const byte* query_str,
@ -736,7 +734,6 @@ Take a FTS savepoint. */
void
fts_savepoint_take(
/*===============*/
trx_t* trx, /*!< in: transaction */
fts_trx_t* fts_trx, /*!< in: fts transaction */
const char* name); /*!< in: savepoint name */

View File

@ -319,7 +319,6 @@ the dict mutex
que_t*
fts_parse_sql_no_dict_lock(
/*=======================*/
fts_table_t* fts_table, /*!< in: table with FTS index */
pars_info_t* info, /*!< in: parser info */
const char* sql) /*!< in: SQL string to evaluate */
MY_ATTRIBUTE((warn_unused_result));

View File

@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2014, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -88,10 +88,8 @@ rtr_index_build_node_ptr(
pointer */
ulint page_no,/*!< in: page number to put in node
pointer */
mem_heap_t* heap, /*!< in: memory heap where pointer
mem_heap_t* heap); /*!< in: memory heap where pointer
created */
ulint level); /*!< in: level of rec in tree:
0 means leaf level */
/*************************************************************//**
Splits an R-tree index page to halves and inserts the tuple. It is assumed
@ -180,7 +178,6 @@ dberr_t
rtr_ins_enlarge_mbr(
/*=================*/
btr_cur_t* cursor, /*!< in: btr cursor */
que_thr_t* thr, /*!< in: query thread */
mtr_t* mtr); /*!< in: mtr */
/********************************************************************//**
@ -439,9 +436,6 @@ rtr_merge_and_update_mbr(
ulint* offsets, /*!< in: rec offsets */
ulint* offsets2, /*!< in: rec offsets */
page_t* child_page, /*!< in: the child page. */
buf_block_t* merge_block, /*!< in: page to merge */
buf_block_t* block, /*!< in: page be merged */
dict_index_t* index, /*!< in: index */
mtr_t* mtr); /*!< in: mtr */
/*************************************************************//**
@ -449,10 +443,8 @@ Deletes on the upper level the node pointer to a page. */
void
rtr_node_ptr_delete(
/*================*/
dict_index_t* index, /*!< in: index tree */
btr_cur_t* sea_cur,/*!< in: search cursor, contains information
btr_cur_t* cursor, /*!< in: search cursor, contains information
about parent nodes in search */
buf_block_t* block, /*!< in: page whose node pointer is deleted */
mtr_t* mtr); /*!< in: mtr */
/****************************************************************//**
@ -464,10 +456,7 @@ rtr_merge_mbr_changed(
btr_cur_t* cursor2, /*!< in: the other cursor */
ulint* offsets, /*!< in: rec offsets */
ulint* offsets2, /*!< in: rec offsets */
rtr_mbr_t* new_mbr, /*!< out: MBR to update */
buf_block_t* merge_block, /*!< in: page to merge */
buf_block_t* block, /*!< in: page be merged */
dict_index_t* index); /*!< in: index */
rtr_mbr_t* new_mbr); /*!< out: MBR to update */
/**************************************************************//**

View File

@ -70,13 +70,11 @@ innobase_invalidate_query_cache(
/*============================*/
trx_t* trx, /*!< in: transaction which
modifies the table */
const char* full_name, /*!< in: concatenation of
const char* full_name); /*!< in: concatenation of
database name, path separator,
table name, null char NUL;
NOTE that in Windows this is
always in LOWER CASE! */
ulint full_name_len); /*!< in: full name length where
also the null chars count */
/** Quote a standard SQL identifier like tablespace, index or column name.
@param[in] file output stream
@ -158,7 +156,6 @@ UNIV_INTERN
void
innobase_mysql_log_notify(
/*======================*/
ib_uint64_t write_lsn, /*!< in: LSN written to log file */
ib_uint64_t flush_lsn); /*!< in: LSN flushed to disk */
/** Converts a MySQL type to an InnoDB type. Note that this function returns

View File

@ -53,15 +53,8 @@ struct OSTrackMutex {
ut_ad(!m_destroy_at_exit || !m_locked);
}
/** Initialise the mutex.
@param[in] id Mutex ID
@param[in] filename File where mutex was created
@param[in] line Line in filename */
void init(
latch_id_t id,
const char* filename,
uint32_t line)
UNIV_NOTHROW
/** Initialise the mutex. */
void init(latch_id_t, const char*, uint32_t) UNIV_NOTHROW
{
ut_ad(m_freed);
ut_ad(!m_locked);
@ -92,16 +85,8 @@ struct OSTrackMutex {
m_mutex.exit();
}
/** Acquire the mutex.
@param[in] max_spins max number of spins
@param[in] max_delay max delay per spin
@param[in] filename from where called
@param[in] line within filename */
void enter(
uint32_t max_spins,
uint32_t max_delay,
const char* filename,
uint32_t line)
/** Acquire the mutex. */
void enter(uint32_t, uint32_t, const char*, uint32_t)
UNIV_NOTHROW
{
ut_ad(!m_freed);
@ -186,15 +171,8 @@ struct TTASFutexMutex {
}
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised.
@param[in] id Mutex ID
@param[in] filename File where mutex was created
@param[in] line Line in filename */
void init(
latch_id_t id,
const char* filename,
uint32_t line)
UNIV_NOTHROW
but when the mutex is initialised. */
void init(latch_id_t, const char*, uint32_t) UNIV_NOTHROW
{
ut_a(m_lock_word == MUTEX_STATE_UNLOCKED);
}
@ -208,14 +186,9 @@ struct TTASFutexMutex {
/** Acquire the mutex.
@param[in] max_spins max number of spins
@param[in] max_delay max delay per spin
@param[in] filename from where called
@param[in] line within filename */
void enter(
uint32_t max_spins,
uint32_t max_delay,
const char* filename,
uint32_t line) UNIV_NOTHROW
@param[in] max_delay max delay per spin */
void enter(uint32_t max_spins, uint32_t max_delay,
const char*, uint32_t) UNIV_NOTHROW
{
uint32_t n_spins, n_waits;
@ -308,15 +281,8 @@ struct TTASMutex {
}
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised.
@param[in] id Mutex ID
@param[in] filename File where mutex was created
@param[in] line Line in filename */
void init(
latch_id_t id,
const char* filename,
uint32_t line)
UNIV_NOTHROW
but when the mutex is initialised. */
void init(latch_id_t) UNIV_NOTHROW
{
ut_ad(m_lock_word == MUTEX_STATE_UNLOCKED);
}
@ -349,14 +315,9 @@ struct TTASMutex {
/** Acquire the mutex.
@param max_spins max number of spins
@param max_delay max delay per spin
@param filename from where called
@param line within filename */
void enter(
uint32_t max_spins,
uint32_t max_delay,
const char* filename,
uint32_t line) UNIV_NOTHROW
@param max_delay max delay per spin */
void enter(uint32_t max_spins, uint32_t max_delay,
const char*, uint32_t) UNIV_NOTHROW
{
const uint32_t step = max_spins;
uint32_t n_spins = 0;
@ -420,14 +381,8 @@ struct TTASEventMutex {
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised.
@param[in] id Mutex ID
@param[in] filename File where mutex was created
@param[in] line Line in filename */
void init(
latch_id_t id,
const char* filename,
uint32_t line)
UNIV_NOTHROW
@param[in] id Mutex ID */
void init(latch_id_t id, const char*, uint32_t) UNIV_NOTHROW
{
ut_a(m_event == 0);
ut_a(m_lock_word == MUTEX_STATE_UNLOCKED);

View File

@ -51,9 +51,8 @@ lock_prdt_lock(
SELECT FOR UPDATE */
ulint type_mode,
/*!< in: LOCK_PREDICATE or LOCK_PRDT_PAGE */
que_thr_t* thr, /*!< in: query thread
que_thr_t* thr); /*!< in: query thread
(can be NULL if BTR_NO_LOCKING_FLAG) */
mtr_t* mtr); /*!< in/out: mini-transaction */
/*********************************************************************//**
Acquire a "Page" lock on a block
@ -107,7 +106,6 @@ Update predicate lock when page splits */
void
lock_prdt_update_split(
/*===================*/
buf_block_t* block, /*!< in/out: page to be split */
buf_block_t* new_block, /*!< in/out: the new half page */
lock_prdt_t* prdt, /*!< in: MBR on the old page */
lock_prdt_t* new_prdt, /*!< in: MBR on the new page */
@ -123,7 +121,6 @@ lock_prdt_update_parent(
buf_block_t* right_block, /*!< in/out: the new half page */
lock_prdt_t* left_prdt, /*!< in: MBR on the old page */
lock_prdt_t* right_prdt, /*!< in: MBR on the new page */
lock_prdt_t* parent_prdt, /*!< in: original parent MBR */
ulint space, /*!< in: space id */
ulint page_no); /*!< in: page number */

View File

@ -293,11 +293,10 @@ log_block_calc_checksum_crc32(
const byte* block);
/** Calculates the checksum for a log block using the "no-op" algorithm.
@param[in] block the redo log block
@return the calculated checksum value */
UNIV_INLINE
ulint
log_block_calc_checksum_none(const byte* block);
log_block_calc_checksum_none(const byte*);
/************************************************************//**
Gets a log block checksum field value.

View File

@ -241,12 +241,10 @@ log_block_calc_checksum_crc32(
}
/** Calculates the checksum for a log block using the "no-op" algorithm.
@param[in] block log block
@return checksum */
UNIV_INLINE
ulint
log_block_calc_checksum_none(
const byte* block)
log_block_calc_checksum_none(const byte*)
{
return(LOG_NO_CHECKSUM_MAGIC);
}

View File

@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -464,13 +464,14 @@ public:
allocated by mem_heap_allocator) can be used as a hint to the
implementation about where the new memory should be allocated in
order to improve locality. */
pointer allocate(size_type n, const_pointer hint = 0)
pointer allocate(size_type n)
{
return(reinterpret_cast<pointer>(
mem_heap_alloc(m_heap, n * sizeof(T))));
}
pointer allocate(size_type n, const_pointer) { return allocate(n); }
void deallocate(pointer p, size_type n) { }
void deallocate(pointer, size_type) {}
pointer address (reference r) const { return(&r); }

View File

@ -78,13 +78,6 @@ savepoint. */
(m)->memo_release((o), (t))
#ifdef UNIV_DEBUG
/** Check if memo contains the given item. */
#define mtr_is_block_fix(m, o, t, table) mtr_memo_contains(m, o, t)
/** Check if memo contains the given page. */
#define mtr_is_page_fix(m, p, t, table) mtr_memo_contains_page(m, p, t)
/** Check if memo contains the given item.
@return TRUE if contains */
#define mtr_memo_contains(m, o, t) \
@ -213,9 +206,8 @@ struct mtr_t {
~mtr_t() { }
/** Start a mini-transaction.
@param sync true if it is a synchronous mini-transaction
@param read_only true if read only mini-transaction */
void start(bool sync = true, bool read_only = false);
@param sync true if it is a synchronous mini-transaction */
void start(bool sync = true);
/** @return whether this is an asynchronous mini-transaction. */
bool is_async() const

View File

@ -42,11 +42,7 @@ Creates an event semaphore, i.e., a semaphore which may just have two states:
signaled and nonsignaled. The created event is manual reset: it must be reset
explicitly by calling os_event_reset().
@return the event handle */
os_event_t
os_event_create(
/*============*/
const char* name); /*!< in: the name of the event, if NULL
the event is created without a name */
os_event_t os_event_create(const char*);
/**
Sets an event semaphore to the signaled state: lets waiting threads

View File

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -156,10 +157,7 @@ page_cur_tuple_insert(
ulint** offsets,/*!< out: offsets on *rec */
mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */
ulint n_ext, /*!< in: number of externally stored columns */
mtr_t* mtr, /*!< in: mini-transaction handle, or NULL */
bool use_cache = false)
/*!< in: if true, then use record cache to
hold the tuple converted record. */
mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */
MY_ATTRIBUTE((nonnull(1,2,3,4,5), warn_unused_result));
/***********************************************************//**
Inserts a record next to page cursor. Returns pointer to inserted record if

View File

@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, MariaDB Corporation.
Copyright (c) 2015, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -262,10 +262,7 @@ page_cur_tuple_insert(
ulint** offsets,/*!< out: offsets on *rec */
mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */
ulint n_ext, /*!< in: number of externally stored columns */
mtr_t* mtr, /*!< in: mini-transaction handle, or NULL */
bool use_cache)
/*!< in: if true, then use record cache to
hold the tuple converted record. */
mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */
{
rec_t* rec;
ulint size = rec_get_converted_size(index, tuple, n_ext);

View File

@ -269,9 +269,8 @@ row_build_row_ref_in_tuple(
held as long as the row
reference is used! */
const dict_index_t* index, /*!< in: secondary index */
ulint* offsets,/*!< in: rec_get_offsets(rec, index)
ulint* offsets)/*!< in: rec_get_offsets(rec, index)
or NULL */
trx_t* trx) /*!< in: transaction or NULL */
MY_ATTRIBUTE((nonnull(1,2,3)));
/*******************************************************************//**
Builds from a secondary index record a row reference with which we can

View File

@ -135,8 +135,7 @@ row_sel_convert_mysql_key_to_innobase(
ulint buf_len, /*!< in: buffer length */
dict_index_t* index, /*!< in: index of the key value */
const byte* key_ptr, /*!< in: MySQL key value */
ulint key_len, /*!< in: MySQL key value length */
trx_t* trx); /*!< in: transaction */
ulint key_len); /*!< in: MySQL key value length */
/** Searches for rows in the database. This is used in the interface to

View File

@ -920,16 +920,10 @@ srv_was_tablespace_truncated(const fil_space_t* space);
#ifdef UNIV_DEBUG
/** Disables master thread. It's used by:
SET GLOBAL innodb_master_thread_disabled_debug = 1 (0).
@param[in] thd thread handle
@param[in] var pointer to system variable
@param[out] var_ptr where the formal string goes
@param[in] save immediate result from check function */
void
srv_master_thread_disabled_debug_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save);
srv_master_thread_disabled_debug_update(THD*, st_mysql_sys_var*, void*,
const void* save);
#endif /* UNIV_DEBUG */
/** Status variables to be passed to MySQL */

View File

@ -167,8 +167,7 @@ public:
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised.
@param[in] id Mutex ID */
void init(latch_id_t id)
UNIV_NOTHROW;
void init(latch_id_t id) UNIV_NOTHROW;
/** Called when an attempt is made to lock the mutex
@param[in] mutex Mutex instance to be locked
@ -241,7 +240,7 @@ struct NoPolicy {
void init(const Mutex&, latch_id_t, const char*, uint32_t)
UNIV_NOTHROW { }
void destroy() UNIV_NOTHROW { }
void enter(const Mutex&, const char*, unsigned line) UNIV_NOTHROW { }
void enter(const Mutex&, const char*, unsigned) UNIV_NOTHROW { }
void add(uint32_t, uint32_t) UNIV_NOTHROW { }
void locked(const Mutex&, const char*, ulint) UNIV_NOTHROW { }
void release(const Mutex&) UNIV_NOTHROW { }
@ -275,12 +274,11 @@ public:
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised.
@param[in] mutex Mutex instance to track
@param[in] id Mutex ID
@param[in] filename File where mutex was created
@param[in] line Line in filename */
void init(
const MutexType& mutex,
const Mutex&,
latch_id_t id,
const char* filename,
uint32_t line)
@ -423,15 +421,8 @@ public:
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised.
@param[in] mutex Mutex instance to track
@param[in] id Mutex ID
@param[in] filename File where mutex was created
@param[in] line Line in filename */
void init(
const MutexType& mutex,
latch_id_t id,
const char* filename,
uint32_t line)
@param[in] id Mutex ID */
void init(const Mutex&, latch_id_t id, const char*, uint32)
UNIV_NOTHROW
{
/* It can be LATCH_ID_BUF_BLOCK_MUTEX or

View File

@ -88,7 +88,7 @@ void MutexDebug<Mutex>::locked(
}
template <typename Mutex>
void MutexDebug<Mutex>::release(const Mutex* mutex)
void MutexDebug<Mutex>::release(const Mutex*)
UNIV_NOTHROW
{
ut_ad(is_owned());

View File

@ -166,13 +166,11 @@ trx_undo_get_first_rec(
mtr_t* mtr);
/** Allocate an undo log page.
@param[in,out] trx transaction
@param[in,out] undo undo log
@param[in,out] mtr mini-transaction that does not hold any page latch
@return X-latched block if success
@retval NULL on failure */
buf_block_t*
trx_undo_add_page(trx_t* trx, trx_undo_t* undo, mtr_t* mtr)
buf_block_t* trx_undo_add_page(trx_undo_t* undo, mtr_t* mtr)
MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Free the last undo log page. The caller must hold the rseg mutex.
@ -282,23 +280,17 @@ trx_undo_truncate_tablespace(
@return end of log record
@retval NULL if the log record is incomplete */
byte*
trx_undo_parse_page_init(
const byte* ptr,
const byte* end_ptr,
page_t* page,
mtr_t* mtr);
trx_undo_parse_page_init(const byte* ptr, const byte* end_ptr, page_t* page);
/** Parse MLOG_UNDO_HDR_REUSE for crash-upgrade from MariaDB 10.2.
@param[in] ptr redo log record
@param[in] end_ptr end of log buffer
@param[in,out] page undo page or NULL
@param[in,out] mtr mini-transaction
@return end of log record or NULL */
byte*
trx_undo_parse_page_header_reuse(
const byte* ptr,
const byte* end_ptr,
page_t* page,
mtr_t* mtr);
page_t* page);
/** Parse the redo log entry of an undo log page header create.
@param[in] ptr redo log record

View File

@ -426,7 +426,7 @@ Gets the last node in a two-way list.
@return last node, or NULL if the list is empty */
#define UT_LIST_GET_LAST(BASE) (BASE).end
struct NullValidate { void operator()(const void* elem) { } };
struct NullValidate { void operator()(const void*) { } };
/********************************************************************//**
Iterate over all the elements and call the functor for each element.

View File

@ -238,11 +238,18 @@ struct ut_new_pfx_t {
#endif
};
static inline void ut_allocate_trace_dontdump(void * ptr,
size_t bytes,
bool dontdump,
ut_new_pfx_t* pfx,
const char* file)
static inline void ut_allocate_trace_dontdump(void *ptr, size_t bytes,
bool
#if defined(DBUG_OFF) && defined(HAVE_MADVISE) && defined(MADV_DONTDUMP)
dontdump
#endif
, ut_new_pfx_t* pfx,
const char*
#ifdef UNIV_PFS_MEMORY
file
#endif
)
{
ut_a(ptr != NULL);
@ -262,17 +269,19 @@ static inline void ut_allocate_trace_dontdump(void * ptr,
}
}
#if defined(DBUG_OFF) && defined(HAVE_MADVISE) && defined(MADV_DODUMP)
static inline void ut_dodump(void* ptr, size_t m_size)
{
#if defined(DBUG_OFF) && defined(HAVE_MADVISE) && defined(MADV_DODUMP)
if (ptr && madvise(ptr, m_size, MADV_DODUMP)) {
ib::warn() << "Failed to set memory to DODUMP: "
<< strerror(errno)
<< " ptr " << ptr
<< " size " << m_size;
}
#endif
}
#else
static inline void ut_dodump(void*, size_t) {}
#endif
/** Allocator class for allocating memory from inside std::* containers.
@tparam T type of allocated object
@ -288,19 +297,25 @@ public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
#ifdef UNIV_PFS_MEMORY
/** Default constructor. */
explicit
ut_allocator(PSI_memory_key key = PSI_NOT_INSTRUMENTED)
#ifdef UNIV_PFS_MEMORY
: m_key(key)
#endif /* UNIV_PFS_MEMORY */
{
}
#else
ut_allocator() {}
ut_allocator(PSI_memory_key) {}
#endif /* UNIV_PFS_MEMORY */
/** Constructor from allocator of another type. */
template <class U>
ut_allocator(
const ut_allocator<U>& other)
ut_allocator(const ut_allocator<U>&
#ifdef UNIV_PFS_MEMORY
other
#endif
)
#ifdef UNIV_PFS_MEMORY
: m_key(other.m_key)
#endif /* UNIV_PFS_MEMORY */
@ -321,6 +336,8 @@ public:
#endif /* UNIV_PFS_MEMORY */
}
pointer allocate(size_type n) { return allocate(n, NULL, NULL); }
/** Allocate a chunk of memory that can hold 'n_elements' objects of
type 'T' and trace the allocation.
If the allocation fails this method may throw an exception. This
@ -329,9 +346,6 @@ public:
After successfull allocation the returned pointer must be passed
to ut_allocator::deallocate() when no longer needed.
@param[in] n_elements number of elements
@param[in] hint pointer to a nearby memory location,
unused by this implementation
@param[in] file file name of the caller
@param[in] set_to_zero if true, then the returned memory is
initialized with 0x0 bytes.
@param[in] throw_on_error if true, raize exception if too big
@ -339,8 +353,12 @@ public:
pointer
allocate(
size_type n_elements,
const_pointer hint = NULL,
const char* file = NULL,
const_pointer,
const char*
#ifdef UNIV_PFS_MEMORY
file /*!< file name of the caller */
#endif
,
bool set_to_zero = false,
bool throw_on_error = true)
{
@ -648,7 +666,11 @@ public:
void
deallocate_large(
pointer ptr,
const ut_new_pfx_t* pfx,
const ut_new_pfx_t*
#ifdef UNIV_PFS_MEMORY
pfx
#endif
,
size_t size,
bool dodump = false)
{
@ -775,12 +797,7 @@ could be freed by A2 even if the pfs mem key is different. */
template <typename T>
inline
bool
operator==(
const ut_allocator<T>& lhs,
const ut_allocator<T>& rhs)
{
return(true);
}
operator==(const ut_allocator<T>&, const ut_allocator<T>&) { return(true); }
/** Compare two allocators of the same type. */
template <typename T>

View File

@ -529,65 +529,28 @@ ut_stage_alter_t::change_phase(
class ut_stage_alter_t {
public:
explicit
ut_stage_alter_t(
const dict_index_t* pk)
{
}
explicit ut_stage_alter_t(const dict_index_t*) {}
void
begin_phase_read_pk(
ulint n_sort_indexes)
{
}
void begin_phase_read_pk(ulint) {}
void
n_pk_recs_inc()
{
}
void n_pk_recs_inc() {}
void
inc(
ulint inc_val = 1)
{
}
void inc() {}
void inc(ulint) {}
void
end_phase_read_pk()
{
}
void end_phase_read_pk() {}
void
begin_phase_sort(
double sort_multi_factor)
{
}
void begin_phase_sort(double) {}
void
begin_phase_insert()
{
}
void begin_phase_insert() {}
void
begin_phase_flush(
ulint n_flush_pages)
{
}
void begin_phase_flush(ulint) {}
void
begin_phase_log_index()
{
}
void begin_phase_log_index() {}
void
begin_phase_log_table()
{
}
void begin_phase_log_table() {}
void
begin_phase_end()
{
}
void begin_phase_end() {}
};
#endif /* HAVE_PSI_STAGE_INTERFACE */

View File

@ -5243,8 +5243,7 @@ lock_rec_block_validate(
}
static my_bool lock_validate_table_locks(rw_trx_hash_element_t *element,
void *arg)
static my_bool lock_validate_table_locks(rw_trx_hash_element_t *element, void*)
{
ut_ad(lock_mutex_own());
mutex_enter(&element->mutex);
@ -5481,7 +5480,6 @@ lock_rec_convert_impl_to_expl_for_trx(
const buf_block_t* block, /*!< in: buffer block of rec */
const rec_t* rec, /*!< in: user record on page */
dict_index_t* index, /*!< in: index of record */
const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */
trx_t* trx, /*!< in/out: active transaction */
ulint heap_no)/*!< in: rec heap number to lock */
{
@ -5626,7 +5624,7 @@ lock_rec_convert_impl_to_expl(
trx cannot be committed until the ref count is zero. */
lock_rec_convert_impl_to_expl_for_trx(
block, rec, index, offsets, trx, heap_no);
block, rec, index, trx, heap_no);
}
}

View File

@ -628,7 +628,6 @@ lock_prdt_update_parent(
buf_block_t* right_block, /*!< in/out: the new half page */
lock_prdt_t* left_prdt, /*!< in: MBR on the old page */
lock_prdt_t* right_prdt, /*!< in: MBR on the new page */
lock_prdt_t* parent_prdt, /*!< in: original parent MBR */
ulint space, /*!< in: parent space id */
ulint page_no) /*!< in: parent page number */
{
@ -682,7 +681,6 @@ static
void
lock_prdt_update_split_low(
/*=======================*/
buf_block_t* block, /*!< in/out: page to be split */
buf_block_t* new_block, /*!< in/out: the new half page */
lock_prdt_t* prdt, /*!< in: MBR on the old page */
lock_prdt_t* new_prdt, /*!< in: MBR on the new page */
@ -759,17 +757,16 @@ Update predicate lock when page splits */
void
lock_prdt_update_split(
/*===================*/
buf_block_t* block, /*!< in/out: page to be split */
buf_block_t* new_block, /*!< in/out: the new half page */
lock_prdt_t* prdt, /*!< in: MBR on the old page */
lock_prdt_t* new_prdt, /*!< in: MBR on the new page */
ulint space, /*!< in: space id */
ulint page_no) /*!< in: page number */
{
lock_prdt_update_split_low(block, new_block, prdt, new_prdt,
lock_prdt_update_split_low(new_block, prdt, new_prdt,
space, page_no, LOCK_PREDICATE);
lock_prdt_update_split_low(block, new_block, NULL, NULL,
lock_prdt_update_split_low(new_block, NULL, NULL,
space, page_no, LOCK_PRDT_PAGE);
}
@ -811,9 +808,8 @@ lock_prdt_lock(
SELECT FOR UPDATE */
ulint type_mode,
/*!< in: LOCK_PREDICATE or LOCK_PRDT_PAGE */
que_thr_t* thr, /*!< in: query thread
que_thr_t* thr) /*!< in: query thread
(can be NULL if BTR_NO_LOCKING_FLAG) */
mtr_t* mtr) /*!< in/out: mini-transaction */
{
trx_t* trx = thr_get_trx(thr);
dberr_t err = DB_SUCCESS;

View File

@ -1119,11 +1119,10 @@ loop:
if (flush_to_disk) {
log_write_flush_to_disk_low();
ib_uint64_t write_lsn = log_sys.write_lsn;
ib_uint64_t flush_lsn = log_sys.flushed_to_disk_lsn;
log_mutex_exit();
innobase_mysql_log_notify(write_lsn, flush_lsn);
innobase_mysql_log_notify(flush_lsn);
}
}

View File

@ -1346,12 +1346,11 @@ parse_log:
break;
case MLOG_UNDO_INIT:
/* Allow anything in page_type when creating a page. */
ptr = trx_undo_parse_page_init(ptr, end_ptr, page, mtr);
ptr = trx_undo_parse_page_init(ptr, end_ptr, page);
break;
case MLOG_UNDO_HDR_REUSE:
ut_ad(!page || page_type == FIL_PAGE_UNDO_LOG);
ptr = trx_undo_parse_page_header_reuse(ptr, end_ptr, page,
mtr);
ptr = trx_undo_parse_page_header_reuse(ptr, end_ptr, page);
break;
case MLOG_UNDO_HDR_CREATE:
ut_ad(!page || page_type == FIL_PAGE_UNDO_LOG);
@ -1431,7 +1430,7 @@ parse_log:
break;
case MLOG_FILE_WRITE_CRYPT_DATA:
dberr_t err;
ptr = const_cast<byte*>(fil_parse_write_crypt_data(ptr, end_ptr, block, &err));
ptr = const_cast<byte*>(fil_parse_write_crypt_data(ptr, end_ptr, &err));
if (err != DB_SUCCESS) {
recv_sys->found_corrupt_log = TRUE;

View File

@ -489,10 +489,9 @@ mtr_write_log(
}
/** Start a mini-transaction.
@param sync true if it is a synchronous mini-transaction
@param read_only true if read only mini-transaction */
@param sync true if it is a synchronous mini-transaction */
void
mtr_t::start(bool sync, bool read_only)
mtr_t::start(bool sync)
{
UNIV_MEM_INVALID(this, sizeof(*this));

View File

@ -48,7 +48,7 @@ typedef os_event_list_t::iterator event_iter_t;
/** InnoDB condition variable. */
struct os_event {
os_event(const char* name) UNIV_NOTHROW;
os_event() UNIV_NOTHROW;
~os_event() UNIV_NOTHROW;
@ -415,7 +415,7 @@ os_event::wait_time_low(
}
/** Constructor */
os_event::os_event(const char* name) UNIV_NOTHROW
os_event::os_event() UNIV_NOTHROW
{
init();
@ -444,14 +444,9 @@ Creates an event semaphore, i.e., a semaphore which may just have two
states: signaled and nonsignaled. The created event is manual reset: it
must be reset explicitly by calling sync_os_reset_event.
@return the event handle */
os_event_t
os_event_create(
/*============*/
const char* name) /*!< in: the name of the
event, if NULL the event
is created without a name */
os_event_t os_event_create(const char*)
{
return(UT_NEW_NOKEY(os_event(name)));
return(UT_NEW_NOKEY(os_event()));
}
/**

View File

@ -2752,7 +2752,11 @@ page_delete_rec(
belongs to */
page_cur_t* pcur, /*!< in/out: page cursor on record
to delete */
page_zip_des_t* page_zip,/*!< in: compressed page descriptor */
page_zip_des_t*
#ifdef UNIV_ZIP_DEBUG
page_zip/*!< in: compressed page descriptor */
#endif
,
const ulint* offsets)/*!< in: offsets for record */
{
bool no_compress_needed;

View File

@ -229,7 +229,6 @@ static
int
cmp_geometry_field(
/*===============*/
ulint mtype, /*!< in: main type */
ulint prtype, /*!< in: precise type */
const byte* a, /*!< in: data field */
unsigned int a_length, /*!< in: data field length,
@ -303,10 +302,8 @@ cmp_gis_field(
not UNIV_SQL_NULL */
{
if (mode == PAGE_CUR_MBR_EQUAL) {
/* TODO: Since the DATA_GEOMETRY is not used in compare
function, we could pass it instead of a specific type now */
return(cmp_geometry_field(DATA_GEOMETRY, DATA_GIS_MBR,
a, a_length, b, b_length));
return cmp_geometry_field(DATA_GIS_MBR,
a, a_length, b, b_length);
} else {
return rtree_key_cmp(mode, a, int(a_length), b, int(b_length));
}
@ -379,8 +376,7 @@ cmp_whole_field(
return(innobase_mysql_cmp(prtype,
a, a_length, b, b_length));
case DATA_GEOMETRY:
return(cmp_geometry_field(mtype, prtype, a, a_length, b,
b_length));
return cmp_geometry_field(prtype, a, a_length, b, b_length);
default:
ib::fatal() << "Unknown data type number " << mtype;
}

View File

@ -886,17 +886,14 @@ private:
/** Purge delete-marked records, only if it is possible to do
so without re-organising the B+tree.
@param offsets current row offsets.
@retval true if purged */
bool purge(const ulint* offsets) UNIV_NOTHROW;
bool purge() UNIV_NOTHROW;
/** Adjust the BLOB references and sys fields for the current record.
@param index the index being converted
@param rec record to update
@param offsets column offsets for the record
@return DB_SUCCESS or error code. */
dberr_t adjust_cluster_record(
const dict_index_t* index,
rec_t* rec,
const ulint* offsets) UNIV_NOTHROW;
@ -1631,11 +1628,8 @@ PageConverter::adjust_cluster_index_blob_ref(
/** Purge delete-marked records, only if it is possible to do so without
re-organising the B+tree.
@param offsets current row offsets.
@return true if purge succeeded */
inline
bool
PageConverter::purge(const ulint* offsets) UNIV_NOTHROW
inline bool PageConverter::purge() UNIV_NOTHROW
{
const dict_index_t* index = m_index->m_srv_index;
@ -1659,7 +1653,6 @@ PageConverter::purge(const ulint* offsets) UNIV_NOTHROW
inline
dberr_t
PageConverter::adjust_cluster_record(
const dict_index_t* index,
rec_t* rec,
const ulint* offsets) UNIV_NOTHROW
{
@ -1726,8 +1719,7 @@ PageConverter::update_records(
if (clust_index) {
dberr_t err = adjust_cluster_record(
m_index->m_srv_index, rec, m_offsets);
dberr_t err = adjust_cluster_record(rec, m_offsets);
if (err != DB_SUCCESS) {
return(err);
@ -1741,7 +1733,7 @@ PageConverter::update_records(
/* A successful purge will move the cursor to the
next record. */
if (!purge(m_offsets)) {
if (!purge()) {
m_rec_iter.next();
}
@ -2108,8 +2100,6 @@ static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_adjust_root_pages_of_secondary_indexes(
/*==============================================*/
row_prebuilt_t* prebuilt, /*!< in/out: prebuilt from
handler */
trx_t* trx, /*!< in: transaction used for
the import */
dict_table_t* table, /*!< in: table the indexes
@ -2367,8 +2357,7 @@ row_import_cfg_read_index_fields(
/*=============================*/
FILE* file, /*!< in: file to write to */
THD* thd, /*!< in/out: session */
row_index_t* index, /*!< Index being read in */
row_import* cfg) /*!< in/out: meta-data read */
row_index_t* index) /*!< Index being read in */
{
byte row[sizeof(ib_uint32_t) * 3];
ulint n_fields = index->m_n_fields;
@ -2588,8 +2577,7 @@ row_import_read_index_data(
return(err);
}
err = row_import_cfg_read_index_fields(
file, thd, cfg_index, cfg);
err = row_import_cfg_read_index_fields(file, thd, cfg_index);
if (err != DB_SUCCESS) {
return(err);
@ -2965,7 +2953,6 @@ static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_read_meta_data(
/*======================*/
dict_table_t* table, /*!< in: table */
FILE* file, /*!< in: File to read from */
THD* thd, /*!< in: session */
row_import& cfg) /*!< out: contents of the .cfg file */
@ -3039,7 +3026,7 @@ row_import_read_cfg(
cfg.m_missing = false;
err = row_import_read_meta_data(table, file, thd, cfg);
err = row_import_read_meta_data(file, thd, cfg);
fclose(file);
}
@ -3998,7 +3985,7 @@ row_import_for_mysql(
during the page conversion phase. */
err = row_import_adjust_root_pages_of_secondary_indexes(
prebuilt, trx, table, cfg);
trx, table, cfg);
DBUG_EXECUTE_IF("ib_import_sec_root_adjust_failure",
err = DB_CORRUPTION;);

View File

@ -915,8 +915,7 @@ row_ins_invalidate_query_cache(
const char* name) /*!< in: table name prefixed with
database name and a '/' character */
{
ulint len = strlen(name) + 1;
innobase_invalidate_query_cache(thr_get_trx(thr), name, len);
innobase_invalidate_query_cache(thr_get_trx(thr), name);
}
@ -3133,7 +3132,7 @@ row_ins_sec_index_entry_low(
if (err == DB_SUCCESS && dict_index_is_spatial(index)
&& rtr_info.mbr_adj) {
err = rtr_ins_enlarge_mbr(&cursor, thr, &mtr);
err = rtr_ins_enlarge_mbr(&cursor, &mtr);
}
} else {
rec_t* insert_rec;
@ -3147,7 +3146,7 @@ row_ins_sec_index_entry_low(
if (err == DB_SUCCESS
&& dict_index_is_spatial(index)
&& rtr_info.mbr_adj) {
err = rtr_ins_enlarge_mbr(&cursor, thr, &mtr);
err = rtr_ins_enlarge_mbr(&cursor, &mtr);
}
} else {
ut_ad(mode == BTR_MODIFY_TREE);
@ -3172,7 +3171,7 @@ row_ins_sec_index_entry_low(
if (err == DB_SUCCESS
&& dict_index_is_spatial(index)
&& rtr_info.mbr_adj) {
err = rtr_ins_enlarge_mbr(&cursor, thr, &mtr);
err = rtr_ins_enlarge_mbr(&cursor, &mtr);
}
}

View File

@ -1132,7 +1132,6 @@ row_log_table_get_pk_old_col(
}
/** Maps an old table column of a PRIMARY KEY column.
@param[in] col old table column (before ALTER TABLE)
@param[in] ifield clustered index field in the new table (after
ALTER TABLE)
@param[in,out] dfield clustered index tuple field in the new table
@ -1148,7 +1147,6 @@ table
static
dberr_t
row_log_table_get_pk_col(
const dict_col_t* col,
const dict_field_t* ifield,
dfield_t* dfield,
mem_heap_t* heap,
@ -1334,7 +1332,7 @@ row_log_table_get_pk(
}
log->error = row_log_table_get_pk_col(
col, ifield, dfield, *heap,
ifield, dfield, *heap,
rec, offsets, i, page_size, max_len,
log->ignore, log->defaults);
@ -1897,11 +1895,10 @@ flag_ok:
/******************************************************//**
Replays a delete operation on a table that was rebuilt.
@return DB_SUCCESS or error code */
static MY_ATTRIBUTE((nonnull(1, 3, 4, 5, 6, 7), warn_unused_result))
static MY_ATTRIBUTE((nonnull(2, 3, 4, 5, 6), warn_unused_result))
dberr_t
row_log_table_apply_delete(
/*=======================*/
que_thr_t* thr, /*!< in: query graph */
ulint trx_id_col, /*!< in: position of
DB_TRX_ID in the new
clustered index */
@ -1911,9 +1908,8 @@ row_log_table_apply_delete(
that can be emptied */
mem_heap_t* heap, /*!< in/out: memory heap */
const row_log_t* log, /*!< in: online log */
const row_ext_t* save_ext, /*!< in: saved external field
const row_ext_t* save_ext) /*!< in: saved external field
info, or NULL */
ulint ext_size) /*!< in: external field size */
{
dict_table_t* new_table = log->table;
dict_index_t* index = dict_table_get_first_index(new_table);
@ -2525,9 +2521,9 @@ row_log_table_apply_op(
}
*error = row_log_table_apply_delete(
thr, new_trx_id_col,
new_trx_id_col,
mrec, offsets, offsets_heap, heap,
log, ext, ext_size);
log, ext);
break;
case ROW_T_UPDATE:

View File

@ -232,7 +232,7 @@ public:
if (error == DB_SUCCESS) {
if (rtr_info.mbr_adj) {
error = rtr_ins_enlarge_mbr(
&ins_cur, NULL, &mtr);
&ins_cur, &mtr);
}
if (error == DB_SUCCESS) {
@ -2940,10 +2940,10 @@ wait_again:
@param[in,out] foffs1 offset of second source list in the file
@param[in,out] of output file
@param[in,out] stage performance schema accounting object, used by
@param[in,out] crypt_block encryption buffer
@param[in] space tablespace ID for encryption
ALTER TABLE. If not NULL stage->inc() will be called for each record
processed.
@param[in,out] crypt_block encryption buffer
@param[in] space tablespace ID for encryption
@return DB_SUCCESS or error code */
static MY_ATTRIBUTE((warn_unused_result))
dberr_t
@ -2954,7 +2954,7 @@ row_merge_blocks(
ulint* foffs0,
ulint* foffs1,
merge_file_t* of,
ut_stage_alter_t* stage,
ut_stage_alter_t* stage MY_ATTRIBUTE((unused)),
row_merge_block_t* crypt_block,
ulint space)
{
@ -3062,10 +3062,10 @@ done1:
@param[in,out] foffs0 input file offset
@param[in,out] of output file
@param[in,out] stage performance schema accounting object, used by
@param[in,out] crypt_block encryption buffer
@param[in] space tablespace ID for encryption
ALTER TABLE. If not NULL stage->inc() will be called for each record
processed.
@param[in,out] crypt_block encryption buffer
@param[in] space tablespace ID for encryption
@return TRUE on success, FALSE on failure */
static MY_ATTRIBUTE((warn_unused_result))
ibool
@ -3075,7 +3075,7 @@ row_merge_blocks_copy(
row_merge_block_t* block,
ulint* foffs0,
merge_file_t* of,
ut_stage_alter_t* stage,
ut_stage_alter_t* stage MY_ATTRIBUTE((unused)),
row_merge_block_t* crypt_block,
ulint space)
{

View File

@ -909,9 +909,8 @@ row_build_row_ref_in_tuple(
held as long as the row
reference is used! */
const dict_index_t* index, /*!< in: secondary index */
ulint* offsets,/*!< in: rec_get_offsets(rec, index)
ulint* offsets)/*!< in: rec_get_offsets(rec, index)
or NULL */
trx_t* trx) /*!< in: transaction */
{
const dict_index_t* clust_index;
dfield_t* dfield;

View File

@ -2489,8 +2489,7 @@ row_sel_convert_mysql_key_to_innobase(
ulint buf_len, /*!< in: buffer length */
dict_index_t* index, /*!< in: index of the key value */
const byte* key_ptr, /*!< in: MySQL key value */
ulint key_len, /*!< in: MySQL key value length */
trx_t* trx) /*!< in: transaction */
ulint key_len) /*!< in: MySQL key value length */
{
byte* original_buf = buf;
const byte* original_key_ptr = key_ptr;
@ -3288,7 +3287,7 @@ row_sel_get_clust_rec_for_mysql(
thd_get_thread_id(trx->mysql_thd));
row_build_row_ref_in_tuple(prebuilt->clust_ref, rec,
sec_index, *offsets, trx);
sec_index, *offsets);
clust_index = dict_table_get_first_index(sec_index->table);

View File

@ -96,7 +96,7 @@ public:
for (;;) {
if (!btr_pcur_is_on_user_rec(&m_pcur)
|| !callback.match(&m_mtr, &m_pcur)) {
|| !callback.match(&m_pcur)) {
/* The end of of the index has been reached. */
err = DB_END_OF_INDEX;
@ -195,10 +195,9 @@ public:
}
/**
@param mtr mini-transaction covering the iteration
@param pcur persistent cursor used for iteration
@return true if the table id column matches. */
bool match(mtr_t* mtr, btr_pcur_t* pcur) const
bool match(btr_pcur_t* pcur) const
{
ulint len;
const byte* field;
@ -866,15 +865,13 @@ public:
/**
Look for table-id in SYS_XXXX tables without loading the table.
@param mtr mini-transaction covering the read
@param pcur persistent cursor used for reading
@return DB_SUCCESS or error code */
dberr_t operator()(mtr_t* mtr, btr_pcur_t* pcur);
private:
// Disably copying
TableLocator(const TableLocator&);
TableLocator& operator=(const TableLocator&);
@return DB_SUCCESS */
dberr_t operator()(mtr_t*, btr_pcur_t*)
{
m_table_found = true;
return(DB_SUCCESS);
}
private:
/** Set to true if table is present */
@ -882,11 +879,10 @@ private:
};
/**
@param mtr mini-transaction covering the read
@param pcur persistent cursor used for reading
@return DB_SUCCESS or error code */
dberr_t
TruncateLogger::operator()(mtr_t* mtr, btr_pcur_t* pcur)
TruncateLogger::operator()(mtr_t*, btr_pcur_t* pcur)
{
ulint len;
const byte* field;
@ -1088,20 +1084,6 @@ CreateIndex::operator()(mtr_t* mtr, btr_pcur_t* pcur) const
return(DB_SUCCESS);
}
/**
Look for table-id in SYS_XXXX tables without loading the table.
@param mtr mini-transaction covering the read
@param pcur persistent cursor used for reading
@return DB_SUCCESS */
dberr_t
TableLocator::operator()(mtr_t* mtr, btr_pcur_t* pcur)
{
m_table_found = true;
return(DB_SUCCESS);
}
/**
Rollback the transaction and release the index locks.
Drop indexes if table is corrupted so that drop/create

View File

@ -750,7 +750,6 @@ func_exit:
@param[in] clust_index cluster index
@param[in] clust_offsets cluster rec offset
@param[in] index secondary index
@param[in] ientry secondary index rec
@param[in] roll_ptr roll_ptr for the purge record
@param[in] trx_id transaction ID on the purging record
@param[in,out] heap heap memory
@ -765,7 +764,6 @@ row_vers_build_cur_vrow(
dict_index_t* clust_index,
ulint** clust_offsets,
dict_index_t* index,
const dtuple_t* ientry,
roll_ptr_t roll_ptr,
trx_id_t trx_id,
mem_heap_t* heap,
@ -970,7 +968,7 @@ safe_to_purge:
associated with current cluster index */
cur_vrow = row_vers_build_cur_vrow(
also_curr, rec, clust_index, &clust_offsets,
index, ientry, roll_ptr, trx_id, heap, v_heap, mtr);
index, roll_ptr, trx_id, heap, v_heap, mtr);
}
version = rec;

View File

@ -2095,16 +2095,10 @@ srv_master_do_disabled_loop(void)
/** Disables master thread. It's used by:
SET GLOBAL innodb_master_thread_disabled_debug = 1 (0).
@param[in] thd thread handle
@param[in] var pointer to system variable
@param[out] var_ptr where the formal string goes
@param[in] save immediate result from check function */
void
srv_master_thread_disabled_debug_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save)
srv_master_thread_disabled_debug_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
/* This method is protected by mutex, as every SET GLOBAL .. */
ut_ad(srv_master_thread_disabled_event != NULL);

View File

@ -1929,7 +1929,7 @@ trx_undo_report_rename(trx_t* trx, const dict_table_t* table)
} else {
mtr.commit();
mtr.start();
block = trx_undo_add_page(trx, undo, &mtr);
block = trx_undo_add_page(undo, &mtr);
if (!block) {
err = DB_OUT_OF_FILE_SPACE;
break;
@ -2104,7 +2104,7 @@ trx_undo_report_row_operation(
mtr.set_log_mode(MTR_LOG_NO_REDO);
}
undo_block = trx_undo_add_page(trx, undo, &mtr);
undo_block = trx_undo_add_page(undo, &mtr);
DBUG_EXECUTE_IF("ib_err_ins_undo_page_add_failure",
undo_block = NULL;);

View File

@ -388,15 +388,10 @@ trx_undo_get_first_rec(
@param[in] ptr log record
@param[in] end_ptr end of log record buffer
@param[in,out] page page or NULL
@param[in,out] mtr mini-transaction
@return end of log record
@retval NULL if the log record is incomplete */
byte*
trx_undo_parse_page_init(
const byte* ptr,
const byte* end_ptr,
page_t* page,
mtr_t* mtr)
trx_undo_parse_page_init(const byte* ptr, const byte* end_ptr, page_t* page)
{
ulint type = mach_parse_compressed(&ptr, end_ptr);
@ -420,14 +415,12 @@ trx_undo_parse_page_init(
@param[in] ptr redo log record
@param[in] end_ptr end of log buffer
@param[in,out] page undo log page or NULL
@param[in,out] mtr mini-transaction
@return end of log record or NULL */
byte*
trx_undo_parse_page_header_reuse(
const byte* ptr,
const byte* end_ptr,
page_t* undo_page,
mtr_t* mtr)
page_t* undo_page)
{
trx_id_t trx_id = mach_u64_parse_compressed(&ptr, end_ptr);
@ -761,13 +754,11 @@ trx_undo_parse_page_header(
}
/** Allocate an undo log page.
@param[in,out] trx transaction
@param[in,out] undo undo log
@param[in,out] mtr mini-transaction that does not hold any page latch
@return X-latched block if success
@retval NULL on failure */
buf_block_t*
trx_undo_add_page(trx_t* trx, trx_undo_t* undo, mtr_t* mtr)
buf_block_t* trx_undo_add_page(trx_undo_t* undo, mtr_t* mtr)
{
trx_rseg_t* rseg = undo->rseg;
buf_block_t* new_block = NULL;

View File

@ -526,32 +526,6 @@ ut_copy_file(
} while (len > 0);
}
/** Convert an error number to a human readable text message.
The returned string is static and should not be freed or modified.
@param[in] num InnoDB internal error number
@return string, describing the error */
std::string
ut_get_name(
/*=========*/
const trx_t* trx, /*!< in: transaction (NULL=no quotes) */
ibool table_id,/*!< in: TRUE=print a table name,
FALSE=print other identifier */
const char* name) /*!< in: name to print */
{
/* 2 * NAME_LEN for database and table name,
and some slack for the #mysql50# prefix and quotes */
char buf[3 * NAME_LEN];
const char* bufend;
ulint namelen = strlen(name);
bufend = innobase_convert_name(buf, sizeof buf,
name, namelen,
trx ? trx->mysql_thd : NULL);
buf[bufend-buf]='\0';
std::string str(buf);
return str;
}
/** Convert an error number to a human readable text message.
The returned string is static and should not be freed or modified.
@param[in] num InnoDB internal error number