MySQL  8.0.21
Source Code Documentation

Storage and retrieval of SDIs to/from files. More...

#include "sql/dd/sdi_file.h"
#include "my_config.h"
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <string.h>
#include <sys/types.h>
#include <memory>
#include <ostream>
#include <string>
#include "mysql/components/services/psi_file_bits.h"
#include "mysql/udf_registration_types.h"
#include <unistd.h>
#include "lex_string.h"
#include "m_ctype.h"
#include "my_dbug.h"
#include "my_dir.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "my_sys.h"
#include "my_thread_local.h"
#include "mysql/psi/mysql_file.h"
#include "mysqld_error.h"
#include "sql/dd/impl/sdi.h"
#include "sql/dd/impl/sdi_utils.h"
#include "sql/dd/types/schema.h"
#include "sql/dd/types/table.h"
#include "sql/key.h"
#include "sql/mysqld.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_table.h"

Namespaces

 dd
 The version of the current data dictionary table definitions.
 
 dd::sdi_file
 

Functions

String_type dd::sdi_file::sdi_filename (Object_id id, const String_type &entity_name, const String_type &schema)
 Formats an sdi filename according to the mysql conventions for an entity name and schema name, where the schema may be "". More...
 
bool dd::sdi_file::store_tbl_sdi (const Sdi_type &sdi, const dd::Table &table, const dd::Schema &schema)
 Stores sdi for table in a file. More...
 
bool dd::sdi_file::remove (const String_type &fname)
 Remove a file name from the file system. More...
 
static bool dd::sdi_file::remove_sdi_file_if_exists (const String_type &fname)
 
bool dd::sdi_file::drop_tbl_sdi (const dd::Table &table, const dd::Schema &schema)
 Removes sdi file for a table. More...
 
bool dd::sdi_file::load (THD *thd, const dd::String_type &fname, dd::String_type *buf)
 Read an sdi file from disk and store in a buffer. More...
 
bool dd::sdi_file::expand_pattern (THD *thd, const MYSQL_LEX_STRING &pattern, Paths_type *paths)
 Expand an sdi filename pattern into the set of full paths that match. More...
 
template<typename CLOS >
bool dd::sdi_file::with_str_error (CLOS &&clos)
 
bool dd::sdi_file::check_data_files_exist (const dd::String_type &schema_name, const dd::String_type &table_name)
 Check that the MYD and MYI files for table exists. More...
 

Variables

PSI_file_key key_file_sdi
 

Detailed Description

Storage and retrieval of SDIs to/from files.

Default for SEs which do not have the ability to store SDIs in tablespaces. File storage is not transactional.

Variable Documentation

◆ key_file_sdi

PSI_file_key key_file_sdi