49 typedef std::vector<Datafile, ut::allocator<Datafile>>
files_t;
149 for (files_t::const_iterator it =
m_files.begin(); it !=
m_files.end();
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:48
uint32_t page_no_t
Page number.
Definition: api0api.h:46
Data file control information.
Definition: fsp0file.h:72
static void normalize(std::string &path)
Normalize a directory path for the current OS: On Windows, we convert '/' to '\', else we convert '\'...
Definition: fil0fil.h:888
Data structure that contains the information about shared tablespaces.
Definition: fsp0space.h:47
uint32_t flags() const
Get the tablespace flags.
Definition: fsp0space.h:134
uint64_t get_autoextend_size() const
Definition: fsp0space.h:186
Datafile * first_datafile()
Definition: fsp0space.h:177
virtual ~Tablespace()
Definition: fsp0space.h:65
void delete_files()
Delete all the data files.
Definition: fsp0space.cc:98
char * m_name
Name of the tablespace.
Definition: fsp0space.h:201
void set_path(const char *path, size_t len)
Set tablespace path and filename members.
Definition: fsp0space.h:98
page_no_t get_sum_of_sizes() const
Definition: fsp0space.h:146
bool m_ignore_read_only
Ignore server read only configuration for this tablespace.
Definition: fsp0space.h:217
Tablespace()
Definition: fsp0space.h:54
void set_ignore_read_only(bool read_only_status)
Set Ignore Read Only Status for tablespace.
Definition: fsp0space.h:138
uint64_t m_autoextend_size
Autoextend size.
Definition: fsp0space.h:213
bool intersection(const Tablespace *other_space)
Check if two tablespaces have common data file names.
Definition: fsp0space.cc:46
void set_autoextend_size(uint64_t size)
Definition: fsp0space.h:183
const char * path() const
Get tablespace path.
Definition: fsp0space.h:112
space_id_t m_space_id
Tablespace ID.
Definition: fsp0space.h:204
Tablespace(const Tablespace &)
void file_found(Datafile &file)
Note that the data file was found.
Definition: fsp0space.cc:74
const char * name() const
Get tablespace name.
Definition: fsp0space.h:93
void set_space_id(space_id_t space_id)
Set the space id of the tablespace.
Definition: fsp0space.h:116
void shutdown()
Free the memory allocated by the Tablespace object.
Definition: fsp0space.cc:60
void set_name(const char *name)
Set tablespace name.
Definition: fsp0space.h:85
uint32_t m_flags
Tablespace flags.
Definition: fsp0space.h:210
space_id_t space_id() const
Get the space id of the tablespace.
Definition: fsp0space.h:123
std::vector< Datafile, ut::allocator< Datafile > > files_t
Definition: fsp0space.h:49
dberr_t add_datafile(const char *datafile_added)
Use the ADD DATAFILE path to create a Datafile object and add it to the front of m_files.
Definition: fsp0space.cc:124
char * m_path
Path where tablespace files will reside, not including a filename.
Definition: fsp0space.h:207
void set_flags(uint32_t fsp_flags)
Set the tablespace flags.
Definition: fsp0space.h:127
Tablespace & operator=(const Tablespace &)
bool find(const char *filename)
Find a filename in the list of Datafiles for a tablespace.
Definition: fsp0space.cc:85
void set_path(const char *path)
Set tablespace path and filename members.
Definition: fsp0space.h:108
files_t m_files
Data file information - each Datafile can be accessed globally.
Definition: fsp0space.h:52
dberr_t
Definition: db0err.h:39
constexpr space_id_t SPACE_UNKNOWN
Unknown space id.
Definition: fil0fil.h:1162
Tablespace data file implementation.
bool fsp_flags_is_valid(uint32_t flags)
Validate the tablespace flags.
Definition: fsp0fsp.ic:317
static char * mem_strdup(const char *str)
Duplicates a NUL-terminated string.
static char * mem_strdupl(const char *str, ulint len)
Makes a NUL-terminated copy of a nonterminated string.
size_t size(const char *const c)
Definition: base64.h:46
void free(void *ptr) noexcept
Releases storage which has been dynamically allocated through any of the ut::malloc*(),...
Definition: ut0new.h:719
const char * filename
Definition: pfs_example_component_population.cc:67
Version control for database, common definitions, and include files.
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:105
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:93
Dynamic memory allocation routines and custom allocators specifically crafted to support memory instr...