MySQL 26.7.0
Source Code Documentation
dd::bootstrap::Server_version_transition Class Reference

Decide whether a stored server version may move to a target server version. More...

#include <server_version_transition.h>

Public Types

enum class  Result {
  ACCEPTED , INVALID_SERVER_UPGRADE_NOT_LTS , INVALID_SERVER_UPGRADE_SKIPS_LTS_LINEAGE , BEYOND_SERVER_UPGRADE_THRESHOLD ,
  INVALID_SERVER_DOWNGRADE_NOT_PATCH , NO_PATCH_DOWNGRADE_FOR_INNOVATION_RELEASES , BEYOND_SERVER_DOWNGRADE_THRESHOLD
}
 

Public Member Functions

 Server_version_transition (My_server_version source, My_server_version target)
 
Result evaluate () const
 
bool check_and_report () const
 Emit the matching error-log message if evaluate() rejects the transition. More...
 

Private Attributes

My_server_version m_source
 
My_server_version m_target
 

Detailed Description

Decide whether a stored server version may move to a target server version.

This class is intentionally independent of DD_properties and THD. Tests can construct it directly from persisted source-version details and target metadata, inspect the pure Result from evaluate(), and leave error-log side-effects to check_and_report().

Member Enumeration Documentation

◆ Result

Enumerator
ACCEPTED 
INVALID_SERVER_UPGRADE_NOT_LTS 
INVALID_SERVER_UPGRADE_SKIPS_LTS_LINEAGE 
BEYOND_SERVER_UPGRADE_THRESHOLD 
INVALID_SERVER_DOWNGRADE_NOT_PATCH 
NO_PATCH_DOWNGRADE_FOR_INNOVATION_RELEASES 
BEYOND_SERVER_DOWNGRADE_THRESHOLD 

Constructor & Destructor Documentation

◆ Server_version_transition()

dd::bootstrap::Server_version_transition::Server_version_transition ( My_server_version  source,
My_server_version  target 
)

Member Function Documentation

◆ check_and_report()

bool dd::bootstrap::Server_version_transition::check_and_report ( ) const

Emit the matching error-log message if evaluate() rejects the transition.

Return values
falseTransition accepted.
trueTransition rejected and error reported.

◆ evaluate()

Server_version_transition::Result dd::bootstrap::Server_version_transition::evaluate ( ) const

Member Data Documentation

◆ m_source

My_server_version dd::bootstrap::Server_version_transition::m_source
private

◆ m_target

My_server_version dd::bootstrap::Server_version_transition::m_target
private

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