54extern int meb_key_fetch(
const char *key_id,
char **
key_type,
55 const char *user_id,
void **
key,
size_t *key_length);
152 space_id_t space_id, uint32_t expected_physical_page_size);
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:49
uint32_t page_no_t
Page number.
Definition: api0api.h:47
Data file control information.
Definition: fsp0file.h:72
uint32_t get_cached_server_version() const
Returns cached server version read from the first page during validation.
Definition: fsp0file.h:171
Datafile()
Definition: fsp0file.h:76
space_id_t get_cached_space_id() const
Returns cached space ID read from the first page during validation.
Definition: fsp0file.h:184
dberr_t validate_for_recovery(space_id_t space_id, uint32_t expected_physical_page_size)
Validates this datafile for the purpose of recovery.
Definition: fsp0file.cc:307
ut::Expected< ut::unique_ptr_aligned< byte[]> > read_first_page(space_id_t space_id, uint32_t physical_page_size)
Reads the first page of the datafile.
Definition: fsp0file.cc:154
byte * m_encryption_iv
Encryption iv read from first page.
Definition: fsp0file.h:319
byte * m_encryption_key
Encryption key read from first page.
Definition: fsp0file.h:316
bool is_valid() const
Get Datafile::m_is_valid.
Definition: fsp0file.h:214
const char * filepath() const
Get Datafile::m_filepath.
Definition: fsp0file.h:160
bool m_exists
true if file already existed on startup
Definition: fsp0file.h:305
bool is_raw_type()
Returns if the Datafile is created in raw partition.
Definition: fsp0file.h:103
void make_filepath(const char *dirpath, const char *filename, ib_file_suffix ext)
Make a full filepath from a directory path and a filename.
Definition: fsp0file.cc:112
dberr_t validate_first_page(const byte *page, space_id_t space_id, const std::string &filepath, bool for_import)
Checks the consistency of the first page supplied when the tablespace is opened, and verifies the spa...
Definition: fsp0file.cc:352
void reset_first_page_fields_cache()
Definition: fsp0file.h:154
node_device_type_t m_type
The type of the data file.
Definition: fsp0file.h:274
dberr_t validate_to_dd(const byte *page, space_id_t space_id, uint32_t flags, const std::string &filepath, bool for_import)
Validates the first page of tablespace supplied and checks that it conforms with the expected space I...
Definition: fsp0file.cc:234
void set_filename()
Set the filename pointer to the start of the file name in the filepath.
Definition: fsp0file.h:246
page_no_t m_size
size in pages
Definition: fsp0file.h:271
pfs_os_file_t handle() const
Get Datafile::m_handle.
Definition: fsp0file.h:164
void shutdown()
Release the resources.
Definition: fsp0file.cc:54
~Datafile()
Definition: fsp0file.h:80
uint32_t get_cached_space_flush_lsn() const
Returns cached space flush LSN read from the first page during validation.
Definition: fsp0file.h:198
Datafile & operator=(const Datafile &file)=delete
void extract_fields_from_first_page(const byte *page)
Extracts basic space fields from the first page header.
Definition: fsp0file.cc:223
dberr_t open_read_only()
Open a data file in read-only mode to check if it exists so that it can be validated.
Definition: fsp0file.cc:69
void free_filepath()
Free the filepath buffer.
Definition: fsp0file.cc:146
size_t physical_page_size() const
Get the physical page size used by the tablespace.
Definition: fsp0file.h:204
pfs_os_file_t m_handle
Open file handle.
Definition: fsp0file.h:268
bool is_open() const
Definition: fsp0file.h:210
uint32_t m_encryption_master_key_id
Master key id read from first page.
Definition: fsp0file.h:325
void set_filepath(const char *filepath)
Set the filepath by duplicating the filepath sent in.
Definition: fsp0file.cc:137
dberr_t close()
Close a data file.
Definition: fsp0file.cc:94
uint32_t get_cached_space_flags() const
Returns cached space FSP flags read from the first page during validation.
Definition: fsp0file.h:191
Encryption::Progress m_encryption_op_in_progress
Encryption operation in progress.
Definition: fsp0file.h:322
char * m_filepath
Physical file path with base name and extension.
Definition: fsp0file.h:312
first_page_fields_cache_t m_first_page_fields_cache
Cache of fields extracted from the first page.
Definition: fsp0file.h:302
friend class SysTablespace
Definition: fsp0file.h:73
Datafile(const Datafile &file)=delete
char * m_filename
Points into m_filepath to the file name with extension.
Definition: fsp0file.h:265
uint32_t get_cached_space_version() const
Returns cached space version read from the first page during validation.
Definition: fsp0file.h:178
bool m_is_valid
Definition: fsp0file.h:308
page_no_t size() const
Definition: fsp0file.h:217
Progress
Encryption progress type.
Definition: os0enc.h:80
Page size descriptor.
Definition: page0size.h:50
C++23 std::expected.
Definition: ut0expected.h:74
int page
Definition: ctype-mb.cc:1226
dberr_t
Definition: db0err.h:39
The low-level file system.
ib_file_suffix
Common InnoDB file extensions.
Definition: fil0fil.h:943
node_device_type_t
Types of nodes specifed in innodb_data_file_path.
Definition: fsp0file.h:59
@ NEW_RAW
A 'newraw' partition, only to be initialized.
@ OLD_RAW
An initialized raw partition.
@ REGULAR_FILE
Not a raw partition, a regular file.
Prototypes for global functions in ha_innodb.cc that are called by InnoDB C code.
static int flags[50]
Definition: hp_test1.cc:40
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:63
#define OS_PATH_SEPARATOR
Definition: log_sink_syseventlog.cc:94
int key_type
Definition: method.h:38
Json_data_extension ext
Definition: backend.cc:50
The interface to the operating system file io.
static constexpr os_fd_t OS_FILE_CLOSED
Definition: os0file.h:151
const char * filename
Definition: pfs_example_component_population.cc:67
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Cache of fields extracted from the first page.
Definition: fsp0file.h:277
lsn_t m_flush_lsn
Flush LSN stored in the tablespace header.
Definition: fsp0file.h:295
uint32_t m_server_version
Server version.
Definition: fsp0file.h:284
space_id_t m_space_id
Tablespace ID.
Definition: fsp0file.h:281
uint32_t m_space_flags
Tablespace flags.
Definition: fsp0file.h:292
uint32_t m_space_version
Space version.
Definition: fsp0file.h:287
bool m_is_valid
Specifies if the cache values have already values assigned.
Definition: fsp0file.h:298
Common file descriptor for file IO instrumentation with PFS on windows and other platforms.
Definition: os0file.h:172
os_file_t m_file
Definition: os0file.h:182
constexpr space_id_t SPACE_UNKNOWN
Unknown space id.
Definition: univ.i:452
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:109
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:97