MySQL 8.0.40
Source Code Documentation
dd::upgrade_57::Upgrade_status Class Reference

Class to manage a temporary file to maintain the progress of the upgrade. More...

#include <upgrade.h>

Public Types

enum class  enum_stage {
  NONE , STARTED , DICT_SPACE_CREATED , DICT_TABLES_CREATED ,
  DICTIONARY_CREATED , USER_TABLE_UPGRADED , SDI_INFO_UPDATED
}
 

Public Member Functions

 Upgrade_status ()
 
bool exists ()
 Check if status file exists. More...
 
bool create ()
 Create status file. More...
 
enum_stage get ()
 Get status from file. More...
 
bool update (enum_stage status)
 Update upgrade status. More...
 
bool remove ()
 Remove upgrade status file. More...
 

Private Member Functions

bool open (int flags)
 
enum_stage read ()
 
bool write (enum_stage status)
 
bool close ()
 

Private Attributes

FILE * m_file
 
const String_type m_filename
 

Detailed Description

Class to manage a temporary file to maintain the progress of the upgrade.

This file will help in error handling for crashes during upgrade. After upgrade is successful, this file will be deleted.

Member Enumeration Documentation

◆ enum_stage

Enumerator
NONE 
STARTED 
DICT_SPACE_CREATED 
DICT_TABLES_CREATED 
DICTIONARY_CREATED 
USER_TABLE_UPGRADED 
SDI_INFO_UPDATED 

Constructor & Destructor Documentation

◆ Upgrade_status()

dd::upgrade_57::Upgrade_status::Upgrade_status ( )

Member Function Documentation

◆ close()

bool dd::upgrade_57::Upgrade_status::close ( )
private

◆ create()

bool dd::upgrade_57::Upgrade_status::create ( )

Create status file.

Returns
false on success, else true.

◆ exists()

bool dd::upgrade_57::Upgrade_status::exists ( )

Check if status file exists.

Returns
true if exists, else false.

◆ get()

Upgrade_status::enum_stage dd::upgrade_57::Upgrade_status::get ( )

Get status from file.

Returns
enum_stage.

◆ open()

bool dd::upgrade_57::Upgrade_status::open ( int  flags)
private

◆ read()

Upgrade_status::enum_stage dd::upgrade_57::Upgrade_status::read ( )
private

◆ remove()

bool dd::upgrade_57::Upgrade_status::remove ( )

Remove upgrade status file.

Returns
false on success, else true.

◆ update()

bool dd::upgrade_57::Upgrade_status::update ( Upgrade_status::enum_stage  stage)

Update upgrade status.

Returns
false on success, else true.

◆ write()

bool dd::upgrade_57::Upgrade_status::write ( Upgrade_status::enum_stage  stage)
private

Member Data Documentation

◆ m_file

FILE* dd::upgrade_57::Upgrade_status::m_file
private

◆ m_filename

const String_type dd::upgrade_57::Upgrade_status::m_filename
private

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