MySQL 8.0.40
Source Code Documentation
mysqldump_tool_chain_maker_options.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2015, 2024, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License, version 2.0, for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef MYSQLDUMP_TOOL_CHAIN_MAKER_OPTIONS_INCLUDED
27#define MYSQLDUMP_TOOL_CHAIN_MAKER_OPTIONS_INCLUDED
28
29#include <optional>
30
35#include "my_inttypes.h"
36
37namespace Mysql {
38namespace Tools {
39namespace Dump {
40
41extern bool use_show_create_user;
42
45 public:
47 const Mysql_chain_element_options *mysql_chain_element_options);
48
50
51 void create_options() override;
52
53 void process_positional_options(std::vector<std::string> positional_options);
54
55 int get_object_queue_id_for_schema(const std::string &schema);
56
57 int get_object_queue_threads_count(int object_queue_id);
58
60
63
67
71 std::optional<std::string> m_result_file;
72 std::optional<std::string> m_compress_output_algorithm;
74
75 private:
76 void parallel_schemas_callback(char *);
77
78 /**
79 Specifies number of threads used by given queue. 0 is set when queue is to
80 use --default-parallelism value.
81 */
82 std::map<int, int> m_object_queue_threads;
83 std::map<std::string, int> m_database_to_object_queue_id;
84 std::optional<std::string> m_parallel_schemas_string;
86 /* count of parallel-schemas queues with default parallelism */
88 /* thread count of parallel-schemas with threads specified */
91};
92
93} // namespace Dump
94} // namespace Tools
95} // namespace Mysql
96
97#endif
Provider that aggregates options from other providers.
Definition: composite_options_provider.h:41
Base class for all main DB objects.
Definition: abstract_data_object.h:41
Definition: mysql_chain_element_options.h:37
Definition: mysql_object_reader_options.h:40
Definition: mysqldump_tool_chain_maker_options.h:44
void parallel_schemas_callback(char *)
Definition: mysqldump_tool_chain_maker_options.cc:39
int m_parallel_thread_count
Definition: mysqldump_tool_chain_maker_options.h:89
const Mysql_chain_element_options * m_mysql_chain_element_options
Definition: mysqldump_tool_chain_maker_options.h:64
bool m_dump_selected_databases
Definition: mysqldump_tool_chain_maker_options.h:69
int get_object_queue_threads_count(int object_queue_id)
Definition: mysqldump_tool_chain_maker_options.cc:78
int get_object_queue_id_for_schema(const std::string &schema)
Definition: mysqldump_tool_chain_maker_options.cc:88
std::optional< std::string > m_result_file
Definition: mysqldump_tool_chain_maker_options.h:71
Mysqldump_tool_chain_maker_options(const Mysql_chain_element_options *mysql_chain_element_options)
Definition: mysqldump_tool_chain_maker_options.cc:302
int m_def_thread_count
Definition: mysqldump_tool_chain_maker_options.h:87
void process_positional_options(std::vector< std::string > positional_options)
Definition: mysqldump_tool_chain_maker_options.cc:98
std::map< int, int > m_object_queue_threads
Specifies number of threads used by given queue.
Definition: mysqldump_tool_chain_maker_options.h:82
~Mysqldump_tool_chain_maker_options() override
Definition: mysqldump_tool_chain_maker_options.cc:297
uint32 m_default_parallelism
Definition: mysqldump_tool_chain_maker_options.h:70
Mysql_object_reader_options * m_object_reader_options
Definition: mysqldump_tool_chain_maker_options.h:66
int get_parallel_schemas_thread_count()
Definition: mysqldump_tool_chain_maker_options.cc:323
std::optional< std::string > m_parallel_schemas_string
Definition: mysqldump_tool_chain_maker_options.h:84
int get_parallel_schemas_with_default_thread_count()
Definition: mysqldump_tool_chain_maker_options.cc:319
std::map< std::string, int > m_database_to_object_queue_id
Definition: mysqldump_tool_chain_maker_options.h:83
void create_options() override
Creates all options that will be provided.
Definition: mysqldump_tool_chain_maker_options.cc:252
bool m_dump_all_databases
Definition: mysqldump_tool_chain_maker_options.h:68
bool m_skip_rows_data
Definition: mysqldump_tool_chain_maker_options.h:73
Sql_formatter_options * m_formatter_options
Definition: mysqldump_tool_chain_maker_options.h:65
Object_filter m_object_filter
Definition: mysqldump_tool_chain_maker_options.h:90
int m_last_parallel_schemas_queue_id
Definition: mysqldump_tool_chain_maker_options.h:85
bool is_object_included_in_dump(Abstract_data_object *object)
Definition: mysqldump_tool_chain_maker_options.cc:73
std::optional< std::string > m_compress_output_algorithm
Definition: mysqldump_tool_chain_maker_options.h:72
Definition: object_filter.h:42
Definition: sql_formatter_options.h:47
Some integer typedefs for easier portability.
uint32_t uint32
Definition: my_inttypes.h:67
bool use_show_create_user
Definition: mysqldump_tool_chain_maker_options.cc:37
Definition: abstract_connection_program.h:38