MySQL 8.0.42
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
column_filter_inbound_gipk.h
Go to the documentation of this file.
1/* Copyright (c) 2022, 2025, 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 CS_COLUMN_FILTER_GIPK_H
25#define CS_COLUMN_FILTER_GIPK_H
26
28#include "sql/rpl_utility.h" // table_def
29
30namespace cs {
31namespace util {
32/**
33 @class ColumnFilterInboundGipk
34
35 Class used when we want a column view over a table in a context where the
36 replicated table contains a GIPK on the replica, but not on the source.
37
38 SOURCE TABLE `t`
39 +----+----+----+
40 | C1 | C2 | C3 |
41 +----+----+----+
42
43 REPLICA TABLE `t`
44 +------+----+----+----+
45 | GIPK | C1 | C2 | C3 |
46 +------+----+----+----+
47
48 This class filters the first column on iteration.
49 */
51 bool filter_column(TABLE const *, size_t column_index) override;
52
53 /**
54 @brief Is this filter needed given context passed in the parameters
55
56 @param thd the thread objected associated to filter
57 @param table the table where the columns are being iterated
58 @param tabledef the source table definition if applicable
59 @return true if the filter should be used
60 @return false if the filter is not needed
61 */
62 public:
63 static bool is_filter_needed(THD const &thd, TABLE *table,
64 table_def const *tabledef);
65};
66} // namespace util
67} // namespace cs
68#endif // CS_COLUMN_FILTER_GIPK_H
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Class used when we want a column view over a table in a context where the replicated table contains a...
Definition: column_filter_inbound_gipk.h:50
bool filter_column(TABLE const *, size_t column_index) override
Definition: column_filter_inbound_gipk.cc:27
static bool is_filter_needed(THD const &thd, TABLE *table, table_def const *tabledef)
Is this filter needed given context passed in the parameters.
Definition: column_filter_inbound_gipk.cc:32
When iterating the table fields for sometimes you want to skip some columns.
Definition: column_filter.h:45
A table definition from the master.
Definition: rpl_utility.h:248
Definition: commit_order_queue.h:34
Definition: table.h:1400