Commit 454b0192 authored by unknown's avatar unknown

Remove constant parameter MLOG_8BYTES from mtr_read_dulint() and mlog_write_dulint()

parent e1cb1ca6
...@@ -65,7 +65,7 @@ dict_hdr_get_new_id( ...@@ -65,7 +65,7 @@ dict_hdr_get_new_id(
dict_hdr = dict_hdr_get(&mtr); dict_hdr = dict_hdr_get(&mtr);
id = mtr_read_dulint(dict_hdr + type, MLOG_8BYTES, &mtr); id = mtr_read_dulint(dict_hdr + type, &mtr);
/* Add some dummy code here because otherwise pgcc seems to /* Add some dummy code here because otherwise pgcc seems to
compile wrong */ compile wrong */
...@@ -76,7 +76,7 @@ dict_hdr_get_new_id( ...@@ -76,7 +76,7 @@ dict_hdr_get_new_id(
id = ut_dulint_add(id, 1); id = ut_dulint_add(id, 1);
mlog_write_dulint(dict_hdr + type, id, MLOG_8BYTES, &mtr); mlog_write_dulint(dict_hdr + type, id, &mtr);
mtr_commit(&mtr); mtr_commit(&mtr);
...@@ -105,7 +105,7 @@ dict_hdr_flush_row_id(void) ...@@ -105,7 +105,7 @@ dict_hdr_flush_row_id(void)
dict_hdr = dict_hdr_get(&mtr); dict_hdr = dict_hdr_get(&mtr);
mlog_write_dulint(dict_hdr + DICT_HDR_ROW_ID, id, MLOG_8BYTES, &mtr); mlog_write_dulint(dict_hdr + DICT_HDR_ROW_ID, id, &mtr);
mtr_commit(&mtr); mtr_commit(&mtr);
} }
...@@ -141,20 +141,16 @@ dict_hdr_create( ...@@ -141,20 +141,16 @@ dict_hdr_create(
/* Start counting row, table, index, and tree ids from /* Start counting row, table, index, and tree ids from
DICT_HDR_FIRST_ID */ DICT_HDR_FIRST_ID */
mlog_write_dulint(dict_header + DICT_HDR_ROW_ID, mlog_write_dulint(dict_header + DICT_HDR_ROW_ID,
ut_dulint_create(0, DICT_HDR_FIRST_ID), ut_dulint_create(0, DICT_HDR_FIRST_ID), mtr);
MLOG_8BYTES, mtr);
mlog_write_dulint(dict_header + DICT_HDR_TABLE_ID, mlog_write_dulint(dict_header + DICT_HDR_TABLE_ID,
ut_dulint_create(0, DICT_HDR_FIRST_ID), ut_dulint_create(0, DICT_HDR_FIRST_ID), mtr);
MLOG_8BYTES, mtr);
mlog_write_dulint(dict_header + DICT_HDR_INDEX_ID, mlog_write_dulint(dict_header + DICT_HDR_INDEX_ID,
ut_dulint_create(0, DICT_HDR_FIRST_ID), ut_dulint_create(0, DICT_HDR_FIRST_ID), mtr);
MLOG_8BYTES, mtr);
mlog_write_dulint(dict_header + DICT_HDR_MIX_ID, mlog_write_dulint(dict_header + DICT_HDR_MIX_ID,
ut_dulint_create(0, DICT_HDR_FIRST_ID), ut_dulint_create(0, DICT_HDR_FIRST_ID), mtr);
MLOG_8BYTES, mtr);
/* Create the B-tree roots for the clustered indexes of the basic /* Create the B-tree roots for the clustered indexes of the basic
system tables */ system tables */
...@@ -250,7 +246,7 @@ dict_boot(void) ...@@ -250,7 +246,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,
MLOG_8BYTES, &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);
......
...@@ -868,8 +868,7 @@ fsp_header_init( ...@@ -868,8 +868,7 @@ fsp_header_init(
flst_init(header + FSP_SEG_INODES_FULL, mtr); flst_init(header + FSP_SEG_INODES_FULL, mtr);
flst_init(header + FSP_SEG_INODES_FREE, mtr); flst_init(header + FSP_SEG_INODES_FREE, mtr);
mlog_write_dulint(header + FSP_SEG_ID, ut_dulint_create(0, 1), mlog_write_dulint(header + FSP_SEG_ID, ut_dulint_create(0, 1), mtr);
MLOG_8BYTES, mtr);
fsp_fill_free_list(space, header, mtr); fsp_fill_free_list(space, header, mtr);
btr_create(DICT_CLUSTERED | DICT_UNIVERSAL | DICT_IBUF, space, btr_create(DICT_CLUSTERED | DICT_UNIVERSAL | DICT_IBUF, space,
...@@ -1553,8 +1552,7 @@ fsp_alloc_seg_inode_page( ...@@ -1553,8 +1552,7 @@ fsp_alloc_seg_inode_page(
inode = fsp_seg_inode_page_get_nth_inode(page, i, mtr); inode = fsp_seg_inode_page_get_nth_inode(page, i, mtr);
mlog_write_dulint(inode + FSEG_ID, ut_dulint_zero, mlog_write_dulint(inode + FSEG_ID, ut_dulint_zero, mtr);
MLOG_8BYTES, mtr);
} }
flst_add_last(space_header + FSP_SEG_INODES_FREE, flst_add_last(space_header + FSP_SEG_INODES_FREE,
...@@ -1649,7 +1647,7 @@ fsp_free_seg_inode( ...@@ -1649,7 +1647,7 @@ fsp_free_seg_inode(
page + FSEG_INODE_PAGE_NODE, mtr); page + FSEG_INODE_PAGE_NODE, mtr);
} }
mlog_write_dulint(inode + FSEG_ID, ut_dulint_zero, MLOG_8BYTES, mtr); mlog_write_dulint(inode + FSEG_ID, ut_dulint_zero, mtr);
mlog_write_ulint(inode + FSEG_MAGIC_N, 0, MLOG_4BYTES, mtr); mlog_write_ulint(inode + FSEG_MAGIC_N, 0, MLOG_4BYTES, mtr);
if (ULINT_UNDEFINED == fsp_seg_inode_page_find_used(page, mtr)) { if (ULINT_UNDEFINED == fsp_seg_inode_page_find_used(page, mtr)) {
...@@ -1883,12 +1881,12 @@ fseg_create_general( ...@@ -1883,12 +1881,12 @@ fseg_create_general(
/* Read the next segment id from space header and increment the /* Read the next segment id from space header and increment the
value in space header */ value in space header */
seg_id = mtr_read_dulint(space_header + FSP_SEG_ID, MLOG_8BYTES, mtr); seg_id = mtr_read_dulint(space_header + FSP_SEG_ID, mtr);
mlog_write_dulint(space_header + FSP_SEG_ID, ut_dulint_add(seg_id, 1), mlog_write_dulint(space_header + FSP_SEG_ID, ut_dulint_add(seg_id, 1),
MLOG_8BYTES, mtr); mtr);
mlog_write_dulint(inode + FSEG_ID, seg_id, MLOG_8BYTES, mtr); mlog_write_dulint(inode + FSEG_ID, seg_id, mtr);
mlog_write_ulint(inode + FSEG_NOT_FULL_N_USED, 0, MLOG_4BYTES, mtr); mlog_write_ulint(inode + FSEG_NOT_FULL_N_USED, 0, MLOG_4BYTES, mtr);
flst_init(inode + FSEG_FREE, mtr); flst_init(inode + FSEG_FREE, mtr);
...@@ -2070,8 +2068,8 @@ fseg_fill_free_list( ...@@ -2070,8 +2068,8 @@ fseg_fill_free_list(
xdes_set_state(descr, XDES_FSEG, mtr); xdes_set_state(descr, XDES_FSEG, mtr);
seg_id = mtr_read_dulint(inode + FSEG_ID, MLOG_8BYTES, mtr); seg_id = mtr_read_dulint(inode + FSEG_ID, mtr);
mlog_write_dulint(descr + XDES_ID, seg_id, MLOG_8BYTES, mtr); mlog_write_dulint(descr + XDES_ID, seg_id, mtr);
flst_add_last(inode + FSEG_FREE, descr + XDES_FLST_NODE, mtr); flst_add_last(inode + FSEG_FREE, descr + XDES_FLST_NODE, mtr);
hint += FSP_EXTENT_SIZE; hint += FSP_EXTENT_SIZE;
...@@ -2112,10 +2110,10 @@ fseg_alloc_free_extent( ...@@ -2112,10 +2110,10 @@ fseg_alloc_free_extent(
return(NULL); return(NULL);
} }
seg_id = mtr_read_dulint(inode + FSEG_ID, MLOG_8BYTES, mtr); seg_id = mtr_read_dulint(inode + FSEG_ID, mtr);
xdes_set_state(descr, XDES_FSEG, mtr); xdes_set_state(descr, XDES_FSEG, mtr);
mlog_write_dulint(descr + XDES_ID, seg_id, MLOG_8BYTES, mtr); mlog_write_dulint(descr + XDES_ID, seg_id, mtr);
flst_add_last(inode + FSEG_FREE, descr + XDES_FLST_NODE, mtr); flst_add_last(inode + FSEG_FREE, descr + XDES_FLST_NODE, mtr);
/* Try to fill the segment free list */ /* Try to fill the segment free list */
...@@ -2162,7 +2160,7 @@ fseg_alloc_free_page_low( ...@@ -2162,7 +2160,7 @@ fseg_alloc_free_page_low(
ut_ad((direction >= FSP_UP) && (direction <= FSP_NO_DIR)); ut_ad((direction >= FSP_UP) && (direction <= FSP_NO_DIR));
ut_ad(mach_read_from_4(seg_inode + FSEG_MAGIC_N) == ut_ad(mach_read_from_4(seg_inode + FSEG_MAGIC_N) ==
FSEG_MAGIC_N_VALUE); FSEG_MAGIC_N_VALUE);
seg_id = mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr); seg_id = mtr_read_dulint(seg_inode + FSEG_ID, mtr);
ut_ad(ut_dulint_cmp(seg_id, ut_dulint_zero) > 0); ut_ad(ut_dulint_cmp(seg_id, ut_dulint_zero) > 0);
...@@ -2181,8 +2179,7 @@ fseg_alloc_free_page_low( ...@@ -2181,8 +2179,7 @@ fseg_alloc_free_page_low(
/*-------------------------------------------------------------*/ /*-------------------------------------------------------------*/
if ((xdes_get_state(descr, mtr) == XDES_FSEG) if ((xdes_get_state(descr, mtr) == XDES_FSEG)
&& (0 == ut_dulint_cmp(mtr_read_dulint(descr + XDES_ID, && (0 == ut_dulint_cmp(mtr_read_dulint(descr + XDES_ID,
MLOG_8BYTES, mtr), mtr), seg_id))
seg_id))
&& (xdes_get_bit(descr, XDES_FREE_BIT, && (xdes_get_bit(descr, XDES_FREE_BIT,
hint % FSP_EXTENT_SIZE, mtr) == TRUE)) { hint % FSP_EXTENT_SIZE, mtr) == TRUE)) {
...@@ -2204,8 +2201,7 @@ fseg_alloc_free_page_low( ...@@ -2204,8 +2201,7 @@ fseg_alloc_free_page_low(
ut_a(ret_descr == descr); ut_a(ret_descr == descr);
xdes_set_state(ret_descr, XDES_FSEG, mtr); xdes_set_state(ret_descr, XDES_FSEG, mtr);
mlog_write_dulint(ret_descr + XDES_ID, seg_id, MLOG_8BYTES, mlog_write_dulint(ret_descr + XDES_ID, seg_id, mtr);
mtr);
flst_add_last(seg_inode + FSEG_FREE, flst_add_last(seg_inode + FSEG_FREE,
ret_descr + XDES_FLST_NODE, mtr); ret_descr + XDES_FLST_NODE, mtr);
...@@ -2234,8 +2230,7 @@ fseg_alloc_free_page_low( ...@@ -2234,8 +2230,7 @@ fseg_alloc_free_page_low(
/*-------------------------------------------------------------*/ /*-------------------------------------------------------------*/
} else if ((xdes_get_state(descr, mtr) == XDES_FSEG) } else if ((xdes_get_state(descr, mtr) == XDES_FSEG)
&& (0 == ut_dulint_cmp(mtr_read_dulint(descr + XDES_ID, && (0 == ut_dulint_cmp(mtr_read_dulint(descr + XDES_ID,
MLOG_8BYTES, mtr), mtr), seg_id))
seg_id))
&& (!xdes_is_full(descr, mtr))) { && (!xdes_is_full(descr, mtr))) {
/* 4. We can take the page from the same extent as the /* 4. We can take the page from the same extent as the
...@@ -2743,18 +2738,18 @@ fseg_free_page_low( ...@@ -2743,18 +2738,18 @@ fseg_free_page_low(
"InnoDB: segment %lu %lu.\n", "InnoDB: segment %lu %lu.\n",
space, page, space, page,
ut_dulint_get_high( ut_dulint_get_high(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr)), mtr_read_dulint(descr + XDES_ID, mtr)),
ut_dulint_get_low( ut_dulint_get_low(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr)), mtr_read_dulint(descr + XDES_ID, mtr)),
ut_dulint_get_high( ut_dulint_get_high(
mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr)), mtr_read_dulint(seg_inode + FSEG_ID, mtr)),
ut_dulint_get_low( ut_dulint_get_low(
mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr))); mtr_read_dulint(seg_inode + FSEG_ID, mtr)));
*/ */
/* If we get here, the page is in some extent of the segment */ /* If we get here, the page is in some extent of the segment */
if (0 != ut_dulint_cmp( if (0 != ut_dulint_cmp(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr), mtr_read_dulint(descr + XDES_ID, mtr),
mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr))) { mtr_read_dulint(seg_inode + FSEG_ID, mtr))) {
ut_sprintf_buf(errbuf, descr, 40); ut_sprintf_buf(errbuf, descr, 40);
fprintf(stderr, fprintf(stderr,
...@@ -2772,21 +2767,21 @@ fseg_free_page_low( ...@@ -2772,21 +2767,21 @@ fseg_free_page_low(
"InnoDB: to segment %lu %lu.\n", "InnoDB: to segment %lu %lu.\n",
space, page, space, page,
ut_dulint_get_high( ut_dulint_get_high(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr)), mtr_read_dulint(descr + XDES_ID, mtr)),
ut_dulint_get_low( ut_dulint_get_low(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr)), mtr_read_dulint(descr + XDES_ID, mtr)),
ut_dulint_get_high( ut_dulint_get_high(
mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr)), mtr_read_dulint(seg_inode + FSEG_ID, mtr)),
ut_dulint_get_low( ut_dulint_get_low(
mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr))); mtr_read_dulint(seg_inode + FSEG_ID, mtr)));
#else #else
/* More pedantic usage to avoid VC++ 6.0 compiler errors due to inline /* More pedantic usage to avoid VC++ 6.0 compiler errors due to inline
function expansion issues */ function expansion issues */
desm = mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr); desm = mtr_read_dulint(descr + XDES_ID, mtr);
segm = mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr); segm = mtr_read_dulint(seg_inode + FSEG_ID, mtr);
fprintf(stderr, fprintf(stderr,
"InnoDB: Serious error: InnoDB is trying to free space %lu page %lu,\n" "InnoDB: Serious error: InnoDB is trying to free space %lu page %lu,\n"
...@@ -2886,8 +2881,8 @@ fseg_free_extent( ...@@ -2886,8 +2881,8 @@ fseg_free_extent(
ut_a(xdes_get_state(descr, mtr) == XDES_FSEG); ut_a(xdes_get_state(descr, mtr) == XDES_FSEG);
ut_a(0 == ut_dulint_cmp( ut_a(0 == ut_dulint_cmp(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr), mtr_read_dulint(descr + XDES_ID, mtr),
mtr_read_dulint(seg_inode + FSEG_ID, MLOG_8BYTES, mtr))); mtr_read_dulint(seg_inode + FSEG_ID, mtr)));
first_page_in_extent = page - (page % FSP_EXTENT_SIZE); first_page_in_extent = page - (page % FSP_EXTENT_SIZE);
...@@ -3179,7 +3174,7 @@ fseg_validate_low( ...@@ -3179,7 +3174,7 @@ fseg_validate_low(
space = buf_frame_get_space_id(inode); space = buf_frame_get_space_id(inode);
seg_id = mtr_read_dulint(inode + FSEG_ID, MLOG_8BYTES, mtr2); seg_id = mtr_read_dulint(inode + FSEG_ID, mtr2);
n_used = mtr_read_ulint(inode + FSEG_NOT_FULL_N_USED, n_used = mtr_read_ulint(inode + FSEG_NOT_FULL_N_USED,
MLOG_4BYTES, mtr2); MLOG_4BYTES, mtr2);
flst_validate(inode + FSEG_FREE, mtr2); flst_validate(inode + FSEG_FREE, mtr2);
...@@ -3198,8 +3193,7 @@ fseg_validate_low( ...@@ -3198,8 +3193,7 @@ fseg_validate_low(
ut_a(xdes_get_n_used(descr, &mtr) == 0); ut_a(xdes_get_n_used(descr, &mtr) == 0);
ut_a(xdes_get_state(descr, &mtr) == XDES_FSEG); ut_a(xdes_get_state(descr, &mtr) == XDES_FSEG);
ut_a(0 == ut_dulint_cmp( ut_a(0 == ut_dulint_cmp(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr_read_dulint(descr + XDES_ID, &mtr), seg_id));
&mtr), seg_id));
node_addr = flst_get_next_addr(descr + XDES_FLST_NODE, &mtr); node_addr = flst_get_next_addr(descr + XDES_FLST_NODE, &mtr);
mtr_commit(&mtr); mtr_commit(&mtr);
...@@ -3219,8 +3213,7 @@ fseg_validate_low( ...@@ -3219,8 +3213,7 @@ fseg_validate_low(
ut_a(xdes_get_n_used(descr, &mtr) < FSP_EXTENT_SIZE); ut_a(xdes_get_n_used(descr, &mtr) < FSP_EXTENT_SIZE);
ut_a(xdes_get_state(descr, &mtr) == XDES_FSEG); ut_a(xdes_get_state(descr, &mtr) == XDES_FSEG);
ut_a(0 == ut_dulint_cmp( ut_a(0 == ut_dulint_cmp(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr_read_dulint(descr + XDES_ID, &mtr), seg_id));
&mtr), seg_id));
n_used2 += xdes_get_n_used(descr, &mtr); n_used2 += xdes_get_n_used(descr, &mtr);
...@@ -3241,8 +3234,7 @@ fseg_validate_low( ...@@ -3241,8 +3234,7 @@ fseg_validate_low(
ut_a(xdes_get_n_used(descr, &mtr) == FSP_EXTENT_SIZE); ut_a(xdes_get_n_used(descr, &mtr) == FSP_EXTENT_SIZE);
ut_a(xdes_get_state(descr, &mtr) == XDES_FSEG); ut_a(xdes_get_state(descr, &mtr) == XDES_FSEG);
ut_a(0 == ut_dulint_cmp( ut_a(0 == ut_dulint_cmp(
mtr_read_dulint(descr + XDES_ID, MLOG_8BYTES, mtr_read_dulint(descr + XDES_ID, &mtr), seg_id));
&mtr), seg_id));
node_addr = flst_get_next_addr(descr + XDES_FLST_NODE, &mtr); node_addr = flst_get_next_addr(descr + XDES_FLST_NODE, &mtr);
mtr_commit(&mtr); mtr_commit(&mtr);
...@@ -3307,7 +3299,7 @@ fseg_print_low( ...@@ -3307,7 +3299,7 @@ fseg_print_low(
reserved = fseg_n_reserved_pages_low(inode, &used, mtr); reserved = fseg_n_reserved_pages_low(inode, &used, mtr);
d_var = mtr_read_dulint(inode + FSEG_ID, MLOG_8BYTES, mtr); d_var = mtr_read_dulint(inode + FSEG_ID, mtr);
seg_id_low = ut_dulint_get_low(d_var); seg_id_low = ut_dulint_get_low(d_var);
seg_id_high = ut_dulint_get_high(d_var); seg_id_high = ut_dulint_get_high(d_var);
...@@ -3623,7 +3615,7 @@ fsp_print( ...@@ -3623,7 +3615,7 @@ fsp_print(
n_free_frag = flst_get_len(header + FSP_FREE_FRAG, &mtr); n_free_frag = flst_get_len(header + FSP_FREE_FRAG, &mtr);
n_full_frag = flst_get_len(header + FSP_FULL_FRAG, &mtr); n_full_frag = flst_get_len(header + FSP_FULL_FRAG, &mtr);
d_var = mtr_read_dulint(header + FSP_SEG_ID, MLOG_8BYTES, &mtr); d_var = mtr_read_dulint(header + FSP_SEG_ID, &mtr);
seg_id_low = ut_dulint_get_low(d_var); seg_id_low = ut_dulint_get_low(d_var);
seg_id_high = ut_dulint_get_high(d_var); seg_id_high = ut_dulint_get_high(d_var);
......
...@@ -45,8 +45,7 @@ btr_page_set_index_id( ...@@ -45,8 +45,7 @@ btr_page_set_index_id(
dulint id, /* in: index id */ dulint id, /* in: index id */
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /* in: mtr */
{ {
mlog_write_dulint(page + PAGE_HEADER + PAGE_INDEX_ID, id, mlog_write_dulint(page + PAGE_HEADER + PAGE_INDEX_ID, id, mtr);
MLOG_8BYTES, mtr);
} }
/****************************************************************** /******************************************************************
......
...@@ -32,7 +32,6 @@ mlog_write_dulint( ...@@ -32,7 +32,6 @@ mlog_write_dulint(
/*==============*/ /*==============*/
byte* ptr, /* in: pointer where to write */ byte* ptr, /* in: pointer where to write */
dulint val, /* in: value to write */ dulint val, /* in: value to write */
byte type, /* in: MLOG_8BYTES */
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************ /************************************************************
Writes a string to a file page buffered in the buffer pool. Writes the Writes a string to a file page buffered in the buffer pool. Writes the
......
...@@ -189,7 +189,6 @@ mtr_read_dulint( ...@@ -189,7 +189,6 @@ mtr_read_dulint(
/*===========*/ /*===========*/
/* out: value read */ /* out: value read */
byte* ptr, /* in: pointer from where to read */ byte* ptr, /* in: pointer from where to read */
ulint type, /* in: MLOG_8BYTES */
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************* /*************************************************************************
This macro locks an rw-lock in s-mode. */ This macro locks an rw-lock in s-mode. */
......
...@@ -261,7 +261,6 @@ mlog_write_dulint( ...@@ -261,7 +261,6 @@ mlog_write_dulint(
/*==============*/ /*==============*/
byte* ptr, /* in: pointer where to write */ byte* ptr, /* in: pointer where to write */
dulint val, /* in: value to write */ dulint val, /* in: value to write */
byte type, /* in: MLOG_8BYTES */
mtr_t* mtr) /* in: mini-transaction handle */ mtr_t* mtr) /* in: mini-transaction handle */
{ {
byte* log_ptr; byte* log_ptr;
...@@ -274,7 +273,6 @@ mlog_write_dulint( ...@@ -274,7 +273,6 @@ mlog_write_dulint(
} }
ut_ad(ptr && mtr); ut_ad(ptr && mtr);
ut_ad(type == MLOG_8BYTES);
mach_write_to_8(ptr, val); mach_write_to_8(ptr, val);
...@@ -286,7 +284,8 @@ mlog_write_dulint( ...@@ -286,7 +284,8 @@ mlog_write_dulint(
return; return;
} }
log_ptr = mlog_write_initial_log_record_fast(ptr, type, log_ptr, mtr); log_ptr = mlog_write_initial_log_record_fast(ptr, MLOG_8BYTES,
log_ptr, mtr);
mach_write_to_2(log_ptr, ptr - buf_frame_align(ptr)); mach_write_to_2(log_ptr, ptr - buf_frame_align(ptr));
log_ptr += 2; log_ptr += 2;
......
...@@ -495,13 +495,11 @@ mtr_read_dulint( ...@@ -495,13 +495,11 @@ mtr_read_dulint(
/*===========*/ /*===========*/
/* out: value read */ /* out: value read */
byte* ptr, /* in: pointer from where to read */ byte* ptr, /* in: pointer from where to read */
ulint type __attribute__((unused)), /* in: MLOG_8BYTES */
mtr_t* mtr __attribute__((unused))) mtr_t* mtr __attribute__((unused)))
/* in: mini-transaction handle */ /* in: mini-transaction handle */
{ {
ut_ad(mtr->state == MTR_ACTIVE); ut_ad(mtr->state == MTR_ACTIVE);
ut_ad(ptr && mtr); ut_ad(ptr && mtr);
ut_ad(type == MLOG_8BYTES);
ut_ad(mtr_memo_contains(mtr, buf_block_align(ptr), ut_ad(mtr_memo_contains(mtr, buf_block_align(ptr),
MTR_MEMO_PAGE_S_FIX) || MTR_MEMO_PAGE_S_FIX) ||
mtr_memo_contains(mtr, buf_block_align(ptr), mtr_memo_contains(mtr, buf_block_align(ptr),
......
...@@ -297,8 +297,7 @@ trx_purge_add_update_undo_to_history( ...@@ -297,8 +297,7 @@ trx_purge_add_update_undo_to_history(
undo_header + TRX_UNDO_HISTORY_NODE, mtr); undo_header + TRX_UNDO_HISTORY_NODE, mtr);
/* Write the trx number to the undo log header */ /* Write the trx number to the undo log header */
mlog_write_dulint(undo_header + TRX_UNDO_TRX_NO, trx->no, MLOG_8BYTES, mlog_write_dulint(undo_header + TRX_UNDO_TRX_NO, trx->no, mtr);
mtr);
/* Write information about delete markings to the undo log header */ /* Write information about delete markings to the undo log header */
if (!undo->del_marks) { if (!undo->del_marks) {
......
...@@ -179,8 +179,7 @@ trx_rseg_mem_create( ...@@ -179,8 +179,7 @@ trx_rseg_mem_create(
+ node_addr.boffset; + node_addr.boffset;
rseg->last_trx_no = mtr_read_dulint( rseg->last_trx_no = mtr_read_dulint(
undo_log_hdr + TRX_UNDO_TRX_NO, undo_log_hdr + TRX_UNDO_TRX_NO, mtr);
MLOG_8BYTES, mtr);
rseg->last_del_marks = mtr_read_ulint( rseg->last_del_marks = mtr_read_ulint(
undo_log_hdr + TRX_UNDO_DEL_MARKS, undo_log_hdr + TRX_UNDO_DEL_MARKS,
MLOG_2BYTES, mtr); MLOG_2BYTES, mtr);
......
...@@ -536,7 +536,7 @@ trx_sys_flush_max_trx_id(void) ...@@ -536,7 +536,7 @@ trx_sys_flush_max_trx_id(void)
sys_header = trx_sysf_get(&mtr); sys_header = trx_sysf_get(&mtr);
mlog_write_dulint(sys_header + TRX_SYS_TRX_ID_STORE, mlog_write_dulint(sys_header + TRX_SYS_TRX_ID_STORE,
trx_sys->max_trx_id, MLOG_8BYTES, &mtr); trx_sys->max_trx_id, &mtr);
mtr_commit(&mtr); mtr_commit(&mtr);
} }
...@@ -784,7 +784,7 @@ trx_sysf_create( ...@@ -784,7 +784,7 @@ trx_sysf_create(
/* Start counting transaction ids from number 1 up */ /* Start counting transaction ids from number 1 up */
mlog_write_dulint(sys_header + TRX_SYS_TRX_ID_STORE, mlog_write_dulint(sys_header + TRX_SYS_TRX_ID_STORE,
ut_dulint_create(0, 1), MLOG_8BYTES, mtr); ut_dulint_create(0, 1), mtr);
/* Reset the rollback segment slots */ /* Reset the rollback segment slots */
for (i = 0; i < TRX_SYS_N_RSEGS; i++) { for (i = 0; i < TRX_SYS_N_RSEGS; i++) {
...@@ -839,8 +839,7 @@ trx_sys_init_at_db_start(void) ...@@ -839,8 +839,7 @@ trx_sys_init_at_db_start(void)
trx_sys->max_trx_id = ut_dulint_add( trx_sys->max_trx_id = ut_dulint_add(
ut_dulint_align_up( ut_dulint_align_up(
mtr_read_dulint(sys_header mtr_read_dulint(sys_header
+ TRX_SYS_TRX_ID_STORE, + TRX_SYS_TRX_ID_STORE, &mtr),
MLOG_8BYTES, &mtr),
TRX_SYS_TRX_ID_WRITE_MARGIN), TRX_SYS_TRX_ID_WRITE_MARGIN),
2 * TRX_SYS_TRX_ID_WRITE_MARGIN); 2 * TRX_SYS_TRX_ID_WRITE_MARGIN);
......
...@@ -1145,8 +1145,7 @@ trx_undo_mem_create_at_db_start( ...@@ -1145,8 +1145,7 @@ trx_undo_mem_create_at_db_start(
undo_header = undo_page + offset; undo_header = undo_page + offset;
trx_id = mtr_read_dulint(undo_header + TRX_UNDO_TRX_ID, MLOG_8BYTES, trx_id = mtr_read_dulint(undo_header + TRX_UNDO_TRX_ID, mtr);
mtr);
mutex_enter(&(rseg->mutex)); mutex_enter(&(rseg->mutex));
undo = trx_undo_mem_create(rseg, id, type, trx_id, page_no, offset); undo = trx_undo_mem_create(rseg, id, type, trx_id, page_no, offset);
...@@ -1156,8 +1155,7 @@ trx_undo_mem_create_at_db_start( ...@@ -1156,8 +1155,7 @@ trx_undo_mem_create_at_db_start(
undo->dict_operation = mtr_read_ulint( undo->dict_operation = mtr_read_ulint(
undo_header + TRX_UNDO_DICT_OPERATION, undo_header + TRX_UNDO_DICT_OPERATION,
MLOG_2BYTES, mtr); MLOG_2BYTES, mtr);
undo->table_id = mtr_read_dulint(undo_header + TRX_UNDO_TABLE_ID, undo->table_id = mtr_read_dulint(undo_header + TRX_UNDO_TABLE_ID, mtr);
MLOG_8BYTES, mtr);
undo->state = state; undo->state = state;
undo->size = flst_get_len(seg_header + TRX_UNDO_PAGE_LIST, mtr); undo->size = flst_get_len(seg_header + TRX_UNDO_PAGE_LIST, mtr);
...@@ -1511,7 +1509,7 @@ trx_undo_mark_as_dict_operation( ...@@ -1511,7 +1509,7 @@ trx_undo_mark_as_dict_operation(
trx->dict_operation, MLOG_2BYTES, mtr); trx->dict_operation, MLOG_2BYTES, mtr);
mlog_write_dulint(hdr_page + undo->hdr_offset + TRX_UNDO_TABLE_ID, mlog_write_dulint(hdr_page + undo->hdr_offset + TRX_UNDO_TABLE_ID,
trx->table_id, MLOG_8BYTES, mtr); trx->table_id, mtr);
undo->dict_operation = trx->dict_operation; undo->dict_operation = trx->dict_operation;
undo->table_id = trx->table_id; undo->table_id = trx->table_id;
......
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