MySQL 26.7.0
Source Code Documentation
session_legacy_stats.h
Go to the documentation of this file.
1// Copyright (c) 2026, 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 MYSQL_CSA_SESSION_LEGACY_STATS_H
25#define MYSQL_CSA_SESSION_LEGACY_STATS_H
26
27#include <cstring>
28#include "sql/rpl_gtid.h" // Trx_monitoring_info
29#include "sql/rpl_reporting.h" // Slave_reporting_capability::Error
30
31namespace mysql::csa {
32
33/// @brief Aggregates MTA legacy statistics
35 /// Ongoing trx
37 /// Last applied trx
39 /// Last error
41 /// Channel id
42 std::string m_channel_id;
43 /// PSF worker id (1...N)
44 std::size_t m_psf_worker_id;
45 /// Thread (psi) id or 0 if unavailable
47 /// Worker running state: true - active, false - inactive (idle channel)
48 bool m_is_on{false};
49 /// @brief Resets temporary data (error, transaction information, thread id)
50 void clear();
51};
52
53} // namespace mysql::csa
54
55#endif // MYSQL_CSA_SESSION_LEGACY_STATS_H
Error information structure.
Definition: rpl_reporting.h:106
unsigned long long int ulonglong
Definition: my_inttypes.h:56
Definition: channel.cpp:28
Structure to store the GTID and timing information.
Definition: rpl_gtid.h:1264
Aggregates MTA legacy statistics.
Definition: session_legacy_stats.h:34
void clear()
Resets temporary data (error, transaction information, thread id)
Definition: session_legacy_stats.cpp:28
Trx_monitoring_info m_applied_trx
Last applied trx.
Definition: session_legacy_stats.h:38
bool m_is_on
Worker running state: true - active, false - inactive (idle channel)
Definition: session_legacy_stats.h:48
std::size_t m_psf_worker_id
PSF worker id (1...N)
Definition: session_legacy_stats.h:44
Slave_reporting_capability::Error m_error
Last error.
Definition: session_legacy_stats.h:40
std::string m_channel_id
Channel id.
Definition: session_legacy_stats.h:42
ulonglong m_thread_id
Thread (psi) id or 0 if unavailable.
Definition: session_legacy_stats.h:46
Trx_monitoring_info m_ongoing_trx
Ongoing trx.
Definition: session_legacy_stats.h:36