MySQL 8.0.39
Source Code Documentation
rpl_info_dummy.h
Go to the documentation of this file.
1/* Copyright (c) 2010, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
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#ifndef RPL_INFO_DUMMY_H
25#define RPL_INFO_DUMMY_H
26
27#include <stddef.h>
28#include <sys/types.h>
29
30#include "my_inttypes.h"
31#include "sql/rpl_info_handler.h" // Rpl_info_handler
32
33class Server_ids;
34
35/**
36 Defines a dummy handler that should only be internally accessed.
37 This class is useful for debugging and performance tests.
38
39 The flag abort indicates if the execution should abort if some
40 methods are called. See the code for further details.
41*/
43 public:
44 Rpl_info_dummy(const int nparam);
45 ~Rpl_info_dummy() override = default;
46
47 private:
48 int do_init_info() override;
49 int do_init_info(uint instance) override;
51 enum_return_check do_check_info(uint instance) override;
52 void do_end_info() override;
53 int do_flush_info(const bool force) override;
54 int do_remove_info() override;
55 int do_clean_info() override;
56
57 int do_prepare_info_for_read() override;
58 int do_prepare_info_for_write() override;
59 bool do_set_info(const int pos, const char *value) override;
60 bool do_set_info(const int pos, const uchar *value,
61 const size_t size) override;
62 bool do_set_info(const int pos, const int value) override;
63 bool do_set_info(const int pos, const ulong value) override;
64 bool do_set_info(const int pos, const float value) override;
65 bool do_set_info(const int pos, const Server_ids *value) override;
66 bool do_set_info(const int pos, const std::nullptr_t value) override;
67 bool do_set_info(const int pos, const std::nullptr_t value,
68 const size_t size) override;
70 const int pos, char *value, const size_t size,
71 const char *default_value) override;
73 const int pos, uchar *value, const size_t size,
74 const uchar *default_value) override;
76 const int pos, int *value, const int default_value) override;
78 const int pos, ulong *value, const ulong default_value) override;
80 const int pos, float *value, const float default_value) override;
82 const int pos, Server_ids *value,
83 const Server_ids *default_value) override;
84 char *do_get_description_info() override;
85 bool do_is_transactional() override;
86 bool do_update_is_transactional() override;
87 uint do_get_rpl_info_type() override;
88
89 static const bool abort = false;
90
93};
94#endif /* RPL_INFO_DUMMY_H */
Defines a dummy handler that should only be internally accessed.
Definition: rpl_info_dummy.h:42
int do_flush_info(const bool force) override
Definition: rpl_info_dummy.cc:63
~Rpl_info_dummy() override=default
char * do_get_description_info() override
Definition: rpl_info_dummy.cc:188
uint do_get_rpl_info_type() override
Definition: rpl_info_dummy.cc:80
int do_prepare_info_for_write() override
Definition: rpl_info_dummy.cc:46
Rpl_info_dummy(const int nparam)
Definition: rpl_info_dummy.cc:33
Rpl_info_dummy & operator=(const Rpl_info_dummy &info)
int do_init_info() override
Definition: rpl_info_dummy.cc:38
static const bool abort
Definition: rpl_info_dummy.h:89
Rpl_info_handler::enum_field_get_status do_get_info(const int pos, char *value, const size_t size, const char *default_value) override
Definition: rpl_info_dummy.cc:138
int do_remove_info() override
Definition: rpl_info_dummy.cc:70
Rpl_info_dummy(const Rpl_info_dummy &info)
bool do_update_is_transactional() override
Definition: rpl_info_dummy.cc:200
enum_return_check do_check_info() override
Definition: rpl_info_dummy.cc:52
bool do_is_transactional() override
Definition: rpl_info_dummy.cc:194
bool do_set_info(const int pos, const char *value) override
Definition: rpl_info_dummy.cc:82
int do_clean_info() override
Definition: rpl_info_dummy.cc:75
int do_prepare_info_for_read() override
Definition: rpl_info_dummy.cc:40
void do_end_info() override
Definition: rpl_info_dummy.cc:68
Definition: rpl_info_handler.h:58
enum_field_get_status
Definition: rpl_info_handler.h:66
Definition: dynamic_ids.h:33
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
Log info(cout, "NOTE")
enum_return_check
Definition: rpl_info_handler.h:51
unsigned int uint
Definition: uca9-dump.cc:75