MySQL 9.1.0
Source Code Documentation
print_version.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef _print_version_h_
25#define _print_version_h_
26
27#ifdef __cplusplus
28#include <string>
29
30extern "C" {
31#endif /* __cplusplus */
32/**
33 @file include/print_version.h
34*/
35
36/**
37 This function prints a standard version string. Should be used by
38 all utilities.
39*/
40
41void print_version();
42
43/**
44 This function prints a standard version string, with '-debug' added
45 to the name of the executable. Used by utilities that have an
46 explicit need to state that they have been compiled in debug mode.
47*/
48
50
51/**
52 This function prints a version string with the released version
53 supplied by the caller. Used by the server process which needs to
54 print if it is compiled with debug, ASAN, UBSAN or running with
55 Valgrind.
56
57 @param[in] version Null-terminated release version string
58*/
59
60void print_explicit_version(const char *version);
61
62#ifdef __cplusplus
63/**
64 This function builds a version string, with the program name
65 supplied by the caller. Used by MEB and other utilities that want to
66 present themselves under their own name.
67
68 @param[in] progname Program name C++ string.
69
70 @param[out] destination Output buffer.
71
72*/
73
74void build_version(const std::string &progname, std::string *destination);
75} /* extern "C" */
76#endif /* __cplusplus */
77#endif /* _print_version_h_ */
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:73
void print_version()
This function prints a standard version string.
Definition: print_version.cc:54
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:68
void print_version_debug()
This function prints a standard version string, with '-debug' added to the name of the executable.
Definition: print_version.cc:61
required uint64 version
Definition: replication_group_member_actions.proto:41