MySQL 9.2.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 <vector>
35
37#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"
54
57 public std::enable_shared_from_this<MysqlRoutingClassicConnectionBase> {
58 protected:
59 // constructor
60 //
61 // use ::create() instead.
64 std::unique_ptr<ConnectionBase> client_connection,
65 std::unique_ptr<RoutingConnectionBase> client_routing_connection,
66 std::function<void(MySQLRoutingConnectionBase *)> remove_callback)
67 : MySQLRoutingConnectionBase{context, std::move(remove_callback)},
68 client_conn_{std::move(client_connection),
69 std::move(client_routing_connection),
71 ClientSideConnection::protocol_state_type{}},
73 ServerSideConnection::protocol_state_type{}},
74 read_timer_{client_conn_.connection()->io_ctx()},
75 connect_timer_{client_conn_.connection()->io_ctx()},
80 }
81
82 public:
87
88 // create a new shared_ptr<ThisClass>
89 //
90 template <typename... Args>
91 [[nodiscard]] static std::shared_ptr<MysqlRoutingClassicConnectionBase>
92 create(Args &&...args) {
93 // can't use make_unique<> here as the constructor is private.
94 return std::shared_ptr<MysqlRoutingClassicConnectionBase>(
95 new MysqlRoutingClassicConnectionBase(std::forward<Args>(args)...));
96 }
97
98 // get a shared-ptr that refers the same 'this'
99 std::shared_ptr<MysqlRoutingClassicConnectionBase> getptr() {
100 return shared_from_this();
101 }
102
104 std::vector<uint8_t> &error_frame, const uint8_t seq_id,
106 const uint16_t error_code, const std::string &msg,
107 const std::string &sql_state);
108
111
113
115
117 return client_conn().native_handle();
118 }
119
122 }
123
125
126 void disconnect() override;
127
128 virtual void async_run() {}
129
130 void send_server_failed(std::error_code ec, bool call_finish = true);
131
132 void recv_server_failed(std::error_code ec, bool call_finish = true);
133
134 void send_client_failed(std::error_code ec, bool call_finish = true);
135
136 void recv_client_failed(std::error_code ec, bool call_finish = true);
137
138 void server_socket_failed(std::error_code ec, bool call_finish = true);
139
140 virtual void client_socket_failed(std::error_code ec,
141 bool call_finish = true);
142
143 // resume
144 //
145 // A Processor may suspend by returning Result::Suspend. When woken,
146 // typically using an async timer, the Processor calls resume() to execute
147 // the next loop() iteration. This allows waiting asynchronously for a
148 // condition other than async io.
150
151 protected:
152 enum class Function {
153 kLoop,
154
155 kFinish,
156 };
157
159 switch (next) {
161 return finish();
162
163 case Function::kLoop:
164 return loop();
165 }
166 }
167
168 private:
169 // a stack of processors
170 //
171 // take the last processor until its done.
172 //
173 // Flow -> Greeting | Command
174 // Greeting -> Connect -> Server::Greeting
175 // Server::Greeting -> Server::Greeting::Greeting |
176 // Server::Greeting::Error Server::Greeting::Error -> Error::Fatal
177 // Server::Greeting::Greeting -> Client::Greeting
178 // Client::Greeting -> TlsConnect | Server::Greeting::Response
179 // TlsConnect -> Client::Greeting::Full | Error::Fatal
180 // Client::Greeting::Full -> Server::Ok | Auth::Switch | Server::Error
181 // Auth::Switch -> ...
182 // Auth
183 // Server::Ok -> Command
184 // Command ->
185 //
186 std::vector<std::unique_ptr<BasicProcessor>> processors_;
187
188 public:
189 void push_processor(std::unique_ptr<BasicProcessor> processor) {
190 return processors_.push_back(std::move(processor));
191 }
192
193 void pop_processor() { processors_.pop_back(); }
194
196 net::const_buffer session_trackers,
198 bool ignore_some_state_changed = false);
199
200 /**
201 * reset the connection's settings to the initial-values.
202 */
203 void reset_to_initial();
204
205 private:
207 std::string_view stage, Function func);
208
209 void async_send_client(Function next);
210
211 void async_recv_client(Function next);
212
213 void async_send_server(Function next);
214
215 void async_recv_server(Function next);
216
217 void async_recv_both(Function next);
218
220
222
224
225 private:
226 // the client didn't send a Greeting before closing the connection.
227 //
228 // Generate a Greeting to be sent to the server, to ensure the router's IP
229 // isn't blocked due to the server's max_connect_errors.
231
232 // main processing loop
233 void loop();
234
235 // after a QUIT, we should wait until the client closed the connection.
236
237 // called when the connection should be closed.
238 //
239 // called multiple times (once per "active_work_").
240 void finish();
241
242 // final state.
243 //
244 // removes the connection from the connection-container.
245 virtual void done();
246
247 public:
249 return client_conn().protocol();
250 }
251
253 return client_conn().protocol();
254 }
255
257 return server_conn().protocol();
258 }
259
261 return server_conn().protocol();
262 }
263
266
269
270 virtual void stash_server_conn();
271
272 std::optional<mysql_harness::Destination> get_destination_id()
273 const override {
277 }
278
279 void destination_id(const std::optional<mysql_harness::Destination> &id) {
283 }
284
285 std::optional<mysql_harness::Destination> read_only_destination_id()
286 const override {
287 return ro_destination_id_;
288 }
289
291 const std::optional<mysql_harness::Destination> &destination_id) {
293 }
294
295 std::optional<mysql_harness::Destination> read_write_destination_id()
296 const override {
297 return rw_destination_id_;
298 }
300 const std::optional<mysql_harness::Destination> &destination_id) {
302 }
303
304 std::optional<mysql_harness::DestinationEndpoint> destination_endpoint()
305 const override {
309 }
310
312 const std::optional<mysql_harness::DestinationEndpoint> &ep) {
316 }
317
318 std::optional<mysql_harness::DestinationEndpoint>
321 }
323 const std::optional<mysql_harness::DestinationEndpoint> &ep) {
325 }
326
327 std::optional<mysql_harness::DestinationEndpoint>
330 }
331
333 const std::optional<mysql_harness::DestinationEndpoint> &ep) {
335 }
336
337 void set_destination(std::unique_ptr<Destination> destination) {
338 destination_ = std::move(destination);
339 }
340
341 /**
342 * check if the connection is authenticated.
343 *
344 * 'true' after the initial handshake and change-user finished with "ok".
345 * 'false' at connection start and after change-user is started.
346 *
347 * @retval true if the connection is authenticated.
348 * @return false otherwise
349 */
350 bool authenticated() const { return authenticated_; }
351 void authenticated(bool v) { authenticated_ = v; }
352
353 /**
354 * check if connection sharing is possible.
355 *
356 * - the configuration enabled it
357 */
358 bool connection_sharing_possible() const;
359
360 /**
361 * check if connection sharing is allowed.
362 *
363 * - connection sharing is possible.
364 * - no active transaction
365 * - no SET TRANSACTION
366 */
367 bool connection_sharing_allowed() const;
368
369 /**
370 * reset the connection-sharing state.
371 *
372 * - after COM_RESET_CONNECTION::ok
373 * - after COM_CHANGE_USER::ok
374 */
376
377 /**
378 * @return a string representing the reason why sharing is blocked.
379 */
380 std::string connection_sharing_blocked_by() const;
381
382 private:
384
385 bool authenticated_{false};
386
387 public:
388 /**
389 * if the router is sending the initial server-greeting.
390 *
391 * if true, the router sends the initial greeting to the client,
392 * if false, the server is sending the initial greeting and router is forward
393 * it.
394 */
395 bool greeting_from_router() const {
396 return !((source_ssl_mode() == SslMode::kPassthrough) ||
399 }
400
403 }
404
407 }
408
410
413 }
416 }
417
420 }
423 }
424
427
428 void gtid_at_least_executed(const std::string &gtid) {
430 }
431 std::string gtid_at_least_executed() const { return gtid_at_least_executed_; }
432
435 }
438 }
439
442 }
443
446 }
447
448 std::optional<classic_protocol::session_track::TransactionCharacteristics>
451 }
452
454 std::optional<classic_protocol::session_track::TransactionCharacteristics>
455 trx_chars) {
456 trx_characteristics_ = std::move(trx_chars);
457 }
458
459 std::optional<classic_protocol::session_track::TransactionState> trx_state()
460 const {
461 return trx_state_;
462 }
463
464 void wait_until_completed() override {
465 is_completed_.wait([](auto ready) { return ready == true; });
466 }
467
468 void completed() override {
469 is_completed_.serialize_with_cv([](auto &ready, auto &cv) {
470 ready = true;
471 cv.notify_all();
472 });
473 }
474
475 private:
478
479 std::optional<mysql_harness::Destination>
480 rw_destination_id_; // read-write destination-id
481 std::optional<mysql_harness::Destination>
482 ro_destination_id_; // read-only destination-id
483
484 std::optional<mysql_harness::DestinationEndpoint> rw_destination_endpoint_;
485 std::optional<mysql_harness::DestinationEndpoint> ro_destination_endpoint_;
486
487 /**
488 * client side handshake isn't finished yet.
489 */
490 bool in_handshake_{true};
491
492 std::optional<classic_protocol::session_track::TransactionState> trx_state_;
493 std::optional<classic_protocol::session_track::TransactionCharacteristics>
496
498
501
502 public:
505
506 private:
508
509 public:
511
512 Tracer &tracer() { return tracer_; }
513
514 private:
516
517 std::string get_routing_source() const override {
518 return destination_->route_name();
519 }
520
521 void set_routing_source(std::string name) override {
522 destination_->set_route_name(std::move(name));
523 }
524
526 return destination_->get_server_info();
527 }
528
529 public:
532
533 void connect_error_code(const std::error_code &ec) { connect_ec_ = ec; }
534 std::error_code connect_error_code() const { return connect_ec_; }
535
538 }
540
541 const TraceSpan &events() const { return events_; }
542 TraceSpan &events() { return events_; }
543
544 enum class FromEither {
545 None,
546 Started,
549 };
550
552
554
557 }
558
561 }
562
563 private:
566
567 std::error_code connect_ec_{};
568
570
571 std::unique_ptr<Destination> destination_;
572
574
575 // events for router.trace.
577
578 // where to target the server-connections if access_mode is kAuto
579 //
580 // - Unavailable -> any destination (at connect)
581 // - ReadOnly -> expect a destination in read-only mode
582 // prefer read-only servers over read-write servers
583 // - ReadWrite -> expect a destination in read-write mode,
584 // if none is available fail the statement/connection.
585 //
588
589 // server-mode of the server-connection.
590 //
591 // - Unavailable -> server mode is still unknown or ignored.
592 // - ReadOnly -> server is used as read-only. (MUST be read-only)
593 // - ReadWrite -> server is used as read-write.(MUST be read-write)
594 //
595 // used to pick a subset of the available destinations at connect time.
598
599 // wait for 'gtid_at_least_executed_' with switch to a read-only destination?
601
602 // GTID to wait for. May be overwritten by client with query attributes.
604
605 // timeout for read your own writes. Setable with query attributes.
607
609
611
613};
614
615#endif
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
Manage destinations for a Connection Routing.
Definition: destination.h:163
execution context for SQL.
Definition: sql_exec_context.h:39
Definition: connection.h:47
MySQLRoutingContext & context()
Definition: connection.h:56
void client_address(const std::string &dest)
Definition: connection.h:120
MySQLRoutingContext holds data used by MySQLRouting (1 per plugin instances) and MySQLRoutingConnecti...
Definition: context.h:54
Definition: classic_connection_base.h:57
std::chrono::seconds wait_for_my_writes_timeout() const
Definition: classic_connection_base.h:433
ClientSideConnection client_conn_
Definition: classic_connection_base.h:476
std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_characteristics_
Definition: classic_connection_base.h:494
std::string get_routing_source() const override
Definition: classic_connection_base.h:517
std::optional< mysql_harness::DestinationEndpoint > rw_destination_endpoint_
Definition: classic_connection_base.h:484
bool wait_for_my_writes_
Definition: classic_connection_base.h:600
bool authenticated_
Definition: classic_connection_base.h:385
void completed() override
Definition: classic_connection_base.h:468
std::unique_ptr< Destination > destination_
Definition: classic_connection_base.h:571
const ServerSideConnection::protocol_state_type & server_protocol() const
Definition: classic_connection_base.h:260
mysqlrouter::ServerMode expected_server_mode_
Definition: classic_connection_base.h:586
std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_characteristics() const
Definition: classic_connection_base.h:449
const ClientSideConnection::protocol_state_type & client_protocol() const
Definition: classic_connection_base.h:252
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:576
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:350
bool collation_connection_maybe_dirty_
Definition: classic_connection_base.h:497
std::optional< mysql_harness::Destination > read_write_destination_id() const override
Definition: classic_connection_base.h:295
std::optional< mysql_harness::DestinationEndpoint > destination_endpoint() const override
Definition: classic_connection_base.h:304
virtual void stash_server_conn()
Definition: classic_connection_base.cc:1033
TransportConstraints expected_server_transport_constraints_
Definition: classic_connection_base.h:499
void on_handshake_received()
Definition: classic_connection_base.cc:100
void destination_id(const std::optional< mysql_harness::Destination > &id)
Definition: classic_connection_base.h:279
void recv_server_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:139
std::optional< classic_protocol::session_track::TransactionState > trx_state() const
Definition: classic_connection_base.h:459
routing_guidelines::Server_info get_server_info() const override
Definition: classic_connection_base.h:525
void pop_processor()
Definition: classic_connection_base.h:193
void current_server_mode(mysqlrouter::ServerMode v)
Definition: classic_connection_base.h:418
void async_recv_server(Function next)
Definition: classic_connection_base.cc:289
virtual void async_run()
Definition: classic_connection_base.h:128
ExecutionContext exec_ctx_
Definition: classic_connection_base.h:507
std::optional< mysql_harness::Destination > rw_destination_id_
Definition: classic_connection_base.h:480
void trx_characteristics(std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_chars)
Definition: classic_connection_base.h:453
void wait_for_my_writes(bool v)
Definition: classic_connection_base.h:425
net::steady_timer connect_timer_
Definition: classic_connection_base.h:565
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
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:158
DestinationManager * destination_manager_
Definition: classic_connection_base.h:612
bool diagnostic_area_changed_
Definition: classic_connection_base.h:569
void collation_connection_maybe_dirty(bool val)
Definition: classic_connection_base.h:440
ServerSideConnection & server_conn()
Definition: classic_connection_base.h:267
void authenticated(bool v)
Definition: classic_connection_base.h:351
void expected_server_transport_constraints(TransportConstraints val)
Definition: classic_connection_base.h:401
net::steady_timer & connect_timer()
Definition: classic_connection_base.h:531
std::optional< mysql_harness::DestinationEndpoint > ro_destination_endpoint_
Definition: classic_connection_base.h:485
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:555
bool has_transient_error_at_connect() const
Definition: classic_connection_base.h:559
SslMode source_ssl_mode() const
Definition: classic_connection_base.h:112
mysqlrouter::ServerMode current_server_mode() const
Definition: classic_connection_base.h:421
static std::shared_ptr< MysqlRoutingClassicConnectionBase > create(Args &&...args)
Definition: classic_connection_base.h:92
DestinationManager * destination_manager() const
Definition: classic_connection_base.h:120
std::optional< mysql_harness::Destination > ro_destination_id_
Definition: classic_connection_base.h:482
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
const ClientSideConnection & client_conn() const
Definition: classic_connection_base.h:265
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:256
void connect_error_code(const std::error_code &ec)
Definition: classic_connection_base.h:533
std::optional< classic_protocol::session_track::TransactionState > trx_state_
Definition: classic_connection_base.h:492
void async_send_client(Function next)
Definition: classic_connection_base.cc:212
void on_handshake_aborted()
Definition: classic_connection_base.cc:113
WaitableMonitor< bool > is_completed_
Definition: classic_connection_base.h:610
routing_guidelines::Session_info get_session_info()
Definition: classic_connection_base.cc:1038
std::shared_ptr< MysqlRoutingClassicConnectionBase > getptr()
Definition: classic_connection_base.h:99
void disconnect() override
Definition: classic_connection_base.cc:398
bool some_state_changed_
Definition: classic_connection_base.h:495
int active_work_
Definition: classic_connection_base.h:383
void gtid_at_least_executed(const std::string &gtid)
Definition: classic_connection_base.h:428
TraceSpan & events()
Definition: classic_connection_base.h:542
SslMode dest_ssl_mode() const
Definition: classic_connection_base.h:114
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
MysqlRoutingClassicConnectionBase(MySQLRoutingContext &context, DestinationManager *destination_manager, std::unique_ptr< ConnectionBase > client_connection, std::unique_ptr< RoutingConnectionBase > client_routing_connection, std::function< void(MySQLRoutingConnectionBase *)> remove_callback)
Definition: classic_connection_base.h:62
void set_routing_source(std::string name) override
Definition: classic_connection_base.h:521
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:409
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:544
void expected_server_mode(mysqlrouter::ServerMode v)
Definition: classic_connection_base.h:411
std::vector< std::unique_ptr< BasicProcessor > > processors_
Definition: classic_connection_base.h:186
bool has_transient_error_at_connect_
Definition: classic_connection_base.h:608
TransportConstraints expected_server_transport_constraints() const
Definition: classic_connection_base.h:405
FromEither recv_from_either_
Definition: classic_connection_base.h:573
std::optional< mysql_harness::DestinationEndpoint > read_write_destination_endpoint() const override
Definition: classic_connection_base.h:328
void push_processor(std::unique_ptr< BasicProcessor > processor)
Definition: classic_connection_base.h:189
FromEither recv_from_either() const
Definition: classic_connection_base.h:553
mysqlrouter::ServerMode current_server_mode_
Definition: classic_connection_base.h:596
std::string gtid_at_least_executed_
Definition: classic_connection_base.h:603
bool in_handshake_
client side handshake isn't finished yet.
Definition: classic_connection_base.h:490
std::error_code connect_ec_
Definition: classic_connection_base.h:567
ExecutionContext & execution_context()
Definition: classic_connection_base.h:503
void read_write_destination_id(const std::optional< mysql_harness::Destination > &destination_id)
Definition: classic_connection_base.h:299
net::impl::socket::native_handle_type get_client_fd() const override
Definition: classic_connection_base.h:116
net::steady_timer & read_timer()
Definition: classic_connection_base.h:530
ClientSideConnection::protocol_state_type & client_protocol()
Definition: classic_connection_base.h:248
const TraceSpan & events() const
Definition: classic_connection_base.h:541
ClientSideConnection & client_conn()
Definition: classic_connection_base.h:264
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:551
const ServerSideConnection & server_conn() const
Definition: classic_connection_base.h:268
void destination_endpoint(const std::optional< mysql_harness::DestinationEndpoint > &ep)
Definition: classic_connection_base.h:311
void read_only_destination_endpoint(const std::optional< mysql_harness::DestinationEndpoint > &ep)
Definition: classic_connection_base.h:322
bool wait_for_my_writes() const
Definition: classic_connection_base.h:426
std::chrono::seconds wait_for_my_writes_timeout_
Definition: classic_connection_base.h:606
virtual void done()
Definition: classic_connection_base.cc:482
void resume()
Definition: classic_connection_base.h:149
std::optional< mysql_harness::DestinationEndpoint > read_only_destination_endpoint() const override
Definition: classic_connection_base.h:319
void read_write_destination_endpoint(const std::optional< mysql_harness::DestinationEndpoint > &ep)
Definition: classic_connection_base.h:332
net::steady_timer read_timer_
Definition: classic_connection_base.h:564
Tracer tracer_
Definition: classic_connection_base.h:515
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:477
void diagnostic_area_changed(bool diagnostic_area_changed)
Definition: classic_connection_base.h:536
Function
Definition: classic_connection_base.h:152
const ExecutionContext & execution_context() const
Definition: classic_connection_base.h:504
bool greeting_from_router() const
if the router is sending the initial server-greeting.
Definition: classic_connection_base.h:395
std::optional< mysql_harness::Destination > read_only_destination_id() const override
Definition: classic_connection_base.h:285
std::optional< mysql_harness::Destination > get_destination_id() const override
Definition: classic_connection_base.h:272
void set_destination(std::unique_ptr< Destination > destination)
Definition: classic_connection_base.h:337
void wait_until_completed() override
Definition: classic_connection_base.h:464
mysqlrouter::ServerMode expected_server_mode() const
Definition: classic_connection_base.h:414
Tracer & tracer()
Definition: classic_connection_base.h:512
void trace(Tracer::Event e)
Definition: classic_connection_base.h:510
void read_only_destination_id(const std::optional< mysql_harness::Destination > &destination_id)
Definition: classic_connection_base.h:290
bool diagnostic_area_changed() const
Definition: classic_connection_base.h:539
void wait_for_my_writes_timeout(std::chrono::seconds timeout)
Definition: classic_connection_base.h:436
std::error_code connect_error_code() const
Definition: classic_connection_base.h:534
std::string gtid_at_least_executed() const
Definition: classic_connection_base.h:431
bool collation_connection_maybe_dirty() const
Definition: classic_connection_base.h:444
Definition: classic_protocol_state.h:406
typename base_class_::protocol_state_type protocol_state_type
Definition: basic_protocol_splicer.h:91
protocol_state_type & protocol()
Definition: connection_base.h:398
std::unique_ptr< ConnectionBase > & connection()
Definition: connection_base.h:404
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: transport_constraints.h:31
Monitor can be waited for.
Definition: monitor.h:62
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
case opt name
Definition: sslopt-case.h:29
Information about one server destination.
Definition: routing_guidelines.h:78
Information about incoming session.
Definition: routing_guidelines.h:101
double seconds()
Definition: task.cc:314