MySQL 8.4.2
Source Code Documentation
print_version.cc File Reference
#include "print_version.h"
#include "my_config.h"
#include <stdio.h>
#include <string.h>
#include <sstream>
#include "my_sys.h"
#include "mysql_com.h"
#include "mysql_version.h"
#include "nulls.h"
#include "strxmov.h"

Macros

#define MYSQL_SERVER_SUFFIX_STR   MYSQL_SERVER_SUFFIX_DEF
 

Functions

void print_version ()
 This function prints a standard version string. More...
 
void print_version_debug ()
 This function prints a standard version string, with '-debug' added to the name of the executable. More...
 
void print_explicit_version (const char *version)
 This function prints a version string with the released version supplied by the caller. More...
 
void build_version (const std::string &progname, std::string *destination)
 This function builds a version string, with the program name supplied by the caller. More...
 

Macro Definition Documentation

◆ MYSQL_SERVER_SUFFIX_STR

#define MYSQL_SERVER_SUFFIX_STR   MYSQL_SERVER_SUFFIX_DEF

Function Documentation

◆ build_version()

void build_version ( const std::string &  progname,
std::string *  destination 
)

This function builds a version string, with the program name supplied by the caller.

Used by MEB and other utilities that want to present themselves under their own name.

Parameters
[in]prognameProgram name C++ string.
[out]destinationOutput buffer.

◆ print_explicit_version()

void print_explicit_version ( const char *  version)

This function prints a version string with the released version supplied by the caller.

Used by the server process which needs to print if it is compiled with debug, ASAN, UBSAN or running with Valgrind.

Parameters
[in]versionNull-terminated release version string

◆ print_version()

void print_version ( )

This function prints a standard version string.

Should be used by all utilities.

◆ print_version_debug()

void print_version_debug ( )

This function prints a standard version string, with '-debug' added to the name of the executable.

Used by utilities that have an explicit need to state that they have been compiled in debug mode.