MySQL 8.0.37
Source Code Documentation
sync_before_execution_message.h
Go to the documentation of this file.
1/* Copyright (c) 2018, 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 SYNC_BEFORE_EXECUTION_MESSAGE_INCLUDED
25#define SYNC_BEFORE_EXECUTION_MESSAGE_INCLUDED
26
28#include <vector>
29
30#include "my_inttypes.h"
32
33/*
34 @class Sync_before_execution_message
35 */
37 public:
39 // This type should not be used anywhere.
41
42 // Length of the payload item: 4 bytes
44
45 // No valid type codes can appear after this one.
46 PIT_MAX = 2
47 };
48
49 /**
50 Message constructor
51
52 @param[in] thread_id the thread that did the request
53 */
55
56 /**
57 Message decode constructor
58
59 @param[in] buf message buffer
60 @param[in] len message buffer length
61 */
62 Sync_before_execution_message(const unsigned char *buf, size_t len);
64
66
67 protected:
68 /*
69 Implementation of the template methods
70 */
71 void encode_payload(std::vector<unsigned char> *buffer) const override;
72 void decode_payload(const unsigned char *buffer,
73 const unsigned char *end) override;
74
75 private:
77};
78
79#endif /* SYNC_BEFORE_EXECUTION_MESSAGE_INCLUDED */
This is the base GCS plugin message.
Definition: gcs_plugin_messages.h:64
Definition: sync_before_execution_message.h:36
void encode_payload(std::vector< unsigned char > *buffer) const override
Encodes the contents of this instance payload into the buffer.
Definition: sync_before_execution_message.cc:40
~Sync_before_execution_message() override
void decode_payload(const unsigned char *buffer, const unsigned char *end) override
Decodes the contents of the buffer and sets the payload field values according to the values decoded.
Definition: sync_before_execution_message.cc:48
enum_payload_item_type
Definition: sync_before_execution_message.h:38
@ PIT_UNKNOWN
Definition: sync_before_execution_message.h:40
@ PIT_MY_THREAD_ID
Definition: sync_before_execution_message.h:43
@ PIT_MAX
Definition: sync_before_execution_message.h:46
my_thread_id m_thread_id
Definition: sync_before_execution_message.h:76
my_thread_id get_thread_id()
Definition: sync_before_execution_message.cc:59
Sync_before_execution_message(my_thread_id thread_id)
Message constructor.
Definition: sync_before_execution_message.cc:27
Some integer typedefs for easier portability.
static my_thread_id thread_id
Definition: my_thr_init.cc:63
uint32 my_thread_id
Definition: my_thread_local.h:34
Definition: buf0block_hint.cc:30
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:420
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192