MySQL 26.7.0
Source Code Documentation
log0pre_8_0_30.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2020, 2026, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is designed to work with certain software (including
10but not limited to OpenSSL) that is licensed under separate terms,
11as designated in a particular file or component or in included license
12documentation. The authors of MySQL hereby grant you an additional
13permission to link the program and your derivative works with the
14separately licensed software that they have either included with
15the program or referenced in the documentation.
16
17This program is distributed in the hope that it will be useful, but WITHOUT
18ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20for more details.
21
22You should have received a copy of the GNU General Public License along with
23this program; if not, write to the Free Software Foundation, Inc.,
2451 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26*****************************************************************************/
27
28/**************************************************/ /**
29 @file include/log0pre_8_0_30.h
30
31 Redo log functions and constants related to redo formats
32 before 8.0.30.
33
34 *******************************************************/
35
36#ifndef log0pre_8_0_30_h
37#define log0pre_8_0_30_h
38
39/* lsn_t */
40#include "log0types.h"
41
42namespace log_pre_8_0_30 {
43
44/** Prefix of log file name in the old redo format (before 8.0.30).
45For more details @see Log_files_ruleset */
46constexpr const char *const FILE_BASE_NAME = "ib_logfile";
47
48/** Maximum redo log file id in the old format (before 8.0.30). */
49constexpr Log_file_id FILE_MAX_ID = 99;
50
51/** Provides name of the log file with the given file id, e.g. 'ib_logfile0'.
52@param[in] file_id id of the log file
53@return file name */
54std::string file_name(Log_file_id file_id);
55
56/** Validates that ib_logfile0 exists and has format older than VERSION_8_0_30.
57@param[in] files_ctx defines context within which redo log files exist
58@param[in] files non-empty list of file headers of existing log
59 files, ordered by file_id
60@param[out] format discovered redo format if true was returned
61@return true iff ib_logfile0 exists and has format older than VERSION_8_0_30 */
62bool files_validate_format(const Log_files_context &files_ctx,
65
66} // namespace log_pre_8_0_30
67
68#endif /* log0pre_8_0_30_h */
Redo log basic types.
size_t Log_file_id
Log file id (0 for ib_redo0)
Definition: log0types.h:66
Log_format
Supported redo log formats.
Definition: log0types.h:138
std::string format(const routing_guidelines::Session_info &session_info, bool extended_session_info)
Definition: dest_metadata_cache.cc:170
Definition: log0pre_8_0_30.h:42
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:45
constexpr Log_file_id FILE_MAX_ID
Maximum redo log file id in the old format (before 8.0.30).
Definition: log0pre_8_0_30.h:49
bool files_validate_format(const Log_files_context &files_ctx, const ut::vector< Log_file_id_and_header > &files, Log_format &format)
Validates that ib_logfile0 exists and has format older than VERSION_8_0_30.
Definition: log0pre_8_0_30.cc:52
constexpr const char *const FILE_BASE_NAME
Prefix of log file name in the old redo format (before 8.0.30).
Definition: log0pre_8_0_30.h:46
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2724
Configures path to the root directory, where redo subdirectory might be located (or redo log files if...
Definition: log0types.h:204