MySQL 8.0.30
Source Code Documentation
print_version.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2022, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef _print_version_h_
24#define _print_version_h_
25
26#ifdef __cplusplus
27#include <string>
28
29extern "C" {
30#endif /* __cplusplus */
31/**
32 @file include/print_version.h
33*/
34
35/**
36 This function prints a standard version string. Should be used by
37 all utilities.
38*/
39
40void print_version();
41
42/**
43 This function prints a standard version string, with '-debug' added
44 to the name of the executable. Used by utilities that have an
45 explicit need to state that they have been compiled in debug mode.
46*/
47
49
50/**
51 This function prints a version string with the released version
52 supplied by the caller. Used by the server process which needs to
53 print if it is compiled with debug, ASAN, UBSAN or running with
54 Valgrind.
55
56 @param[in] version Null-terminated release version string
57*/
58
59void print_explicit_version(const char *version);
60
61#ifdef __cplusplus
62/**
63 This function builds a version string, with the program name
64 supplied by the caller. Used by MEB and other utilities that want to
65 present themselves under their own name.
66
67 @param[in] progname Program name C++ string.
68
69 @param[out] destination Output buffer.
70
71*/
72
73void build_version(const std::string &progname, std::string *destination);
74} /* extern "C" */
75#endif /* __cplusplus */
76#endif /* _print_version_h_ */
char * progname
Definition: do_ctype.cc:78
void build_version(const std::string &progname, std::string *destination)
This function builds a version string, with the program name supplied by the caller.
Definition: print_version.cc:70
void print_version()
This function prints a standard version string.
Definition: print_version.cc:51
void print_explicit_version(const char *version)
This function prints a version string with the released version supplied by the caller.
Definition: print_version.cc:65
void print_version_debug()
This function prints a standard version string, with '-debug' added to the name of the executable.
Definition: print_version.cc:58
required uint64 version
Definition: replication_group_member_actions.proto:40