MySQL 8.0.30
Source Code Documentation

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

#include "sql/dd/sdi_file.h"
#include "my_config.h"
#include <assert.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/bits/psi_file_bits.h"
#include "mysql/udf_registration_types.h"
#include <unistd.h>
#include "lex_string.h"
#include "m_ctype.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"

Classes

struct  anonymous_namespace{sdi_file.cc}::Dir_pat_tuple
 

Namespaces

namespace  anonymous_namespace{sdi_file.cc}
 
namespace  dd
 The version of the current data dictionary table definitions.
 
namespace  dd::sdi_file
 

Functions

bool anonymous_namespace{sdi_file.cc}::write_sdi_file (const dd::String_type &fname, const dd::Sdi_type &sdi)
 
bool anonymous_namespace{sdi_file.cc}::sdi_file_exists (const dd::String_type &fname, bool *res)
 
int anonymous_namespace{sdi_file.cc}::pathncmp (const LEX_CSTRING &a, const LEX_CSTRING &b, size_t n)
 
Dir_pat_tuple anonymous_namespace{sdi_file.cc}::make_dir_pattern_tuple (const LEX_STRING &path, const LEX_CSTRING &schema_name)
 
bool anonymous_namespace{sdi_file.cc}::expand_sdi_pattern (const Dir_pat_tuple &dpt, dd::sdi_file::Paths_type *paths)
 
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
extern