MySQL 8.4.4
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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()},
82 }
83
84 public:
89
90 // create a new shared_ptr<ThisClass>
91 //
92 template <typename... Args>
93 [[nodiscard]] static std::shared_ptr<MysqlRoutingClassicConnectionBase>
94 create(Args &&...args) {
95 // can't use make_unique<> here as the constructor is private.
96 return std::shared_ptr<MysqlRoutingClassicConnectionBase>(
97 new MysqlRoutingClassicConnectionBase(std::forward<Args>(args)...));
98 }
99
100 // get a shared-ptr that refers the same 'this'
101 std::shared_ptr<MysqlRoutingClassicConnectionBase> getptr() {
102 return shared_from_this();
103 }
104
106 std::vector<uint8_t> &error_frame, const uint8_t seq_id,
108 const uint16_t error_code, const std::string &msg,
109 const std::string &sql_state);
110
113
115
117
119 return client_conn().native_handle();
120 }
121
122 void disconnect() override;
123
124 virtual void async_run() {}
125
126 void send_server_failed(std::error_code ec, bool call_finish = true);
127
128 void recv_server_failed(std::error_code ec, bool call_finish = true);
129
130 void send_client_failed(std::error_code ec, bool call_finish = true);
131
132 void recv_client_failed(std::error_code ec, bool call_finish = true);
133
134 void server_socket_failed(std::error_code ec, bool call_finish = true);
135
136 virtual void client_socket_failed(std::error_code ec,
137 bool call_finish = true);
138
139 // resume
140 //
141 // A Processor may suspend by returning Result::Suspend. When woken,
142 // typically using an async timer, the Processor calls resume() to execute
143 // the next loop() iteration. This allows waiting asynchronously for a
144 // condition other than async io.
146
147 protected:
148 enum class Function {
149 kLoop,
150
151 kFinish,
152 };
153
155 switch (next) {
157 return finish();
158
159 case Function::kLoop:
160 return loop();
161 }
162 }
163
164 private:
165 // a stack of processors
166 //
167 // take the last processor until its done.
168 //
169 // Flow -> Greeting | Command
170 // Greeting -> Connect -> Server::Greeting
171 // Server::Greeting -> Server::Greeting::Greeting |
172 // Server::Greeting::Error Server::Greeting::Error -> Error::Fatal
173 // Server::Greeting::Greeting -> Client::Greeting
174 // Client::Greeting -> TlsConnect | Server::Greeting::Response
175 // TlsConnect -> Client::Greeting::Full | Error::Fatal
176 // Client::Greeting::Full -> Server::Ok | Auth::Switch | Server::Error
177 // Auth::Switch -> ...
178 // Auth
179 // Server::Ok -> Command
180 // Command ->
181 //
182 std::vector<std::unique_ptr<BasicProcessor>> processors_;
183
184 public:
185 void push_processor(std::unique_ptr<BasicProcessor> processor) {
186 return processors_.push_back(std::move(processor));
187 }
188
189 void pop_processor() { processors_.pop_back(); }
190
192 net::const_buffer session_trackers,
194 bool ignore_some_state_changed = false);
195
196 /**
197 * reset the connection's settings to the initial-values.
198 */
199 void reset_to_initial();
200
201 private:
203 std::string_view stage, Function func);
204
205 void async_send_client(Function next);
206
207 void async_recv_client(Function next);
208
209 void async_send_server(Function next);
210
211 void async_recv_server(Function next);
212
213 void async_recv_both(Function next);
214
216
218
220
221 private:
222 // the client didn't send a Greeting before closing the connection.
223 //
224 // Generate a Greeting to be sent to the server, to ensure the router's IP
225 // isn't blocked due to the server's max_connect_errors.
227
228 // main processing loop
229 void loop();
230
231 // after a QUIT, we should wait until the client closed the connection.
232
233 // called when the connection should be closed.
234 //
235 // called multiple times (once per "active_work_").
236 void finish();
237
238 // final state.
239 //
240 // removes the connection from the connection-container.
241 virtual void done();
242
243 public:
245 return client_conn().protocol();
246 }
247
249 return client_conn().protocol();
250 }
251
253 return server_conn().protocol();
254 }
255
257 return server_conn().protocol();
258 }
259
262
265
266 virtual void stash_server_conn();
267
268 std::string get_destination_id() const override {
272 }
273
274 void destination_id(const std::string &id) {
278 }
279
280 std::string read_only_destination_id() const override {
281 return ro_destination_id_;
282 }
283
284 void read_only_destination_id(const std::string &destination_id) {
286 }
287
288 std::string read_write_destination_id() const override {
289 return rw_destination_id_;
290 }
291 void read_write_destination_id(const std::string &destination_id) {
293 }
294
295 std::optional<net::ip::tcp::endpoint> destination_endpoint() const override {
299 }
300
301 void destination_endpoint(const std::optional<net::ip::tcp::endpoint> &ep) {
305 }
306
307 std::optional<net::ip::tcp::endpoint> read_only_destination_endpoint()
308 const override {
310 }
312 const std::optional<net::ip::tcp::endpoint> &ep) {
314 }
315
316 std::optional<net::ip::tcp::endpoint> read_write_destination_endpoint()
317 const override {
319 }
320
322 const std::optional<net::ip::tcp::endpoint> &ep) {
324 }
325
326 /**
327 * check if the connection is authenticated.
328 *
329 * 'true' after the initial handshake and change-user finished with "ok".
330 * 'false' at connection start and after change-user is started.
331 *
332 * @retval true if the connection is authenticated.
333 * @return false otherwise
334 */
335 bool authenticated() const { return authenticated_; }
336 void authenticated(bool v) { authenticated_ = v; }
337
338 /**
339 * check if connection sharing is possible.
340 *
341 * - the configuration enabled it
342 */
343 bool connection_sharing_possible() const;
344
345 /**
346 * check if connection sharing is allowed.
347 *
348 * - connection sharing is possible.
349 * - no active transaction
350 * - no SET TRANSACTION
351 */
352 bool connection_sharing_allowed() const;
353
354 /**
355 * reset the connection-sharing state.
356 *
357 * - after COM_RESET_CONNECTION::ok
358 * - after COM_CHANGE_USER::ok
359 */
361
362 /**
363 * @return a string representing the reason why sharing is blocked.
364 */
365 std::string connection_sharing_blocked_by() const;
366
367 private:
369
370 bool authenticated_{false};
371
372 public:
373 /**
374 * if the router is sending the initial server-greeting.
375 *
376 * if true, the router sends the initial greeting to the client,
377 * if false, the server is sending the initial greeting and router is forward
378 * it.
379 */
380 bool greeting_from_router() const {
381 return !((source_ssl_mode() == SslMode::kPassthrough) ||
384 }
385
386 /// set if the server-connection requires TLS
387 void requires_tls(bool v) { requires_tls_ = v; }
388
389 /// get if the server-connection requires TLS
390 bool requires_tls() const { return requires_tls_; }
391
392 /// set if the server-connection requires a client cert
394
395 /// get if the server-connection requires a client cert
397
399
402 }
405 }
406
409 }
412 }
413
416
417 void gtid_at_least_executed(const std::string &gtid) {
419 }
420 std::string gtid_at_least_executed() const { return gtid_at_least_executed_; }
421
424 }
427 }
428
431
434 }
435
438 }
439
440 std::optional<classic_protocol::session_track::TransactionCharacteristics>
443 }
444
446 std::optional<classic_protocol::session_track::TransactionCharacteristics>
447 trx_chars) {
448 trx_characteristics_ = std::move(trx_chars);
449 }
450
451 std::optional<classic_protocol::session_track::TransactionState> trx_state()
452 const {
453 return trx_state_;
454 }
455
456 private:
459
462
463 std::string rw_destination_id_; // read-write destination-id
464 std::string ro_destination_id_; // read-only destination-id
465
466 std::optional<net::ip::tcp::endpoint> rw_destination_endpoint_;
467 std::optional<net::ip::tcp::endpoint> ro_destination_endpoint_;
468
469 /**
470 * client side handshake isn't finished yet.
471 */
472 bool in_handshake_{true};
473
474 std::optional<classic_protocol::session_track::TransactionState> trx_state_;
475 std::optional<classic_protocol::session_track::TransactionCharacteristics>
478
480
481 bool requires_tls_{true};
482
484
485 public:
488
489 private:
491
492 public:
494
495 Tracer &tracer() { return tracer_; }
496
497 private:
499
500 public:
503
504 void connect_error_code(const std::error_code &ec) { connect_ec_ = ec; }
505 std::error_code connect_error_code() const { return connect_ec_; }
506
509 }
511
512 const TraceSpan &events() const { return events_; }
513 TraceSpan &events() { return events_; }
514
515 enum class FromEither {
516 None,
517 Started,
520 };
521
523
525
528 }
529
532 }
533
534 private:
537
538 std::error_code connect_ec_{};
539
541
543
544 // events for router.trace.
546
547 // where to target the server-connections if access_mode is kAuto
548 //
549 // - Unavailable -> any destination (at connect)
550 // - ReadOnly -> expect a destination in read-only mode
551 // prefer read-only servers over read-write servers
552 // - ReadWrite -> expect a destination in read-write mode,
553 // if none is available fail the statement/connection.
554 //
557
558 // server-mode of the server-connection.
559 //
560 // - Unavailable -> server mode is still unknown or ignored.
561 // - ReadOnly -> server is used as read-only. (MUST be read-only)
562 // - ReadWrite -> server is used as read-write.(MUST be read-write)
563 //
564 // used to pick a subset of the available destinations at connect time.
567
568 // wait for 'gtid_at_least_executed_' with switch to a read-only destination?
570
571 // GTID to wait for. May be overwritten by client with query attributes.
573
574 // timeout for read your own writes. Setable with query attributes.
576
578};
579
580#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
void client_address(const std::string &dest)
Definition: connection.h:105
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:422
ClientSideConnection client_conn_
Definition: classic_connection_base.h:460
std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_characteristics_
Definition: classic_connection_base.h:476
bool wait_for_my_writes_
Definition: classic_connection_base.h:569
bool authenticated_
Definition: classic_connection_base.h:370
RouteDestination * destinations()
Definition: classic_connection_base.h:429
void destination_id(const std::string &id)
Definition: classic_connection_base.h:274
const ServerSideConnection::protocol_state_type & server_protocol() const
Definition: classic_connection_base.h:256
mysqlrouter::ServerMode expected_server_mode_
Definition: classic_connection_base.h:555
void requires_client_cert(bool v)
set if the server-connection requires a client cert
Definition: classic_connection_base.h:393
std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_characteristics() const
Definition: classic_connection_base.h:441
const ClientSideConnection::protocol_state_type & client_protocol() const
Definition: classic_connection_base.h:248
void reset_to_initial()
reset the connection's settings to the initial-values.
Definition: classic_connection_base.cc:999
TraceSpan events_
Definition: classic_connection_base.h:545
bool connection_sharing_possible() const
check if connection sharing is possible.
Definition: classic_connection_base.cc:843
bool authenticated() const
check if the connection is authenticated.
Definition: classic_connection_base.h:335
bool collation_connection_maybe_dirty_
Definition: classic_connection_base.h:479
std::optional< net::ip::tcp::endpoint > read_write_destination_endpoint() const override
Definition: classic_connection_base.h:316
bool requires_client_cert_
Definition: classic_connection_base.h:483
virtual void stash_server_conn()
Definition: classic_connection_base.cc:1032
void on_handshake_received()
Definition: classic_connection_base.cc:99
void recv_server_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:138
Destinations destinations_
Definition: classic_connection_base.h:458
void destination_endpoint(const std::optional< net::ip::tcp::endpoint > &ep)
Definition: classic_connection_base.h:301
std::optional< net::ip::tcp::endpoint > rw_destination_endpoint_
Definition: classic_connection_base.h:466
std::optional< classic_protocol::session_track::TransactionState > trx_state() const
Definition: classic_connection_base.h:451
void pop_processor()
Definition: classic_connection_base.h:189
void current_server_mode(mysqlrouter::ServerMode v)
Definition: classic_connection_base.h:407
void async_recv_server(Function next)
Definition: classic_connection_base.cc:288
virtual void async_run()
Definition: classic_connection_base.h:124
ExecutionContext exec_ctx_
Definition: classic_connection_base.h:490
void trx_characteristics(std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_chars)
Definition: classic_connection_base.h:445
void wait_for_my_writes(bool v)
Definition: classic_connection_base.h:414
net::steady_timer connect_timer_
Definition: classic_connection_base.h:536
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:61
std::optional< net::ip::tcp::endpoint > destination_endpoint() const override
Definition: classic_connection_base.h:295
void server_socket_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:165
void call_next_function(Function next)
Definition: classic_connection_base.h:154
bool diagnostic_area_changed_
Definition: classic_connection_base.h:540
void collation_connection_maybe_dirty(bool val)
Definition: classic_connection_base.h:432
ServerSideConnection & server_conn()
Definition: classic_connection_base.h:263
void authenticated(bool v)
Definition: classic_connection_base.h:336
net::steady_timer & connect_timer()
Definition: classic_connection_base.h:502
void send_client_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:147
bool connection_sharing_allowed() const
check if connection sharing is allowed.
Definition: classic_connection_base.cc:954
void has_transient_error_at_connect(bool val)
Definition: classic_connection_base.h:526
bool requires_tls() const
get if the server-connection requires TLS
Definition: classic_connection_base.h:390
bool has_transient_error_at_connect() const
Definition: classic_connection_base.h:530
SslMode source_ssl_mode() const
Definition: classic_connection_base.h:114
mysqlrouter::ServerMode current_server_mode() const
Definition: classic_connection_base.h:410
static std::shared_ptr< MysqlRoutingClassicConnectionBase > create(Args &&...args)
Definition: classic_connection_base.h:94
void async_send_server(Function next)
Definition: classic_connection_base.cc:261
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:484
void trace_and_call_function(Tracer::Event::Direction dir, std::string_view stage, Function func)
Definition: classic_connection_base.cc:793
std::string connection_sharing_blocked_by() const
Definition: classic_connection_base.cc:961
std::string read_only_destination_id() const override
Definition: classic_connection_base.h:280
const ClientSideConnection & client_conn() const
Definition: classic_connection_base.h:261
std::string ro_destination_id_
Definition: classic_connection_base.h:464
virtual void client_socket_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:182
ServerSideConnection::protocol_state_type & server_protocol()
Definition: classic_connection_base.h:252
void read_write_destination_id(const std::string &destination_id)
Definition: classic_connection_base.h:291
void connect_error_code(const std::error_code &ec)
Definition: classic_connection_base.h:504
std::optional< net::ip::tcp::endpoint > read_only_destination_endpoint() const override
Definition: classic_connection_base.h:307
std::optional< classic_protocol::session_track::TransactionState > trx_state_
Definition: classic_connection_base.h:474
void async_send_client(Function next)
Definition: classic_connection_base.cc:211
void on_handshake_aborted()
Definition: classic_connection_base.cc:112
std::shared_ptr< MysqlRoutingClassicConnectionBase > getptr()
Definition: classic_connection_base.h:101
void disconnect() override
Definition: classic_connection_base.cc:397
Destinations & current_destinations()
Definition: classic_connection_base.h:430
bool some_state_changed_
Definition: classic_connection_base.h:477
bool requires_tls_
Definition: classic_connection_base.h:481
int active_work_
Definition: classic_connection_base.h:368
std::string rw_destination_id_
Definition: classic_connection_base.h:463
void gtid_at_least_executed(const std::string &gtid)
Definition: classic_connection_base.h:417
TraceSpan & events()
Definition: classic_connection_base.h:513
void requires_tls(bool v)
set if the server-connection requires TLS
Definition: classic_connection_base.h:387
SslMode dest_ssl_mode() const
Definition: classic_connection_base.h:116
void async_recv_client(Function next)
Definition: classic_connection_base.cc:238
void connection_sharing_allowed_reset()
reset the connection-sharing state.
Definition: classic_connection_base.cc:993
void send_server_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:129
void some_state_changed(bool v)
Definition: classic_connection_base.h:398
bool requires_client_cert() const
get if the server-connection requires a client cert
Definition: classic_connection_base.h:396
void server_side_client_greeting()
Definition: classic_connection_base.cc:419
void async_wait_send_server(Function next)
Definition: classic_connection_base.cc:380
FromEither
Definition: classic_connection_base.h:515
void expected_server_mode(mysqlrouter::ServerMode v)
Definition: classic_connection_base.h:400
std::vector< std::unique_ptr< BasicProcessor > > processors_
Definition: classic_connection_base.h:182
bool has_transient_error_at_connect_
Definition: classic_connection_base.h:577
RouteDestination * route_destination_
Definition: classic_connection_base.h:457
FromEither recv_from_either_
Definition: classic_connection_base.h:542
void push_processor(std::unique_ptr< BasicProcessor > processor)
Definition: classic_connection_base.h:185
FromEither recv_from_either() const
Definition: classic_connection_base.h:524
mysqlrouter::ServerMode current_server_mode_
Definition: classic_connection_base.h:565
std::string gtid_at_least_executed_
Definition: classic_connection_base.h:572
bool in_handshake_
client side handshake isn't finished yet.
Definition: classic_connection_base.h:472
void read_only_destination_endpoint(const std::optional< net::ip::tcp::endpoint > &ep)
Definition: classic_connection_base.h:311
std::optional< net::ip::tcp::endpoint > ro_destination_endpoint_
Definition: classic_connection_base.h:467
std::error_code connect_ec_
Definition: classic_connection_base.h:538
ExecutionContext & execution_context()
Definition: classic_connection_base.h:486
net::impl::socket::native_handle_type get_client_fd() const override
Definition: classic_connection_base.h:118
net::steady_timer & read_timer()
Definition: classic_connection_base.h:501
ClientSideConnection::protocol_state_type & client_protocol()
Definition: classic_connection_base.h:244
void read_only_destination_id(const std::string &destination_id)
Definition: classic_connection_base.h:284
const TraceSpan & events() const
Definition: classic_connection_base.h:512
void read_write_destination_endpoint(const std::optional< net::ip::tcp::endpoint > &ep)
Definition: classic_connection_base.h:321
ClientSideConnection & client_conn()
Definition: classic_connection_base.h:260
void async_recv_both(Function next)
Definition: classic_connection_base.cc:307
void loop()
Definition: classic_connection_base.cc:803
void recv_from_either(FromEither v)
Definition: classic_connection_base.h:522
const ServerSideConnection & server_conn() const
Definition: classic_connection_base.h:264
std::string get_destination_id() const override
Definition: classic_connection_base.h:268
bool wait_for_my_writes() const
Definition: classic_connection_base.h:415
std::chrono::seconds wait_for_my_writes_timeout_
Definition: classic_connection_base.h:575
virtual void done()
Definition: classic_connection_base.cc:481
void resume()
Definition: classic_connection_base.h:145
net::steady_timer read_timer_
Definition: classic_connection_base.h:535
Tracer tracer_
Definition: classic_connection_base.h:498
void recv_client_failed(std::error_code ec, bool call_finish=true)
Definition: classic_connection_base.cc:156
void finish()
Definition: classic_connection_base.cc:433
ServerSideConnection server_conn_
Definition: classic_connection_base.h:461
void diagnostic_area_changed(bool diagnostic_area_changed)
Definition: classic_connection_base.h:507
Function
Definition: classic_connection_base.h:148
const ExecutionContext & execution_context() const
Definition: classic_connection_base.h:487
std::string read_write_destination_id() const override
Definition: classic_connection_base.h:288
bool greeting_from_router() const
if the router is sending the initial server-greeting.
Definition: classic_connection_base.h:380
mysqlrouter::ServerMode expected_server_mode() const
Definition: classic_connection_base.h:403
Tracer & tracer()
Definition: classic_connection_base.h:495
void trace(Tracer::Event e)
Definition: classic_connection_base.h:493
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:510
void wait_for_my_writes_timeout(std::chrono::seconds timeout)
Definition: classic_connection_base.h:425
std::error_code connect_error_code() const
Definition: classic_connection_base.h:505
std::string gtid_at_least_executed() const
Definition: classic_connection_base.h:420
bool collation_connection_maybe_dirty() const
Definition: classic_connection_base.h:436
Manage destinations for a Connection Routing.
Definition: destination.h:189
Definition: classic_protocol_state.h:375
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: 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:314