MySQL 8.3.0
Source Code Documentation
mysqldump_tool_chain_maker_options.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2015, 2023, 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 also distributed 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 included with MySQL.
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
25#ifndef MYSQLDUMP_TOOL_CHAIN_MAKER_OPTIONS_INCLUDED
26#define MYSQLDUMP_TOOL_CHAIN_MAKER_OPTIONS_INCLUDED
27
28#include <optional>
29
34#include "my_inttypes.h"
35
36namespace Mysql {
37namespace Tools {
38namespace Dump {
39
40extern bool use_show_create_user;
41
44 public:
46 const Mysql_chain_element_options *mysql_chain_element_options);
47
49
50 void create_options() override;
51
52 void process_positional_options(std::vector<std::string> positional_options);
53
54 int get_object_queue_id_for_schema(const std::string &schema);
55
56 int get_object_queue_threads_count(int object_queue_id);
57
59
62
66
70 std::optional<std::string> m_result_file;
71 std::optional<std::string> m_compress_output_algorithm;
73
74 private:
75 void parallel_schemas_callback(char *);
76
77 /**
78 Specifies number of threads used by given queue. 0 is set when queue is to
79 use --default-parallelism value.
80 */
81 std::map<int, int> m_object_queue_threads;
82 std::map<std::string, int> m_database_to_object_queue_id;
83 std::optional<std::string> m_parallel_schemas_string;
85 /* count of parallel-schemas queues with default parallelism */
87 /* thread count of parallel-schemas with threads specified */
90};
91
92} // namespace Dump
93} // namespace Tools
94} // namespace Mysql
95
96#endif
Provider that aggregates options from other providers.
Definition: composite_options_provider.h:40
Base class for all main DB objects.
Definition: abstract_data_object.h:40
Definition: mysql_chain_element_options.h:36
Definition: mysql_object_reader_options.h:39
Definition: mysqldump_tool_chain_maker_options.h:43
void parallel_schemas_callback(char *)
Definition: mysqldump_tool_chain_maker_options.cc:38
int m_parallel_thread_count
Definition: mysqldump_tool_chain_maker_options.h:88
const Mysql_chain_element_options * m_mysql_chain_element_options
Definition: mysqldump_tool_chain_maker_options.h:63
bool m_dump_selected_databases
Definition: mysqldump_tool_chain_maker_options.h:68
int get_object_queue_threads_count(int object_queue_id)
Definition: mysqldump_tool_chain_maker_options.cc:77
int get_object_queue_id_for_schema(const std::string &schema)
Definition: mysqldump_tool_chain_maker_options.cc:87
std::optional< std::string > m_result_file
Definition: mysqldump_tool_chain_maker_options.h:70
Mysqldump_tool_chain_maker_options(const Mysql_chain_element_options *mysql_chain_element_options)
Definition: mysqldump_tool_chain_maker_options.cc:301
int m_def_thread_count
Definition: mysqldump_tool_chain_maker_options.h:86
void process_positional_options(std::vector< std::string > positional_options)
Definition: mysqldump_tool_chain_maker_options.cc:97
std::map< int, int > m_object_queue_threads
Specifies number of threads used by given queue.
Definition: mysqldump_tool_chain_maker_options.h:81
~Mysqldump_tool_chain_maker_options() override
Definition: mysqldump_tool_chain_maker_options.cc:296
uint32 m_default_parallelism
Definition: mysqldump_tool_chain_maker_options.h:69
Mysql_object_reader_options * m_object_reader_options
Definition: mysqldump_tool_chain_maker_options.h:65
int get_parallel_schemas_thread_count()
Definition: mysqldump_tool_chain_maker_options.cc:322
std::optional< std::string > m_parallel_schemas_string
Definition: mysqldump_tool_chain_maker_options.h:83
int get_parallel_schemas_with_default_thread_count()
Definition: mysqldump_tool_chain_maker_options.cc:318
std::map< std::string, int > m_database_to_object_queue_id
Definition: mysqldump_tool_chain_maker_options.h:82
void create_options() override
Creates all options that will be provided.
Definition: mysqldump_tool_chain_maker_options.cc:251
bool m_dump_all_databases
Definition: mysqldump_tool_chain_maker_options.h:67
bool m_skip_rows_data
Definition: mysqldump_tool_chain_maker_options.h:72
Sql_formatter_options * m_formatter_options
Definition: mysqldump_tool_chain_maker_options.h:64
Object_filter m_object_filter
Definition: mysqldump_tool_chain_maker_options.h:89
int m_last_parallel_schemas_queue_id
Definition: mysqldump_tool_chain_maker_options.h:84
bool is_object_included_in_dump(Abstract_data_object *object)
Definition: mysqldump_tool_chain_maker_options.cc:72
std::optional< std::string > m_compress_output_algorithm
Definition: mysqldump_tool_chain_maker_options.h:71
Definition: object_filter.h:41
Definition: sql_formatter_options.h:47
Some integer typedefs for easier portability.
uint32_t uint32
Definition: my_inttypes.h:66
bool use_show_create_user
Definition: mysqldump_tool_chain_maker_options.cc:36
Definition: abstract_connection_program.h:39