boostorg / mysql

MySQL C++ client based on Boost.Asio
https://www.boost.org/doc/libs/master/libs/mysql
Boost Software License 1.0
259 stars 33 forks source link

Remove UB regarding connection state for async functions in any_connections #367

Open anarthal opened 1 month ago

anarthal commented 1 month ago

We currently have a surprisingly big number of places where initiating an async operation derives in unpredictable and/or undefined behavior, . Since the introduction of any_connection, which does not expose the stream, all of these can be fixed to fail in a predictable way, without overhead. These are:

A simple state machine in any_connection should suffice.