#include "univ.i"
#include "dict0types.h"
#include "ut0byte.h"
#include "os0file.h"
#include "sync0rw.h"
#include "ibuf0types.h"
Go to the source code of this file.
Classes | |
struct | fil_addr_struct |
Defines | |
#define | FIL_IBD_FILE_INITIAL_SIZE 4 |
#define | FIL_NULL ULINT32_UNDEFINED |
#define | FIL_ADDR_PAGE 0 |
#define | FIL_ADDR_BYTE 4 |
#define | FIL_ADDR_SIZE 6 |
#define | FIL_PAGE_SPACE_OR_CHKSUM 0 |
#define | FIL_PAGE_OFFSET 4 |
#define | FIL_PAGE_PREV 8 |
#define | FIL_PAGE_NEXT 12 |
#define | FIL_PAGE_LSN 16 |
#define | FIL_PAGE_TYPE 24 |
#define | FIL_PAGE_FILE_FLUSH_LSN 26 |
#define | FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID 34 |
#define | FIL_PAGE_DATA 38 |
#define | FIL_PAGE_END_LSN_OLD_CHKSUM 8 |
#define | FIL_PAGE_DATA_END 8 |
#define | FIL_PAGE_INDEX 17855 |
#define | FIL_PAGE_UNDO_LOG 2 |
#define | FIL_PAGE_INODE 3 |
#define | FIL_PAGE_IBUF_FREE_LIST 4 |
#define | FIL_PAGE_TYPE_ALLOCATED 0 |
#define | FIL_PAGE_IBUF_BITMAP 5 |
#define | FIL_PAGE_TYPE_SYS 6 |
#define | FIL_PAGE_TYPE_TRX_SYS 7 |
#define | FIL_PAGE_TYPE_FSP_HDR 8 |
#define | FIL_PAGE_TYPE_XDES 9 |
#define | FIL_PAGE_TYPE_BLOB 10 |
#define | FIL_PAGE_TYPE_ZBLOB 11 |
#define | FIL_PAGE_TYPE_ZBLOB2 12 |
#define | FIL_TABLESPACE 501 |
#define | FIL_LOG 502 |
Typedefs | |
typedef byte | fil_faddr_t |
typedef struct fil_addr_struct | fil_addr_t |
typedef struct fil_space_struct | fil_space_t |
Functions | |
UNIV_INTERN ib_int64_t | fil_space_get_version (ulint id) |
UNIV_INTERN rw_lock_t * | fil_space_get_latch (ulint id, ulint *zip_size) |
UNIV_INTERN ulint | fil_space_get_type (ulint id) |
UNIV_INTERN void | fil_node_create (const char *name, ulint size, ulint id, ibool is_raw) |
UNIV_INTERN ibool | fil_space_create (const char *name, ulint id, ulint zip_size, ulint purpose) |
UNIV_INTERN ibool | fil_assign_new_space_id (ulint *space_id) |
UNIV_INTERN ulint | fil_space_get_size (ulint id) |
UNIV_INTERN ulint | fil_space_get_flags (ulint id) |
UNIV_INTERN ulint | fil_space_get_zip_size (ulint id) |
UNIV_INTERN ibool | fil_check_adress_in_tablespace (ulint id, ulint page_no) |
UNIV_INTERN void | fil_init (ulint hash_size, ulint max_n_open) |
UNIV_INTERN void | fil_close (void) |
UNIV_INTERN void | fil_open_log_and_system_tablespace_files (void) |
UNIV_INTERN void | fil_close_all_files (void) |
UNIV_INTERN void | fil_set_max_space_id_if_bigger (ulint max_id) |
UNIV_INTERN ulint | fil_write_flushed_lsn_to_data_files (ib_uint64_t lsn, ulint arch_log_no) |
UNIV_INTERN void | fil_read_flushed_lsn_and_arch_log_no (os_file_t data_file, ibool one_read_already, ib_uint64_t *min_flushed_lsn, ib_uint64_t *max_flushed_lsn) |
UNIV_INTERN ibool | fil_inc_pending_ibuf_merges (ulint id) |
UNIV_INTERN void | fil_decr_pending_ibuf_merges (ulint id) |
UNIV_INTERN byte * | fil_op_log_parse_or_replay (byte *ptr, byte *end_ptr, ulint type, ulint space_id, ulint log_flags) |
UNIV_INTERN ibool | fil_delete_tablespace (ulint id) |
UNIV_INTERN ibool | fil_discard_tablespace (ulint id) |
UNIV_INTERN ibool | fil_rename_tablespace (const char *old_name, ulint id, const char *new_name) |
UNIV_INTERN ulint | fil_create_new_single_table_tablespace (ulint space_id, const char *tablename, ibool is_temp, ulint flags, ulint size) |
UNIV_INTERN ibool | fil_open_single_table_tablespace (ibool check_space_id, ulint id, ulint flags, const char *name) |
UNIV_INTERN ibool | fil_reset_too_high_lsns (const char *name, ib_uint64_t current_lsn) |
UNIV_INTERN ulint | fil_load_single_table_tablespaces (void) |
UNIV_INTERN ibool | fil_tablespace_deleted_or_being_deleted_in_mem (ulint id, ib_int64_t version) |
UNIV_INTERN ibool | fil_tablespace_exists_in_mem (ulint id) |
UNIV_INTERN ibool | fil_space_for_table_exists_in_mem (ulint id, const char *name, ibool is_temp, ibool mark_space, ibool print_error_if_does_not_exist) |
UNIV_INTERN ibool | fil_extend_space_to_desired_size (ulint *actual_size, ulint space_id, ulint size_after_extend) |
UNIV_INTERN ibool | fil_space_reserve_free_extents (ulint id, ulint n_free_now, ulint n_to_reserve) |
UNIV_INTERN void | fil_space_release_free_extents (ulint id, ulint n_reserved) |
UNIV_INTERN ulint | fil_space_get_n_reserved_extents (ulint id) |
UNIV_INTERN ulint | fil_io (ulint type, ibool sync, ulint space_id, ulint zip_size, ulint block_offset, ulint byte_offset, ulint len, void *buf, void *message) |
UNIV_INTERN void | fil_aio_wait (ulint segment) |
UNIV_INTERN void | fil_flush (ulint space_id) |
UNIV_INTERN void | fil_flush_file_spaces (ulint purpose) |
UNIV_INTERN ibool | fil_validate (void) |
UNIV_INTERN ibool | fil_addr_is_null (fil_addr_t addr) |
UNIV_INTERN ulint | fil_page_get_prev (const byte *page) |
UNIV_INTERN ulint | fil_page_get_next (const byte *page) |
UNIV_INTERN void | fil_page_set_type (byte *page, ulint type) |
UNIV_INTERN ulint | fil_page_get_type (const byte *page) |
UNIV_INTERN ibool | fil_tablespace_is_being_deleted (ulint id) |
Variables | |
const char * | fil_path_to_mysql_datadir |
fil_addr_t | fil_addr_null |
ulint | fil_n_log_flushes |
ulint | fil_n_pending_log_flushes |
ulint | fil_n_pending_tablespace_flushes |
#define FIL_IBD_FILE_INITIAL_SIZE 4 |
Initial size of a single-table tablespace in pages
Definition at line 45 of file fil0fil.h.
Referenced by fil_create_new_single_table_tablespace(), fil_op_log_parse_or_replay(), and row_truncate_table_for_mysql().
#define FIL_LOG 502 |
redo log
Definition at line 150 of file fil0fil.h.
Referenced by logs_empty_and_mark_files_at_shutdown().
#define FIL_NULL ULINT32_UNDEFINED |
'null' (undefined) page offset in the context of file spaces
Definition at line 48 of file fil0fil.h.
Referenced by btr_compress(), btr_create(), btr_cur_pessimistic_delete(), btr_discard_page(), btr_estimate_number_of_different_key_vals(), btr_free_externally_stored_field(), btr_get_next_user_rec(), btr_get_prev_user_rec(), btr_page_alloc(), btr_pcur_move_backward_from_page(), btr_pcur_move_to_next_page(), btr_pcur_store_position(), btr_root_raise_and_insert(), btr_store_big_rec_extern_fields(), dict_create_index_step(), dict_drop_index_tree(), dict_truncate_index_tree(), fil_addr_is_null(), fseg_alloc_free_page_general(), fseg_create_general(), ind_create_graph_create(), row_truncate_table_for_mysql(), trx_purge_add_update_undo_to_history(), trx_rseg_header_create(), trx_sys_create_doublewrite_buf(), trx_sysf_rseg_find_free(), trx_undo_add_page(), trx_undo_lists_init(), and trx_undo_report_row_operation().
#define FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID 34 |
starting from 4.1.x this contains the space id of the page
Definition at line 119 of file fil0fil.h.
Referenced by buf_LRU_block_free_non_file_page(), buf_page_io_complete(), buf_page_print(), fil_create_new_single_table_tablespace(), fsp_header_get_space_id(), page_zip_calc_checksum(), and trx_sys_doublewrite_init_or_restore_pages().
#define FIL_PAGE_DATA 38 |
start of the data on the page
Definition at line 121 of file fil0fil.h.
Referenced by btr_free_but_not_root(), btr_free_externally_stored_field(), btr_root_raise_and_insert(), btr_store_big_rec_extern_fields(), buf_calc_page_new_checksum(), page_simple_validate_new(), and page_simple_validate_old().
#define FIL_PAGE_DATA_END 8 |
size of the page trailer
Definition at line 128 of file fil0fil.h.
Referenced by btr_store_big_rec_extern_fields(), and fseg_create_general().
#define FIL_PAGE_END_LSN_OLD_CHKSUM 8 |
File page trailer the low 4 bytes of this are used to store the page checksum, the last 4 bytes should be identical to the last 4 bytes of FIL_PAGE_LSN
Definition at line 124 of file fil0fil.h.
Referenced by buf_calc_page_new_checksum(), buf_flush_init_for_writing(), buf_page_is_corrupted(), buf_page_print(), and recv_recover_page_func().
#define FIL_PAGE_FILE_FLUSH_LSN 26 |
this is only defined for the first page in a system tablespace data file (ibdata*, not *.ibd): the file has been flushed to disk at least up to this lsn
Definition at line 114 of file fil0fil.h.
Referenced by btr_store_big_rec_extern_fields(), buf_calc_page_new_checksum(), buf_calc_page_old_checksum(), buf_flush_init_for_writing(), buf_page_create(), fil_read_flushed_lsn_and_arch_log_no(), and fil_reset_too_high_lsns().
#define FIL_PAGE_IBUF_BITMAP 5 |
Insert buffer bitmap
Definition at line 138 of file fil0fil.h.
Referenced by buf_flush_init_for_writing(), buf_page_print(), buf_zip_decompress(), and ibuf_bitmap_page_init().
#define FIL_PAGE_IBUF_FREE_LIST 4 |
#define FIL_PAGE_INDEX 17855 |
File page types (values of FIL_PAGE_TYPE) B-tree node
Definition at line 132 of file fil0fil.h.
Referenced by btr_store_big_rec_extern_fields(), buf_flush_init_for_writing(), buf_page_print(), buf_zip_decompress(), mlog_parse_nbytes(), mlog_parse_string(), and recv_recover_page_func().
#define FIL_PAGE_INODE 3 |
Index node
Definition at line 134 of file fil0fil.h.
Referenced by buf_flush_init_for_writing(), buf_page_print(), and buf_zip_decompress().
#define FIL_PAGE_LSN 16 |
lsn of the end of the newest modification log record to the page
Definition at line 97 of file fil0fil.h.
Referenced by buf_flush_init_for_writing(), buf_page_is_corrupted(), buf_page_print(), fil_reset_too_high_lsns(), page_zip_calc_checksum(), and recv_recover_page_func().
#define FIL_PAGE_NEXT 12 |
if there is a 'natural' successor of the page, its offset. Otherwise FIL_NULL. B-tree index pages (FIL_PAGE_TYPE contains FIL_PAGE_INDEX) on the same PAGE_LEVEL are maintained as a doubly linked list via FIL_PAGE_PREV and FIL_PAGE_NEXT in the collation order of the smallest user record on each page.
Definition at line 87 of file fil0fil.h.
Referenced by btr_free_externally_stored_field(), btr_store_big_rec_extern_fields(), buf_page_create(), and fil_page_get_next().
#define FIL_PAGE_OFFSET 4 |
page offset inside space
Definition at line 79 of file fil0fil.h.
Referenced by buf_calc_page_new_checksum(), buf_LRU_block_free_non_file_page(), buf_page_io_complete(), buf_page_is_corrupted(), buf_page_print(), page_zip_calc_checksum(), and trx_sys_doublewrite_init_or_restore_pages().
#define FIL_PAGE_PREV 8 |
if there is a 'natural' predecessor of the page, its offset. Otherwise FIL_NULL. This field is not set on BLOB pages, which are stored as a singly-linked list. See also FIL_PAGE_NEXT.
Definition at line 80 of file fil0fil.h.
Referenced by btr_compress(), btr_store_big_rec_extern_fields(), buf_page_create(), and fil_page_get_prev().
#define FIL_PAGE_SPACE_OR_CHKSUM 0 |
The byte offsets on a file page for various variables in < MySQL-4.0.14 space id the page belongs to (== 0) but in later versions the 'new' checksum of the page
Definition at line 75 of file fil0fil.h.
Referenced by buf_flush_init_for_writing(), buf_LRU_free_block(), buf_page_is_corrupted(), buf_page_print(), and buf_zip_decompress().
#define FIL_PAGE_TYPE 24 |
file page type: FIL_PAGE_INDEX,..., 2 bytes.
The contents of this field can only be trusted in the following case: if the page is an uncompressed B-tree index page, then it is guaranteed that the value is FIL_PAGE_INDEX. The opposite does not hold.
In tablespaces created by MySQL/InnoDB 5.1.7 or later, the contents of this field is valid for all uncompressed pages.
Definition at line 99 of file fil0fil.h.
Referenced by btr_store_big_rec_extern_fields(), buf_page_create(), fil_page_get_type(), fil_page_set_type(), fseg_create_general(), fsp_header_init(), and page_zip_calc_checksum().
#define FIL_PAGE_TYPE_ALLOCATED 0 |
Freshly allocated page
Definition at line 137 of file fil0fil.h.
Referenced by buf_flush_init_for_writing(), buf_page_create(), buf_page_print(), and buf_zip_decompress().
#define FIL_PAGE_TYPE_BLOB 10 |
Uncompressed BLOB page
Definition at line 143 of file fil0fil.h.
Referenced by btr_store_big_rec_extern_fields(), and buf_page_print().
#define FIL_PAGE_TYPE_FSP_HDR 8 |
File space header
Definition at line 141 of file fil0fil.h.
Referenced by buf_flush_init_for_writing(), buf_page_print(), buf_zip_decompress(), and fsp_header_init().
#define FIL_PAGE_TYPE_SYS 6 |
System page
Definition at line 139 of file fil0fil.h.
Referenced by buf_page_print(), and fseg_create_general().
#define FIL_PAGE_TYPE_TRX_SYS 7 |
#define FIL_PAGE_TYPE_XDES 9 |
Extent descriptor page
Definition at line 142 of file fil0fil.h.
Referenced by buf_flush_init_for_writing(), buf_page_print(), and buf_zip_decompress().
#define FIL_PAGE_TYPE_ZBLOB 11 |
First compressed BLOB page
Definition at line 144 of file fil0fil.h.
Referenced by btr_free_externally_stored_field(), btr_store_big_rec_extern_fields(), buf_flush_init_for_writing(), buf_page_print(), and buf_zip_decompress().
#define FIL_PAGE_TYPE_ZBLOB2 12 |
Subsequent compressed BLOB page
Definition at line 145 of file fil0fil.h.
Referenced by btr_free_externally_stored_field(), btr_store_big_rec_extern_fields(), buf_flush_init_for_writing(), buf_page_print(), and buf_zip_decompress().
#define FIL_TABLESPACE 501 |
Space types tablespace
Definition at line 149 of file fil0fil.h.
Referenced by fil_aio_wait(), fil_create_new_single_table_tablespace(), fil_flush(), fil_io(), fil_open_log_and_system_tablespace_files(), fil_open_single_table_tablespace(), fil_space_create(), fil_space_get_flags(), fil_space_get_size(), fil_validate(), fil_write_flushed_lsn_to_data_files(), ibuf_page(), log_checkpoint(), logs_empty_and_mark_files_at_shutdown(), and trx_sys_doublewrite_init_or_restore_pages().
typedef struct fil_addr_struct fil_addr_t |
typedef byte fil_faddr_t |
UNIV_INTERN ibool fil_addr_is_null | ( | fil_addr_t | addr | ) |
Returns TRUE if file address is undefined.
Returns TRUE if file address is undefined.
addr | in: address |
Definition at line 4778 of file fil0fil.cc.
References FIL_NULL, and fil_addr_struct::page.
UNIV_INTERN void fil_aio_wait | ( | ulint | segment | ) |
Waits for an aio operation to complete. This function is used to write the handler for completed requests. The aio array of pending requests is divided into segments (see os0file.c for more info). The thread specifies which segment it wants to wait for. in: the number of the segment in the aio array to wait for
Waits for an aio operation to complete. This function is used to write the handler for completed requests. The aio array of pending requests is divided into segments (see os0file.c for more info). The thread specifies which segment it wants to wait for.
segment | in: the number of the segment in the aio array to wait for |
Definition at line 4484 of file fil0fil.cc.
References FIL_TABLESPACE, log_io_complete(), fil_system_struct::mutex, os_aio_simulated_handle(), fil_space_struct::purpose, fil_node_struct::space, srv_set_io_thread_op_info(), ut_a, ut_ad, and ut_error.
UNIV_INTERN ibool fil_assign_new_space_id | ( | ulint * | space_id | ) |
Assigns a new space id for a new single-table tablespace. This works simply by incrementing the global counter. If 4 billion id's is not enough, we may need to recycle id's.
Assigns a new space id for a new single-table tablespace. This works simply by incrementing the global counter. If 4 billion id's is not enough, we may need to recycle id's.
space_id | in/out: space id |
Definition at line 1273 of file fil0fil.cc.
References fil_system_struct::max_assigned_id, fil_system_struct::mutex, SRV_LOG_SPACE_FIRST_ID, and ut_print_timestamp().
UNIV_INTERN ibool fil_check_adress_in_tablespace | ( | ulint | id, |
ulint | page_no | ||
) |
Checks if the pair space, page_no refers to an existing page in a tablespace file space. The tablespace must be cached in the memory cache.
Checks if the pair space, page_no refers to an existing page in a tablespace file space. The tablespace must be cached in the memory cache.
id | in: space id |
page_no | in: page number |
Definition at line 1529 of file fil0fil.cc.
UNIV_INTERN void fil_close | ( | void | ) |
Initializes the tablespace memory cache.
Definition at line 4842 of file fil0fil.cc.
References mem_free, fil_system_struct::mutex, fil_system_struct::name_hash, fil_system_struct::spaces, ut_a, ut_ad, and UT_LIST_GET_LEN.
UNIV_INTERN void fil_close_all_files | ( | void | ) |
Closes all open files. There must not be any pending i/o's or not flushed modifications in the files.
Definition at line 1633 of file fil0fil.cc.
References fil_space_struct::id, fil_system_struct::mutex, fil_node_struct::open, fil_node_struct::space, UT_LIST_GET_FIRST, and UT_LIST_GET_NEXT.
UNIV_INTERN ulint fil_create_new_single_table_tablespace | ( | ulint | space_id, |
const char * | tablename, | ||
ibool | is_temp, | ||
ulint | flags, | ||
ulint | size | ||
) |
Creates a new single-table tablespace to a database directory of MySQL. Database directories are under the 'datadir' of MySQL. The datadir is the directory of a running mysqld program. We can refer to it by simply the path '.'. Tables created with CREATE TEMPORARY TABLE we place in the temp dir of the mysqld server.
Creates a new single-table tablespace to a database directory of MySQL. Database directories are under the 'datadir' of MySQL. The datadir is the directory of a running mysqld program. We can refer to it by simply the path '.'. Tables created with CREATE TEMPORARY TABLE we place in the temp dir of the mysqld server.
space_id | in: space id |
tablename | in: the table name in the usual databasename/tablename format of InnoDB, or a dir path to a temp table |
is_temp | in: TRUE if a table created with CREATE TEMPORARY TABLE |
flags | in: tablespace flags |
size | in: the initial size of the tablespace file in pages, must be >= FIL_IBD_FILE_INITIAL_SIZE |
Definition at line 2643 of file fil0fil.cc.
References page_zip_des_struct::data, DICT_TF_BITS, DICT_TF_COMPACT, DICT_TF_ZSSIZE_SHIFT, FIL_IBD_FILE_INITIAL_SIZE, FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, FIL_TABLESPACE, page_zip_des_struct::m_end, page_zip_des_struct::m_nonempty, mach_write_to_4(), mem_free, MLOG_FILE_CREATE, MLOG_FILE_CREATE2, MLOG_FILE_FLAG_TEMP, mtr_commit(), mtr_start(), page_zip_des_struct::n_blobs, OS_DATA_FILE, os_file_delete(), os_file_get_last_error(), os_file_set_size(), PAGE_ZIP_MIN_SIZE, page_zip_set_size(), SRV_LOG_SPACE_FIRST_ID, ut_a, ut_align(), ut_free(), ut_malloc(), ut_print_filename(), and ut_print_timestamp().
UNIV_INTERN void fil_decr_pending_ibuf_merges | ( | ulint | id | ) |
Decrements the count of pending insert buffer page merges. in: space id
Decrements the count of pending insert buffer page merges.
id | in: space id |
Definition at line 1878 of file fil0fil.cc.
References fil_system_struct::mutex, fil_space_struct::n_pending_ibuf_merges, and fil_node_struct::space.
UNIV_INTERN ibool fil_delete_tablespace | ( | ulint | id | ) |
Deletes a single-table tablespace. The tablespace must be cached in the memory cache.
Deletes a single-table tablespace. The tablespace must be cached in the memory cache.
id | in: space id |
Definition at line 2175 of file fil0fil.cc.
References fil_space_struct::is_being_deleted, fil_space_struct::latch, mem_free, mem_strdup(), MLOG_FILE_DELETE, mtr_commit(), mtr_start(), fil_system_struct::mutex, fil_node_struct::n_pending, fil_space_struct::n_pending_flushes, fil_space_struct::n_pending_ibuf_merges, fil_space_struct::name, os_file_delete(), os_file_delete_if_exists(), os_thread_sleep(), fil_node_struct::space, fil_space_struct::stop_ibuf_merges, ut_a, UT_LIST_GET_FIRST, UT_LIST_GET_LEN, ut_print_filename(), and ut_print_timestamp().
UNIV_INTERN ibool fil_discard_tablespace | ( | ulint | id | ) |
Discards a single-table tablespace. The tablespace must be cached in the memory cache. Discarding is like deleting a tablespace, but 1) we do not drop the table from the data dictionary; 2) we remove all insert buffer entries for the tablespace immediately; in DROP TABLE they are only removed gradually in the background; 3) when the user does IMPORT TABLESPACE, the tablespace will have the same id as it originally had.
Discards a single-table tablespace. The tablespace must be cached in the memory cache. Discarding is like deleting a tablespace, but 1) we do not drop the table from the data dictionary; 2) we remove all insert buffer entries for the tablespace immediately; in DROP TABLE they are only removed gradually in the background; 3) when the user does IMPORT TABLESPACE, the tablespace will have the same id as it originally had.
id | in: space id |
Definition at line 2380 of file fil0fil.cc.
References ibuf_delete_for_discarded_space().
UNIV_INTERN ibool fil_extend_space_to_desired_size | ( | ulint * | actual_size, |
ulint | space_id, | ||
ulint | size_after_extend | ||
) |
Tries to extend a data file so that it would accommodate the number of pages given. The tablespace must be cached in the memory cache. If the space is big enough already, does nothing.
Tries to extend a data file so that it would accommodate the number of pages given. The tablespace must be cached in the memory cache. If the space is big enough already, does nothing.
actual_size | out: size of the space after extension; if we ran out of disk space this may be lower than the desired size |
space_id | in: space id |
size_after_extend | in: desired size in pages after the extension; if the current space size is bigger than this already, the function does nothing |
Definition at line 3859 of file fil0fil.cc.
References dict_table_flags_to_zip_size(), fil_space_struct::flags, fil_node_struct::handle, mem_free, fil_system_struct::mutex, fil_node_struct::name, OS_AIO_SYNC, os_file_get_size_as_iblonglong(), fil_node_struct::size, fil_space_struct::size, fil_node_struct::space, ut_a, ut_align(), UT_LIST_GET_LAST, and ut_min().
UNIV_INTERN void fil_flush | ( | ulint | space_id | ) |
Flushes to disk possible writes cached by the OS. If the space does not exist or is being dropped, does not do anything. in: file space id (this can be a group of log files or a tablespace of the database)
Flushes to disk possible writes cached by the OS. If the space does not exist or is being dropped, does not do anything.
< prevent dropping of the space while we are flushing
space_id | in: file space id (this can be a group of log files or a tablespace of the database) |
Definition at line 4548 of file fil0fil.cc.
References FIL_TABLESPACE, fil_node_struct::flush_counter, fil_node_struct::handle, fil_space_struct::is_being_deleted, fil_space_struct::is_in_unflushed_spaces, fil_node_struct::is_raw_disk, fil_node_struct::modification_counter, fil_system_struct::mutex, fil_node_struct::n_pending_flushes, fil_space_struct::n_pending_flushes, fil_node_struct::open, os_thread_sleep(), fil_space_struct::purpose, fil_node_struct::space, ut_a, UT_LIST_GET_FIRST, UT_LIST_GET_NEXT, and UT_LIST_REMOVE.
UNIV_INTERN void fil_flush_file_spaces | ( | ulint | purpose | ) |
Flushes to disk writes in file spaces of the given type possibly cached by the OS. in: FIL_TABLESPACE, FIL_LOG
Flushes to disk the writes in file spaces of the given type possibly cached by the OS.
purpose | in: FIL_TABLESPACE, FIL_LOG |
Definition at line 4663 of file fil0fil.cc.
References fil_space_struct::id, fil_space_struct::is_being_deleted, mem_free, fil_system_struct::mutex, fil_space_struct::purpose, fil_node_struct::space, UT_LIST_GET_FIRST, UT_LIST_GET_LEN, and UT_LIST_GET_NEXT.
UNIV_INTERN ibool fil_inc_pending_ibuf_merges | ( | ulint | id | ) |
Increments the count of pending insert buffer page merges, if space is not being deleted.
Increments the count of pending insert buffer page merges, if space is not being deleted.
id | in: space id |
Definition at line 1844 of file fil0fil.cc.
References fil_system_struct::mutex, fil_space_struct::n_pending_ibuf_merges, fil_node_struct::space, and fil_space_struct::stop_ibuf_merges.
UNIV_INTERN void fil_init | ( | ulint | hash_size, |
ulint | max_n_open | ||
) |
Initializes the tablespace memory cache. in: max number of open files
Initializes the tablespace memory cache.
hash_size | in: hash table size |
max_n_open | in: max number of open files |
Definition at line 1546 of file fil0fil.cc.
References fil_system_struct::max_n_open, mem_zalloc, fil_system_struct::mutex, fil_system_struct::name_hash, fil_system_struct::spaces, ut_a, and UT_LIST_INIT.
UNIV_INTERN ulint fil_io | ( | ulint | type, |
ibool | sync, | ||
ulint | space_id, | ||
ulint | zip_size, | ||
ulint | block_offset, | ||
ulint | byte_offset, | ||
ulint | len, | ||
void * | buf, | ||
void * | message | ||
) |
Reads or writes data. This operation is asynchronous (aio).
Reads or writes data. This operation is asynchronous (aio).
type | in: OS_FILE_READ or OS_FILE_WRITE, ORed to OS_FILE_LOG, if a log i/o and ORed to OS_AIO_SIMULATED_WAKE_LATER if simulated aio and we want to post a batch of i/os; NOTE that a simulated batch may introduce hidden chances of deadlocks, because i/os are not actually handled until all have been posted: use with great caution! |
sync | in: TRUE if synchronous aio is desired |
space_id | in: space id |
zip_size | in: compressed page size in bytes; 0 for uncompressed pages |
block_offset | in: offset in number of blocks |
byte_offset | in: remainder of offset in bytes; in aio this must be divisible by the OS block size |
len | in: how many bytes to read or write; this must not cross a file boundary; in aio this must be a block size multiple |
buf | in/out: buffer where to store read data or from where to write; in aio this must be appropriately aligned |
message | in: message for aio handler if non-sync aio used, else ignored |
Definition at line 4260 of file fil0fil.cc.
References FIL_TABLESPACE, fil_node_struct::handle, ibuf_bitmap_page(), fil_space_struct::id, fil_system_struct::mutex, fil_node_struct::name, fil_space_struct::name, OS_AIO_IBUF, OS_AIO_LOG, OS_AIO_NORMAL, OS_AIO_SIMULATED_WAKE_LATER, OS_AIO_SYNC, OS_FILE_LOG_BLOCK_SIZE, OS_FILE_READ, fil_space_struct::purpose, recv_no_ibuf_operations, fil_node_struct::size, fil_node_struct::space, ut_a, ut_ad, ut_error, ut_is_2pow, UT_LIST_GET_FIRST, UT_LIST_GET_NEXT, and ut_print_timestamp().
UNIV_INTERN ulint fil_load_single_table_tablespaces | ( | void | ) |
At the server startup, if we need crash recovery, scans the database directories under the MySQL datadir, looking for .ibd files. Those files are single-table tablespaces. We need to know the space id in each of them so that we know into which file we should look to check the contents of a page stored in the doublewrite buffer, also to know where to apply log records where the space id is != 0.
Definition at line 3495 of file fil0fil.cc.
References mem_free, os_file_stat_struct::name, os_file_closedir(), os_file_opendir(), srv_normalize_path_for_win(), os_file_stat_struct::type, and ut_print_filename().
UNIV_INTERN void fil_node_create | ( | const char * | name, |
ulint | size, | ||
ulint | id, | ||
ibool | is_raw | ||
) |
Appends a new file to the chain of files of a space. File must be closed. in: TRUE if a raw device or a raw disk partition
Appends a new file to the chain of files of a space. File must be closed.
name | in: file name (file must be closed) |
size | in: file size in database blocks, rounded downwards to an integer |
id | in: space id where to append |
is_raw | in: TRUE if a raw device or a raw disk partition |
Definition at line 567 of file fil0fil.cc.
References fil_node_struct::flush_counter, fil_node_struct::is_raw_disk, fil_node_struct::magic_n, fil_system_struct::max_assigned_id, mem_free, mem_strdup(), fil_node_struct::modification_counter, fil_system_struct::mutex, fil_node_struct::n_pending, fil_node_struct::n_pending_flushes, fil_node_struct::name, fil_node_struct::open, fil_space_struct::size, fil_node_struct::size, fil_node_struct::space, srv_start_raw_disk_in_use, ut_a, UT_LIST_ADD_LAST, ut_print_filename(), and ut_print_timestamp().
UNIV_INTERN byte* fil_op_log_parse_or_replay | ( | byte * | ptr, |
byte * | end_ptr, | ||
ulint | type, | ||
ulint | space_id, | ||
ulint | log_flags | ||
) |
Parses the body of a log record written about an .ibd file operation. That is, the log record part after the standard (type, space id, page no) header of the log record.
If desired, also replays the delete or rename operation if the .ibd file exists and the space id in it matches. Replays the create operation if a file at that path does not exist yet. If the database directory for the file to be created does not exist, then we create the directory, too.
Note that ibbackup --apply-log sets fil_path_to_mysql_datadir to point to the datadir that we should use in replaying the file operations.
Parses the body of a log record written about an .ibd file operation. That is, the log record part after the standard (type, space id, page no) header of the log record.
If desired, also replays the delete or rename operation if the .ibd file exists and the space id in it matches. Replays the create operation if a file at that path does not exist yet. If the database directory for the file to be created does not exist, then we create the directory, too.
Note that ibbackup --apply-log sets fil_path_to_mysql_datadir to point to the datadir that we should use in replaying the file operations.
ptr | in: buffer containing the log record body, or an initial segment of it, if the record does not fir completely between ptr and end_ptr |
end_ptr | in: buffer end |
type | in: the type of this log record |
space_id | in: the space id of the tablespace in question, or 0 if the log record should only be parsed but not replayed |
log_flags | in: redo log flags (stored in the page number parameter) |
Definition at line 2015 of file fil0fil.cc.
References FIL_IBD_FILE_INITIAL_SIZE, mach_read_from_2(), mach_read_from_4(), MLOG_FILE_CREATE, MLOG_FILE_CREATE2, MLOG_FILE_DELETE, MLOG_FILE_FLAG_TEMP, MLOG_FILE_RENAME, fil_node_struct::name, ut_a, and ut_error.
UNIV_INTERN void fil_open_log_and_system_tablespace_files | ( | void | ) |
Opens all log files and system tablespace data files. They stay open until the database server shutdown. This should be called at a server startup after the space objects for the log and the system tablespace have been created. The purpose of this operation is to make sure we never run out of file descriptors if we need to read from the insert buffer or to write to the log.
Definition at line 1578 of file fil0fil.cc.
References FIL_TABLESPACE, fil_space_struct::id, fil_system_struct::max_n_open, fil_system_struct::mutex, fil_system_struct::n_open, fil_node_struct::open, fil_space_struct::purpose, fil_node_struct::space, UT_LIST_GET_FIRST, and UT_LIST_GET_NEXT.
UNIV_INTERN ibool fil_open_single_table_tablespace | ( | ibool | check_space_id, |
ulint | id, | ||
ulint | flags, | ||
const char * | name | ||
) |
Tries to open a single-table tablespace and optionally checks the space id is right in it. If does not succeed, prints an error message to the .err log. This function is used to open a tablespace when we start up mysqld, and also in IMPORT TABLESPACE. NOTE that we assume this operation is used either at the database startup or under the protection of the dictionary mutex, so that two users cannot race here. This operation does not leave the file associated with the tablespace open, but closes it after we have looked at the space id in it.
Tries to open a single-table tablespace and optionally checks the space id is right in it. If does not succeed, prints an error message to the .err log. This function is used to open a tablespace when we start up mysqld, and also in IMPORT TABLESPACE. NOTE that we assume this operation is used either at the database startup or under the protection of the dictionary mutex, so that two users cannot race here. This operation does not leave the file associated with the tablespace open, but closes it after we have looked at the space id in it.
check_space_id | in: should we check that the space id in the file is right; we assume that this function runs much faster if no check is made, since accessing the file inode probably is much faster (the OS caches them) than accessing the first page of the file |
id | in: space id |
flags | in: tablespace flags |
name | in: table name in the databasename/tablename format |
Definition at line 3019 of file fil0fil.cc.
References DICT_TF_BITS, DICT_TF_COMPACT, FIL_TABLESPACE, mem_free, os_file_get_last_error(), OS_FILE_OPEN, ut_a, ut_align(), ut_free(), ut_malloc(), ut_print_filename(), and ut_print_timestamp().
UNIV_INTERN ulint fil_page_get_next | ( | const byte * | page | ) |
Get the successor of a file page.
Get the successor of a file page.
page | in: file page |
Definition at line 4802 of file fil0fil.cc.
References FIL_PAGE_NEXT, and mach_read_from_4().
UNIV_INTERN ulint fil_page_get_prev | ( | const byte * | page | ) |
Get the predecessor of a file page.
Get the predecessor of a file page.
page | in: file page |
Definition at line 4790 of file fil0fil.cc.
References FIL_PAGE_PREV, and mach_read_from_4().
UNIV_INTERN ulint fil_page_get_type | ( | const byte * | page | ) |
Gets the file page type.
Gets the file page type.
page | in: file page |
Definition at line 4829 of file fil0fil.cc.
References FIL_PAGE_TYPE, mach_read_from_2(), and ut_ad.
UNIV_INTERN void fil_page_set_type | ( | byte * | page, |
ulint | type | ||
) |
Sets the file page type. in: type
Sets the file page type.
page | in/out: file page |
type | in: type |
Definition at line 4813 of file fil0fil.cc.
References FIL_PAGE_TYPE, mach_write_to_2(), and ut_ad.
UNIV_INTERN void fil_read_flushed_lsn_and_arch_log_no | ( | os_file_t | data_file, |
ibool | one_read_already, | ||
ib_uint64_t * | min_flushed_lsn, | ||
ib_uint64_t * | max_flushed_lsn | ||
) |
Reads the flushed lsn and arch no fields from a data file at database startup. in/out:
Reads the flushed lsn and arch no fields from a data file at database startup.
data_file | in: open data file |
one_read_already | in: TRUE if min and max parameters below already contain sensible data |
min_flushed_lsn | in/out: |
max_flushed_lsn | in/out: |
Definition at line 1782 of file fil0fil.cc.
References FIL_PAGE_FILE_FLUSH_LSN, mach_read_from_8(), ut_align(), ut_free(), and ut_malloc().
UNIV_INTERN ibool fil_rename_tablespace | ( | const char * | old_name, |
ulint | id, | ||
const char * | new_name | ||
) |
Renames a single-table tablespace. The tablespace must be cached in the tablespace memory cache.
Renames a single-table tablespace. The tablespace must be cached in the tablespace memory cache.
old_name | in: old table name in the standard databasename/tablename format of InnoDB, or NULL if we do the rename based on the space id only |
id | in: space id |
new_name | in: new table name in the standard databasename/tablename format of InnoDB |
Definition at line 2490 of file fil0fil.cc.
References fil_node_struct::flush_counter, mem_free, mem_strdup(), MLOG_FILE_RENAME, fil_node_struct::modification_counter, mtr_commit(), mtr_start(), fil_system_struct::mutex, fil_node_struct::n_pending, fil_node_struct::n_pending_flushes, fil_node_struct::name, fil_space_struct::name, fil_node_struct::open, os_thread_sleep(), fil_node_struct::space, fil_space_struct::stop_ios, ut_a, UT_LIST_GET_FIRST, UT_LIST_GET_LEN, ut_print_filename(), and ut_print_timestamp().
UNIV_INTERN ibool fil_reset_too_high_lsns | ( | const char * | name, |
ib_uint64_t | current_lsn | ||
) |
It is possible, though very improbable, that the lsn's in the tablespace to be imported have risen above the current system lsn, if a lengthy purge, ibuf merge, or rollback was performed on a backup taken with ibbackup. If that is the case, reset page lsn's in the file. We assume that mysqld was shut down after it performed these cleanup operations on the .ibd file, so that it at the shutdown stamped the latest lsn to the FIL_PAGE_FILE_FLUSH_LSN in the first page of the .ibd file, and we can determine whether we need to reset the lsn's just by looking at that flush lsn.
It is possible, though very improbable, that the lsn's in the tablespace to be imported have risen above the current system lsn, if a lengthy purge, ibuf merge, or rollback was performed on a backup taken with ibbackup. If that is the case, reset page lsn's in the file. We assume that mysqld was shut down after it performed these cleanup operations on the .ibd file, so that it at the shutdown stamped the latest lsn to the FIL_PAGE_FILE_FLUSH_LSN in the first page of the .ibd file, and we can determine whether we need to reset the lsn's just by looking at that flush lsn.
name | in: table name in the databasename/tablename format |
current_lsn | in: reset lsn's if the lsn stamped to FIL_PAGE_FILE_FLUSH_LSN in the first page is too high |
Definition at line 2845 of file fil0fil.cc.
References page_zip_des_struct::data, FIL_PAGE_FILE_FLUSH_LSN, FIL_PAGE_LSN, mach_read_from_8(), mach_write_to_8(), mem_free, os_file_get_last_error(), os_file_get_size_as_iblonglong(), OS_FILE_OPEN, page_zip_des_init(), page_zip_set_size(), ut_a, ut_align(), ut_free(), ut_is_2pow, ut_malloc(), ut_print_filename(), and ut_print_timestamp().
UNIV_INTERN void fil_set_max_space_id_if_bigger | ( | ulint | max_id | ) |
Sets the max tablespace id counter if the given number is bigger than the previous value. in: maximum known id
Sets the max tablespace id counter if the given number is bigger than the previous value.
max_id | in: maximum known id |
Definition at line 1668 of file fil0fil.cc.
References fil_system_struct::max_assigned_id, fil_system_struct::mutex, SRV_LOG_SPACE_FIRST_ID, and ut_error.
UNIV_INTERN ibool fil_space_create | ( | const char * | name, |
ulint | id, | ||
ulint | flags, | ||
ulint | purpose | ||
) |
Creates a space memory object and puts it to the 'fil system' hash table. If there is an error, prints an error message to the .err log.
Creates a space memory object and puts it to the tablespace memory cache. If there is an error, prints an error message to the .err log.
name | in: space name |
id | in: space id |
flags | in: compressed page size and file format, or 0 |
purpose | in: FIL_TABLESPACE, or FIL_LOG if log |
Definition at line 1112 of file fil0fil.cc.
References DICT_TF_BITS, DICT_TF_COMPACT, FIL_TABLESPACE, fil_space_struct::flags, HASH_INSERT, fil_space_struct::id, fil_space_struct::is_being_deleted, fil_space_struct::is_in_unflushed_spaces, fil_space_struct::latch, fil_space_struct::magic_n, fil_space_struct::mark, fil_system_struct::max_assigned_id, mem_strdup(), fil_system_struct::mutex, fil_space_struct::n_pending_flushes, fil_space_struct::n_pending_ibuf_merges, fil_space_struct::n_reserved_extents, fil_space_struct::name, fil_system_struct::name_hash, fil_space_struct::purpose, recv_recovery_on, rw_lock_create, fil_space_struct::size, fil_node_struct::space, fil_system_struct::spaces, fil_space_struct::stop_ibuf_merges, fil_space_struct::stop_ios, fil_space_struct::tablespace_version, fil_system_struct::tablespace_version, ut_a, ut_fold_string(), UT_LIST_ADD_LAST, UT_LIST_INIT, ut_print_filename(), and ut_print_timestamp().
UNIV_INTERN ibool fil_space_for_table_exists_in_mem | ( | ulint | id, |
const char * | name, | ||
ibool | is_temp, | ||
ibool | mark_space, | ||
ibool | print_error_if_does_not_exist | ||
) |
Returns TRUE if a matching tablespace exists in the InnoDB tablespace memory cache. Note that if we have not done a crash recovery at the database startup, there may be many tablespaces which are not yet in the memory cache.
Returns TRUE if a matching tablespace exists in the InnoDB tablespace memory cache. Note that if we have not done a crash recovery at the database startup, there may be many tablespaces which are not yet in the memory cache.
id | in: space id |
name | in: table name in the standard 'databasename/tablename' format or the dir path to a temp table |
is_temp | in: TRUE if created with CREATE TEMPORARY TABLE |
mark_space | in: in crash recovery, at database startup we mark all spaces which have an associated table in the InnoDB data dictionary, so that we can print a warning about orphaned tablespaces |
print_error_if_does_not_exist | in: print detailed error information to the .err log if a matching tablespace is not found from memory |
Definition at line 3682 of file fil0fil.cc.
References fil_space_struct::id, fil_space_struct::mark, mem_free, fil_system_struct::mutex, fil_space_struct::name, fil_node_struct::space, ut_ad, ut_print_filename(), and ut_print_timestamp().
UNIV_INTERN ulint fil_space_get_flags | ( | ulint | id | ) |
Returns the flags of the space. The tablespace must be cached in the memory cache.
Returns the flags of the space. The tablespace must be cached in the memory cache.
id | in: space id |
Definition at line 1455 of file fil0fil.cc.
References FIL_TABLESPACE, fil_space_struct::flags, fil_system_struct::mutex, OS_FILE_READ, fil_space_struct::purpose, fil_space_struct::size, fil_node_struct::space, ut_a, ut_ad, UT_LIST_GET_FIRST, and UT_LIST_GET_LEN.
UNIV_INTERN rw_lock_t* fil_space_get_latch | ( | ulint | id, |
ulint * | flags | ||
) |
Returns the latch of a file space.
Returns the latch of a file space.
id | in: space id |
flags | out: tablespace flags |
Definition at line 486 of file fil0fil.cc.
References fil_space_struct::flags, fil_space_struct::latch, fil_system_struct::mutex, fil_node_struct::space, ut_a, and ut_ad.
UNIV_INTERN ulint fil_space_get_n_reserved_extents | ( | ulint | id | ) |
Gets the number of reserved extents. If the database is silent, this number should be zero. in: space id
Gets the number of reserved extents. If the database is silent, this number should be zero.
id | in: space id |
Definition at line 4115 of file fil0fil.cc.
References fil_system_struct::mutex, fil_space_struct::n_reserved_extents, fil_node_struct::space, ut_a, and ut_ad.
UNIV_INTERN ulint fil_space_get_size | ( | ulint | id | ) |
Returns the size of the space in pages. The tablespace must be cached in the memory cache.
Returns the size of the space in pages. The tablespace must be cached in the memory cache.
id | in: space id |
Definition at line 1407 of file fil0fil.cc.
References FIL_TABLESPACE, fil_system_struct::mutex, OS_FILE_READ, fil_space_struct::purpose, fil_space_struct::size, fil_node_struct::size, fil_node_struct::space, ut_a, ut_ad, UT_LIST_GET_FIRST, and UT_LIST_GET_LEN.
UNIV_INTERN ulint fil_space_get_type | ( | ulint | id | ) |
Returns the type of a file space.
Returns the type of a file space.
id | in: space id |
Definition at line 515 of file fil0fil.cc.
References fil_system_struct::mutex, fil_space_struct::purpose, fil_node_struct::space, ut_a, and ut_ad.
UNIV_INTERN ib_int64_t fil_space_get_version | ( | ulint | id | ) |
Returns the version number of a tablespace, -1 if not found.
Returns the version number of a tablespace, -1 if not found.
id | in: space id |
Definition at line 459 of file fil0fil.cc.
References fil_system_struct::mutex, fil_node_struct::space, fil_space_struct::tablespace_version, and ut_ad.
UNIV_INTERN ulint fil_space_get_zip_size | ( | ulint | id | ) |
Returns the compressed page size of the space, or 0 if the space is not compressed. The tablespace must be cached in the memory cache.
Returns the compressed page size of the space, or 0 if the space is not compressed. The tablespace must be cached in the memory cache.
id | in: space id |
Definition at line 1507 of file fil0fil.cc.
References dict_table_flags_to_zip_size().
UNIV_INTERN void fil_space_release_free_extents | ( | ulint | id, |
ulint | n_reserved | ||
) |
Releases free extents in a file space. in: how many one reserved
Releases free extents in a file space.
id | in: space id |
n_reserved | in: how many one reserved |
Definition at line 4089 of file fil0fil.cc.
References fil_system_struct::mutex, fil_space_struct::n_reserved_extents, fil_node_struct::space, ut_a, and ut_ad.
UNIV_INTERN ibool fil_space_reserve_free_extents | ( | ulint | id, |
ulint | n_free_now, | ||
ulint | n_to_reserve | ||
) |
Tries to reserve free extents in a file space.
Tries to reserve free extents in a file space.
id | in: space id |
n_free_now | in: number of free extents now |
n_to_reserve | in: how many one wants to reserve |
Definition at line 4056 of file fil0fil.cc.
References fil_system_struct::mutex, fil_space_struct::n_reserved_extents, fil_node_struct::space, ut_a, and ut_ad.
UNIV_INTERN ibool fil_tablespace_deleted_or_being_deleted_in_mem | ( | ulint | id, |
ib_int64_t | version | ||
) |
Returns TRUE if a single-table tablespace does not exist in the memory cache, or is being deleted there.
Returns TRUE if a single-table tablespace does not exist in the memory cache, or is being deleted there.
id | in: space id |
version | in: tablespace_version should be this; if you pass -1 as the value of this, then this parameter is ignored |
Definition at line 3620 of file fil0fil.cc.
References fil_space_struct::is_being_deleted, fil_system_struct::mutex, fil_node_struct::space, fil_space_struct::tablespace_version, and ut_ad.
UNIV_INTERN ibool fil_tablespace_exists_in_mem | ( | ulint | id | ) |
Returns TRUE if a single-table tablespace exists in the memory cache.
Returns TRUE if a single-table tablespace exists in the memory cache.
id | in: space id |
Definition at line 3658 of file fil0fil.cc.
References fil_system_struct::mutex, fil_node_struct::space, and ut_ad.
UNIV_INTERN ibool fil_tablespace_is_being_deleted | ( | ulint | id | ) |
Returns TRUE if a single-table tablespace is being deleted.
Returns TRUE if a single-table tablespace is being deleted.
id | in: space id |
Definition at line 2348 of file fil0fil.cc.
References fil_space_struct::is_being_deleted, fil_system_struct::mutex, fil_node_struct::space, and ut_a.
UNIV_INTERN ibool fil_validate | ( | void | ) |
Checks the consistency of the tablespace cache.
Definition at line 4716 of file fil0fil.cc.
References FIL_TABLESPACE, HASH_GET_FIRST, hash_get_n_cells(), HASH_GET_NEXT, fil_space_struct::id, fil_system_struct::mutex, fil_system_struct::n_open, fil_node_struct::n_pending, fil_node_struct::open, fil_space_struct::purpose, fil_node_struct::space, fil_system_struct::spaces, ut_a, UT_LIST_GET_FIRST, UT_LIST_GET_NEXT, and UT_LIST_VALIDATE.
UNIV_INTERN ulint fil_write_flushed_lsn_to_data_files | ( | ib_uint64_t | lsn, |
ulint | arch_log_no | ||
) |
Writes the flushed lsn and the latest archived log number to the page header of the first page of each data file in the system tablespace.
Writes the flushed lsn and the latest archived log number to the page header of the first page of each data file in the system tablespace.
lsn | in: lsn to write |
arch_log_no | in: latest archived log file number |
Definition at line 1726 of file fil0fil.cc.
References FIL_TABLESPACE, fil_space_struct::id, fil_system_struct::mutex, fil_space_struct::purpose, fil_node_struct::size, fil_node_struct::space, UT_LIST_GET_FIRST, and UT_LIST_GET_NEXT.
The null file address
Definition at line 122 of file fil0fil.cc.
ulint fil_n_log_flushes |
The number of fsyncs done to the log
Definition at line 114 of file fil0fil.cc.
Number of pending redo log flushes
Definition at line 117 of file fil0fil.cc.
Number of pending tablespace flushes
Definition at line 119 of file fil0fil.cc.
const char* fil_path_to_mysql_datadir |
When mysqld is run, the default directory "." is the mysqld datadir, but in the MySQL Embedded Server Library and ibbackup it is not the default directory, and we must set the base file path explicitly
Definition at line 111 of file fil0fil.cc.