MySQL 5.6.14 Source Code Document
|
#include "fsp0fsp.h"
#include "buf0buf.h"
#include "fil0fil.h"
#include "mtr0log.h"
#include "ut0byte.h"
#include "page0page.h"
#include "page0zip.h"
#include "sync0sync.h"
#include "fut0fut.h"
#include "srv0srv.h"
#include "ibuf0ibuf.h"
#include "btr0btr.h"
#include "btr0sea.h"
#include "dict0boot.h"
#include "log0log.h"
#include "dict0mem.h"
#include "srv0start.h"
Go to the source code of this file.
Functions | |
UNIV_INTERN ulint | fsp_get_size_low (page_t *page) |
UNIV_INLINE fsp_header_t * | fsp_get_space_header (ulint id, ulint zip_size, mtr_t *mtr) |
UNIV_INLINE ibool | xdes_mtr_get_bit (const xdes_t *descr, ulint bit, ulint offset, mtr_t *mtr) |
UNIV_INLINE void | xdes_set_bit (xdes_t *descr, ulint bit, ulint offset, ibool val, mtr_t *mtr) |
UNIV_INLINE ulint | xdes_find_bit (xdes_t *descr, ulint bit, ibool val, ulint hint, mtr_t *mtr) |
UNIV_INLINE ulint | xdes_find_bit_downward (xdes_t *descr, ulint bit, ibool val, ulint hint, mtr_t *mtr) |
UNIV_INLINE ulint | xdes_get_n_used (const xdes_t *descr, mtr_t *mtr) |
UNIV_INLINE ibool | xdes_is_free (const xdes_t *descr, mtr_t *mtr) |
UNIV_INLINE ibool | xdes_is_full (const xdes_t *descr, mtr_t *mtr) |
UNIV_INLINE void | xdes_set_state (xdes_t *descr, ulint state, mtr_t *mtr) |
UNIV_INLINE ulint | xdes_get_state (const xdes_t *descr, mtr_t *mtr) |
UNIV_INLINE void | xdes_init (xdes_t *descr, mtr_t *mtr) |
UNIV_INLINE | __attribute__ ((nonnull, warn_unused_result)) xdes_t *xdes_get_descriptor_with_space_hdr(fsp_header_t *sp_header |
ut_ad (mtr_memo_contains(mtr, fil_space_get_latch(space, NULL), MTR_MEMO_X_LOCK)) | |
ut_ad (mtr_memo_contains_page(mtr, sp_header, MTR_MEMO_PAGE_X_FIX)) | |
ut_ad (page_offset(sp_header)==FSP_HEADER_OFFSET) | |
if ((offset >=size)||(offset >=limit)) | |
if (descr_page_no==0) |
Variables | |
static ulint | page |
static ulint xdes_t * | descr |
static ulint xdes_t mtr_t * | mtr |
static buf_block_t | nonnull |
UNIV_INLINE ulint | space |
UNIV_INLINE ulint ulint | offset |
UNIV_INLINE ulint ulint mtr_t *mtr ulint | limit = mach_read_from_4(sp_header + FSP_FREE_LIMIT) |
ulint | size = mach_read_from_4(sp_header + FSP_SIZE) |
ulint | zip_size |
ulint | descr_page_no = xdes_calc_descriptor_page(zip_size, offset) |
page_t * | descr_page |
static __attribute__ | ( | (nonnull, warn_unused_result) | ) |
Gets pointer to a the extent descriptor of a page. The page where the extent descriptor resides is x-locked. This function no longer extends the data file.
Gets pointer to a the extent descriptor of a page. The page where the extent descriptor resides is x-locked. If the page offset is equal to the free limit of the space, adds new extents from above the free limit to the space free list, if not free limit == space size. This adding is necessary to make the descriptor defined, as they are uninitialized above the free limit.
Removes a secondary index entry if found.
Opens a log file.
UNIV_INTERN ulint fsp_get_size_low | ( | page_t * | page | ) |
Reads the file space size stored in the header page.
page | in: header page (page 0 in the tablespace) |
Definition at line 172 of file fsp0fsp.cc.
UNIV_INLINE fsp_header_t* fsp_get_space_header | ( | ulint | id, |
ulint | zip_size, | ||
mtr_t * | mtr | ||
) |
Gets a pointer to the space header and x-locks its page.
id | in: space id |
zip_size | in: compressed page size in bytes or 0 for uncompressed pages |
mtr | in/out: mini-transaction |
Definition at line 185 of file fsp0fsp.cc.
UNIV_INLINE ulint xdes_find_bit | ( | xdes_t * | descr, |
ulint | bit, | ||
ibool | val, | ||
ulint | hint, | ||
mtr_t * | mtr | ||
) |
Looks for a descriptor bit having the desired value. Starts from hint and scans upward; at the end of the extent the search is wrapped to the start of the extent.
descr | in: descriptor |
bit | in: XDES_FREE_BIT or XDES_CLEAN_BIT |
val | in: desired bit value |
hint | in: hint of which bit position would be desirable |
mtr | in/out: mini-transaction |
Definition at line 271 of file fsp0fsp.cc.
UNIV_INLINE ulint xdes_find_bit_downward | ( | xdes_t * | descr, |
ulint | bit, | ||
ibool | val, | ||
ulint | hint, | ||
mtr_t * | mtr | ||
) |
Looks for a descriptor bit having the desired value. Scans the extent in a direction opposite to xdes_find_bit.
descr | in: descriptor |
bit | in: XDES_FREE_BIT or XDES_CLEAN_BIT |
val | in: desired bit value |
hint | in: hint of which bit position would be desirable |
mtr | in/out: mini-transaction |
Definition at line 309 of file fsp0fsp.cc.
UNIV_INLINE ulint xdes_get_n_used | ( | const xdes_t * | descr, |
mtr_t * | mtr | ||
) |
Returns the number of used pages in a descriptor.
descr | in: descriptor |
mtr | in/out: mini-transaction |
Definition at line 346 of file fsp0fsp.cc.
UNIV_INLINE ulint xdes_get_state | ( | const xdes_t * | descr, |
mtr_t * | mtr | ||
) |
Gets the state of an xdes.
descr | in: descriptor |
mtr | in/out: mini-transaction |
Definition at line 423 of file fsp0fsp.cc.
UNIV_INLINE void xdes_init | ( | xdes_t * | descr, |
mtr_t * | mtr | ||
) |
Inits an extent descriptor to the free and clean state.
descr | in: descriptor |
mtr | in/out: mini-transaction |
Definition at line 442 of file fsp0fsp.cc.
UNIV_INLINE ibool xdes_is_free | ( | const xdes_t * | descr, |
mtr_t * | mtr | ||
) |
Returns true if extent contains no used pages.
descr | in: descriptor |
mtr | in/out: mini-transaction |
Definition at line 369 of file fsp0fsp.cc.
UNIV_INLINE ibool xdes_is_full | ( | const xdes_t * | descr, |
mtr_t * | mtr | ||
) |
Returns true if extent contains no free pages.
descr | in: descriptor |
mtr | in/out: mini-transaction |
Definition at line 387 of file fsp0fsp.cc.
UNIV_INLINE ibool xdes_mtr_get_bit | ( | const xdes_t * | descr, |
ulint | bit, | ||
ulint | offset, | ||
mtr_t * | mtr | ||
) |
Gets a descriptor bit of a page.
descr | in: descriptor |
bit | in: XDES_FREE_BIT or XDES_CLEAN_BIT |
offset | in: page offset within extent: 0 ... FSP_EXTENT_SIZE - 1 |
mtr | in: mini-transaction |
Definition at line 215 of file fsp0fsp.cc.
UNIV_INLINE void xdes_set_bit | ( | xdes_t * | descr, |
ulint | bit, | ||
ulint | offset, | ||
ibool | val, | ||
mtr_t * | mtr | ||
) |
Sets a descriptor bit of a page.
descr | in: descriptor |
bit | in: XDES_FREE_BIT or XDES_CLEAN_BIT |
offset | in: page offset within extent: 0 ... FSP_EXTENT_SIZE - 1 |
val | in: bit value |
mtr | in/out: mini-transaction |
Definition at line 233 of file fsp0fsp.cc.
UNIV_INLINE void xdes_set_state | ( | xdes_t * | descr, |
ulint | state, | ||
mtr_t * | mtr | ||
) |
Sets the state of an xdes.
descr | in/out: descriptor |
state | in: state to set |
mtr | in/out: mini-transaction |
Definition at line 404 of file fsp0fsp.cc.
ulint xdes_t* descr |
in: extent descriptor
Definition at line 101 of file fsp0fsp.cc.
limit = mach_read_from_4(sp_header + FSP_FREE_LIMIT) |
< in/out: mini-transaction
Definition at line 472 of file fsp0fsp.cc.
ulint xdes_t mtr_t* mtr |
in/out: mini-transaction
Definition at line 101 of file fsp0fsp.cc.
ulint ulint offset |
in: page offset; if equal to the free limit, we try to add new extents to the space free list
Definition at line 472 of file fsp0fsp.cc.
ulint page |
< in: segment inode in: page offset
Definition at line 101 of file fsp0fsp.cc.
UNIV_INLINE ulint space |
< in/out: space header, x-latched in mtr in: space id
Definition at line 472 of file fsp0fsp.cc.
ulint zip_size |
< in: space id in: compressed page size in bytes or 0 for uncompressed pages
Definition at line 481 of file fsp0fsp.cc.