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
31
#include "
client/dump/abstract_data_object.h
"
32
#include "
client/dump/mysql_object_reader_options.h
"
33
#include "
client/dump/object_filter.h
"
34
#include "
client/dump/sql_formatter_options.h
"
35
#include "
my_inttypes.h
"
36
37
namespace
Mysql
{
38
namespace
Tools {
39
namespace
Dump {
40
41
extern
bool
use_show_create_user
;
42
43
class
Mysqldump_tool_chain_maker_options
44
:
public
Mysql::Tools::Base::Options::Composite_options_provider
{
45
public
:
46
explicit
Mysqldump_tool_chain_maker_options
(
47
const
Mysql_chain_element_options
*mysql_chain_element_options);
48
49
~Mysqldump_tool_chain_maker_options
()
override
;
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
59
bool
is_object_included_in_dump
(
Abstract_data_object
*
object
);
60
61
int
get_parallel_schemas_with_default_thread_count
();
62
int
get_parallel_schemas_thread_count
();
63
64
const
Mysql_chain_element_options
*
m_mysql_chain_element_options
;
65
Sql_formatter_options
*
m_formatter_options
;
66
Mysql_object_reader_options
*
m_object_reader_options
;
67
68
bool
m_dump_all_databases
;
69
bool
m_dump_selected_databases
;
70
uint32
m_default_parallelism
;
71
std::optional<std::string>
m_result_file
;
72
std::optional<std::string>
m_compress_output_algorithm
;
73
bool
m_skip_rows_data
;
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
;
85
int
m_last_parallel_schemas_queue_id
;
86
/* count of parallel-schemas queues with default parallelism */
87
int
m_def_thread_count
;
88
/* thread count of parallel-schemas with threads specified */
89
int
m_parallel_thread_count
;
90
Object_filter
m_object_filter
;
91
};
92
93
}
// namespace Dump
94
}
// namespace Tools
95
}
// namespace Mysql
96
97
#endif
abstract_data_object.h
Mysql::Tools::Base::Options::Composite_options_provider
Provider that aggregates options from other providers.
Definition:
composite_options_provider.h:41
Mysql::Tools::Dump::Abstract_data_object
Base class for all main DB objects.
Definition:
abstract_data_object.h:41
Mysql::Tools::Dump::Mysql_chain_element_options
Definition:
mysql_chain_element_options.h:37
Mysql::Tools::Dump::Mysql_object_reader_options
Definition:
mysql_object_reader_options.h:40
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options
Definition:
mysqldump_tool_chain_maker_options.h:44
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::parallel_schemas_callback
void parallel_schemas_callback(char *)
Definition:
mysqldump_tool_chain_maker_options.cc:39
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_parallel_thread_count
int m_parallel_thread_count
Definition:
mysqldump_tool_chain_maker_options.h:89
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_mysql_chain_element_options
const Mysql_chain_element_options * m_mysql_chain_element_options
Definition:
mysqldump_tool_chain_maker_options.h:64
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_dump_selected_databases
bool m_dump_selected_databases
Definition:
mysqldump_tool_chain_maker_options.h:69
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::get_object_queue_threads_count
int get_object_queue_threads_count(int object_queue_id)
Definition:
mysqldump_tool_chain_maker_options.cc:78
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::get_object_queue_id_for_schema
int get_object_queue_id_for_schema(const std::string &schema)
Definition:
mysqldump_tool_chain_maker_options.cc:88
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_result_file
std::optional< std::string > m_result_file
Definition:
mysqldump_tool_chain_maker_options.h:71
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::Mysqldump_tool_chain_maker_options
Mysqldump_tool_chain_maker_options(const Mysql_chain_element_options *mysql_chain_element_options)
Definition:
mysqldump_tool_chain_maker_options.cc:302
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_def_thread_count
int m_def_thread_count
Definition:
mysqldump_tool_chain_maker_options.h:87
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::process_positional_options
void process_positional_options(std::vector< std::string > positional_options)
Definition:
mysqldump_tool_chain_maker_options.cc:98
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_object_queue_threads
std::map< int, int > m_object_queue_threads
Specifies number of threads used by given queue.
Definition:
mysqldump_tool_chain_maker_options.h:82
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::~Mysqldump_tool_chain_maker_options
~Mysqldump_tool_chain_maker_options() override
Definition:
mysqldump_tool_chain_maker_options.cc:297
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_default_parallelism
uint32 m_default_parallelism
Definition:
mysqldump_tool_chain_maker_options.h:70
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_object_reader_options
Mysql_object_reader_options * m_object_reader_options
Definition:
mysqldump_tool_chain_maker_options.h:66
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::get_parallel_schemas_thread_count
int get_parallel_schemas_thread_count()
Definition:
mysqldump_tool_chain_maker_options.cc:323
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_parallel_schemas_string
std::optional< std::string > m_parallel_schemas_string
Definition:
mysqldump_tool_chain_maker_options.h:84
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::get_parallel_schemas_with_default_thread_count
int get_parallel_schemas_with_default_thread_count()
Definition:
mysqldump_tool_chain_maker_options.cc:319
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_database_to_object_queue_id
std::map< std::string, int > m_database_to_object_queue_id
Definition:
mysqldump_tool_chain_maker_options.h:83
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::create_options
void create_options() override
Creates all options that will be provided.
Definition:
mysqldump_tool_chain_maker_options.cc:252
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_dump_all_databases
bool m_dump_all_databases
Definition:
mysqldump_tool_chain_maker_options.h:68
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_skip_rows_data
bool m_skip_rows_data
Definition:
mysqldump_tool_chain_maker_options.h:73
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_formatter_options
Sql_formatter_options * m_formatter_options
Definition:
mysqldump_tool_chain_maker_options.h:65
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_object_filter
Object_filter m_object_filter
Definition:
mysqldump_tool_chain_maker_options.h:90
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_last_parallel_schemas_queue_id
int m_last_parallel_schemas_queue_id
Definition:
mysqldump_tool_chain_maker_options.h:85
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::is_object_included_in_dump
bool is_object_included_in_dump(Abstract_data_object *object)
Definition:
mysqldump_tool_chain_maker_options.cc:73
Mysql::Tools::Dump::Mysqldump_tool_chain_maker_options::m_compress_output_algorithm
std::optional< std::string > m_compress_output_algorithm
Definition:
mysqldump_tool_chain_maker_options.h:72
Mysql::Tools::Dump::Object_filter
Definition:
object_filter.h:42
Mysql::Tools::Dump::Sql_formatter_options
Definition:
sql_formatter_options.h:47
my_inttypes.h
Some integer typedefs for easier portability.
uint32
uint32_t uint32
Definition:
my_inttypes.h:67
mysql_object_reader_options.h
Mysql::Tools::Dump::use_show_create_user
bool use_show_create_user
Definition:
mysqldump_tool_chain_maker_options.cc:37
Mysql
Definition:
abstract_connection_program.h:38
object_filter.h
sql_formatter_options.h
client
dump
mysqldump_tool_chain_maker_options.h
Generated by
1.9.2