MySQL  8.0.27
Source Code Documentation
rpl_info_dummy.h
Go to the documentation of this file.
1 /* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef RPL_INFO_DUMMY_H
24 #define RPL_INFO_DUMMY_H
25 
26 #include <stddef.h>
27 #include <sys/types.h>
28 
29 #include "my_inttypes.h"
30 #include "sql/rpl_info_handler.h" // Rpl_info_handler
31 
32 class Server_ids;
33 
34 /**
35  Defines a dummy handler that should only be internally accessed.
36  This class is useful for debugging and performance tests.
37 
38  The flag abort indicates if the execution should abort if some
39  methods are called. See the code for further details.
40 */
42  public:
43  Rpl_info_dummy(const int nparam);
44  ~Rpl_info_dummy() override = default;
45 
46  private:
47  int do_init_info() override;
48  int do_init_info(uint instance) override;
50  enum_return_check do_check_info(uint instance) override;
51  void do_end_info() override;
52  int do_flush_info(const bool force) override;
53  int do_remove_info() override;
54  int do_clean_info() override;
55 
56  int do_prepare_info_for_read() override;
57  int do_prepare_info_for_write() override;
58  bool do_set_info(const int pos, const char *value) override;
59  bool do_set_info(const int pos, const uchar *value,
60  const size_t size) override;
61  bool do_set_info(const int pos, const int value) override;
62  bool do_set_info(const int pos, const ulong value) override;
63  bool do_set_info(const int pos, const float value) override;
64  bool do_set_info(const int pos, const Server_ids *value) override;
65  bool do_set_info(const int pos, const std::nullptr_t value) override;
66  bool do_set_info(const int pos, const std::nullptr_t value,
67  const size_t size) override;
69  const int pos, char *value, const size_t size,
70  const char *default_value) override;
72  const int pos, uchar *value, const size_t size,
73  const uchar *default_value) override;
75  const int pos, int *value, const int default_value) override;
77  const int pos, ulong *value, const ulong default_value) override;
79  const int pos, float *value, const float default_value) override;
81  const int pos, Server_ids *value,
82  const Server_ids *default_value) override;
83  char *do_get_description_info() override;
84  bool do_is_transactional() override;
85  bool do_update_is_transactional() override;
86  uint do_get_rpl_info_type() override;
87 
88  static const bool abort = false;
89 
92 };
93 #endif /* RPL_INFO_DUMMY_H */
Defines a dummy handler that should only be internally accessed.
Definition: rpl_info_dummy.h:41
Rpl_info_handler::enum_field_get_status do_get_info(const int pos, float *value, const float default_value) override
int do_flush_info(const bool force) override
Definition: rpl_info_dummy.cc:62
~Rpl_info_dummy() override=default
char * do_get_description_info() override
Definition: rpl_info_dummy.cc:187
Rpl_info_handler::enum_field_get_status do_get_info(const int pos, ulong *value, const ulong default_value) override
bool do_set_info(const int pos, const int value) override
enum_return_check do_check_info(uint instance) override
uint do_get_rpl_info_type() override
Definition: rpl_info_dummy.cc:79
int do_prepare_info_for_write() override
Definition: rpl_info_dummy.cc:45
bool do_set_info(const int pos, const Server_ids *value) override
Rpl_info_dummy(const int nparam)
Definition: rpl_info_dummy.cc:32
Rpl_info_handler::enum_field_get_status do_get_info(const int pos, Server_ids *value, const Server_ids *default_value) override
int do_init_info() override
Definition: rpl_info_dummy.cc:37
bool do_set_info(const int pos, const float value) override
static const bool abort
Definition: rpl_info_dummy.h:88
Rpl_info_dummy & operator=(const Rpl_info_dummy &info)
Rpl_info_handler::enum_field_get_status do_get_info(const int pos, char *value, const size_t size, const char *default_value) override
int do_remove_info() override
Definition: rpl_info_dummy.cc:69
Rpl_info_dummy(const Rpl_info_dummy &info)
bool do_update_is_transactional() override
Definition: rpl_info_dummy.cc:199
enum_return_check do_check_info() override
Definition: rpl_info_dummy.cc:51
bool do_set_info(const int pos, const uchar *value, const size_t size) override
Rpl_info_handler::enum_field_get_status do_get_info(const int pos, int *value, const int default_value) override
bool do_is_transactional() override
Definition: rpl_info_dummy.cc:193
bool do_set_info(const int pos, const char *value) override
int do_clean_info() override
Definition: rpl_info_dummy.cc:74
bool do_set_info(const int pos, const ulong value) override
int do_init_info(uint instance) override
Rpl_info_handler::enum_field_get_status do_get_info(const int pos, uchar *value, const size_t size, const uchar *default_value) override
int do_prepare_info_for_read() override
Definition: rpl_info_dummy.cc:39
void do_end_info() override
Definition: rpl_info_dummy.cc:67
Definition: rpl_info_handler.h:57
enum_field_get_status
Definition: rpl_info_handler.h:65
Definition: dynamic_ids.h:32
char * pos
Definition: do_ctype.cc:76
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:51
Log info(cout, "NOTE")
const string value("\"Value\"")
enum_return_check
Definition: rpl_info_handler.h:50
unsigned int uint
Definition: uca-dump.cc:29