MySQL 26.7.0
Source Code Documentation
fil0tablespace_scan.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 2026, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify it under
4the terms of the GNU General Public License, version 2.0, as published by the
5Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
18for more details.
19
20You should have received a copy of the GNU General Public License along with
21this program; if not, write to the Free Software Foundation, Inc.,
2251 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23*/
24
25#pragma once
26
27#include "api0api.h"
28#include "db0err.h"
29#include "trx0purge.h"
30
31namespace ib::fil {
32
33using Space_id_set = std::set<space_id_t>;
34using Dirs = std::vector<std::string>;
35
36/* uint16_t is the index into Scanned_tablespace_dirs::m_scanned_dirs_and_files
37 */
38using Scanned_files = std::vector<std::pair<uint16_t, std::string>>;
39
40/** A directory and tablespace files discovered under it during startup. */
42 public:
43 /* Info populated by opening and reading first few pages from a tablespace
44 file. */
46 /* Space id */
48
49 /* Physical page size of tablespace */
51 };
52
53 /** Structure to represent space information collected after directory
54 scanning. */
56 /* Tablespce file name */
57 std::string file_name{};
58
59 /* physical page size of tablespace */
61 };
62
63 using Space_scan_infos = std::vector<Space_scan_info>;
65 std::unordered_map<space_id_t, Space_scan_infos>;
66
67 /** Default constructor
68 @param[in] dir Directory that the files are under */
69 explicit Scanned_tablespace_dir_and_files(const std::string &dir)
72 }
73
74 /** Add a space to filename mapping.
75 @param[in] space_info Tablespace Info
76 @param[in] name File name.
77 @return number of files that map to the space ID */
78 [[nodiscard]] size_t add(Space_read_info space_info, const std::string &name);
79
80 /** Get the file names that map to a space ID
81 @param[in] space_id Tablespace ID
82 @return the filenames that map to space id */
83 [[nodiscard]] Space_scan_infos *find_by_id(space_id_t space_id) {
84 ut_ad(space_id != TRX_SYS_SPACE);
85
86 auto it = m_id_to_scan_info.find(space_id);
87 if (it != m_id_to_scan_info.end()) {
88 return &it->second;
89 }
90
91 return nullptr;
92 }
93
94 /** Remove the entry for the space ID.
95 @param[in] space_id Tablespace ID mapping to remove
96 @return true if erase successful */
97 [[nodiscard]] bool erase_path(space_id_t space_id) {
98 ut_ad(space_id != TRX_SYS_SPACE);
99
100 const auto n_erased = m_id_to_scan_info.erase(space_id);
101 return (n_erased == 1);
102 }
103
104 /** Clear all the tablespace data. */
105 void clear() { m_id_to_scan_info.clear(); }
106
107 /** @return m_dir */
108 [[nodiscard]] const Fil_path &root() const { return m_dir; }
109
110 /** @return the directory path specified by the user. */
111 [[nodiscard]] const std::string &path() const { return m_dir.path(); }
112
113 void get_space_ids(std::vector<space_id_t> &space_ids) {
114 for (auto &item : m_id_to_scan_info) {
115 space_ids.push_back(item.first);
116 }
117 }
118
119#ifdef UNIV_DEBUG
121 for (auto &info : m_id_to_scan_info) {
122 const auto space_id = info.first;
123 for (const auto &scan_info : info.second) {
124 ib::info() << "MAPPING : [" << space_id << "] = Name : '"
125 << scan_info.file_name
126 << "'. Page Size : " << scan_info.physical_page_size;
127 }
128 }
129 }
130#endif
131
132 private:
133 /** Mapping from tablespace ID to data filenames.
134 Note: The file names in m_id_to_scan_info are relative to m_dir. */
136
137 /** Top level directory where the above files were found. */
139};
140
141/** A helper class to handle partition file names during server upgrade. */
143 public:
145#ifndef UNIV_HOTBACKUP
146 /* Revert to old names if downgrading after upgrade failure. */
149 }
150#endif /* !UNIV_HOTBACKUP */
151
152 /* Clear all accumulated old files. */
153 m_old_paths.clear();
154 }
155
156 /** Add a path to the list of old paths for partitions.
157 @param[in] path path to be added. */
158 void add_old_path(const std::string &path) { m_old_paths.push_back(path); }
159
160 /** Rename partition files during upgrade.
161 @param[in] revert if true, revert to old names */
162 void rename_partition_files(bool revert);
163
164 /** Get modified name for partition file. During upgrade we change all
165 partition files to have lower case separator and partition name.
166 @param[in] old_path old file name and path
167 @param[in] extn file extension suffix
168 @param[out] new_path modified new name for partitioned file
169 @return true, iff name needs modification. */
170 [[nodiscard]] static bool get_partition_file(const std::string &old_path,
171 ib_file_suffix extn,
172 std::string &new_path);
173
174 /** Rename partition file.
175 @param[in] old_path old file path
176 @param[in] extn file extension suffix
177 @param[in] revert if true, rename from new to old file
178 @param[in] import if called during import */
179 static void rename_partition_file(const std::string &old_path,
180 ib_file_suffix extn, bool revert,
181 bool import);
182
183 private:
184 /** Old file paths during 5.7 upgrade. It will be populated by
185 Scanned_tablespace_dirs::scan() */
186 std::vector<std::string> m_old_paths;
187};
188
189/** Directories scanned during startup and the files discovered. */
191 public:
192 using Result =
193 std::pair<std::string,
195
196 /** Constructor */
198
199 /** Normalize and save a directory to scan for IBD and IBU datafiles
200 before recovery.
201 @param[in] directory directory to scan for IBD and IBU files */
202 void add_scan_dir(const std::string &directory);
203
204 /** Normalize and save a list of directories to scan for IBD and IBU
205 datafiles before recovery.
206 @param[in] directories Directories to scan for IBD and IBU files */
207 void add_scan_dirs(const std::string &directories);
208
209 /** Discover tablespaces by reading the header from IBD files.
210 @return DB_SUCCESS if all goes well */
211 [[nodiscard]] dberr_t scan();
212
213 /** Clear all the tablespace file data but leave the list of
214 scanned directories in place. */
215 void clear() {
216 for (auto &dir : m_scanned_dirs_and_files) {
217 dir.clear();
218 }
219
220 m_checked = 0;
221 }
222
223 /** Erase a space ID to filename mapping.
224 @param[in] space_id Tablespace ID to erase
225 @return true if successful */
226 [[nodiscard]] bool erase_path(space_id_t space_id) {
227 for (auto &dir : m_scanned_dirs_and_files) {
228 if (dir.erase_path(space_id)) {
229 return true;
230 }
231 }
232
233 return false;
234 }
235
236 /* Find the first matching space ID -> name mapping.
237 @param[in] space_id Tablespace ID
238 @return directory searched and pointer to names that map to the
239 tablespace ID */
240 [[nodiscard]] Result find_by_id(space_id_t space_id) {
241 for (auto &dir : m_scanned_dirs_and_files) {
242 const auto names = dir.find_by_id(space_id);
243
244 if (names != nullptr) {
245 return (Result{dir.path(), names});
246 }
247 }
248
249 return (Result{"", nullptr});
250 }
251
252 /** Determine if this Fil_path contains the path provided.
253 @param[in] path file or directory path to compare.
254 @return true if this Fil_path contains path */
255 [[nodiscard]] bool contains(const std::string &path) const {
256 const Fil_path descendant{path};
257
258 for (const auto &dir : m_scanned_dirs_and_files) {
259 if (dir.root().is_same_as(descendant) ||
260 dir.root().is_ancestor(descendant)) {
261 return true;
262 }
263 }
264 return false;
265 }
266
267 /** Get the list of directories that InnoDB knows about.
268 @return the list of directories 'dir1;dir2;....;dirN' */
269 [[nodiscard]] std::string get_dirs() const {
270 std::string dirs;
271
273
274 for (const auto &dir : m_scanned_dirs_and_files) {
275 dirs.append(dir.root());
276 dirs.push_back(FIL_PATH_SEPARATOR);
277 }
278
279 dirs.pop_back();
280
281 ut_ad(!dirs.empty());
282
283 return dirs;
284 }
285
286 /** Get the list of tablespace IDs discovered.
287 @param[out] space_ids List of tablespace ids */
288 void get_found_space_ids(std::vector<space_id_t> &space_ids) {
289 for (auto &dir : m_scanned_dirs_and_files) {
290 dir.get_space_ids(space_ids);
291 }
292 }
293
294#ifdef UNIV_DEBUG
296 for (auto &dir : m_scanned_dirs_and_files) {
297 dir.print_mapping();
298 }
299 }
300#endif
301
302 private:
303 /** Print the duplicate filenames for a tablespace ID to the log
304 @param[in] duplicates Duplicate tablespace IDs*/
305 void print_duplicates(const Space_id_set &duplicates);
306
307 /** first=dir path from the user, second=files found under first. */
308 using Scanned_dirs_and_files = std::vector<Scanned_tablespace_dir_and_files>;
309
310 /** Report a warning that a path is being ignored and include the reason. */
311 void warn_ignore(std::string path_in, const char *reason);
312
313 /** Add a single path specification to this list of tablespace directories.
314 Convert it to an absolute path. Check if the path is valid. Ignore
315 unreadable, duplicate or invalid directories.
316 @param[in] str Path specification to tokenize */
317 void add_path(const std::string &str);
318
319 /** Add a delimited list of path specifications to this list of tablespace
320 directories. Convert relative paths to absolute paths. Check if the paths
321 are valid. Ignore unreadable, duplicate or invalid directories.
322 @param[in] str Path specification to tokenize
323 @param[in] delimiters Delimiters */
324 void add_paths(const std::string &str, const std::string &delimiters);
325
326 using Const_iter = Scanned_files::const_iterator;
327
328 /** Check for duplicate tablespace IDs.
329 @param[in] start Start of slice
330 @param[in] end End of slice
331 @param[in] thread_id Thread ID
332 @param[in,out] mutex Mutex protecting the global state
333 @param[in,out] unique To check for duplicates
334 @param[in,out] duplicates Duplicate space IDs found */
335 void duplicate_check(const Const_iter &start, const Const_iter &end,
336 size_t thread_id, std::mutex *mutex,
337 Space_id_set *unique, Space_id_set *duplicates);
338
339 /** Get the tablespace ID from an .ibd and/or an undo tablespace. If the
340 read failed or the ID is 0 on the first page or there is a mismatch of
341 space_ids stored in FSP_SPACE_ID and FIL_PAGE_SPACE_ID, then try finding
342 the ID with get_tablespace_info_heavy(). This function should only be called
343 during server startup.
344 @param[in] filename File name to check
345 @return s_invalid_space_id if not found, otherwise the space ID */
347 get_tablespace_info(const std::string &filename) const;
348
349 private:
350 /** If normal file read isn't sufficient to get the space id and page size,
351 use this heavy method which opens files by guessing different page sizes and
352 read pages from file to determine space_id. */
354 get_tablespace_info_heavy(const std::string &filename) const;
355
356 /** Directories scanned and the files discovered under them. */
358
359 /** Number of files checked. */
360 std::atomic_size_t m_checked;
361
362 /** An object to handle partition file names during upgrade. */
364};
365
366/** Represents infrastructure needed for tablespace files scanning during
367server bootstrap. */
369 public:
370 /** Check if a path is known to InnoDB.
371 @param[in] path Path to check
372 @return true if path is known to InnoDB */
373 [[nodiscard]] bool is_known_path(const std::string &path) {
375 }
376
377 /** Erase a space ID to filename mapping.
378 @param[in] space_id Tablespace ID to erase
379 @return true if successful */
380 [[nodiscard]] bool erase_path(space_id_t space_id) {
381 ut_a(!is_cleared());
382 return m_scanned_dirs.erase_path(space_id);
383 }
384
385 /** Free the data structures required for recovery. */
386 void clear() {
388
391 }
392
393 /** Normalize and save a directory to scan for IBD and IBU datafiles
394 before recovery.
395 @param[in] directory directory to scan for IBD and IBU files */
396 void add_scan_dir(const std::string &directory) {
398
399 m_scanned_dirs.add_scan_dir(directory);
400 }
401
402 /** Normalize and save a list of directories to scan for IBD and IBU
403 datafiles before recovery.
404 @param[in] directories Directories to scan for IBD and IBU files */
405 void add_scan_dirs(const std::string &directories) {
406 m_scanned_dirs.add_scan_dirs(directories);
407 }
408
409 /** Discover tablespaces by reading the header from IBD files.
410 @return DB_SUCCESS if all goes well */
411 [[nodiscard]] dberr_t scan() {
413
415 if (err != DB_SUCCESS) {
416 return err;
417 }
418
420 return err;
421 }
422
423 /** Get the list of directories that InnoDB knows about.
424 @return the list of directories 'dir1;dir2;....;dirN' */
425 [[nodiscard]] std::string get_dirs() { return m_scanned_dirs.get_dirs(); }
426
427 /** Check if file for a given space_id is found during scan.
428 @param[in] space_id Tablespace id
429 @return true if file is found, false otherwise. */
430 [[nodiscard]] bool is_tablespace_file_found(const space_id_t space_id) {
432 return (result.second != nullptr);
433 }
434
435 /** Fetch the file name opened for a space_id from the file map.
436 @param[in] space_id tablespace ID
437 @return Tablespace file name if Tablespace with the id is found, nullopt
438 otherwise */
439 [[nodiscard]] std::optional<std::string> get_tablespace_file_by_id(
440 space_id_t space_id);
441
442#ifndef UNIV_HOTBACKUP
443 /** Get the physical page size of a Tablespace given it's space id.
444 @param[in] space_id Tablespace id
445 @return Tablespace page size if Tablespace with the given id is found, nullopt
446 otherwise */
447 [[nodiscard]] std::optional<size_t> get_tablespace_page_size(
448 space_id_t space_id);
449
450 /** This function should be called after recovery has completed.
451 Check for tablespace files for which we did not see any MLOG_FILE_DELETE
452 or MLOG_FILE_RENAME record. These could not be recovered
453 @return true if there were some filenames missing for which we had to
454 ignore redo log records during the apply phase */
455 [[nodiscard]] bool check_missing_tablespaces();
456#endif /* !UNIV_HOTBACKUP */
457
458 /** Returns true if mapping has been initialized. */
459 [[nodiscard]] bool is_inited() { return (m_state == Scanning_state::INITED); }
460
461 /** Returns true if mapping has been cleared. */
462 [[nodiscard]] bool is_cleared() {
464 }
465
466 /** Returns the list of tablespace ids found during scan
467 @param[out] space_ids List of tablespace ids discovered. */
468 void get_found_space_ids(std::vector<space_id_t> &space_ids) {
471 }
472
473#ifdef UNIV_DEBUG
475#endif
476
477 private:
478 /** Fetch the file names opened for a space_id during recovery.
479 @param[in] space_id Tablespace ID to lookup
480 @return pair of top level directory scanned and names that map
481 to space_id or nullptr if not found. */
485 return m_scanned_dirs.find_by_id(space_id);
486 }
487
488 /** Tablespace directories scanned at startup */
490
492 friend std::ostream &operator<<(std::ostream &stream,
493 const Scanning_state &state) {
494 return stream << static_cast<int>(state);
495 }
497};
498} /* namespace ib::fil */
499
501extern bool lower_case_file_system;
InnoDB Native API.
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:49
Wrapper for a path to a directory that may or may not exist.
Definition: fil0fil.h:971
static bool is_separator(char c)
Check if a character is a path separator ('\' or '/')
Definition: fil0fil.h:1338
const std::string & path() const
Definition: fil0fil.h:1025
A helper class to handle partition file names during server upgrade.
Definition: fil0tablespace_scan.h:142
void rename_partition_files(bool revert)
Rename partition files during upgrade.
Definition: fil0tablespace_scan.cc:604
static bool get_partition_file(const std::string &old_path, ib_file_suffix extn, std::string &new_path)
Get modified name for partition file.
Definition: fil0tablespace_scan.cc:689
void add_old_path(const std::string &path)
Add a path to the list of old paths for partitions.
Definition: fil0tablespace_scan.h:158
~Partition_file_names_upgrader()
Definition: fil0tablespace_scan.h:144
std::vector< std::string > m_old_paths
Old file paths during 5.7 upgrade.
Definition: fil0tablespace_scan.h:186
static void rename_partition_file(const std::string &old_path, ib_file_suffix extn, bool revert, bool import)
Rename partition file.
Definition: fil0tablespace_scan.cc:625
A directory and tablespace files discovered under it during startup.
Definition: fil0tablespace_scan.h:41
Space_id_to_scan_info m_id_to_scan_info
Mapping from tablespace ID to data filenames.
Definition: fil0tablespace_scan.h:135
void clear()
Clear all the tablespace data.
Definition: fil0tablespace_scan.h:105
std::vector< Space_scan_info > Space_scan_infos
Definition: fil0tablespace_scan.h:63
std::unordered_map< space_id_t, Space_scan_infos > Space_id_to_scan_info
Definition: fil0tablespace_scan.h:65
void print_mapping()
Definition: fil0tablespace_scan.h:120
void get_space_ids(std::vector< space_id_t > &space_ids)
Definition: fil0tablespace_scan.h:113
bool erase_path(space_id_t space_id)
Remove the entry for the space ID.
Definition: fil0tablespace_scan.h:97
Space_scan_infos * find_by_id(space_id_t space_id)
Get the file names that map to a space ID.
Definition: fil0tablespace_scan.h:83
const std::string & path() const
Definition: fil0tablespace_scan.h:111
Fil_path m_dir
Top level directory where the above files were found.
Definition: fil0tablespace_scan.h:138
size_t add(Space_read_info space_info, const std::string &name)
Add a space to filename mapping.
Definition: fil0tablespace_scan.cc:37
Scanned_tablespace_dir_and_files(const std::string &dir)
Default constructor.
Definition: fil0tablespace_scan.h:69
const Fil_path & root() const
Definition: fil0tablespace_scan.h:108
Directories scanned during startup and the files discovered.
Definition: fil0tablespace_scan.h:190
bool contains(const std::string &path) const
Determine if this Fil_path contains the path provided.
Definition: fil0tablespace_scan.h:255
void print_duplicates(const Space_id_set &duplicates)
Print the duplicate filenames for a tablespace ID to the log.
Definition: fil0tablespace_scan.cc:209
void duplicate_check(const Const_iter &start, const Const_iter &end, size_t thread_id, std::mutex *mutex, Space_id_set *unique, Space_id_set *duplicates)
Check for duplicate tablespace IDs.
Definition: fil0tablespace_scan.cc:152
void add_scan_dir(const std::string &directory)
Normalize and save a directory to scan for IBD and IBU datafiles before recovery.
Definition: fil0tablespace_scan.cc:248
void get_found_space_ids(std::vector< space_id_t > &space_ids)
Get the list of tablespace IDs discovered.
Definition: fil0tablespace_scan.h:288
std::string get_dirs() const
Get the list of directories that InnoDB knows about.
Definition: fil0tablespace_scan.h:269
Scanned_dirs_and_files m_scanned_dirs_and_files
Directories scanned and the files discovered under them.
Definition: fil0tablespace_scan.h:357
Scanned_tablespace_dir_and_files::Space_read_info get_tablespace_info(const std::string &filename) const
Get the tablespace ID from an .ibd and/or an undo tablespace.
Definition: fil0tablespace_scan.cc:556
std::vector< Scanned_tablespace_dir_and_files > Scanned_dirs_and_files
first=dir path from the user, second=files found under first.
Definition: fil0tablespace_scan.h:308
bool erase_path(space_id_t space_id)
Erase a space ID to filename mapping.
Definition: fil0tablespace_scan.h:226
Scanned_tablespace_dir_and_files::Space_read_info get_tablespace_info_heavy(const std::string &filename) const
If normal file read isn't sufficient to get the space id and page size, use this heavy method which o...
Definition: fil0tablespace_scan.cc:397
std::pair< std::string, Scanned_tablespace_dir_and_files::Space_scan_infos * > Result
Definition: fil0tablespace_scan.h:194
void clear()
Clear all the tablespace file data but leave the list of scanned directories in place.
Definition: fil0tablespace_scan.h:215
void add_path(const std::string &str)
Add a single path specification to this list of tablespace directories.
Definition: fil0tablespace_scan.cc:65
Scanned_tablespace_dirs()
Constructor.
Definition: fil0tablespace_scan.h:197
void add_paths(const std::string &str, const std::string &delimiters)
Add a delimited list of path specifications to this list of tablespace directories.
Definition: fil0tablespace_scan.cc:132
Partition_file_names_upgrader m_partition_file_names_upgrader
An object to handle partition file names during upgrade.
Definition: fil0tablespace_scan.h:363
void print_mapping()
Definition: fil0tablespace_scan.h:295
Scanned_files::const_iterator Const_iter
Definition: fil0tablespace_scan.h:326
dberr_t scan()
Discover tablespaces by reading the header from IBD files.
Definition: fil0tablespace_scan.cc:268
std::atomic_size_t m_checked
Number of files checked.
Definition: fil0tablespace_scan.h:360
Result find_by_id(space_id_t space_id)
Definition: fil0tablespace_scan.h:240
void warn_ignore(std::string path_in, const char *reason)
Report a warning that a path is being ignored and include the reason.
Definition: fil0tablespace_scan.cc:60
void add_scan_dirs(const std::string &directories)
Normalize and save a list of directories to scan for IBD and IBU datafiles before recovery.
Definition: fil0tablespace_scan.cc:256
Represents infrastructure needed for tablespace files scanning during server bootstrap.
Definition: fil0tablespace_scan.h:368
friend std::ostream & operator<<(std::ostream &stream, const Scanning_state &state)
Definition: fil0tablespace_scan.h:492
std::optional< std::string > get_tablespace_file_by_id(space_id_t space_id)
Fetch the file name opened for a space_id from the file map.
Definition: fil0tablespace_scan.cc:740
bool is_tablespace_file_found(const space_id_t space_id)
Check if file for a given space_id is found during scan.
Definition: fil0tablespace_scan.h:430
void add_scan_dirs(const std::string &directories)
Normalize and save a list of directories to scan for IBD and IBU datafiles before recovery.
Definition: fil0tablespace_scan.h:405
std::optional< size_t > get_tablespace_page_size(space_id_t space_id)
Get the physical page size of a Tablespace given it's space id.
Definition: fil0tablespace_scan.cc:754
bool is_inited()
Returns true if mapping has been initialized.
Definition: fil0tablespace_scan.h:459
void get_found_space_ids(std::vector< space_id_t > &space_ids)
Returns the list of tablespace ids found during scan.
Definition: fil0tablespace_scan.h:468
Scanning_state m_state
Definition: fil0tablespace_scan.h:496
std::string get_dirs()
Get the list of directories that InnoDB knows about.
Definition: fil0tablespace_scan.h:425
Scanned_tablespace_dirs::Result get_scanned_filename_by_space_id(space_id_t space_id)
Fetch the file names opened for a space_id during recovery.
Definition: fil0tablespace_scan.h:483
bool is_known_path(const std::string &path)
Check if a path is known to InnoDB.
Definition: fil0tablespace_scan.h:373
void clear()
Free the data structures required for recovery.
Definition: fil0tablespace_scan.h:386
dberr_t scan()
Discover tablespaces by reading the header from IBD files.
Definition: fil0tablespace_scan.h:411
Scanning_state
Definition: fil0tablespace_scan.h:491
void print_mapping()
Definition: fil0tablespace_scan.h:474
bool check_missing_tablespaces()
This function should be called after recovery has completed.
Definition: fil0tablespace_scan.cc:765
void add_scan_dir(const std::string &directory)
Normalize and save a directory to scan for IBD and IBU datafiles before recovery.
Definition: fil0tablespace_scan.h:396
Scanned_tablespace_dirs m_scanned_dirs
Tablespace directories scanned at startup.
Definition: fil0tablespace_scan.h:489
bool is_cleared()
Returns true if mapping has been cleared.
Definition: fil0tablespace_scan.h:462
bool erase_path(space_id_t space_id)
Erase a space ID to filename mapping.
Definition: fil0tablespace_scan.h:380
The class info is used to emit informational log messages.
Definition: ut0log.h:183
Global error codes for the database.
dberr_t
Definition: db0err.h:39
@ DB_SUCCESS
Definition: db0err.h:43
ib_file_suffix
Common InnoDB file extensions.
Definition: fil0fil.h:943
bool lower_case_file_system
Definition: mysqld.cc:1306
ut::unique_ptr< ib::fil::Tablespace_scanning > tablespace_scanning
Definition: fil0fil.cc:1390
constexpr char FIL_PATH_SEPARATOR
Path separator e.g., 'dir;...;dirN'.
Definition: fil0types.h:131
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:180
static my_thread_id thread_id
Definition: my_thr_init.cc:60
static char * path
Definition: mysqldump.cc:151
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1077
std::string dir
Double write files location.
Definition: buf0dblwr.cc:81
Definition: fil0fil.cc:1392
std::vector< std::pair< uint16_t, std::string > > Scanned_files
Definition: fil0tablespace_scan.h:38
std::vector< std::string > Dirs
Definition: fil0tablespace_scan.h:34
std::set< space_id_t > Space_id_set
Definition: fil0tablespace_scan.h:33
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:943
std::conditional_t< !std::is_array< T >::value, std::unique_ptr< T, detail::Deleter< T > >, std::conditional_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, detail::Array_deleter< std::remove_extent_t< T > > >, void > > unique_ptr
The following is a common type that is returned by all the ut::make_unique (non-aligned) specializati...
Definition: ut0new.h:2284
const char * filename
Definition: pfs_example_component_population.cc:67
bool srv_downgrade_partition_files
Definition: srv0srv.cc:119
size_t physical_page_size
Definition: fil0tablespace_scan.h:50
space_id_t space_id
Definition: fil0tablespace_scan.h:47
Structure to represent space information collected after directory scanning.
Definition: fil0tablespace_scan.h:55
size_t physical_page_size
Definition: fil0tablespace_scan.h:60
std::string file_name
Definition: fil0tablespace_scan.h:57
Definition: result.h:30
Purge old versions.
static const space_id_t TRX_SYS_SPACE
Space id of the transaction system page (the system tablespace)
Definition: trx0types.h:52
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:109
#define ut_a_eq(LHS, RHS)
Assert that LHS == RHS.
Definition: ut0dbg.h:91
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:97