Commit ac69f8c2 authored by osku's avatar osku

Style cleanups: Convert spaces to tabs, remove trailing whitespace, other

misc cleanups.
parent 9596f6d8
...@@ -1416,15 +1416,12 @@ btr_insert_on_non_leaf_level( ...@@ -1416,15 +1416,12 @@ btr_insert_on_non_leaf_level(
first parameter for btr_cur_search_to_nth_level. */ first parameter for btr_cur_search_to_nth_level. */
btr_cur_search_to_nth_level(UT_LIST_GET_FIRST(tree->tree_indexes), btr_cur_search_to_nth_level(UT_LIST_GET_FIRST(tree->tree_indexes),
level, tuple, PAGE_CUR_LE, level, tuple, PAGE_CUR_LE, BTR_CONT_MODIFY_TREE,
BTR_CONT_MODIFY_TREE,
&cursor, 0, mtr); &cursor, 0, mtr);
err = btr_cur_pessimistic_insert(BTR_NO_LOCKING_FLAG err = btr_cur_pessimistic_insert(BTR_NO_LOCKING_FLAG
| BTR_KEEP_SYS_FLAG | BTR_KEEP_SYS_FLAG | BTR_NO_UNDO_LOG_FLAG,
| BTR_NO_UNDO_LOG_FLAG, &cursor, tuple, &rec, &dummy_big_rec, NULL, mtr);
&cursor, tuple,
&rec, &dummy_big_rec, NULL, mtr);
ut_a(err == DB_SUCCESS); ut_a(err == DB_SUCCESS);
} }
......
...@@ -798,8 +798,8 @@ btr_search_guess_on_hash( ...@@ -798,8 +798,8 @@ btr_search_guess_on_hash(
record to determine if our guess for the cursor position is record to determine if our guess for the cursor position is
right. */ right. */
if (UNIV_EXPECT(ut_dulint_cmp(tree_id, btr_page_get_index_id(page)), 0) if (UNIV_EXPECT(ut_dulint_cmp(tree_id, btr_page_get_index_id(page)), 0)
|| !btr_search_check_guess(cursor, can_only_compare_to_cursor_rec, || !btr_search_check_guess(cursor,
tuple, mode, mtr)) { can_only_compare_to_cursor_rec, tuple, mode, mtr)) {
if (UNIV_LIKELY(!has_search_latch)) { if (UNIV_LIKELY(!has_search_latch)) {
btr_leaf_page_release(page, latch_mode, mtr); btr_leaf_page_release(page, latch_mode, mtr);
} }
......
...@@ -335,10 +335,10 @@ buf_page_is_corrupted( ...@@ -335,10 +335,10 @@ buf_page_is_corrupted(
} }
#endif #endif
/* If we use checksums validation, make additional check before returning /* If we use checksums validation, make additional check before
TRUE to ensure that the checksum is not equal to BUF_NO_CHECKSUM_MAGIC which returning TRUE to ensure that the checksum is not equal to
might be stored by InnoDB with checksums disabled. BUF_NO_CHECKSUM_MAGIC which might be stored by InnoDB with checksums
Otherwise, skip checksum calculation and return FALSE */ disabled. Otherwise, skip checksum calculation and return FALSE */
if (srv_use_checksums) { if (srv_use_checksums) {
old_checksum = buf_calc_page_old_checksum(read_buf); old_checksum = buf_calc_page_old_checksum(read_buf);
...@@ -347,11 +347,15 @@ buf_page_is_corrupted( ...@@ -347,11 +347,15 @@ buf_page_is_corrupted(
- FIL_PAGE_END_LSN_OLD_CHKSUM); - FIL_PAGE_END_LSN_OLD_CHKSUM);
/* There are 2 valid formulas for old_checksum_field: /* There are 2 valid formulas for old_checksum_field:
1. Very old versions of InnoDB only stored 8 byte lsn to the start
and the end of the page.
2. Newer InnoDB versions store the old formula checksum there. */
if (old_checksum_field != mach_read_from_4(read_buf + FIL_PAGE_LSN) 1. Very old versions of InnoDB only stored 8 byte lsn to the
start and the end of the page.
2. Newer InnoDB versions store the old formula checksum
there. */
if (old_checksum_field != mach_read_from_4(read_buf
+ FIL_PAGE_LSN)
&& old_checksum_field != old_checksum && old_checksum_field != old_checksum
&& old_checksum_field != BUF_NO_CHECKSUM_MAGIC) { && old_checksum_field != BUF_NO_CHECKSUM_MAGIC) {
...@@ -359,7 +363,8 @@ buf_page_is_corrupted( ...@@ -359,7 +363,8 @@ buf_page_is_corrupted(
} }
checksum = buf_calc_page_new_checksum(read_buf); checksum = buf_calc_page_new_checksum(read_buf);
checksum_field = mach_read_from_4(read_buf + FIL_PAGE_SPACE_OR_CHKSUM); checksum_field = mach_read_from_4(read_buf +
FIL_PAGE_SPACE_OR_CHKSUM);
/* InnoDB versions < 4.0.14 and < 4.1.1 stored the space id /* InnoDB versions < 4.0.14 and < 4.1.1 stored the space id
(always equal to 0), to FIL_PAGE_SPACE_SPACE_OR_CHKSUM */ (always equal to 0), to FIL_PAGE_SPACE_SPACE_OR_CHKSUM */
...@@ -2338,9 +2343,8 @@ buf_print_io( ...@@ -2338,9 +2343,8 @@ buf_print_io(
if (buf_pool->n_page_gets > buf_pool->n_page_gets_old) { if (buf_pool->n_page_gets > buf_pool->n_page_gets_old) {
fprintf(file, "Buffer pool hit rate %lu / 1000\n", fprintf(file, "Buffer pool hit rate %lu / 1000\n",
(ulong) (1000 (ulong) (1000 -
- ((1000 * ((1000 * (buf_pool->n_pages_read - buf_pool->n_pages_read_old))
(buf_pool->n_pages_read - buf_pool->n_pages_read_old))
/ (buf_pool->n_page_gets - buf_pool->n_page_gets_old)))); / (buf_pool->n_page_gets - buf_pool->n_page_gets_old))));
} else { } else {
fputs("No buffer pool page gets since the last printout\n", fputs("No buffer pool page gets since the last printout\n",
......
...@@ -357,7 +357,8 @@ buf_flush_buffered_writes(void) ...@@ -357,7 +357,8 @@ buf_flush_buffered_writes(void)
"InnoDB: The lsn fields do not match! Noticed in the buffer pool\n" "InnoDB: The lsn fields do not match! Noticed in the buffer pool\n"
"InnoDB: after posting and flushing the doublewrite buffer.\n" "InnoDB: after posting and flushing the doublewrite buffer.\n"
"InnoDB: Page buf fix count %lu, io fix %lu, state %lu\n", "InnoDB: Page buf fix count %lu, io fix %lu, state %lu\n",
(ulong)block->buf_fix_count, (ulong)block->io_fix, (ulong)block->buf_fix_count,
(ulong)block->io_fix,
(ulong)block->state); (ulong)block->state);
} }
ut_a(block->state == BUF_BLOCK_FILE_PAGE); ut_a(block->state == BUF_BLOCK_FILE_PAGE);
......
...@@ -458,7 +458,8 @@ buf_read_ahead_linear( ...@@ -458,7 +458,8 @@ buf_read_ahead_linear(
/* Not accessed */ /* Not accessed */
fail_count++; fail_count++;
} else if (pred_block && (ut_ulint_cmp(block->LRU_position, } else if (pred_block
&& (ut_ulint_cmp(block->LRU_position,
pred_block->LRU_position) pred_block->LRU_position)
!= asc_or_desc)) { != asc_or_desc)) {
/* Accesses not in the right order */ /* Accesses not in the right order */
......
...@@ -238,8 +238,7 @@ dict_boot(void) ...@@ -238,8 +238,7 @@ dict_boot(void)
dict_sys->row_id = ut_dulint_add( dict_sys->row_id = ut_dulint_add(
ut_dulint_align_up( ut_dulint_align_up(
mtr_read_dulint(dict_hdr + DICT_HDR_ROW_ID, mtr_read_dulint(dict_hdr + DICT_HDR_ROW_ID, &mtr),
&mtr),
DICT_HDR_ROW_ID_WRITE_MARGIN), DICT_HDR_ROW_ID_WRITE_MARGIN),
DICT_HDR_ROW_ID_WRITE_MARGIN); DICT_HDR_ROW_ID_WRITE_MARGIN);
......
...@@ -1324,7 +1324,7 @@ dict_create_add_foreigns_to_dictionary( ...@@ -1324,7 +1324,7 @@ dict_create_add_foreigns_to_dictionary(
if (NULL == dict_table_get_low("SYS_FOREIGN")) { if (NULL == dict_table_get_low("SYS_FOREIGN")) {
fprintf(stderr, fprintf(stderr,
"InnoDB: table SYS_FOREIGN not found from internal data dictionary\n"); "InnoDB: table SYS_FOREIGN not found from internal data dictionary\n");
return(DB_ERROR); return(DB_ERROR);
} }
......
...@@ -1739,9 +1739,7 @@ dict_index_build_internal_clust( ...@@ -1739,9 +1739,7 @@ dict_index_build_internal_clust(
/* Create a new index object with certainly enough fields */ /* Create a new index object with certainly enough fields */
new_index = dict_mem_index_create(table->name, new_index = dict_mem_index_create(table->name,
index->name, index->name, table->space, index->type,
table->space,
index->type,
index->n_fields + table->n_cols); index->n_fields + table->n_cols);
/* Copy other relevant data from the old index struct to the new /* Copy other relevant data from the old index struct to the new
...@@ -1922,11 +1920,8 @@ dict_index_build_internal_non_clust( ...@@ -1922,11 +1920,8 @@ dict_index_build_internal_non_clust(
/* Create a new index */ /* Create a new index */
new_index = dict_mem_index_create(table->name, new_index = dict_mem_index_create(table->name,
index->name, index->name, index->space, index->type,
index->space, index->n_fields + 1 + clust_index->n_uniq);
index->type,
index->n_fields
+ 1 + clust_index->n_uniq);
/* Copy other relevant data from the old index /* Copy other relevant data from the old index
struct to the new struct: it inherits the values */ struct to the new struct: it inherits the values */
......
...@@ -3124,7 +3124,7 @@ fil_load_single_table_tablespaces(void) ...@@ -3124,7 +3124,7 @@ fil_load_single_table_tablespaces(void)
&fileinfo); &fileinfo);
while (ret == 0) { while (ret == 0) {
/* printf( /* printf(
" Looking at file %s\n", fileinfo.name); */ " Looking at file %s\n", fileinfo.name); */
if (fileinfo.type == OS_FILE_TYPE_DIR) { if (fileinfo.type == OS_FILE_TYPE_DIR) {
...@@ -3612,8 +3612,8 @@ fil_extend_tablespaces_to_stored_len(void) ...@@ -3612,8 +3612,8 @@ fil_extend_tablespaces_to_stored_len(void)
ut_a(space->purpose == FIL_TABLESPACE); ut_a(space->purpose == FIL_TABLESPACE);
mutex_exit(&(system->mutex)); /* no need to protect with a mutex_exit(&(system->mutex)); /* no need to protect with a
mutex, because this is a single- mutex, because this is a
threaded operation */ single-threaded operation */
error = fil_read(TRUE, space->id, 0, 0, UNIV_PAGE_SIZE, buf, error = fil_read(TRUE, space->id, 0, 0, UNIV_PAGE_SIZE, buf,
NULL); NULL);
ut_a(error == DB_SUCCESS); ut_a(error == DB_SUCCESS);
...@@ -4297,8 +4297,8 @@ fil_flush_file_spaces( ...@@ -4297,8 +4297,8 @@ fil_flush_file_spaces(
while (space) { while (space) {
if (space->purpose == purpose && !space->is_being_deleted) { if (space->purpose == purpose && !space->is_being_deleted) {
space->n_pending_flushes++; /* prevent dropping of the space->n_pending_flushes++; /* prevent dropping of
space while we are the space while we are
flushing */ flushing */
mutex_exit(&(system->mutex)); mutex_exit(&(system->mutex));
......
...@@ -941,8 +941,8 @@ fsp_header_get_space_id( ...@@ -941,8 +941,8 @@ fsp_header_get_space_id(
if (id != fsp_id) { if (id != fsp_id) {
fprintf(stderr, fprintf(stderr,
"InnoDB: Error: space id in fsp header %lu, but in the page header %lu\n", "InnoDB: Error: space id in fsp header %lu, but in the page header %lu\n",
(ulong) fsp_id, (ulong) fsp_id, (ulong) id);
(ulong) id);
return(ULINT_UNDEFINED); return(ULINT_UNDEFINED);
} }
...@@ -2857,8 +2857,9 @@ fsp_get_available_space_in_free_extents( ...@@ -2857,8 +2857,9 @@ fsp_get_available_space_in_free_extents(
if (size < FSP_EXTENT_SIZE) { if (size < FSP_EXTENT_SIZE) {
ut_a(space != 0); /* This must be a single-table ut_a(space != 0); /* This must be a single-table
tablespace */ tablespace */
return(0); /* TODO: count free frag pages and return
a value based on that */ return(0); /* TODO: count free frag pages and
return a value based on that */
} }
/* Below we play safe when counting free extents above the free limit: /* Below we play safe when counting free extents above the free limit:
...@@ -3734,18 +3735,22 @@ fsp_validate( ...@@ -3734,18 +3735,22 @@ fsp_validate(
mtr_start(&mtr); mtr_start(&mtr);
mtr_x_lock(fil_space_get_latch(space), &mtr); mtr_x_lock(fil_space_get_latch(space), &mtr);
seg_inode_page = fut_get_ptr(space, node_addr, RW_X_LATCH, seg_inode_page = fut_get_ptr(space, node_addr,
&mtr) - FSEG_INODE_PAGE_NODE; RW_X_LATCH, &mtr) - FSEG_INODE_PAGE_NODE;
seg_inode = fsp_seg_inode_page_get_nth_inode(seg_inode_page, seg_inode = fsp_seg_inode_page_get_nth_inode(
n, &mtr); seg_inode_page, n, &mtr);
ut_a(ut_dulint_cmp(mach_read_from_8(seg_inode + FSEG_ID), ut_a(ut_dulint_cmp(
mach_read_from_8(seg_inode + FSEG_ID),
ut_dulint_zero) != 0); ut_dulint_zero) != 0);
fseg_validate_low(seg_inode, &mtr); fseg_validate_low(seg_inode, &mtr);
descr_count += flst_get_len(seg_inode + FSEG_FREE, &mtr); descr_count += flst_get_len(seg_inode + FSEG_FREE,
descr_count += flst_get_len(seg_inode + FSEG_FULL, &mtr); &mtr);
descr_count += flst_get_len(seg_inode + FSEG_NOT_FULL, &mtr); descr_count += flst_get_len(seg_inode + FSEG_FULL,
&mtr);
descr_count += flst_get_len(seg_inode + FSEG_NOT_FULL,
&mtr);
n_used2 += fseg_get_n_frag_pages(seg_inode, &mtr); n_used2 += fseg_get_n_frag_pages(seg_inode, &mtr);
...@@ -3775,22 +3780,24 @@ fsp_validate( ...@@ -3775,22 +3780,24 @@ fsp_validate(
mtr_start(&mtr); mtr_start(&mtr);
mtr_x_lock(fil_space_get_latch(space), &mtr); mtr_x_lock(fil_space_get_latch(space), &mtr);
seg_inode_page = fut_get_ptr(space, node_addr, RW_X_LATCH, seg_inode_page = fut_get_ptr(space, node_addr,
&mtr) - FSEG_INODE_PAGE_NODE; RW_X_LATCH, &mtr) - FSEG_INODE_PAGE_NODE;
seg_inode = fsp_seg_inode_page_get_nth_inode(seg_inode_page, seg_inode = fsp_seg_inode_page_get_nth_inode(
n, &mtr); seg_inode_page, n, &mtr);
if (ut_dulint_cmp(mach_read_from_8(seg_inode + FSEG_ID), if (ut_dulint_cmp(mach_read_from_8(
seg_inode + FSEG_ID),
ut_dulint_zero) != 0) { ut_dulint_zero) != 0) {
fseg_validate_low(seg_inode, &mtr); fseg_validate_low(seg_inode, &mtr);
descr_count += flst_get_len(seg_inode + FSEG_FREE, descr_count += flst_get_len(
&mtr); seg_inode + FSEG_FREE, &mtr);
descr_count += flst_get_len(seg_inode + FSEG_FULL, descr_count += flst_get_len(
&mtr); seg_inode + FSEG_FULL, &mtr);
descr_count += flst_get_len(seg_inode + FSEG_NOT_FULL, descr_count += flst_get_len(
&mtr); seg_inode + FSEG_NOT_FULL, &mtr);
n_used2 += fseg_get_n_frag_pages(seg_inode, &mtr); n_used2 += fseg_get_n_frag_pages(
seg_inode, &mtr);
} }
next_node_addr = flst_get_next_addr(seg_inode_page next_node_addr = flst_get_next_addr(seg_inode_page
...@@ -3809,6 +3816,7 @@ fsp_validate( ...@@ -3809,6 +3816,7 @@ fsp_validate(
ut_a(frag_n_used == n_used); ut_a(frag_n_used == n_used);
mtr_commit(&mtr2); mtr_commit(&mtr2);
return(TRUE); return(TRUE);
} }
...@@ -3897,12 +3905,13 @@ fsp_print( ...@@ -3897,12 +3905,13 @@ fsp_print(
mtr_start(&mtr); mtr_start(&mtr);
mtr_x_lock(fil_space_get_latch(space), &mtr); mtr_x_lock(fil_space_get_latch(space), &mtr);
seg_inode_page = fut_get_ptr(space, node_addr, RW_X_LATCH, seg_inode_page = fut_get_ptr(space, node_addr,
&mtr) - FSEG_INODE_PAGE_NODE; RW_X_LATCH, &mtr) - FSEG_INODE_PAGE_NODE;
seg_inode = fsp_seg_inode_page_get_nth_inode(seg_inode_page, seg_inode = fsp_seg_inode_page_get_nth_inode(
n, &mtr); seg_inode_page, n, &mtr);
ut_a(ut_dulint_cmp(mach_read_from_8(seg_inode + FSEG_ID), ut_a(ut_dulint_cmp(mach_read_from_8(
seg_inode + FSEG_ID),
ut_dulint_zero) != 0); ut_dulint_zero) != 0);
fseg_print_low(seg_inode, &mtr); fseg_print_low(seg_inode, &mtr);
...@@ -3932,12 +3941,13 @@ fsp_print( ...@@ -3932,12 +3941,13 @@ fsp_print(
mtr_start(&mtr); mtr_start(&mtr);
mtr_x_lock(fil_space_get_latch(space), &mtr); mtr_x_lock(fil_space_get_latch(space), &mtr);
seg_inode_page = fut_get_ptr(space, node_addr, RW_X_LATCH, seg_inode_page = fut_get_ptr(space, node_addr,
&mtr) - FSEG_INODE_PAGE_NODE; RW_X_LATCH, &mtr) - FSEG_INODE_PAGE_NODE;
seg_inode = fsp_seg_inode_page_get_nth_inode(seg_inode_page, seg_inode = fsp_seg_inode_page_get_nth_inode(
n, &mtr); seg_inode_page, n, &mtr);
if (ut_dulint_cmp(mach_read_from_8(seg_inode + FSEG_ID), if (ut_dulint_cmp(mach_read_from_8(
seg_inode + FSEG_ID),
ut_dulint_zero) != 0) { ut_dulint_zero) != 0) {
fseg_print_low(seg_inode, &mtr); fseg_print_low(seg_inode, &mtr);
......
This diff is collapsed.
...@@ -233,10 +233,11 @@ extern my_bool innobase_log_archive, ...@@ -233,10 +233,11 @@ extern my_bool innobase_log_archive,
innobase_file_per_table, innobase_locks_unsafe_for_binlog, innobase_file_per_table, innobase_locks_unsafe_for_binlog,
innobase_create_status_file; innobase_create_status_file;
extern my_bool innobase_very_fast_shutdown; /* set this to 1 just before extern my_bool innobase_very_fast_shutdown; /* set this to 1 just before
calling innobase_end() if you want calling innobase_end() if
InnoDB to shut down without you want InnoDB to shut down
flushing the buffer pool: this without flushing the buffer
is equivalent to a 'crash' */ pool: this is equivalent to
a 'crash' */
extern "C" { extern "C" {
extern ulong srv_max_buf_pool_modified_pct; extern ulong srv_max_buf_pool_modified_pct;
extern ulong srv_max_purge_lag; extern ulong srv_max_purge_lag;
......
...@@ -621,8 +621,9 @@ ibuf_bitmap_page_get_bits( ...@@ -621,8 +621,9 @@ ibuf_bitmap_page_get_bits(
page_t* page, /* in: bitmap page */ page_t* page, /* in: bitmap page */
ulint page_no,/* in: page whose bits to get */ ulint page_no,/* in: page whose bits to get */
ulint bit, /* in: IBUF_BITMAP_FREE, IBUF_BITMAP_BUFFERED, ... */ ulint bit, /* in: IBUF_BITMAP_FREE, IBUF_BITMAP_BUFFERED, ... */
mtr_t* mtr __attribute__((unused))) /* in: mtr containing an x-latch mtr_t* mtr __attribute__((unused))) /* in: mtr containing an
to the bitmap page */ x-latch to the bitmap
page */
{ {
ulint byte_offset; ulint byte_offset;
ulint bit_offset; ulint bit_offset;
...@@ -681,7 +682,8 @@ ibuf_bitmap_page_set_bits( ...@@ -681,7 +682,8 @@ ibuf_bitmap_page_set_bits(
MTR_MEMO_PAGE_X_FIX)); MTR_MEMO_PAGE_X_FIX));
#ifdef UNIV_IBUF_DEBUG #ifdef UNIV_IBUF_DEBUG
ut_a((bit != IBUF_BITMAP_BUFFERED) || (val != FALSE) ut_a((bit != IBUF_BITMAP_BUFFERED) || (val != FALSE)
|| (0 == ibuf_count_get(buf_frame_get_space_id(page), page_no))); || (0 == ibuf_count_get(buf_frame_get_space_id(page),
page_no)));
#endif #endif
bit_offset = (page_no % XDES_DESCRIBED_PER_PAGE) * IBUF_BITS_PER_PAGE bit_offset = (page_no % XDES_DESCRIBED_PER_PAGE) * IBUF_BITS_PER_PAGE
+ bit; + bit;
......
...@@ -82,7 +82,8 @@ buf_pool_is_block( ...@@ -82,7 +82,8 @@ buf_pool_is_block(
void* ptr) /* in: pointer to memory */ void* ptr) /* in: pointer to memory */
{ {
if ((buf_pool->blocks <= (buf_block_t*)ptr) if ((buf_pool->blocks <= (buf_block_t*)ptr)
&& ((buf_block_t*)ptr < buf_pool->blocks + buf_pool->max_size)) { && ((buf_block_t*)ptr < buf_pool->blocks
+ buf_pool->max_size)) {
return(TRUE); return(TRUE);
} }
......
...@@ -147,7 +147,8 @@ dfield_datas_are_binary_equal( ...@@ -147,7 +147,8 @@ dfield_datas_are_binary_equal(
if ((len != field2->len) if ((len != field2->len)
|| ((len != UNIV_SQL_NULL) || ((len != UNIV_SQL_NULL)
&& (0 != ut_memcmp(field1->data, field2->data, len)))) { && (0 != ut_memcmp(field1->data, field2->data,
len)))) {
return(FALSE); return(FALSE);
} }
......
...@@ -42,7 +42,7 @@ Created 5/24/1996 Heikki Tuuri ...@@ -42,7 +42,7 @@ Created 5/24/1996 Heikki Tuuri
#define DB_CANNOT_ADD_CONSTRAINT 38 /* adding a foreign key constraint #define DB_CANNOT_ADD_CONSTRAINT 38 /* adding a foreign key constraint
to a table failed */ to a table failed */
#define DB_CORRUPTION 39 /* data structure corruption noticed */ #define DB_CORRUPTION 39 /* data structure corruption noticed */
#define DB_COL_APPEARS_TWICE_IN_INDEX 40 /* InnoDB cannot handle an index #define DB_COL_APPEARS_TWICE_IN_INDEX 40/* InnoDB cannot handle an index
where same column appears twice */ where same column appears twice */
#define DB_CANNOT_DROP_CONSTRAINT 41 /* dropping a foreign key constraint #define DB_CANNOT_DROP_CONSTRAINT 41 /* dropping a foreign key constraint
from a table failed */ from a table failed */
......
...@@ -25,8 +25,7 @@ UNIV_MEM_ALIGNMENT. In the debug version there are also ...@@ -25,8 +25,7 @@ UNIV_MEM_ALIGNMENT. In the debug version there are also
check fields at the both ends of the field. */ check fields at the both ends of the field. */
#ifdef UNIV_MEM_DEBUG #ifdef UNIV_MEM_DEBUG
#define MEM_SPACE_NEEDED(N) ut_calc_align((N) + MEM_FIELD_HEADER_SIZE\ #define MEM_SPACE_NEEDED(N) ut_calc_align((N) + MEM_FIELD_HEADER_SIZE\
+ MEM_FIELD_TRAILER_SIZE,\ + MEM_FIELD_TRAILER_SIZE, UNIV_MEM_ALIGNMENT)
UNIV_MEM_ALIGNMENT)
#else #else
#define MEM_SPACE_NEEDED(N) ut_calc_align((N), UNIV_MEM_ALIGNMENT) #define MEM_SPACE_NEEDED(N) ut_calc_align((N), UNIV_MEM_ALIGNMENT)
#endif #endif
......
...@@ -68,22 +68,19 @@ Use this macro instead of the corresponding function! Macro for memory ...@@ -68,22 +68,19 @@ Use this macro instead of the corresponding function! Macro for memory
heap creation. */ heap creation. */
#define mem_heap_create(N) mem_heap_create_func(\ #define mem_heap_create(N) mem_heap_create_func(\
(N), NULL, MEM_HEAP_DYNAMIC,\ (N), NULL, MEM_HEAP_DYNAMIC, __FILE__, __LINE__)
__FILE__, __LINE__)
/****************************************************************** /******************************************************************
Use this macro instead of the corresponding function! Macro for memory Use this macro instead of the corresponding function! Macro for memory
heap creation. */ heap creation. */
#define mem_heap_create_in_buffer(N) mem_heap_create_func(\ #define mem_heap_create_in_buffer(N) mem_heap_create_func(\
(N), NULL, MEM_HEAP_BUFFER,\ (N), NULL, MEM_HEAP_BUFFER, __FILE__, __LINE__)
__FILE__, __LINE__)
/****************************************************************** /******************************************************************
Use this macro instead of the corresponding function! Macro for memory Use this macro instead of the corresponding function! Macro for memory
heap creation. */ heap creation. */
#define mem_heap_create_in_btr_search(N) mem_heap_create_func(\ #define mem_heap_create_in_btr_search(N) mem_heap_create_func(\
(N), NULL, MEM_HEAP_BTR_SEARCH |\ (N), NULL, MEM_HEAP_BTR_SEARCH | MEM_HEAP_BUFFER,\
MEM_HEAP_BUFFER,\
__FILE__, __LINE__) __FILE__, __LINE__)
/****************************************************************** /******************************************************************
Use this macro instead of the corresponding function! Macro for fast Use this macro instead of the corresponding function! Macro for fast
...@@ -92,8 +89,7 @@ caller, N is its size, and this memory block is not freed by ...@@ -92,8 +89,7 @@ caller, N is its size, and this memory block is not freed by
mem_heap_free. See the parameter comment in mem_heap_create_func below. */ mem_heap_free. See the parameter comment in mem_heap_create_func below. */
#define mem_heap_fast_create(N, B) mem_heap_create_func(\ #define mem_heap_fast_create(N, B) mem_heap_create_func(\
(N), (B), MEM_HEAP_DYNAMIC,\ (N), (B), MEM_HEAP_DYNAMIC, __FILE__, __LINE__)
__FILE__, __LINE__)
/****************************************************************** /******************************************************************
Use this macro instead of the corresponding function! Macro for memory Use this macro instead of the corresponding function! Macro for memory
......
...@@ -119,10 +119,11 @@ os_mem_alloc_large( ...@@ -119,10 +119,11 @@ os_mem_alloc_large(
/*===============*/ /*===============*/
/* out: allocated memory */ /* out: allocated memory */
ulint n, /* in: number of bytes */ ulint n, /* in: number of bytes */
ibool set_to_zero, /* in: TRUE if allocated memory should be set ibool set_to_zero, /* in: TRUE if allocated memory
to zero if UNIV_SET_MEM_TO_ZERO is defined */ should be set to zero if
ibool assert_on_error); /* in: if TRUE, we crash mysqld if the memory UNIV_SET_MEM_TO_ZERO is defined */
cannot be allocated */ ibool assert_on_error);/* in: if TRUE, we crash mysqld if
the memory cannot be allocated */
/******************************************************************** /********************************************************************
Frees large pages memory. */ Frees large pages memory. */
......
...@@ -233,6 +233,7 @@ que_thr_peek_stop( ...@@ -233,6 +233,7 @@ que_thr_peek_stop(
|| trx->que_state == TRX_QUE_LOCK_WAIT || trx->que_state == TRX_QUE_LOCK_WAIT
|| (UT_LIST_GET_LEN(trx->signals) > 0 || (UT_LIST_GET_LEN(trx->signals) > 0
&& trx->que_state == TRX_QUE_RUNNING)) { && trx->que_state == TRX_QUE_RUNNING)) {
return(TRUE); return(TRUE);
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment