2
0
mirror of https://github.com/boostorg/mysql.git synced 2026-01-27 07:02:11 +00:00
Files
mysql/test/unit/include/test_unit/test_any_connection.hpp
Anarthal (Rubén Pérez) 33660e2710 Starting operations while engaged in multi-function ops is no longer UB
Attempting to start an operation involving server communication after a
multi-function operation has been started and before all its associated
packets have been read now fails with
client_errc::engaged_in_multi_function, instead of causing undefined
behavior.
Attempting to start a read_some_rows or read_resultset_head operation
with no in-progress multi-function operation now fails with
client_errc::not_engaged_in_multi_function.
Attempting to start an operation that requires an established session
before a successful connect now fails with client_errc::not_connected.
Added the three client_errc enum values mentioned above.
Renamed detail::connection_status (connection_pool) to node_status.
Added detail::connection_status (connection_state_data).
Removed redundant spotcheck tests.

close #448 
close #450
2025-02-22 19:15:03 +01:00

35 lines
945 B
C++

//
// Copyright (c) 2019-2025 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_MYSQL_TEST_UNIT_INCLUDE_TEST_UNIT_TEST_ANY_CONNECTION_HPP
#define BOOST_MYSQL_TEST_UNIT_INCLUDE_TEST_UNIT_TEST_ANY_CONNECTION_HPP
#include <boost/mysql/any_connection.hpp>
#include <boost/mysql/impl/internal/sansio/connection_state_data.hpp>
#include <boost/asio/io_context.hpp>
#include "test_unit/test_stream.hpp"
namespace boost {
namespace mysql {
namespace test {
any_connection create_test_any_connection(
asio::io_context& ctx,
any_connection_params params = {},
detail::connection_status initial_status = detail::connection_status::ready
);
test_stream& get_stream(any_connection& conn);
} // namespace test
} // namespace mysql
} // namespace boost
#endif