MySQL  8.0.21
Source Code Documentation
Cached_authentication_plugins Class Reference

#include <sql_authentication.h>

Public Member Functions

 Cached_authentication_plugins ()
 Cached_authentication_plugins constructor. More...
 
 ~Cached_authentication_plugins ()
 Cached_authentication_plugins destructor. More...
 
plugin_ref get_cached_plugin_ref (const LEX_CSTRING *plugin)
 Get plugin_ref if plugin is cached. More...
 
plugin_ref get_cached_plugin_ref (cached_plugins_enum plugin_index)
 Fetch cached plugin handle. More...
 
bool is_valid ()
 

Static Public Member Functions

static void optimize_plugin_compare_by_pointer (LEX_CSTRING *plugin)
 Use known pointers for cached plugins to improve comparison time. More...
 
static bool compare_plugin (cached_plugins_enum plugin_index, LEX_CSTRING plugin)
 Compare given plugin against one of the cached ones. More...
 
static bool auth_plugin_is_built_in (LEX_CSTRING *plugin)
 Check if given plugin is a builtin. More...
 
static const char * get_plugin_name (cached_plugins_enum plugin_index)
 Get name of the plugin at given index. More...
 

Public Attributes

plugin_ref cached_plugins [(uint) PLUGIN_LAST]
 

Static Public Attributes

static const LEX_CSTRING cached_plugins_names [(uint) PLUGIN_LAST]
 

Private Attributes

bool m_valid
 

Constructor & Destructor Documentation

◆ Cached_authentication_plugins()

Cached_authentication_plugins::Cached_authentication_plugins ( )

Cached_authentication_plugins constructor.

Cache plugin_ref for each plugin in cached_plugins_names list

◆ ~Cached_authentication_plugins()

Cached_authentication_plugins::~Cached_authentication_plugins ( )

Cached_authentication_plugins destructor.

Releases all plugin_refs

Member Function Documentation

◆ auth_plugin_is_built_in()

static bool Cached_authentication_plugins::auth_plugin_is_built_in ( LEX_CSTRING plugin)
inlinestatic

Check if given plugin is a builtin.

Parameters
[in]pluginPlugin name
Returns
true if builtin, false otherwise

◆ compare_plugin()

static bool Cached_authentication_plugins::compare_plugin ( cached_plugins_enum  plugin_index,
LEX_CSTRING  plugin 
)
inlinestatic

Compare given plugin against one of the cached ones.

Parameters
[in]plugin_indexCached plugin index
[in]pluginPlugin to be compared
Returns
status of comparison
Return values
trueMatch
falseNot a match

◆ get_cached_plugin_ref() [1/2]

plugin_ref Cached_authentication_plugins::get_cached_plugin_ref ( const LEX_CSTRING plugin)

Get plugin_ref if plugin is cached.

Parameters
[in]pluginName of the plugin
Returns
cached plugin_ref if found, 0 otherwise.

◆ get_cached_plugin_ref() [2/2]

plugin_ref Cached_authentication_plugins::get_cached_plugin_ref ( cached_plugins_enum  plugin_index)
inline

Fetch cached plugin handle.

Parameters
plugin_indexCached plugin index
Returns
cached plugin_ref if found, 0 otherwise

◆ get_plugin_name()

static const char* Cached_authentication_plugins::get_plugin_name ( cached_plugins_enum  plugin_index)
inlinestatic

Get name of the plugin at given index.

Parameters
[in]plugin_indexCached plugin index
Returns
name of the cached plugin at given index

◆ is_valid()

bool Cached_authentication_plugins::is_valid ( )
inline

◆ optimize_plugin_compare_by_pointer()

void Cached_authentication_plugins::optimize_plugin_compare_by_pointer ( LEX_CSTRING plugin)
static

Use known pointers for cached plugins to improve comparison time.

Parameters
[in]pluginName of the plugin

Member Data Documentation

◆ cached_plugins

plugin_ref Cached_authentication_plugins::cached_plugins[(uint) PLUGIN_LAST]

◆ cached_plugins_names

const LEX_CSTRING Cached_authentication_plugins::cached_plugins_names
static
Initial value:
= {{STRING_WITH_LEN("caching_sha2_password")},
{STRING_WITH_LEN("mysql_native_password")},
{STRING_WITH_LEN("sha256_password")}}

◆ m_valid

bool Cached_authentication_plugins::m_valid
private

The documentation for this class was generated from the following files: