MySQL 8.0.40
Source Code Documentation
anonymous_namespace{p_s.cc} Namespace Reference

Classes

struct  parsed_table_path
 

Functions

std::string_view alloc_identifier (PSI_server_data_lock_container *container, PSI_identifier kind, const std::string &id_str)
 Allocate identifier in performance schema container. More...
 
parsed_table_path parse_table_path (PSI_server_data_lock_container *container, const char *table_path)
 Parse a table path string. More...
 

Function Documentation

◆ alloc_identifier()

std::string_view anonymous_namespace{p_s.cc}::alloc_identifier ( PSI_server_data_lock_container container,
PSI_identifier  kind,
const std::string &  id_str 
)

Allocate identifier in performance schema container.

The string is allocated in the cache of the container and is owned by that cache. Therefore the returned std::string_view is only valid for as long as the cache is not cleared by a call to PFS_data_cache::clear() which occurs in:

  • PFS_data_lock_wait_container::clear()
  • PFS_data_lock_wait_container::shrink()
  • PFS_data_lock_container::clear()
  • PFS_data_lock_wait_container::shrink()
    Parameters
    [in]containerThe container to fill
    [in]kindThe identifier kind
    [in]id_strThe identifier string
    Returns
    view of the cached string

◆ parse_table_path()

parsed_table_path anonymous_namespace{p_s.cc}::parse_table_path ( PSI_server_data_lock_container container,
const char *  table_path 
)

Parse a table path string.

Isolate the table schema, name, partition and sub partition from a table path string. Convert these strings and store them in the performance schema container.

Note
String returned are not zero terminated.
Parameters
[in]containerThe container to fill
[in]table_pathThe table path string
Returns
parsed fragments of the table name pointing to cached strings