mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
InnoDB: Define some macros around GCC's __builtin_expect()
and __builtin_prefetch(). Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/btr/btr0btr.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/btr/btr0cur.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/btr/btr0sea.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/include/univ.i: Define UNIV_EXPECT(), UNIV_LIKELY(), UNIV_UNLIKELY(), UNIV_LIKELY_NULL(), UNIV_PREFETCH_R() and UNIV_PREFETCH_RW(). innobase/lock/lock0lock.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/page/page0cur.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/page/page0page.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/rem/rem0rec.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/row/row0ins.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/row/row0mysql.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/row/row0purge.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/row/row0row.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/row/row0sel.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/row/row0undo.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/row/row0upd.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests. innobase/trx/trx0rec.c: Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
This commit is contained in:
parent
ea5c2a148a
commit
4e0e9a3bae
16 changed files with 82 additions and 68 deletions
|
@ -1284,14 +1284,14 @@ btr_page_get_sure_split_rec(
|
||||||
next_rec = page_rec_get_next(rec);
|
next_rec = page_rec_get_next(rec);
|
||||||
}
|
}
|
||||||
if (next_rec != page_get_supremum_rec(page)) {
|
if (next_rec != page_get_supremum_rec(page)) {
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(next_rec);
|
return(next_rec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(rec);
|
return(rec);
|
||||||
|
@ -2109,7 +2109,7 @@ btr_compress(
|
||||||
rec_get_offsets(node_ptr, cursor->index,
|
rec_get_offsets(node_ptr, cursor->index,
|
||||||
offsets_, ULINT_UNDEFINED, &heap),
|
offsets_, ULINT_UNDEFINED, &heap),
|
||||||
right_page_no, mtr);
|
right_page_no, mtr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
btr_node_ptr_delete(tree, merge_page, mtr);
|
btr_node_ptr_delete(tree, merge_page, mtr);
|
||||||
|
@ -2403,7 +2403,7 @@ btr_print_tree(
|
||||||
root = btr_root_get(tree, &mtr);
|
root = btr_root_get(tree, &mtr);
|
||||||
|
|
||||||
btr_print_recursive(tree, root, width, &heap, &offsets, &mtr);
|
btr_print_recursive(tree, root, width, &heap, &offsets, &mtr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2557,14 +2557,14 @@ btr_index_rec_validate(
|
||||||
rec_print_new(stderr, rec, offsets);
|
rec_print_new(stderr, rec, offsets);
|
||||||
putc('\n', stderr);
|
putc('\n', stderr);
|
||||||
}
|
}
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
|
|
@ -431,7 +431,7 @@ retry_page_get:
|
||||||
cursor->thr)) {
|
cursor->thr)) {
|
||||||
/* Insertion to the insert buffer succeeded */
|
/* Insertion to the insert buffer succeeded */
|
||||||
cursor->flag = BTR_CUR_INSERT_TO_IBUF;
|
cursor->flag = BTR_CUR_INSERT_TO_IBUF;
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -525,7 +525,7 @@ retry_page_get:
|
||||||
page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets);
|
page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,7 +681,7 @@ btr_cur_open_at_index_side(
|
||||||
page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets);
|
page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -762,7 +762,7 @@ btr_cur_open_at_rnd_pos(
|
||||||
page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets);
|
page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1261,7 +1261,7 @@ btr_cur_upd_lock_and_undo(
|
||||||
err = lock_clust_rec_modify_check_and_lock(flags, rec, index,
|
err = lock_clust_rec_modify_check_and_lock(flags, rec, index,
|
||||||
rec_get_offsets(rec, index, offsets_,
|
rec_get_offsets(rec, index, offsets_,
|
||||||
ULINT_UNDEFINED, &heap), thr);
|
ULINT_UNDEFINED, &heap), thr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
if (err != DB_SUCCESS) {
|
if (err != DB_SUCCESS) {
|
||||||
|
@ -1451,7 +1451,7 @@ btr_cur_update_in_place(
|
||||||
thr, &roll_ptr);
|
thr, &roll_ptr);
|
||||||
if (err != DB_SUCCESS) {
|
if (err != DB_SUCCESS) {
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
@ -1498,7 +1498,7 @@ btr_cur_update_in_place(
|
||||||
btr_cur_unmark_extern_fields(rec, mtr, offsets);
|
btr_cur_unmark_extern_fields(rec, mtr, offsets);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(DB_SUCCESS);
|
return(DB_SUCCESS);
|
||||||
|
@ -2078,7 +2078,7 @@ btr_cur_parse_del_mark_set_clust_rec(
|
||||||
rec_get_offsets(rec, index, offsets_,
|
rec_get_offsets(rec, index, offsets_,
|
||||||
ULINT_UNDEFINED, &heap),
|
ULINT_UNDEFINED, &heap),
|
||||||
pos, trx_id, roll_ptr);
|
pos, trx_id, roll_ptr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2138,7 +2138,7 @@ btr_cur_del_mark_set_clust_rec(
|
||||||
|
|
||||||
if (err != DB_SUCCESS) {
|
if (err != DB_SUCCESS) {
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
@ -2149,7 +2149,7 @@ btr_cur_del_mark_set_clust_rec(
|
||||||
&roll_ptr);
|
&roll_ptr);
|
||||||
if (err != DB_SUCCESS) {
|
if (err != DB_SUCCESS) {
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
@ -2175,7 +2175,7 @@ btr_cur_del_mark_set_clust_rec(
|
||||||
|
|
||||||
btr_cur_del_mark_set_clust_rec_log(flags, rec, index, val, trx,
|
btr_cur_del_mark_set_clust_rec_log(flags, rec, index, val, trx,
|
||||||
roll_ptr, mtr);
|
roll_ptr, mtr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(DB_SUCCESS);
|
return(DB_SUCCESS);
|
||||||
|
@ -2443,7 +2443,7 @@ btr_cur_optimistic_delete(
|
||||||
mtr);
|
mtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2943,7 +2943,7 @@ btr_estimate_number_of_different_key_vals(
|
||||||
}
|
}
|
||||||
|
|
||||||
mem_free(n_diff);
|
mem_free(n_diff);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -435,7 +435,7 @@ btr_search_update_hash_ref(
|
||||||
offsets_, ULINT_UNDEFINED, &heap),
|
offsets_, ULINT_UNDEFINED, &heap),
|
||||||
block->curr_n_fields,
|
block->curr_n_fields,
|
||||||
block->curr_n_bytes, tree_id);
|
block->curr_n_bytes, tree_id);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
#ifdef UNIV_SYNC_DEBUG
|
#ifdef UNIV_SYNC_DEBUG
|
||||||
|
@ -659,7 +659,7 @@ btr_search_check_guess(
|
||||||
success = cmp != 1;
|
success = cmp != 1;
|
||||||
}
|
}
|
||||||
exit_func:
|
exit_func:
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(success);
|
return(success);
|
||||||
|
@ -1010,7 +1010,7 @@ next_rec:
|
||||||
prev_fold = fold;
|
prev_fold = fold;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1252,7 +1252,7 @@ exit_func:
|
||||||
|
|
||||||
mem_free(folds);
|
mem_free(folds);
|
||||||
mem_free(recs);
|
mem_free(recs);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1370,7 +1370,7 @@ btr_search_update_hash_on_delete(
|
||||||
fold = rec_fold(rec, rec_get_offsets(rec, cursor->index, offsets_,
|
fold = rec_fold(rec, rec_get_offsets(rec, cursor->index, offsets_,
|
||||||
ULINT_UNDEFINED, &heap), block->curr_n_fields,
|
ULINT_UNDEFINED, &heap), block->curr_n_fields,
|
||||||
block->curr_n_bytes, tree_id);
|
block->curr_n_bytes, tree_id);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
rw_lock_x_lock(&btr_search_latch);
|
rw_lock_x_lock(&btr_search_latch);
|
||||||
|
@ -1573,7 +1573,7 @@ check_next_rec:
|
||||||
}
|
}
|
||||||
|
|
||||||
function_exit:
|
function_exit:
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
if (locked) {
|
if (locked) {
|
||||||
|
@ -1662,7 +1662,7 @@ btr_search_validate(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
rw_lock_x_unlock(&btr_search_latch);
|
rw_lock_x_unlock(&btr_search_latch);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -243,6 +243,20 @@ contains the sum of the following flag and the locally stored len. */
|
||||||
|
|
||||||
#define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE)
|
#define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE)
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ > 2)
|
||||||
|
# define UNIV_EXPECT(expr,value) __builtin_expect(expr, value)
|
||||||
|
# define UNIV_LIKELY_NULL(expr) __builtin_expect((ulint) expr, 0)
|
||||||
|
# define UNIV_PREFETCH_R(addr) __builtin_prefetch(addr, 0, 3)
|
||||||
|
# define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3)
|
||||||
|
#else
|
||||||
|
# define UNIV_EXPECT(expr,value) (expr)
|
||||||
|
# define UNIV_LIKELY_NULL(expr) (expr)
|
||||||
|
# define UNIV_PREFETCH_R(addr) ((void) 0)
|
||||||
|
# define UNIV_PREFETCH_RW(addr) ((void) 0)
|
||||||
|
#endif
|
||||||
|
#define UNIV_LIKELY(expr) UNIV_EXPECT(expr, TRUE)
|
||||||
|
#define UNIV_UNLIKELY(expr) UNIV_EXPECT(expr, FALSE)
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "ut0dbg.h"
|
#include "ut0dbg.h"
|
||||||
#include "ut0ut.h"
|
#include "ut0ut.h"
|
||||||
|
|
|
@ -4187,7 +4187,7 @@ lock_rec_print(
|
||||||
}
|
}
|
||||||
|
|
||||||
mtr_commit(&mtr);
|
mtr_commit(&mtr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4664,7 +4664,7 @@ function_exit:
|
||||||
|
|
||||||
mtr_commit(&mtr);
|
mtr_commit(&mtr);
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
@ -4850,7 +4850,7 @@ lock_rec_insert_check_and_lock(
|
||||||
offsets = rec_get_offsets(next_rec, index, offsets_,
|
offsets = rec_get_offsets(next_rec, index, offsets_,
|
||||||
ULINT_UNDEFINED, &heap);
|
ULINT_UNDEFINED, &heap);
|
||||||
ut_ad(lock_rec_queue_validate(next_rec, index, offsets));
|
ut_ad(lock_rec_queue_validate(next_rec, index, offsets));
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4999,7 +4999,7 @@ lock_sec_rec_modify_check_and_lock(
|
||||||
offsets = rec_get_offsets(rec, index, offsets_,
|
offsets = rec_get_offsets(rec, index, offsets_,
|
||||||
ULINT_UNDEFINED, &heap);
|
ULINT_UNDEFINED, &heap);
|
||||||
ut_ad(lock_rec_queue_validate(rec, index, offsets));
|
ut_ad(lock_rec_queue_validate(rec, index, offsets));
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ page_cur_try_search_shortcut(
|
||||||
#endif
|
#endif
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
exit_func:
|
exit_func:
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(success);
|
return(success);
|
||||||
|
@ -451,7 +451,7 @@ page_cur_search_with_match(
|
||||||
*iup_matched_bytes = up_matched_bytes;
|
*iup_matched_bytes = up_matched_bytes;
|
||||||
*ilow_matched_fields = low_matched_fields;
|
*ilow_matched_fields = low_matched_fields;
|
||||||
*ilow_matched_bytes = low_matched_bytes;
|
*ilow_matched_bytes = low_matched_bytes;
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,7 +539,7 @@ page_cur_insert_rec_write_log(
|
||||||
ut_ad(rec_size == rec_offs_size(ins_offs));
|
ut_ad(rec_size == rec_offs_size(ins_offs));
|
||||||
cur_rec_size = rec_offs_size(cur_offs);
|
cur_rec_size = rec_offs_size(cur_offs);
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -821,7 +821,7 @@ page_cur_parse_insert_rec(
|
||||||
mem_free(buf);
|
mem_free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -890,7 +890,7 @@ page_cur_insert_rec_low(
|
||||||
insert_buf = page_mem_alloc(page, rec_size, index, &heap_no);
|
insert_buf = page_mem_alloc(page, rec_size, index, &heap_no);
|
||||||
|
|
||||||
if (insert_buf == NULL) {
|
if (insert_buf == NULL) {
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
@ -980,7 +980,7 @@ page_cur_insert_rec_low(
|
||||||
page_cur_insert_rec_write_log(insert_rec, rec_size, current_rec,
|
page_cur_insert_rec_write_log(insert_rec, rec_size, current_rec,
|
||||||
index, mtr);
|
index, mtr);
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(insert_rec);
|
return(insert_rec);
|
||||||
|
@ -1186,7 +1186,7 @@ page_copy_rec_list_end_to_created_page(
|
||||||
slot_index--;
|
slot_index--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1285,7 +1285,7 @@ page_cur_parse_delete_rec(
|
||||||
page_cur_delete_rec(&cursor, index,
|
page_cur_delete_rec(&cursor, index,
|
||||||
rec_get_offsets(rec, index, offsets_,
|
rec_get_offsets(rec, index, offsets_,
|
||||||
ULINT_UNDEFINED, &heap), mtr);
|
ULINT_UNDEFINED, &heap), mtr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,13 +252,13 @@ page_mem_alloc(
|
||||||
*heap_no = rec_get_heap_no(rec, page_is_comp(page));
|
*heap_no = rec_get_heap_no(rec, page_is_comp(page));
|
||||||
|
|
||||||
block = rec_get_start(rec, offsets);
|
block = rec_get_start(rec, offsets);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(block);
|
return(block);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -514,7 +514,7 @@ page_copy_rec_list_end_no_locks(
|
||||||
page_cur_move_to_next(&cur2);
|
page_cur_move_to_next(&cur2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -608,7 +608,7 @@ page_copy_rec_list_start(
|
||||||
|
|
||||||
btr_search_move_or_delete_hash_entries(new_page, page, index);
|
btr_search_move_or_delete_hash_entries(new_page, page, index);
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -772,7 +772,7 @@ page_delete_rec_list_end(
|
||||||
rec2 = page_rec_get_next(rec2);
|
rec2 = page_rec_get_next(rec2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -868,7 +868,7 @@ page_delete_rec_list_start(
|
||||||
page_cur_delete_rec(&cur1, index, offsets, mtr);
|
page_cur_delete_rec(&cur1, index, offsets, mtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1381,7 +1381,7 @@ page_print_list(
|
||||||
"--------------------------------\n",
|
"--------------------------------\n",
|
||||||
(ulong) (count + 1));
|
(ulong) (count + 1));
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -965,7 +965,7 @@ rec_convert_dtuple_to_rec(
|
||||||
offsets = rec_get_offsets(rec, index,
|
offsets = rec_get_offsets(rec, index,
|
||||||
offsets_, ULINT_UNDEFINED, &heap);
|
offsets_, ULINT_UNDEFINED, &heap);
|
||||||
ut_ad(rec_validate(rec, offsets));
|
ut_ad(rec_validate(rec, offsets));
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1412,7 +1412,7 @@ rec_print(
|
||||||
|
|
||||||
rec_print_new(file, rec, rec_get_offsets(rec, index, offsets_,
|
rec_print_new(file, rec, rec_get_offsets(rec, index, offsets_,
|
||||||
ULINT_UNDEFINED, &heap));
|
ULINT_UNDEFINED, &heap));
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1392,7 +1392,7 @@ do_possible_lock_wait:
|
||||||
}
|
}
|
||||||
|
|
||||||
exit_func:
|
exit_func:
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
@ -1660,7 +1660,7 @@ next_rec:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
mtr_commit(&mtr);
|
mtr_commit(&mtr);
|
||||||
|
@ -2048,7 +2048,7 @@ function_exit:
|
||||||
mtr_commit(&mtr);
|
mtr_commit(&mtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
|
|
@ -3845,7 +3845,7 @@ funct_exit:
|
||||||
que_graph_free(graph);
|
que_graph_free(graph);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ row_purge_remove_clust_if_poss_low(
|
||||||
if (0 != ut_dulint_cmp(node->roll_ptr,
|
if (0 != ut_dulint_cmp(node->roll_ptr,
|
||||||
row_get_rec_roll_ptr(rec, index, rec_get_offsets(
|
row_get_rec_roll_ptr(rec, index, rec_get_offsets(
|
||||||
rec, index, offsets_, ULINT_UNDEFINED, &heap)))) {
|
rec, index, offsets_, ULINT_UNDEFINED, &heap)))) {
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
/* Someone else has modified the record later: do not remove */
|
/* Someone else has modified the record later: do not remove */
|
||||||
|
@ -135,7 +135,7 @@ row_purge_remove_clust_if_poss_low(
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -535,7 +535,7 @@ row_build_row_ref_in_tuple(
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_ad(dtuple_check_typed(ref));
|
ut_ad(dtuple_check_typed(ref));
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ row_sel_sec_rec_is_for_clust_rec(
|
||||||
}
|
}
|
||||||
|
|
||||||
func_exit:
|
func_exit:
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(is_equal);
|
return(is_equal);
|
||||||
|
@ -746,7 +746,7 @@ func_exit:
|
||||||
*out_rec = clust_rec;
|
*out_rec = clust_rec;
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
err_exit:
|
err_exit:
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
@ -1066,7 +1066,7 @@ row_sel_try_search_shortcut(
|
||||||
|
|
||||||
plan->n_rows_fetched++;
|
plan->n_rows_fetched++;
|
||||||
func_exit:
|
func_exit:
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(SEL_FOUND);
|
return(SEL_FOUND);
|
||||||
|
@ -1780,7 +1780,7 @@ lock_wait_or_error:
|
||||||
ut_ad(sync_thread_levels_empty_gen(TRUE));
|
ut_ad(sync_thread_levels_empty_gen(TRUE));
|
||||||
|
|
||||||
func_exit:
|
func_exit:
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
@ -4004,7 +4004,7 @@ normal_return:
|
||||||
|
|
||||||
func_exit:
|
func_exit:
|
||||||
trx->op_info = "";
|
trx->op_info = "";
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
|
|
@ -190,7 +190,7 @@ row_undo_search_clust_to_pcur(
|
||||||
|
|
||||||
btr_pcur_commit_specify_mtr(&(node->pcur), &mtr);
|
btr_pcur_commit_specify_mtr(&(node->pcur), &mtr);
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
|
|
|
@ -1224,7 +1224,7 @@ row_upd_store_row(
|
||||||
|
|
||||||
node->n_ext_vec = btr_push_update_extern_fields(node->ext_vec,
|
node->n_ext_vec = btr_push_update_extern_fields(node->ext_vec,
|
||||||
offsets, update);
|
offsets, update);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1423,7 +1423,7 @@ row_upd_clust_rec_by_insert(
|
||||||
index, thr, mtr);
|
index, thr, mtr);
|
||||||
if (err != DB_SUCCESS) {
|
if (err != DB_SUCCESS) {
|
||||||
mtr_commit(mtr);
|
mtr_commit(mtr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
@ -1549,7 +1549,7 @@ row_upd_clust_rec(
|
||||||
rec_get_offsets(rec, index, offsets_,
|
rec_get_offsets(rec, index, offsets_,
|
||||||
ULINT_UNDEFINED, &heap),
|
ULINT_UNDEFINED, &heap),
|
||||||
big_rec, mtr);
|
big_rec, mtr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
mtr_commit(mtr);
|
mtr_commit(mtr);
|
||||||
|
@ -1719,7 +1719,7 @@ row_upd_clust_step(
|
||||||
node->index = dict_table_get_next_index(index);
|
node->index = dict_table_get_next_index(index);
|
||||||
}
|
}
|
||||||
exit_func:
|
exit_func:
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(err);
|
return(err);
|
||||||
|
@ -1736,7 +1736,7 @@ row_upd_clust_step(
|
||||||
row_upd_eval_new_vals(node->update);
|
row_upd_eval_new_vals(node->update);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2016,7 +2016,7 @@ row_upd_in_place_in_select(
|
||||||
btr_pcur_get_rec(pcur), btr_cur->index, offsets_,
|
btr_pcur_get_rec(pcur), btr_cur->index, offsets_,
|
||||||
ULINT_UNDEFINED, &heap),
|
ULINT_UNDEFINED, &heap),
|
||||||
UT_LIST_GET_FIRST(node->columns));
|
UT_LIST_GET_FIRST(node->columns));
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
row_upd_eval_new_vals(node->update);
|
row_upd_eval_new_vals(node->update);
|
||||||
|
|
|
@ -1134,7 +1134,7 @@ trx_undo_report_row_operation(
|
||||||
|
|
||||||
mutex_exit(&(trx->undo_mutex));
|
mutex_exit(&(trx->undo_mutex));
|
||||||
mtr_commit(&mtr);
|
mtr_commit(&mtr);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(DB_OUT_OF_FILE_SPACE);
|
return(DB_OUT_OF_FILE_SPACE);
|
||||||
|
@ -1153,7 +1153,7 @@ trx_undo_report_row_operation(
|
||||||
|
|
||||||
*roll_ptr = trx_undo_build_roll_ptr(is_insert, rseg->id, page_no,
|
*roll_ptr = trx_undo_build_roll_ptr(is_insert, rseg->id, page_no,
|
||||||
offset);
|
offset);
|
||||||
if (heap) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
}
|
}
|
||||||
return(DB_SUCCESS);
|
return(DB_SUCCESS);
|
||||||
|
|
Loading…
Reference in a new issue