2
0
mirror of https://github.com/boostorg/mysql.git synced 2026-01-23 17:52:12 +00:00

47 Commits

Author SHA1 Message Date
Anarthal (Rubén Pérez)
6a82609638 caching_sha2_password can now be used without TLS
Fixed a problem that caused pfr_by_name<T> to fail compilation when T has no fields under older clang/libc++ versions.

close #313
close #483
2025-06-07 13:20:48 +02:00
Anarthal (Rubén Pérez)
90405e79e4 Handshake is now more resilient
Errors issued by the server for caching_sha2_password users after a fast
auth OK packet has been received (e.g. bad database errors) are now
reported correctly
Handshake now correctly detects protocol violation errors, like double
auth switches

close #469 
close #468
2025-05-07 13:11:52 +02:00
Anarthal (Rubén Pérez)
cbe9270253 Added handshake unit tests
close #442
2025-04-25 17:10:34 +02:00
Anarthal (Rubén Pérez)
3868d8a0cf Added unit tests for the close connection algorithm
close #445
2025-02-19 16:13:23 +01:00
Anarthal (Rubén Pérez)
41a674628f Added quit_connection unit tests and refactored
Quit now correctly marks TLS as terminated, even if it encounters an error
Removed ssl_state

close #444
2025-02-17 18:46:46 +01:00
Anarthal (Rubén Pérez)
793b678287 Updated file copyrights to 2025 2025-02-11 20:42:41 +01:00
Anarthal (Rubén Pérez)
bb568ba071 Documented connection_pool execution semantics
Refactored pool internals to remove wait_group
Added an external strand thread-safety test

close #361
2024-10-10 15:52:17 +02:00
Anarthal (Rubén Pérez)
146b555817 Replaced run_with_timeout by asio::cancel_after
close #351
2024-10-04 11:35:02 +02:00
Anarthal (Rubén Pérez)
e39c978514 Removed the global io_context in tests
Now tests are independent of each other
Refactor common utilities for separate compilation
2024-09-28 19:36:43 +02:00
Anarthal (Rubén Pérez)
e72b4906af Removed connection_pool::async_get_connection timeout overloads
Please use asio::cancel_after, instead.
Replaced client_errc::timeout, client_errc::cancelled by
    client_errc::no_connection_available, client_errc::pool_cancelled
async_get_connection no longer uses the last connect error code as failure error code,
    but embeds this info in the output diagnostics

close #349
2024-09-26 08:30:52 +02:00
Anarthal (Rubén Pérez)
0f843cd963 Refactored connection_pool unit tests
Removed IoTraits
Removed mock_timer_service
Simplified connection_pool_impl unit tests
2024-09-16 17:32:41 +02:00
René Ferdinand Rivera Morell
69c457a3e7 Add support for modular build structure 2024-08-19 09:40:08 +02:00
Anarthal (Rubén Pérez)
95a9aa1068 Added with_diagnostics completion token
Made with_diagnostics(deferred) the default token for any_connection and
connection_pool.
throw_on_error is now marked as legacy.

close #329 
close #296
2024-08-13 10:48:49 +02:00
Anarthal (Rubén Pérez)
a20fc3e5ea Added with_params
close #218
2024-08-01 12:59:56 +02:00
Anarthal (Rubén Pérez)
f76e17c37b Using an unconnected any_connection no longer crashes
Refactored `variant_stream` and added tests

close #230 
close #321
2024-07-29 13:37:01 +02:00
Anarthal (Rubén Pérez)
77361353a5 Added formattable_ref
format_context_base::append_value now uses formattable_ref instead of being a template

close #284
2024-06-23 18:35:26 +02:00
Anarthal (Rubén Pérez)
80a86189e9 Support for ranges in client-side SQL formatting
close #280
2024-06-22 11:48:45 +02:00
Anarthal (Rubén Pérez)
08abb5d073 Client-side SQL formatting now supports specifiers
Added the 'i' and 'r' specifiers
Removed the identifier class

close #217
2024-06-17 21:53:07 +02:00
Anarthal (Rubén Pérez)
9ba4f9dfed Pipeline API
Removed sansio_algorithm base class

close #75
2024-06-08 12:47:42 +02:00
Anarthal (Rubén Pérez)
77de54cf2c any_stream->engine, asio::coroutine ODR violation fix
Fixed a potential ODR violation with `asio::coroutine` under MSVC, manifesting as sporadic test failures under release configurations.
`any_stream` has been replaced by the internal `EngineStream` concept
and the `engine` interface.
`algo_runner` has been replaced by `top_level_algo`, improving algorithm
type-erasing

This change is required by #195 and beneficial for #75
close #259
2024-05-10 14:03:05 +02:00
Anarthal (Rubén Pérez)
03f1dd5df2 Pipeline-friendly serialization
Updated the serialization functions to take framing into account when
serializing. This is a requirement to implement #75.

close #255
2024-05-08 11:02:19 +02:00
Anarthal (Rubén Pérez)
75c7415118 Added is_fatal_error
Updated osx CIs to run in macos-latest (macos 14)

close #253
2024-04-30 16:17:16 +02:00
Anarthal (Rubén Pérez)
60eb2b6764 Removed the deprecated execution API
close #250
2024-04-20 13:01:38 +02:00
Anarthal (Rubén Pérez)
7eec4954a7 Added support for Boost.PFR in the static interface
target_include_directories no longer uses the SYSTEM option

close #185
2024-04-18 15:52:00 +02:00
Anarthal (Rubén Pérez)
343006142b Test Jamfiles now use the built-in OpenSSL module
Added a Linux b2 build without OpenSSL
Fixed issue in install_boost.py that made rebuilds to error
Removed workaround for https://github.com/boostorg/boost/issues/711
Changed boost.mysql.use-ts-executor default value to off

close #235
2024-03-27 16:43:37 +01:00
Anarthal (Rubén Pérez)
e68ff579c3 Moved Valgrind functionality to b2
close #239
2024-03-16 14:32:37 +01:00
Ruben Perez
d8b69d0e78 Bumped copyright to 2024 2024-02-18 12:48:14 +01:00
Ruben Perez
ce53f3e0c0 Support for BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
Fixed connection_pool to build under this macro
Fixed tests and examples to build under this macro
Added CIs for this macro

close #184
2024-02-16 17:27:31 +01:00
Ruben Perez
d6bc5092e6 Deprecation warnings for the old execution interface
connection::query, start_query, execute_statement,
    start_statement_execution and their async counterparts
    now trigger a deprecation warning.

close #220
2024-02-15 18:24:04 +01:00
Ruben Perez
5e8992ba88 Client-side SQL formatting functions
Added format_sql, format_sql_to and basic_format_context
Boost.Charconv is now a mandatory dependency
Text queries are now locale-independent
any_connection::current_character_set now uses system::result
Added any_connection::format_opts
field_view, field and statement::bind now disallow character types
escape_string can now be used with any OutputString type
Added constant_string_view
character_set now uses string_view and span
set_character_set hardening

close #69
close #208
2024-02-15 16:02:39 +01:00
Ruben Perez
bf2eb59692 Character set tracking
Added current_character_set and set_character_set

close #206
2024-01-26 22:23:45 +01:00
Ruben Perez
88d12feb58 Added escape_string and character_set
Added any_connection::backslash_escapes
Added utf8mb4_charset and latin1_charset

close #202
2024-01-02 21:51:38 +01:00
Ruben Perez
bc5577ede5 Connection pool
Added any_connection and any_address
Added connection_pool and pooled_connection
Added thread_safety tests
Added defaults.hpp header

close 19
2023-12-20 18:46:31 +01:00
Ruben Perez
c35b404af7 Implementation now uses a sans-io strategy
close #179
2023-10-30 18:16:43 +01:00
Ruben Perez
c60de9cee4 Support for reset_connection
Refactored integration tests network functions

Close #141
2023-07-14 16:27:31 +02:00
Ruben Perez
88fbe387ac Separate compilation
Separate compilation
Immediate completions are now posted through the I/O executor
Jamfiles now correctly requires C++11
Refactored the protocol and channel modules
Removed example on default completion tokens

close #23
close #112
2023-06-22 12:03:24 +02:00
Ruben Perez
b51115668d Added support for the static interface
Added support for the static interface
Statement execution now supports bool and optionals
Replaced the FieldLikeTuple and FieldLike concepts
    by WritableFieldTuple and WritableField
Added diagnostics::client_message
Solved a problem with blob types and stored procedures
    under MariaDB
Removed a troublesome assert in row_impl
Protected numeric_limits min/max from intrusive macros
Added C++11/14 order management examples
Documentation section collapsing
Test Jamfiles now show output only on failure

close #60
close #153
close #154
2023-05-22 14:05:12 +02:00
Ruben Perez
0571e4b886 Generic execute and start_execution functions
Added execute, start_execution, ExecutionRequest and
    statement::bind. Deprecated query, execute_statement,
    start_query and start_statement_execution.
Statements can now be executed specifying parameters
    as iterator ranges.
Fixed a bug that caused build problems when FieldViewForwardIterator's
    reference is convertible to field_view, but not field_view.

Close #111
Close #137
Close #138
2023-04-03 16:31:33 +02:00
Ruben Perez
ed007e31ae Multi-resultset
Added support for running stored procedures that SELECT data
Added support for running multiple semicolon-separated queries
Added support for running stored procedures with OUT params
Added resultset and resultset_view
Fixed documentation typos and wording
Refactored object creation in tests

Close #133
Close #132
Close #8
2023-03-31 00:44:46 +02:00
Ruben Perez
fb87e840f0 Separate mysql and mariadb error codes.
Separate error categories for common, mysql and mariadb codes.
DB "flavor" detection.
CI mechanism to run db-specific integration tests.
Recovered PCHs in cmake and made them more sane.

close #108
2023-02-20 00:42:14 +01:00
Ruben Perez
527df790f8 Future-proof renames
resultset has been renamed to results, to support multi-resultset
    without changing the API.
server_diagnostics has been renamed to diagnostics, allowing
    the library to emit future client diagnostics
server_error has been renamed to error_with_diagnostics
throw_on_error semantics have been simplified
field::emplace_xxx functions have been removed (redundant)
connection::read_one_row has been removed (redundant)

close #119
2023-02-15 19:44:32 +01:00
Ruben Perez
08420ebdb9 Prepared statements are no longer I/O objects.
Prepared statements are no longer I/O objects.
Closing a statement no longer resets it.
Statements are no longer required to be kept alive
    during async execution and close.
close #118
2023-02-15 12:56:57 +01:00
Ruben Perez
4962a64a87 Added ping support.
Integration tests network variant refactor.
close #62
2023-02-06 11:55:16 +01:00
Ruben Perez
7f583f4409 Hide all internal API functions from public classes
Hide all internal API functions from public classes.
Removed operator<< for row and row_view.
Moved ssl_mode to a separate header file.
Changed metadata_collection_view to use boost::span.

Close #79
2023-01-18 12:14:31 +01:00
Ruben Perez
ac7285c621 server_diagnostics and client/server error categories.
Renamed error_info to server_diagnostics.
server_diagnostics::message is now correctly treated as user-supplied input
  (security fix). Added notes on examples on this.
Split server and client errors in different categories.
Added throw_on_error.
Added connection::rebind_executor.
Made error categories public.
Exception throwing now uses Boost.Exception.
Improved error handling in examples.
Updated Asio dependencies for stackful coroutines.

Close #64
Close #107
2023-01-17 19:41:21 +01:00
Ruben Perez
31bc3b9dac Copyright year bump 2022-12-31 16:28:59 +01:00
Ruben Perez
a975273490 Multi-function operations
Added proper support for multi-function operations, segregating
  the API in single-function and multi-function operations.
  Removed resultset as I/O object, the read_xxx owning functions
  and read_all.
Unit test infrastructure for async testing.
Reference types lifetime fixes.
Removed connection::valid.
Fixed a serialization bug for statements with no parameters.
Binary protocol strings now use the type recommended by MySQL.
Refactored Jamfile to match best practices.
Updated description in libraries.json.

Close #82
Close #81
Close #73
Close #59
Close #58
Close #53
Close #41
Close #22
2022-12-31 15:49:09 +01:00