MySQL 9.1.0
Source Code Documentation
classic_connection_base.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2020, 2024, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef ROUTING_CLASSIC_CONNECTION_BASE_INCLUDED
27#define ROUTING_CLASSIC_CONNECTION_BASE_INCLUDED
28
29#include <chrono>
30#include <functional>
31#include <memory>
32#include <optional>
33#include <string>
34#include <unordered_map>
35#include <variant>
36#include <vector>
37
39#include "connection.h" // MySQLRoutingConnectionBase
42#include "mysqlrouter/channel.h"
49#include "processor.h"
50#include "sql_exec_context.h"
51#include "trace_span.h"
52#include "tracer.h"
53
56 public std::enable_shared_from_this<MysqlRoutingClassicConnectionBase> {
57 protected:
58 // constructor
59 //
60 // use ::create() instead.
62 MySQLRoutingContext &context, RouteDestination *route_destination,
63 std::unique_ptr<ConnectionBase> client_connection,
64 std::unique_ptr<RoutingConnectionBase> client_routing_connection,
65 std::function<void(MySQLRoutingConnectionBase *)> remove_callback)
66 : MySQLRoutingConnectionBase{context, std::move(remove_callback)},
67 route_destination_{route_destination},
70 : Destinations{}},
71 client_conn_{std::move(client_connection),
72 std::move(client_routing_connection),
74 ClientSideConnection::protocol_state_type{}},
76 ServerSideConnection::protocol_state_type{}},
77 read_timer_{client_conn_.connection()->io_ctx()},
78 connect_timer_{client_conn_.connection()->io_ctx()},
81
82 public:
87
88 // create a new shared_ptr<ThisClass>
89 //
90 template <typename... Args>
91 [[nodiscard]] static std::shared_ptr<MysqlRoutingClassicConnectionBase>
93 // clang-format off
94 Args &&... args) {
95 // clang-format on
96
97 // can't use make_unique<> here as the constructor is private.
98 return std::shared_ptr<MysqlRoutingClassicConnectionBase>(
99 new MysqlRoutingClassicConnectionBase(std::forward<Args>(args)...));
100 }
101
102 // get a shared-ptr that refers the same 'this'
103 std::shared_ptr<MysqlRoutingClassicConnectionBase> getptr() {
104 return shared_from_this();
105 }
106
108 std::vector<uint8_t> &error_frame, const uint8_t seq_id,
110 const uint16_t error_code, const std::string &msg,
111 const std::string &sql_state);
112
115
117
119
121 return client_conn().native_handle();
122 }
123
124 std::string get_client_address() const override {
125 return client_conn().endpoint();
126 }
127
128 std::string get_server_address() const override {
129 return server_conn().endpoint();
130 }
131
132 void disconnect() override;
133
134 virtual void async_run() {}
135
136 void send_server_failed(std::error_code ec, bool call_finish = true);
137
138 void recv_server_failed(std::error_code ec, bool call_finish = true);
139
140 void send_client_failed(std::error_code ec, bool call_finish = true);
141
142 void recv_client_failed(std::error_code ec, bool call_finish = true);
143
144 void server_socket_failed(std::error_code ec, bool call_finish = true);
145
146 virtual void client_socket_failed(std::error_code ec,
147 bool call_finish = true);
148
149 // resume
150 //
151 // A Processor may suspend by returning Result::Suspend. When woken,
152 // typically using an async timer, the Processor calls resume() to execute
153 // the next loop() iteration. This allows waiting asynchronously for a
154 // condition other than async io.
156
157 protected:
158 enum class Function {
159 kLoop,
160
161 kFinish,
162 };
163
165 switch (next) {
167 return finish();
168
169 case Function::kLoop:
170 return loop();
171 }
172 }
173
174 private:
175 // a stack of processors
176 //
177 // take the last processor until its done.
178 //
179 // Flow -> Greeting | Command
180 // Greeting -> Connect -> Server::Greeting
181 // Server::Greeting -> Server::Greeting::Greeting |
182 // Server::Greeting::Error Server::Greeting::Error -> Error::Fatal
183 // Server::Greeting::Greeting -> Client::Greeting
184 // Client::Greeting -> TlsConnect | Server::Greeting::Response
185 // TlsConnect -> Client::Greeting::Full | Error::Fatal
186 // Client::Greeting::Full -> Server::Ok | Auth::Switch | Server::Error
187 // Auth::Switch -> ...
188 // Auth
189 // Server::Ok -> Command
190 // Command ->
191 //
192 std::vector<std::unique_ptr<BasicProcessor>> processors_;
193
194 public:
195 void push_processor(std::unique_ptr<BasicProcessor> processor) {
196 return processors_.push_back(std::move(processor));
197 }
198
199 void pop_processor() { processors_.pop_back(); }
200
202 net::const_buffer session_trackers,
204 bool ignore_some_state_changed = false);
205
206 /**
207 * reset the connection's settings to the initial-values.
208 */
209 void reset_to_initial();
210
211 private:
213 std::string_view stage, Function func);
214
215 void async_send_client(Function next);
216
217 void async_recv_client(Function next);
218
219 void async_send_server(Function next);
220
221 void async_recv_server(Function next);
222
223 void async_recv_both(Function next);
224
226
228
230
231 private:
232 // the client didn't send a Greeting before closing the connection.
233 //
234 // Generate a Greeting to be sent to the server, to ensure the router's IP
235 // isn't blocked due to the server's max_connect_errors.
237
238 // main processing loop
239 void loop();
240
241 // after a QUIT, we should wait until the client closed the connection.
242
243 // called when the connection should be closed.
244 //
245 // called multiple times (once per "active_work_").
246 void finish();
247
248 // final state.
249 //
250 // removes the connection from the connection-container.
251 virtual void done();
252
253 public:
255 return client_conn().protocol();
256 }
257
259 return client_conn().protocol();
260 }
261
263 return server_conn().protocol();
264 }
265
267 return server_conn().protocol();
268 }
269
272
275
276 virtual void stash_server_conn();
277
278 std::string get_destination_id() const override {
282 }
283
284 void destination_id(const std::string &id) {
288 }
289
290 std::string read_only_destination_id() const override {
291 return ro_destination_id_;
292 }
293
294 void read_only_destination_id(const std::string &destination_id) {
296 }
297
298 std::string read_write_destination_id() const override {
299 return rw_destination_id_;
300 }
301 void read_write_destination_id(const std::string &destination_id) {
303 }
304
305 std::optional<net::ip::tcp::endpoint> destination_endpoint() const override {
309 }
310
311 void destination_endpoint(const std::optional<net::ip::tcp::endpoint> &ep) {
315 }
316
317 std::optional<net::ip::tcp::endpoint> read_only_destination_endpoint()
318 const override {
320 }
322 const std::optional<net::ip::tcp::endpoint> &ep) {
324 }
325
326 std::optional<net::ip::tcp::endpoint> read_write_destination_endpoint()
327 const override {
329 }
330
332 const std::optional<net::ip::tcp::endpoint> &ep) {
334 }
335
336 /**
337 * check if the connection is authenticated.
338 *
339 * 'true' after the initial handshake and change-user finished with "ok".
340 * 'false' at connection start and after change-user is started.
341 *
342 * @retval true if the connection is authenticated.
343 * @return false otherwise
344 */
345 bool authenticated() const { return authenticated_; }
346 void authenticated(bool v) { authenticated_ = v; }
347
348 /**
349 * check if connection sharing is possible.
350 *
351 * - the configuration enabled it
352 */
353 bool connection_sharing_possible() const;
354
355 /**
356 * check if connection sharing is allowed.
357 *
358 * - connection sharing is possible.
359 * - no active transaction
360 * - no SET TRANSACTION
361 */
362 bool connection_sharing_allowed() const;
363
364 /**
365 * reset the connection-sharing state.
366 *
367 * - after COM_RESET_CONNECTION::ok
368 * - after COM_CHANGE_USER::ok
369 */
371
372 /**
373 * @return a string representing the reason why sharing is blocked.
374 */
375 std::string connection_sharing_blocked_by() const;
376
377 private:
379
380 bool authenticated_{false};
381
382 public:
383 /**
384 * if the router is sending the initial server-greeting.
385 *
386 * if true, the router sends the initial greeting to the client,
387 * if false, the server is sending the initial greeting and router is forward
388 * it.
389 */
390 bool greeting_from_router() const {
391 return !((source_ssl_mode() == SslMode::kPassthrough) ||
394 }
395
396 /// set if the server-connection requires TLS
397 void requires_tls(bool v) { requires_tls_ = v; }
398
399 /// get if the server-connection requires TLS
400 bool requires_tls() const { return requires_tls_; }
401
402 /// set if the server-connection requires a client cert
404
405 /// get if the server-connection requires a client cert
407
409
412 }
415 }
416
419 }
422 }
423
426
427 void gtid_at_least_executed(const std::string &gtid) {
429 }
430 std::string gtid_at_least_executed() const { return gtid_at_least_executed_; }
431
434 }
437 }
438
441
444 }
445
448 }
449
450 std::optional<classic_protocol::session_track::TransactionCharacteristics>
453 }
454
456 std::optional<classic_protocol::session_track::TransactionCharacteristics>
457 trx_chars) {
458 trx_characteristics_ = std::move(trx_chars);
459 }
460
461 std::optional<classic_protocol::session_track::TransactionState> trx_state()
462 const {
463 return trx_state_;
464 }
465
466 private:
469
472
473 std::string rw_destination_id_; // read-write destination-id
474 std::string ro_destination_id_; // read-only destination-id
475
476 std::optional<net::ip::tcp::endpoint> rw_destination_endpoint_;
477 std::optional<net::ip::tcp::endpoint> ro_destination_endpoint_;
478
479 /**
480 * client side handshake isn't finished yet.
481 */
482 bool in_handshake_{true};
483
484 std::optional<classic_protocol::session_track::TransactionState> trx_state_;
485 std::optional<classic_protocol::session_track::TransactionCharacteristics>
488
490
491 bool requires_tls_{true};
492
494
495 public:
498
499 private:
501
502 public:
504
505 Tracer &tracer() { return tracer_; }
506
507 private:
509
510 public:
513
514 void connect_error_code(const std::error_code &ec) { connect_ec_ = ec; }
515 std::error_code connect_error_code() const { return connect_ec_; }
516
519 }
521
522 const TraceSpan &events() const { return events_; }
523 TraceSpan &events() { return events_; }
524
525 enum class FromEither {
526 None,
527 Started,
530 };
531
533
535
538 }
539
542 }
543
544 private:
547
548 std::error_code connect_ec_{};
549
551
553
554 // events for router.trace.
556
557 // where to target the server-connections if access_mode is kAuto
558 //
559 // - Unavailable -> any destination (at connect)
560 // - ReadOnly -> expect a destination in read-only mode
561 // prefer read-only servers over read-write servers
562 // - ReadWrite -> expect a destination in read-write mode,
563 // if none is available fail the statement/connection.
564 //
567
568 // server-mode of the server-connection.
569 //
570 // - Unavailable -> server mode is still unknown or ignored.
571 // - ReadOnly -> server is used as read-only. (MUST be read-only)
572 // - ReadWrite -> server is used as read-write.(MUST be read-write)
573 //
574 // used to pick a subset of the available destinations at connect time.
577
578 // wait for 'gtid_at_least_executed_' with switch to a read-only destination?
580
581 // GTID to wait for. May be overwritten by client with query attributes.
583
584 // timeout for read your own writes. Setable with query attributes.
586
588};
589
590#endif
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
A forward iterable container of destinations.
Definition: destination.h:107
execution context for SQL.
Definition: sql_exec_context.h:39
Definition: connection.h:44
MySQLRoutingContext & context()
Definition: connection.h:53
MySQLRoutingContext holds data used by MySQLRouting (1 per plugin instances) and MySQLRoutingConnecti...
Definition: context.h:59
Definition: classic_connection_base.h:56
std::chrono::seconds wait_for_my_writes_timeout() const
Definition: classic_connection_base.h:432
ClientSideConnection client_conn_
Definition: classic_connection_base.h:470
std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_characteristics_
Definition: classic_connection_base.h:486
bool wait_for_my_writes_
Definition: classic_connection_base.h:579
bool authenticated_
Definition: classic_connection_base.h:380
RouteDestination * destinations()
Definition: classic_connection_base.h:439
void destination_id(const std::string &id)
Definition: classic_connection_base.h:284
const ServerSideConnection::protocol_state_type & server_protocol() const
Definition: classic_connection_base.h:266
mysqlrouter::ServerMode expected_server_mode_
Definition: classic_connection_base.h:565
void requires_client_cert(bool v)
set if the server-connection requires a client cert
Definition: classic_connection_base.h:403
std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_characteristics() const
Definition: classic_connection_base.h:451
const ClientSideConnection::protocol_state_type & client_protocol() const
Definition: classic_connection_base.h:258
void reset_to_initial()
reset the connection's settings to the initial-values.
Definition: classic_connection_base.cc:1000
TraceSpan events_
Definition: classic_connection_base.h:555
bool connection_sharing_possible() const
check if connection sharing is possible.
Definition: classic_connection_base.cc:844
bool authenticated() const
check if the connection is authenticated.
Definition: classic_connection_base.h:345
bool collation_connection_maybe_dirty_
Definition: classic_connection_base.h:489
std::optional< net::ip::tcp::endpoint > read_write_destination_endpoint() const override
Definition: classic_connection_base.h:326
bool requires_client_cert_
Definition: classic_connection_base.h:493
virtual void stash_server_conn()
Definition: classic_connection_base.cc:1033
void on_handshake_received()
Definition: classic_connection_base.cc:100
void recv_server_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:139
Destinations destinations_
Definition: classic_connection_base.h:468
void destination_endpoint(const std::optional< net::ip::tcp::endpoint > &ep)
Definition: classic_connection_base.h:311
std::optional< net::ip::tcp::endpoint > rw_destination_endpoint_
Definition: classic_connection_base.h:476
std::optional< classic_protocol::session_track::TransactionState > trx_state() const
Definition: classic_connection_base.h:461
void pop_processor()
Definition: classic_connection_base.h:199
void current_server_mode(mysqlrouter::ServerMode v)
Definition: classic_connection_base.h:417
void async_recv_server(Function next)
Definition: classic_connection_base.cc:289
virtual void async_run()
Definition: classic_connection_base.h:134
ExecutionContext exec_ctx_
Definition: classic_connection_base.h:500
void trx_characteristics(std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_chars)
Definition: classic_connection_base.h:455
void wait_for_my_writes(bool v)
Definition: classic_connection_base.h:424
net::steady_timer connect_timer_
Definition: classic_connection_base.h:546
static stdx::expected< size_t, std::error_code > encode_error_packet(std::vector< uint8_t > &error_frame, const uint8_t seq_id, const classic_protocol::capabilities::value_type caps, const uint16_t error_code, const std::string &msg, const std::string &sql_state)
Definition: classic_connection_base.cc:62
std::optional< net::ip::tcp::endpoint > destination_endpoint() const override
Definition: classic_connection_base.h:305
void server_socket_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:166
void call_next_function(Function next)
Definition: classic_connection_base.h:164
bool diagnostic_area_changed_
Definition: classic_connection_base.h:550
void collation_connection_maybe_dirty(bool val)
Definition: classic_connection_base.h:442
ServerSideConnection & server_conn()
Definition: classic_connection_base.h:273
void authenticated(bool v)
Definition: classic_connection_base.h:346
net::steady_timer & connect_timer()
Definition: classic_connection_base.h:512
void send_client_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:148
bool connection_sharing_allowed() const
check if connection sharing is allowed.
Definition: classic_connection_base.cc:955
void has_transient_error_at_connect(bool val)
Definition: classic_connection_base.h:536
bool requires_tls() const
get if the server-connection requires TLS
Definition: classic_connection_base.h:400
bool has_transient_error_at_connect() const
Definition: classic_connection_base.h:540
SslMode source_ssl_mode() const
Definition: classic_connection_base.h:116
mysqlrouter::ServerMode current_server_mode() const
Definition: classic_connection_base.h:420
void async_send_server(Function next)
Definition: classic_connection_base.cc:262
stdx::expected< void, std::error_code > track_session_changes(net::const_buffer session_trackers, classic_protocol::capabilities::value_type caps, bool ignore_some_state_changed=false)
Definition: classic_connection_base.cc:485
void trace_and_call_function(Tracer::Event::Direction dir, std::string_view stage, Function func)
Definition: classic_connection_base.cc:794
std::string connection_sharing_blocked_by() const
Definition: classic_connection_base.cc:962
std::string read_only_destination_id() const override
Definition: classic_connection_base.h:290
const ClientSideConnection & client_conn() const
Definition: classic_connection_base.h:271
std::string ro_destination_id_
Definition: classic_connection_base.h:474
virtual void client_socket_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:183
ServerSideConnection::protocol_state_type & server_protocol()
Definition: classic_connection_base.h:262
void read_write_destination_id(const std::string &destination_id)
Definition: classic_connection_base.h:301
void connect_error_code(const std::error_code &ec)
Definition: classic_connection_base.h:514
std::optional< net::ip::tcp::endpoint > read_only_destination_endpoint() const override
Definition: classic_connection_base.h:317
std::optional< classic_protocol::session_track::TransactionState > trx_state_
Definition: classic_connection_base.h:484
void async_send_client(Function next)
Definition: classic_connection_base.cc:212
void on_handshake_aborted()
Definition: classic_connection_base.cc:113
std::shared_ptr< MysqlRoutingClassicConnectionBase > getptr()
Definition: classic_connection_base.h:103
void disconnect() override
Definition: classic_connection_base.cc:398
Destinations & current_destinations()
Definition: classic_connection_base.h:440
bool some_state_changed_
Definition: classic_connection_base.h:487
bool requires_tls_
Definition: classic_connection_base.h:491
int active_work_
Definition: classic_connection_base.h:378
std::string rw_destination_id_
Definition: classic_connection_base.h:473
void gtid_at_least_executed(const std::string &gtid)
Definition: classic_connection_base.h:427
TraceSpan & events()
Definition: classic_connection_base.h:523
static std::shared_ptr< MysqlRoutingClassicConnectionBase > create(Args &&... args)
Definition: classic_connection_base.h:92
void requires_tls(bool v)
set if the server-connection requires TLS
Definition: classic_connection_base.h:397
SslMode dest_ssl_mode() const
Definition: classic_connection_base.h:118
void async_recv_client(Function next)
Definition: classic_connection_base.cc:239
void connection_sharing_allowed_reset()
reset the connection-sharing state.
Definition: classic_connection_base.cc:994
void send_server_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:130
void some_state_changed(bool v)
Definition: classic_connection_base.h:408
bool requires_client_cert() const
get if the server-connection requires a client cert
Definition: classic_connection_base.h:406
void server_side_client_greeting()
Definition: classic_connection_base.cc:420
void async_wait_send_server(Function next)
Definition: classic_connection_base.cc:381
FromEither
Definition: classic_connection_base.h:525
void expected_server_mode(mysqlrouter::ServerMode v)
Definition: classic_connection_base.h:410
std::vector< std::unique_ptr< BasicProcessor > > processors_
Definition: classic_connection_base.h:192
bool has_transient_error_at_connect_
Definition: classic_connection_base.h:587
RouteDestination * route_destination_
Definition: classic_connection_base.h:467
FromEither recv_from_either_
Definition: classic_connection_base.h:552
void push_processor(std::unique_ptr< BasicProcessor > processor)
Definition: classic_connection_base.h:195
FromEither recv_from_either() const
Definition: classic_connection_base.h:534
mysqlrouter::ServerMode current_server_mode_
Definition: classic_connection_base.h:575
std::string gtid_at_least_executed_
Definition: classic_connection_base.h:582
bool in_handshake_
client side handshake isn't finished yet.
Definition: classic_connection_base.h:482
void read_only_destination_endpoint(const std::optional< net::ip::tcp::endpoint > &ep)
Definition: classic_connection_base.h:321
std::optional< net::ip::tcp::endpoint > ro_destination_endpoint_
Definition: classic_connection_base.h:477
std::error_code connect_ec_
Definition: classic_connection_base.h:548
ExecutionContext & execution_context()
Definition: classic_connection_base.h:496
net::impl::socket::native_handle_type get_client_fd() const override
Definition: classic_connection_base.h:120
net::steady_timer & read_timer()
Definition: classic_connection_base.h:511
ClientSideConnection::protocol_state_type & client_protocol()
Definition: classic_connection_base.h:254
void read_only_destination_id(const std::string &destination_id)
Definition: classic_connection_base.h:294
const TraceSpan & events() const
Definition: classic_connection_base.h:522
void read_write_destination_endpoint(const std::optional< net::ip::tcp::endpoint > &ep)
Definition: classic_connection_base.h:331
ClientSideConnection & client_conn()
Definition: classic_connection_base.h:270
std::string get_client_address() const override
Returns address of client which connected to router.
Definition: classic_connection_base.h:124
void async_recv_both(Function next)
Definition: classic_connection_base.cc:308
void loop()
Definition: classic_connection_base.cc:804
void recv_from_either(FromEither v)
Definition: classic_connection_base.h:532
const ServerSideConnection & server_conn() const
Definition: classic_connection_base.h:274
std::string get_destination_id() const override
Definition: classic_connection_base.h:278
bool wait_for_my_writes() const
Definition: classic_connection_base.h:425
std::chrono::seconds wait_for_my_writes_timeout_
Definition: classic_connection_base.h:585
virtual void done()
Definition: classic_connection_base.cc:482
void resume()
Definition: classic_connection_base.h:155
std::string get_server_address() const override
Returns address of server to which connection is established.
Definition: classic_connection_base.h:128
net::steady_timer read_timer_
Definition: classic_connection_base.h:545
Tracer tracer_
Definition: classic_connection_base.h:508
void recv_client_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:157
void finish()
Definition: classic_connection_base.cc:434
ServerSideConnection server_conn_
Definition: classic_connection_base.h:471
void diagnostic_area_changed(bool diagnostic_area_changed)
Definition: classic_connection_base.h:517
Function
Definition: classic_connection_base.h:158
const ExecutionContext & execution_context() const
Definition: classic_connection_base.h:497
std::string read_write_destination_id() const override
Definition: classic_connection_base.h:298
bool greeting_from_router() const
if the router is sending the initial server-greeting.
Definition: classic_connection_base.h:390
mysqlrouter::ServerMode expected_server_mode() const
Definition: classic_connection_base.h:413
Tracer & tracer()
Definition: classic_connection_base.h:505
void trace(Tracer::Event e)
Definition: classic_connection_base.h:503
MysqlRoutingClassicConnectionBase(MySQLRoutingContext &context, RouteDestination *route_destination, std::unique_ptr< ConnectionBase > client_connection, std::unique_ptr< RoutingConnectionBase > client_routing_connection, std::function< void(MySQLRoutingConnectionBase *)> remove_callback)
Definition: classic_connection_base.h:61
bool diagnostic_area_changed() const
Definition: classic_connection_base.h:520
void wait_for_my_writes_timeout(std::chrono::seconds timeout)
Definition: classic_connection_base.h:435
std::error_code connect_error_code() const
Definition: classic_connection_base.h:515
std::string gtid_at_least_executed() const
Definition: classic_connection_base.h:430
bool collation_connection_maybe_dirty() const
Definition: classic_connection_base.h:446
Manage destinations for a Connection Routing.
Definition: destination.h:189
Definition: classic_protocol_state.h:406
typename base_class_::protocol_state_type protocol_state_type
Definition: basic_protocol_splicer.h:91
std::string endpoint() const
Definition: connection_base.h:386
protocol_state_type & protocol()
Definition: connection_base.h:398
net::impl::socket::native_handle_type native_handle() const
Definition: connection_base.h:367
SslMode ssl_mode() const
Definition: connection_base.h:363
Events of a command.
Definition: trace_span.h:77
Definition: tracer.h:61
Direction
Definition: tracer.h:73
traces the timestamps of events in a stderr log.
Definition: tracer.h:49
void trace(Event e)
Definition: tracer.h:128
Definition: timer.h:57
Definition: buffer.h:135
std::bitset< 32 > value_type
Definition: classic_protocol_constants.h:73
std::string dir
Double write files location.
Definition: buf0dblwr.cc:77
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:498
ServerMode
Definition: datatypes.h:50
int native_handle_type
Definition: socket_constants.h:51
Definition: gcs_xcom_synode.h:64
SslMode
Definition: ssl_mode.h:29
@ kPassthrough
double seconds()
Definition: task.cc:310